<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.1//EN"
"http://www.w3.org/TR/xhtml11/DTD/xhtml11.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head><meta http-equiv="content-type" content="text/html; charset=utf-8" />
<title>[198447] trunk</title>
</head>
<body>

<style type="text/css"><!--
#msg dl.meta { border: 1px #006 solid; background: #369; padding: 6px; color: #fff; }
#msg dl.meta dt { float: left; width: 6em; font-weight: bold; }
#msg dt:after { content:':';}
#msg dl, #msg dt, #msg ul, #msg li, #header, #footer, #logmsg { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt;  }
#msg dl a { font-weight: bold}
#msg dl a:link    { color:#fc3; }
#msg dl a:active  { color:#ff0; }
#msg dl a:visited { color:#cc6; }
h3 { font-family: verdana,arial,helvetica,sans-serif; font-size: 10pt; font-weight: bold; }
#msg pre { overflow: auto; background: #ffc; border: 1px #fa0 solid; padding: 6px; }
#logmsg { background: #ffc; border: 1px #fa0 solid; padding: 1em 1em 0 1em; }
#logmsg p, #logmsg pre, #logmsg blockquote { margin: 0 0 1em 0; }
#logmsg p, #logmsg li, #logmsg dt, #logmsg dd { line-height: 14pt; }
#logmsg h1, #logmsg h2, #logmsg h3, #logmsg h4, #logmsg h5, #logmsg h6 { margin: .5em 0; }
#logmsg h1:first-child, #logmsg h2:first-child, #logmsg h3:first-child, #logmsg h4:first-child, #logmsg h5:first-child, #logmsg h6:first-child { margin-top: 0; }
#logmsg ul, #logmsg ol { padding: 0; list-style-position: inside; margin: 0 0 0 1em; }
#logmsg ul { text-indent: -1em; padding-left: 1em; }#logmsg ol { text-indent: -1.5em; padding-left: 1.5em; }
#logmsg > ul, #logmsg > ol { margin: 0 0 1em 0; }
#logmsg pre { background: #eee; padding: 1em; }
#logmsg blockquote { border: 1px solid #fa0; border-left-width: 10px; padding: 1em 1em 0 1em; background: white;}
#logmsg dl { margin: 0; }
#logmsg dt { font-weight: bold; }
#logmsg dd { margin: 0; padding: 0 0 0.5em 0; }
#logmsg dd:before { content:'\00bb';}
#logmsg table { border-spacing: 0px; border-collapse: collapse; border-top: 4px solid #fa0; border-bottom: 1px solid #fa0; background: #fff; }
#logmsg table th { text-align: left; font-weight: normal; padding: 0.2em 0.5em; border-top: 1px dotted #fa0; }
#logmsg table td { text-align: right; border-top: 1px dotted #fa0; padding: 0.2em 0.5em; }
#logmsg table thead th { text-align: center; border-bottom: 1px solid #fa0; }
#logmsg table th.Corner { text-align: left; }
#logmsg hr { border: none 0; border-top: 2px dashed #fa0; height: 1px; }
#header, #footer { color: #fff; background: #636; border: 1px #300 solid; padding: 6px; }
#patch { width: 100%; }
#patch h4 {font-family: verdana,arial,helvetica,sans-serif;font-size:10pt;padding:8px;background:#369;color:#fff;margin:0;}
#patch .propset h4, #patch .binary h4 {margin:0;}
#patch pre {padding:0;line-height:1.2em;margin:0;}
#patch .diff {width:100%;background:#eee;padding: 0 0 10px 0;overflow:auto;}
#patch .propset .diff, #patch .binary .diff  {padding:10px 0;}
#patch span {display:block;padding:0 10px;}
#patch .modfile, #patch .addfile, #patch .delfile, #patch .propset, #patch .binary, #patch .copfile {border:1px solid #ccc;margin:10px 0;}
#patch ins {background:#dfd;text-decoration:none;display:block;padding:0 10px;}
#patch del {background:#fdd;text-decoration:none;display:block;padding:0 10px;}
#patch .lines, .info {color:#888;background:#fff;}
--></style>
<div id="msg">
<dl class="meta">
<dt>Revision</dt> <dd><a href="http://trac.webkit.org/projects/webkit/changeset/198447">198447</a></dd>
<dt>Author</dt> <dd>mark.lam@apple.com</dd>
<dt>Date</dt> <dd>2016-03-18 16:14:34 -0700 (Fri, 18 Mar 2016)</dd>
</dl>

<h3>Log Message</h3>
<pre>ES6 spec requires that RegExpPrototype not be a RegExp object.
https://bugs.webkit.org/show_bug.cgi?id=155654

Reviewed by Filip Pizlo.

Source/JavaScriptCore:

The ES6 spec states that RegExp.prototype should not be an instance of RegExp:
https://tc39.github.io/ecma262/#sec-properties-of-the-regexp-prototype-object

&quot;The RegExp prototype object is an ordinary object. It is not a RegExp instance
and does not have a [[RegExpMatcher]] internal slot or any of the other internal
slots of RegExp instance objects.&quot;

This patch changes RegExpPrototype to conform to the above specifications.

* runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
* runtime/RegExpConstructor.cpp:
(JSC::RegExpConstructor::RegExpConstructor):
(JSC::RegExpConstructor::finishCreation):
* runtime/RegExpPrototype.cpp:
(JSC::RegExpPrototype::RegExpPrototype):
(JSC::RegExpPrototype::finishCreation):
(JSC::RegExpPrototype::getOwnPropertySlot):
(JSC::RegExpPrototype::visitChildren):
(JSC::regExpProtoFuncTest):
* runtime/RegExpPrototype.h:
(JSC::RegExpPrototype::create):
(JSC::RegExpPrototype::createStructure):
(JSC::RegExpPrototype::emptyRegExp):

* tests/es6.yaml:
- This patch makes the es6/miscellaneous_built-in_prototypes_are_not_instances.js
  test now pass.  However, the kangax version of this test still fails because
  it also checks Error objects (which will be fixed in a subsequent patch).

* tests/mozilla/ecma_2/shell.js:
(stringify):
(test):
(getFailedCases):
(err):
* tests/stress/static-getter-in-names.js:
(shouldBe):

LayoutTests:

Rebase all the test results.

* fast/regex/script-tests/toString.js:
* fast/regex/toString-expected.txt:
* ietestcenter/Javascript/15.10.6-expected.txt:
* ietestcenter/Javascript/15.10.7.1-1-expected.txt:
* ietestcenter/Javascript/15.10.7.2-1-expected.txt:
* ietestcenter/Javascript/15.10.7.3-1-expected.txt:
* ietestcenter/Javascript/15.10.7.4-1-expected.txt:
* ietestcenter/Javascript/15.10.7.5-1-expected.txt:
* ietestcenter/Javascript/TestCases/15.10.6.js:
(ES5Harness.registerTest.test):
* ietestcenter/Javascript/TestCases/15.10.7.1-1.js:
(ES5Harness.registerTest.test):
* ietestcenter/Javascript/TestCases/15.10.7.2-1.js:
(ES5Harness.registerTest.test):
* ietestcenter/Javascript/TestCases/15.10.7.3-1.js:
(ES5Harness.registerTest.test):
* ietestcenter/Javascript/TestCases/15.10.7.4-1.js:
(ES5Harness.registerTest.test):
* ietestcenter/Javascript/TestCases/15.10.7.5-1.js:
(ES5Harness.registerTest.test):
* js/Object-getOwnPropertyNames-expected.txt:
* js/kde/RegExp-expected.txt:
* js/kde/script-tests/RegExp.js:
* js/script-tests/Object-getOwnPropertyNames.js:
* sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.6/S15.10.6_A2-expected.txt:</pre>

<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastregexscriptteststoStringjs">trunk/LayoutTests/fast/regex/script-tests/toString.js</a></li>
<li><a href="#trunkLayoutTestsfastregextoStringexpectedtxt">trunk/LayoutTests/fast/regex/toString-expected.txt</a></li>
<li><a href="#trunkLayoutTestsietestcenterJavascript15106expectedtxt">trunk/LayoutTests/ietestcenter/Javascript/15.10.6-expected.txt</a></li>
<li><a href="#trunkLayoutTestsietestcenterJavascript1510711expectedtxt">trunk/LayoutTests/ietestcenter/Javascript/15.10.7.1-1-expected.txt</a></li>
<li><a href="#trunkLayoutTestsietestcenterJavascript1510721expectedtxt">trunk/LayoutTests/ietestcenter/Javascript/15.10.7.2-1-expected.txt</a></li>
<li><a href="#trunkLayoutTestsietestcenterJavascript1510731expectedtxt">trunk/LayoutTests/ietestcenter/Javascript/15.10.7.3-1-expected.txt</a></li>
<li><a href="#trunkLayoutTestsietestcenterJavascript1510741expectedtxt">trunk/LayoutTests/ietestcenter/Javascript/15.10.7.4-1-expected.txt</a></li>
<li><a href="#trunkLayoutTestsietestcenterJavascript1510751expectedtxt">trunk/LayoutTests/ietestcenter/Javascript/15.10.7.5-1-expected.txt</a></li>
<li><a href="#trunkLayoutTestsietestcenterJavascriptTestCases15106js">trunk/LayoutTests/ietestcenter/Javascript/TestCases/15.10.6.js</a></li>
<li><a href="#trunkLayoutTestsietestcenterJavascriptTestCases1510711js">trunk/LayoutTests/ietestcenter/Javascript/TestCases/15.10.7.1-1.js</a></li>
<li><a href="#trunkLayoutTestsietestcenterJavascriptTestCases1510721js">trunk/LayoutTests/ietestcenter/Javascript/TestCases/15.10.7.2-1.js</a></li>
<li><a href="#trunkLayoutTestsietestcenterJavascriptTestCases1510731js">trunk/LayoutTests/ietestcenter/Javascript/TestCases/15.10.7.3-1.js</a></li>
<li><a href="#trunkLayoutTestsietestcenterJavascriptTestCases1510741js">trunk/LayoutTests/ietestcenter/Javascript/TestCases/15.10.7.4-1.js</a></li>
<li><a href="#trunkLayoutTestsietestcenterJavascriptTestCases1510751js">trunk/LayoutTests/ietestcenter/Javascript/TestCases/15.10.7.5-1.js</a></li>
<li><a href="#trunkLayoutTestsjsObjectgetOwnPropertyNamesexpectedtxt">trunk/LayoutTests/js/Object-getOwnPropertyNames-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjskdeRegExpexpectedtxt">trunk/LayoutTests/js/kde/RegExp-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjskdescripttestsRegExpjs">trunk/LayoutTests/js/kde/script-tests/RegExp.js</a></li>
<li><a href="#trunkLayoutTestsjsscripttestsObjectgetOwnPropertyNamesjs">trunk/LayoutTests/js/script-tests/Object-getOwnPropertyNames.js</a></li>
<li><a href="#trunkLayoutTestssputnikConformance15_Native_Objects1510_RegExp15106S15106_A2expectedtxt">trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.6/S15.10.6_A2-expected.txt</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeJSGlobalObjectcpp">trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeRegExpConstructorcpp">trunk/Source/JavaScriptCore/runtime/RegExpConstructor.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeRegExpPrototypecpp">trunk/Source/JavaScriptCore/runtime/RegExpPrototype.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeRegExpPrototypeh">trunk/Source/JavaScriptCore/runtime/RegExpPrototype.h</a></li>
<li><a href="#trunkSourceJavaScriptCoretestses6yaml">trunk/Source/JavaScriptCore/tests/es6.yaml</a></li>
<li><a href="#trunkSourceJavaScriptCoretestsmozillaecma_2shelljs">trunk/Source/JavaScriptCore/tests/mozilla/ecma_2/shell.js</a></li>
<li><a href="#trunkSourceJavaScriptCoretestsstressstaticgetterinnamesjs">trunk/Source/JavaScriptCore/tests/stress/static-getter-in-names.js</a></li>
</ul>

</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (198446 => 198447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-03-18 22:35:33 UTC (rev 198446)
+++ trunk/LayoutTests/ChangeLog        2016-03-18 23:14:34 UTC (rev 198447)
</span><span class="lines">@@ -1,3 +1,38 @@
</span><ins>+2016-03-18  Mark Lam  &lt;mark.lam@apple.com&gt;
+
+        ES6 spec requires that RegExpPrototype not be a RegExp object.
+        https://bugs.webkit.org/show_bug.cgi?id=155654
+
+        Reviewed by Filip Pizlo.
+
+        Rebase all the test results.
+
+        * fast/regex/script-tests/toString.js:
+        * fast/regex/toString-expected.txt:
+        * ietestcenter/Javascript/15.10.6-expected.txt:
+        * ietestcenter/Javascript/15.10.7.1-1-expected.txt:
+        * ietestcenter/Javascript/15.10.7.2-1-expected.txt:
+        * ietestcenter/Javascript/15.10.7.3-1-expected.txt:
+        * ietestcenter/Javascript/15.10.7.4-1-expected.txt:
+        * ietestcenter/Javascript/15.10.7.5-1-expected.txt:
+        * ietestcenter/Javascript/TestCases/15.10.6.js:
+        (ES5Harness.registerTest.test):
+        * ietestcenter/Javascript/TestCases/15.10.7.1-1.js:
+        (ES5Harness.registerTest.test):
+        * ietestcenter/Javascript/TestCases/15.10.7.2-1.js:
+        (ES5Harness.registerTest.test):
+        * ietestcenter/Javascript/TestCases/15.10.7.3-1.js:
+        (ES5Harness.registerTest.test):
+        * ietestcenter/Javascript/TestCases/15.10.7.4-1.js:
+        (ES5Harness.registerTest.test):
+        * ietestcenter/Javascript/TestCases/15.10.7.5-1.js:
+        (ES5Harness.registerTest.test):
+        * js/Object-getOwnPropertyNames-expected.txt:
+        * js/kde/RegExp-expected.txt:
+        * js/kde/script-tests/RegExp.js:
+        * js/script-tests/Object-getOwnPropertyNames.js:
+        * sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.6/S15.10.6_A2-expected.txt:
+
</ins><span class="cx"> 2016-03-18  Brent Fulgham  &lt;bfulgham@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         Local file restrictions should not block sessionStorage access
</span></span></pre></div>
<a id="trunkLayoutTestsfastregexscriptteststoStringjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/regex/script-tests/toString.js (198446 => 198447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/regex/script-tests/toString.js        2016-03-18 22:35:33 UTC (rev 198446)
+++ trunk/LayoutTests/fast/regex/script-tests/toString.js        2016-03-18 23:14:34 UTC (rev 198447)
</span><span class="lines">@@ -19,11 +19,11 @@
</span><span class="cx"> 
</span><span class="cx"> shouldBe(&quot;RegExp('/').source&quot;, '&quot;\\\\/&quot;');
</span><span class="cx"> shouldBe(&quot;RegExp('').source&quot;, '&quot;(?:)&quot;');
</span><del>-shouldBe(&quot;RegExp.prototype.source&quot;, '&quot;(?:)&quot;');
</del><ins>+shouldThrow(&quot;RegExp.prototype.source&quot;, '&quot;TypeError: Type error&quot;');
</ins><span class="cx"> 
</span><span class="cx"> shouldBe(&quot;RegExp('/').toString()&quot;, '&quot;/\\\\//&quot;');
</span><span class="cx"> shouldBe(&quot;RegExp('').toString()&quot;, '&quot;/(?:)/&quot;');
</span><del>-shouldBe(&quot;RegExp.prototype.toString()&quot;, '&quot;/(?:)/&quot;');
</del><ins>+shouldThrow(&quot;RegExp.prototype.toString()&quot;, '&quot;TypeError: Type error&quot;');
</ins><span class="cx"> 
</span><span class="cx"> // These strings are equivalent, since the '\' is identity escaping the '/' at the string level.
</span><span class="cx"> shouldBeTrue('testForwardSlash(&quot;^/$&quot;, &quot;/&quot;);');
</span></span></pre></div>
<a id="trunkLayoutTestsfastregextoStringexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/regex/toString-expected.txt (198446 => 198447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/regex/toString-expected.txt        2016-03-18 22:35:33 UTC (rev 198446)
+++ trunk/LayoutTests/fast/regex/toString-expected.txt        2016-03-18 23:14:34 UTC (rev 198447)
</span><span class="lines">@@ -5,10 +5,10 @@
</span><span class="cx"> 
</span><span class="cx"> PASS RegExp('/').source is &quot;\\/&quot;
</span><span class="cx"> PASS RegExp('').source is &quot;(?:)&quot;
</span><del>-PASS RegExp.prototype.source is &quot;(?:)&quot;
</del><ins>+PASS RegExp.prototype.source threw exception TypeError: Type error.
</ins><span class="cx"> PASS RegExp('/').toString() is &quot;/\\//&quot;
</span><span class="cx"> PASS RegExp('').toString() is &quot;/(?:)/&quot;
</span><del>-PASS RegExp.prototype.toString() is &quot;/(?:)/&quot;
</del><ins>+PASS RegExp.prototype.toString() threw exception TypeError: Type error.
</ins><span class="cx"> PASS testForwardSlash(&quot;^/$&quot;, &quot;/&quot;); is true
</span><span class="cx"> PASS testForwardSlash(&quot;^/$&quot;, &quot;/&quot;); is true
</span><span class="cx"> PASS testForwardSlash(&quot;^\/$&quot;, &quot;/&quot;); is true
</span></span></pre></div>
<a id="trunkLayoutTestsietestcenterJavascript15106expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ietestcenter/Javascript/15.10.6-expected.txt (198446 => 198447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ietestcenter/Javascript/15.10.6-expected.txt        2016-03-18 22:35:33 UTC (rev 198446)
+++ trunk/LayoutTests/ietestcenter/Javascript/15.10.6-expected.txt        2016-03-18 23:14:34 UTC (rev 198447)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-15.10.6 (TestCases/chapter15/15.10/15.10.6/15.10.6.js) RegExp.prototype is itself a RegExp
</del><ins>+15.10.6 (TestCases/chapter15/15.10/15.10.6/15.10.6.js) RegExp.prototype is not a RegExp
</ins><span class="cx"> 
</span><span class="cx"> On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsietestcenterJavascript1510711expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ietestcenter/Javascript/15.10.7.1-1-expected.txt (198446 => 198447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ietestcenter/Javascript/15.10.7.1-1-expected.txt        2016-03-18 22:35:33 UTC (rev 198446)
+++ trunk/LayoutTests/ietestcenter/Javascript/15.10.7.1-1-expected.txt        2016-03-18 23:14:34 UTC (rev 198447)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-15.10.7.1-1 (TestCases/chapter15/15.10/15.10.7/15.10.7.1/15.10.7.1-1.js) RegExp.prototype.source is of type String
</del><ins>+15.10.7.1-1 (TestCases/chapter15/15.10/15.10.7/15.10.7.1/15.10.7.1-1.js) RegExp.prototype.source should throw because RegExp.prototype is not a RegExp
</ins><span class="cx"> 
</span><span class="cx"> On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsietestcenterJavascript1510721expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ietestcenter/Javascript/15.10.7.2-1-expected.txt (198446 => 198447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ietestcenter/Javascript/15.10.7.2-1-expected.txt        2016-03-18 22:35:33 UTC (rev 198446)
+++ trunk/LayoutTests/ietestcenter/Javascript/15.10.7.2-1-expected.txt        2016-03-18 23:14:34 UTC (rev 198447)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-15.10.7.2-1 (TestCases/chapter15/15.10/15.10.7/15.10.7.2/15.10.7.2-1.js) RegExp.prototype.global is of type Boolean
</del><ins>+15.10.7.2-1 (TestCases/chapter15/15.10/15.10.7/15.10.7.2/15.10.7.2-1.js) RegExp.prototype.global should throw because RegExp.prototype is not a RegExp
</ins><span class="cx"> 
</span><span class="cx"> On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsietestcenterJavascript1510731expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ietestcenter/Javascript/15.10.7.3-1-expected.txt (198446 => 198447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ietestcenter/Javascript/15.10.7.3-1-expected.txt        2016-03-18 22:35:33 UTC (rev 198446)
+++ trunk/LayoutTests/ietestcenter/Javascript/15.10.7.3-1-expected.txt        2016-03-18 23:14:34 UTC (rev 198447)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-15.10.7.3-1 (TestCases/chapter15/15.10/15.10.7/15.10.7.3/15.10.7.3-1.js) RegExp.prototype.ignoreCase is of type Boolean
</del><ins>+15.10.7.3-1 (TestCases/chapter15/15.10/15.10.7/15.10.7.3/15.10.7.3-1.js) RegExp.prototype.ignoreCase should throw because RegExp.prototype is not a RegExp
</ins><span class="cx"> 
</span><span class="cx"> On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsietestcenterJavascript1510741expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ietestcenter/Javascript/15.10.7.4-1-expected.txt (198446 => 198447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ietestcenter/Javascript/15.10.7.4-1-expected.txt        2016-03-18 22:35:33 UTC (rev 198446)
+++ trunk/LayoutTests/ietestcenter/Javascript/15.10.7.4-1-expected.txt        2016-03-18 23:14:34 UTC (rev 198447)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-15.10.7.4-1 (TestCases/chapter15/15.10/15.10.7/15.10.7.4/15.10.7.4-1.js) RegExp.prototype.multiline is of type Boolean
</del><ins>+15.10.7.4-1 (TestCases/chapter15/15.10/15.10.7/15.10.7.4/15.10.7.4-1.js) RegExp.prototype.multiline should throw because RegExp.prototype is not a RegExp
</ins><span class="cx"> 
</span><span class="cx"> On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsietestcenterJavascript1510751expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ietestcenter/Javascript/15.10.7.5-1-expected.txt (198446 => 198447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ietestcenter/Javascript/15.10.7.5-1-expected.txt        2016-03-18 22:35:33 UTC (rev 198446)
+++ trunk/LayoutTests/ietestcenter/Javascript/15.10.7.5-1-expected.txt        2016-03-18 23:14:34 UTC (rev 198447)
</span><span class="lines">@@ -1,4 +1,4 @@
</span><del>-15.10.7.5-1 (TestCases/chapter15/15.10/15.10.7/15.10.7.5/15.10.7.5-1.js) RegExp.prototype.lastIndex is of type Number
</del><ins>+15.10.7.5-1 (TestCases/chapter15/15.10/15.10.7/15.10.7.5/15.10.7.5-1.js) RegExp.prototype.lastIndex is undefined because RegExp.prototype is not a RegExp
</ins><span class="cx"> 
</span><span class="cx"> On success, you will see a series of &quot;PASS&quot; messages, followed by &quot;TEST COMPLETE&quot;.
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkLayoutTestsietestcenterJavascriptTestCases15106js"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ietestcenter/Javascript/TestCases/15.10.6.js (198446 => 198447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ietestcenter/Javascript/TestCases/15.10.6.js        2016-03-18 22:35:33 UTC (rev 198446)
+++ trunk/LayoutTests/ietestcenter/Javascript/TestCases/15.10.6.js        2016-03-18 23:14:34 UTC (rev 198447)
</span><span class="lines">@@ -24,11 +24,11 @@
</span><span class="cx"> 
</span><span class="cx"> path: &quot;TestCases/chapter15/15.10/15.10.6/15.10.6.js&quot;,
</span><span class="cx"> 
</span><del>-description: &quot;RegExp.prototype is itself a RegExp&quot;,
</del><ins>+description: &quot;RegExp.prototype is not a RegExp&quot;,
</ins><span class="cx"> 
</span><span class="cx"> test: function testcase() {
</span><span class="cx">   var s = Object.prototype.toString.call(RegExp.prototype);
</span><del>-  if (s === '[object RegExp]') {
</del><ins>+  if (s === '[object Object]') {
</ins><span class="cx">     return true;
</span><span class="cx">   }
</span><span class="cx">  }
</span></span></pre></div>
<a id="trunkLayoutTestsietestcenterJavascriptTestCases1510711js"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ietestcenter/Javascript/TestCases/15.10.7.1-1.js (198446 => 198447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ietestcenter/Javascript/TestCases/15.10.7.1-1.js        2016-03-18 22:35:33 UTC (rev 198446)
+++ trunk/LayoutTests/ietestcenter/Javascript/TestCases/15.10.7.1-1.js        2016-03-18 23:14:34 UTC (rev 198447)
</span><span class="lines">@@ -24,10 +24,14 @@
</span><span class="cx"> 
</span><span class="cx"> path: &quot;TestCases/chapter15/15.10/15.10.7/15.10.7.1/15.10.7.1-1.js&quot;,
</span><span class="cx"> 
</span><del>-description: &quot;RegExp.prototype.source is of type String&quot;,
</del><ins>+description: &quot;RegExp.prototype.source should throw because RegExp.prototype is not a RegExp&quot;,
</ins><span class="cx"> 
</span><span class="cx"> test: function testcase() {
</span><del>-  if((typeof(RegExp.prototype.source)) === 'string')
-    return true;
</del><ins>+    try {
+        RegExp.prototype.source;
+        return false;
+    } catch (e) {
+        return true;
+    }
</ins><span class="cx">  }
</span><span class="cx"> });
</span></span></pre></div>
<a id="trunkLayoutTestsietestcenterJavascriptTestCases1510721js"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ietestcenter/Javascript/TestCases/15.10.7.2-1.js (198446 => 198447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ietestcenter/Javascript/TestCases/15.10.7.2-1.js        2016-03-18 22:35:33 UTC (rev 198446)
+++ trunk/LayoutTests/ietestcenter/Javascript/TestCases/15.10.7.2-1.js        2016-03-18 23:14:34 UTC (rev 198447)
</span><span class="lines">@@ -24,10 +24,14 @@
</span><span class="cx"> 
</span><span class="cx"> path: &quot;TestCases/chapter15/15.10/15.10.7/15.10.7.2/15.10.7.2-1.js&quot;,
</span><span class="cx"> 
</span><del>-description: &quot;RegExp.prototype.global is of type Boolean&quot;,
</del><ins>+description: &quot;RegExp.prototype.global should throw because RegExp.prototype is not a RegExp&quot;,
</ins><span class="cx"> 
</span><span class="cx"> test: function testcase() {
</span><del>-  if((typeof(RegExp.prototype.global)) === 'boolean')
-    return true;
</del><ins>+    try {
+        RegExp.prototype.global;
+        return false;
+    } catch (e) {
+        return true;
+    }
</ins><span class="cx">  }
</span><span class="cx"> });
</span></span></pre></div>
<a id="trunkLayoutTestsietestcenterJavascriptTestCases1510731js"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ietestcenter/Javascript/TestCases/15.10.7.3-1.js (198446 => 198447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ietestcenter/Javascript/TestCases/15.10.7.3-1.js        2016-03-18 22:35:33 UTC (rev 198446)
+++ trunk/LayoutTests/ietestcenter/Javascript/TestCases/15.10.7.3-1.js        2016-03-18 23:14:34 UTC (rev 198447)
</span><span class="lines">@@ -24,10 +24,14 @@
</span><span class="cx"> 
</span><span class="cx"> path: &quot;TestCases/chapter15/15.10/15.10.7/15.10.7.3/15.10.7.3-1.js&quot;,
</span><span class="cx"> 
</span><del>-description: &quot;RegExp.prototype.ignoreCase is of type Boolean&quot;,
</del><ins>+description: &quot;RegExp.prototype.ignoreCase should throw because RegExp.prototype is not a RegExp&quot;,
</ins><span class="cx"> 
</span><span class="cx"> test: function testcase() {
</span><del>-  if((typeof(RegExp.prototype.ignoreCase)) === 'boolean')
-    return true;
</del><ins>+    try {
+        RegExp.prototype.ignoreCase;
+        return false;
+    } catch (e) {
+        return true;
+    }
</ins><span class="cx">  }
</span><span class="cx"> });
</span></span></pre></div>
<a id="trunkLayoutTestsietestcenterJavascriptTestCases1510741js"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ietestcenter/Javascript/TestCases/15.10.7.4-1.js (198446 => 198447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ietestcenter/Javascript/TestCases/15.10.7.4-1.js        2016-03-18 22:35:33 UTC (rev 198446)
+++ trunk/LayoutTests/ietestcenter/Javascript/TestCases/15.10.7.4-1.js        2016-03-18 23:14:34 UTC (rev 198447)
</span><span class="lines">@@ -24,10 +24,14 @@
</span><span class="cx"> 
</span><span class="cx"> path: &quot;TestCases/chapter15/15.10/15.10.7/15.10.7.4/15.10.7.4-1.js&quot;,
</span><span class="cx"> 
</span><del>-description: &quot;RegExp.prototype.multiline is of type Boolean&quot;,
</del><ins>+description: &quot;RegExp.prototype.multiline should throw because RegExp.prototype is not a RegExp&quot;,
</ins><span class="cx"> 
</span><span class="cx"> test: function testcase() {
</span><del>-  if((typeof(RegExp.prototype.multiline)) === 'boolean')
-    return true;
</del><ins>+    try {
+        RegExp.prototype.multiline;
+        return false;
+    } catch (e) {
+        return true;
+    }
</ins><span class="cx">  }
</span><span class="cx"> });
</span></span></pre></div>
<a id="trunkLayoutTestsietestcenterJavascriptTestCases1510751js"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ietestcenter/Javascript/TestCases/15.10.7.5-1.js (198446 => 198447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ietestcenter/Javascript/TestCases/15.10.7.5-1.js        2016-03-18 22:35:33 UTC (rev 198446)
+++ trunk/LayoutTests/ietestcenter/Javascript/TestCases/15.10.7.5-1.js        2016-03-18 23:14:34 UTC (rev 198447)
</span><span class="lines">@@ -24,10 +24,10 @@
</span><span class="cx"> 
</span><span class="cx"> path: &quot;TestCases/chapter15/15.10/15.10.7/15.10.7.5/15.10.7.5-1.js&quot;,
</span><span class="cx"> 
</span><del>-description: &quot;RegExp.prototype.lastIndex is of type Number&quot;,
</del><ins>+description: &quot;RegExp.prototype.lastIndex is undefined because RegExp.prototype is not a RegExp&quot;,
</ins><span class="cx"> 
</span><span class="cx"> test: function testcase() {
</span><del>-  if((typeof(RegExp.prototype.lastIndex)) === 'number')
</del><ins>+  if((typeof(RegExp.prototype.lastIndex)) === 'undefined')
</ins><span class="cx">     return true;
</span><span class="cx">  }
</span><span class="cx"> });
</span></span></pre></div>
<a id="trunkLayoutTestsjsObjectgetOwnPropertyNamesexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/Object-getOwnPropertyNames-expected.txt (198446 => 198447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/Object-getOwnPropertyNames-expected.txt        2016-03-18 22:35:33 UTC (rev 198446)
+++ trunk/LayoutTests/js/Object-getOwnPropertyNames-expected.txt        2016-03-18 23:14:34 UTC (rev 198447)
</span><span class="lines">@@ -56,7 +56,7 @@
</span><span class="cx"> PASS getSortedOwnPropertyNames(Date) is ['UTC', 'length', 'name', 'now', 'parse', 'prototype']
</span><span class="cx"> PASS getSortedOwnPropertyNames(Date.prototype) is ['constructor', 'getDate', 'getDay', 'getFullYear', 'getHours', 'getMilliseconds', 'getMinutes', 'getMonth', 'getSeconds', 'getTime', 'getTimezoneOffset', 'getUTCDate', 'getUTCDay', 'getUTCFullYear', 'getUTCHours', 'getUTCMilliseconds', 'getUTCMinutes', 'getUTCMonth', 'getUTCSeconds', 'getYear', 'setDate', 'setFullYear', 'setHours', 'setMilliseconds', 'setMinutes', 'setMonth', 'setSeconds', 'setTime', 'setUTCDate', 'setUTCFullYear', 'setUTCHours', 'setUTCMilliseconds', 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds', 'setYear', 'toDateString', 'toGMTString', 'toISOString', 'toJSON', 'toLocaleDateString', 'toLocaleString', 'toLocaleTimeString', 'toString', 'toTimeString', 'toUTCString', 'valueOf']
</span><span class="cx"> PASS getSortedOwnPropertyNames(RegExp) is ['$&amp;', &quot;$'&quot;, '$*', '$+', '$1', '$2', '$3', '$4', '$5', '$6', '$7', '$8', '$9', '$_', '$`', 'input', 'lastMatch', 'lastParen', 'leftContext', 'length', 'multiline', 'name', 'prototype', 'rightContext']
</span><del>-PASS getSortedOwnPropertyNames(RegExp.prototype) is ['compile', 'constructor', 'exec', 'flags', 'global', 'ignoreCase', 'lastIndex', 'multiline', 'source', 'sticky', 'test', 'toString', 'unicode']
</del><ins>+PASS getSortedOwnPropertyNames(RegExp.prototype) is ['compile', 'constructor', 'exec', 'flags', 'global', 'ignoreCase', 'multiline', 'source', 'sticky', 'test', 'toString', 'unicode']
</ins><span class="cx"> PASS getSortedOwnPropertyNames(Error) is ['length', 'name', 'prototype']
</span><span class="cx"> PASS getSortedOwnPropertyNames(Error.prototype) is ['constructor', 'message', 'name', 'toString']
</span><span class="cx"> PASS getSortedOwnPropertyNames(Math) is ['E','LN10','LN2','LOG10E','LOG2E','PI','SQRT1_2','SQRT2','abs','acos','acosh','asin','asinh','atan','atan2','atanh','cbrt','ceil','clz32','cos','cosh','exp','expm1','floor','fround','hypot','imul','log','log10','log1p','log2','max','min','pow','random','round','sign','sin','sinh','sqrt','tan','tanh','trunc']
</span></span></pre></div>
<a id="trunkLayoutTestsjskdeRegExpexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/kde/RegExp-expected.txt (198446 => 198447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/kde/RegExp-expected.txt        2016-03-18 22:35:33 UTC (rev 198446)
+++ trunk/LayoutTests/js/kde/RegExp-expected.txt        2016-03-18 23:14:34 UTC (rev 198447)
</span><span class="lines">@@ -90,8 +90,8 @@
</span><span class="cx"> PASS str.match(/d/gi).toString() is 'D,d'
</span><span class="cx"> PASS /\u0061/.source is '\\u0061'
</span><span class="cx"> PASS 'abc'.match(/\u0062/).toString() is 'b'
</span><del>-PASS Object.prototype.toString.apply(RegExp.prototype) is '[object RegExp]'
-PASS typeof RegExp.prototype.toString() is 'string'
</del><ins>+PASS Object.prototype.toString.apply(RegExp.prototype) is '[object Object]'
+PASS RegExp.prototype.toString() threw exception TypeError: Type error.
</ins><span class="cx"> PASS new RegExp().toString() is '/(?:)/'
</span><span class="cx"> PASS (new RegExp('(?:)')).source is '(?:)'
</span><span class="cx"> PASS /(?:)/.toString() is '/(?:)/'
</span></span></pre></div>
<a id="trunkLayoutTestsjskdescripttestsRegExpjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/kde/script-tests/RegExp.js (198446 => 198447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/kde/script-tests/RegExp.js        2016-03-18 22:35:33 UTC (rev 198446)
+++ trunk/LayoutTests/js/kde/script-tests/RegExp.js        2016-03-18 23:14:34 UTC (rev 198447)
</span><span class="lines">@@ -143,11 +143,11 @@
</span><span class="cx"> shouldBe(&quot;'abc'.match(/\\u0062/).toString()&quot;, &quot;'b'&quot;);
</span><span class="cx"> 
</span><span class="cx"> shouldBe(&quot;Object.prototype.toString.apply(RegExp.prototype)&quot;,
</span><del>-         &quot;'[object RegExp]'&quot;);
</del><ins>+         &quot;'[object Object]'&quot;);
</ins><span class="cx"> 
</span><span class="cx"> // not sure what this should return. most importantly
</span><span class="cx"> // it doesn't throw an exception
</span><del>-shouldBe(&quot;typeof RegExp.prototype.toString()&quot;, &quot;'string'&quot;);
</del><ins>+shouldThrow(&quot;RegExp.prototype.toString()&quot;, &quot;'TypeError: Type error'&quot;);
</ins><span class="cx"> 
</span><span class="cx"> // Empty regular expressions have string representation /(?:)/
</span><span class="cx"> shouldBe(&quot;new RegExp().toString()&quot;, &quot;'/(?:)/'&quot;);
</span></span></pre></div>
<a id="trunkLayoutTestsjsscripttestsObjectgetOwnPropertyNamesjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/script-tests/Object-getOwnPropertyNames.js (198446 => 198447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/script-tests/Object-getOwnPropertyNames.js        2016-03-18 22:35:33 UTC (rev 198446)
+++ trunk/LayoutTests/js/script-tests/Object-getOwnPropertyNames.js        2016-03-18 23:14:34 UTC (rev 198447)
</span><span class="lines">@@ -65,7 +65,7 @@
</span><span class="cx">     &quot;Date&quot;: &quot;['UTC', 'length', 'name', 'now', 'parse', 'prototype']&quot;,
</span><span class="cx">     &quot;Date.prototype&quot;: &quot;['constructor', 'getDate', 'getDay', 'getFullYear', 'getHours', 'getMilliseconds', 'getMinutes', 'getMonth', 'getSeconds', 'getTime', 'getTimezoneOffset', 'getUTCDate', 'getUTCDay', 'getUTCFullYear', 'getUTCHours', 'getUTCMilliseconds', 'getUTCMinutes', 'getUTCMonth', 'getUTCSeconds', 'getYear', 'setDate', 'setFullYear', 'setHours', 'setMilliseconds', 'setMinutes', 'setMonth', 'setSeconds', 'setTime', 'setUTCDate', 'setUTCFullYear', 'setUTCHours', 'setUTCMilliseconds', 'setUTCMinutes', 'setUTCMonth', 'setUTCSeconds', 'setYear', 'toDateString', 'toGMTString', 'toISOString', 'toJSON', 'toLocaleDateString', 'toLocaleString', 'toLocaleTimeString', 'toString', 'toTimeString', 'toUTCString', 'valueOf']&quot;,
</span><span class="cx">     &quot;RegExp&quot;: &quot;['$&amp;', \&quot;$'\&quot;, '$*', '$+', '$1', '$2', '$3', '$4', '$5', '$6', '$7', '$8', '$9', '$_', '$`', 'input', 'lastMatch', 'lastParen', 'leftContext', 'length', 'multiline', 'name', 'prototype', 'rightContext']&quot;,
</span><del>-    &quot;RegExp.prototype&quot;: &quot;['compile', 'constructor', 'exec', 'flags', 'global', 'ignoreCase', 'lastIndex', 'multiline', 'source', 'sticky', 'test', 'toString', 'unicode']&quot;,
</del><ins>+    &quot;RegExp.prototype&quot;: &quot;['compile', 'constructor', 'exec', 'flags', 'global', 'ignoreCase', 'multiline', 'source', 'sticky', 'test', 'toString', 'unicode']&quot;,
</ins><span class="cx">     &quot;Error&quot;: &quot;['length', 'name', 'prototype']&quot;,
</span><span class="cx">     &quot;Error.prototype&quot;: &quot;['constructor', 'message', 'name', 'toString']&quot;,
</span><span class="cx">     &quot;Math&quot;: &quot;['E','LN10','LN2','LOG10E','LOG2E','PI','SQRT1_2','SQRT2','abs','acos','acosh','asin','asinh','atan','atan2','atanh','cbrt','ceil','clz32','cos','cosh','exp','expm1','floor','fround','hypot','imul','log','log10','log1p','log2','max','min','pow','random','round','sign','sin','sinh','sqrt','tan','tanh','trunc']&quot;,
</span></span></pre></div>
<a id="trunkLayoutTestssputnikConformance15_Native_Objects1510_RegExp15106S15106_A2expectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.6/S15.10.6_A2-expected.txt (198446 => 198447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.6/S15.10.6_A2-expected.txt        2016-03-18 22:35:33 UTC (rev 198446)
+++ trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.6/S15.10.6_A2-expected.txt        2016-03-18 23:14:34 UTC (rev 198447)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> S15.10.6_A2
</span><span class="cx"> 
</span><del>-FAIL SputnikError: #1: RegExp.prototype.toString = Object.prototype.toString; RegExp.prototype.toString() === &quot;[object &quot; + &quot;Object&quot; + &quot;]&quot;. Actual: [object RegExp]
</del><ins>+PASS 
</ins><span class="cx"> 
</span><span class="cx"> TEST COMPLETE
</span><span class="cx"> 
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (198446 => 198447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-03-18 22:35:33 UTC (rev 198446)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-03-18 23:14:34 UTC (rev 198447)
</span><span class="lines">@@ -1,3 +1,48 @@
</span><ins>+2016-03-18  Mark Lam  &lt;mark.lam@apple.com&gt;
+
+        ES6 spec requires that RegExpPrototype not be a RegExp object.
+        https://bugs.webkit.org/show_bug.cgi?id=155654
+
+        Reviewed by Filip Pizlo.
+
+        The ES6 spec states that RegExp.prototype should not be an instance of RegExp:
+        https://tc39.github.io/ecma262/#sec-properties-of-the-regexp-prototype-object
+
+        &quot;The RegExp prototype object is an ordinary object. It is not a RegExp instance
+        and does not have a [[RegExpMatcher]] internal slot or any of the other internal
+        slots of RegExp instance objects.&quot;
+
+        This patch changes RegExpPrototype to conform to the above specifications.
+
+        * runtime/JSGlobalObject.cpp:
+        (JSC::JSGlobalObject::init):
+        * runtime/RegExpConstructor.cpp:
+        (JSC::RegExpConstructor::RegExpConstructor):
+        (JSC::RegExpConstructor::finishCreation):
+        * runtime/RegExpPrototype.cpp:
+        (JSC::RegExpPrototype::RegExpPrototype):
+        (JSC::RegExpPrototype::finishCreation):
+        (JSC::RegExpPrototype::getOwnPropertySlot):
+        (JSC::RegExpPrototype::visitChildren):
+        (JSC::regExpProtoFuncTest):
+        * runtime/RegExpPrototype.h:
+        (JSC::RegExpPrototype::create):
+        (JSC::RegExpPrototype::createStructure):
+        (JSC::RegExpPrototype::emptyRegExp):
+
+        * tests/es6.yaml:
+        - This patch makes the es6/miscellaneous_built-in_prototypes_are_not_instances.js
+          test now pass.  However, the kangax version of this test still fails because
+          it also checks Error objects (which will be fixed in a subsequent patch).
+
+        * tests/mozilla/ecma_2/shell.js:
+        (stringify):
+        (test):
+        (getFailedCases):
+        (err):
+        * tests/stress/static-getter-in-names.js:
+        (shouldBe):
+
</ins><span class="cx"> 2016-03-18  Keith Miller  &lt;keith_miller@apple.com&gt;
</span><span class="cx"> 
</span><span class="cx">         DataView should use an accessor for its length and buffer properties
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeJSGlobalObjectcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp (198446 => 198447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp        2016-03-18 22:35:33 UTC (rev 198446)
+++ trunk/Source/JavaScriptCore/runtime/JSGlobalObject.cpp        2016-03-18 23:14:34 UTC (rev 198447)
</span><span class="lines">@@ -361,9 +361,7 @@
</span><span class="cx">     for (unsigned i = 0; i &lt; NumberOfIndexingShapes; ++i)
</span><span class="cx">         m_arrayStructureForIndexingShapeDuringAllocation[i] = m_originalArrayStructureForIndexingShape[i];
</span><span class="cx"> 
</span><del>-    RegExp* emptyRegex = RegExp::create(vm, &quot;&quot;, NoFlags);
-    
-    m_regExpPrototype.set(vm, this, RegExpPrototype::create(vm, this, RegExpPrototype::createStructure(vm, this, m_objectPrototype.get()), emptyRegex));
</del><ins>+    m_regExpPrototype.set(vm, this, RegExpPrototype::create(vm, this, RegExpPrototype::createStructure(vm, this, m_objectPrototype.get())));
</ins><span class="cx">     m_regExpStructure.set(vm, this, RegExpObject::createStructure(vm, this, m_regExpPrototype.get()));
</span><span class="cx">     m_regExpMatchesArrayStructure.set(vm, this, createRegExpMatchesArrayStructure(vm, this));
</span><span class="cx">     m_regExpMatchesArraySlowPutStructure.set(vm, this, createRegExpMatchesArraySlowPutStructure(vm, this));
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeRegExpConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/RegExpConstructor.cpp (198446 => 198447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/RegExpConstructor.cpp        2016-03-18 22:35:33 UTC (rev 198446)
+++ trunk/Source/JavaScriptCore/runtime/RegExpConstructor.cpp        2016-03-18 23:14:34 UTC (rev 198447)
</span><span class="lines">@@ -86,14 +86,14 @@
</span><span class="cx"> 
</span><span class="cx"> RegExpConstructor::RegExpConstructor(VM&amp; vm, Structure* structure, RegExpPrototype* regExpPrototype)
</span><span class="cx">     : InternalFunction(vm, structure)
</span><del>-    , m_cachedResult(vm, this, regExpPrototype-&gt;regExp())
</del><ins>+    , m_cachedResult(vm, this, regExpPrototype-&gt;emptyRegExp())
</ins><span class="cx">     , m_multiline(false)
</span><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> void RegExpConstructor::finishCreation(VM&amp; vm, RegExpPrototype* regExpPrototype, GetterSetter* speciesSymbol)
</span><span class="cx"> {
</span><del>-    Base::finishCreation(vm, regExpPrototype-&gt;classInfo()-&gt;className);
</del><ins>+    Base::finishCreation(vm, ASCIILiteral(&quot;RegExp&quot;));
</ins><span class="cx">     ASSERT(inherits(info()));
</span><span class="cx"> 
</span><span class="cx">     // ECMA 15.10.5.1 RegExp.prototype
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeRegExpPrototypecpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/RegExpPrototype.cpp (198446 => 198447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/RegExpPrototype.cpp        2016-03-18 22:35:33 UTC (rev 198446)
+++ trunk/Source/JavaScriptCore/runtime/RegExpPrototype.cpp        2016-03-18 23:14:34 UTC (rev 198447)
</span><span class="lines">@@ -59,7 +59,7 @@
</span><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span><del>-const ClassInfo RegExpPrototype::s_info = { &quot;RegExp&quot;, &amp;RegExpObject::s_info, &amp;regExpPrototypeTable, CREATE_METHOD_TABLE(RegExpPrototype) };
</del><ins>+const ClassInfo RegExpPrototype::s_info = { &quot;Object&quot;, &amp;Base::s_info, &amp;regExpPrototypeTable, CREATE_METHOD_TABLE(RegExpPrototype) };
</ins><span class="cx"> 
</span><span class="cx"> /* Source for RegExpPrototype.lut.h
</span><span class="cx"> @begin regExpPrototypeTable
</span><span class="lines">@@ -77,8 +77,8 @@
</span><span class="cx"> @end
</span><span class="cx"> */
</span><span class="cx"> 
</span><del>-RegExpPrototype::RegExpPrototype(VM&amp; vm, Structure* structure, RegExp* regExp)
-    : RegExpObject(vm, structure, regExp)
</del><ins>+RegExpPrototype::RegExpPrototype(VM&amp; vm, Structure* structure)
+    : JSNonFinalObject(vm, structure)
</ins><span class="cx"> {
</span><span class="cx"> }
</span><span class="cx"> 
</span><span class="lines">@@ -87,6 +87,8 @@
</span><span class="cx">     Base::finishCreation(vm);
</span><span class="cx">     ASSERT(inherits(info()));
</span><span class="cx">     JSC_NATIVE_FUNCTION(vm.propertyNames-&gt;searchSymbol, regExpProtoFuncSearch, DontEnum, 1);
</span><ins>+
+    m_emptyRegExp.set(vm, this, RegExp::create(vm, &quot;&quot;, NoFlags));
</ins><span class="cx"> }
</span><span class="cx"> 
</span><span class="cx"> bool RegExpPrototype::getOwnPropertySlot(JSObject* object, ExecState* exec, PropertyName propertyName, PropertySlot &amp;slot)
</span><span class="lines">@@ -94,6 +96,15 @@
</span><span class="cx">     return getStaticFunctionSlot&lt;Base&gt;(exec, regExpPrototypeTable, jsCast&lt;RegExpPrototype*&gt;(object), propertyName, slot);
</span><span class="cx"> }
</span><span class="cx"> 
</span><ins>+void RegExpPrototype::visitChildren(JSCell* cell, SlotVisitor&amp; visitor)
+{
+    RegExpPrototype* thisObject = jsCast&lt;RegExpPrototype*&gt;(cell);
+    ASSERT_GC_OBJECT_INHERITS(thisObject, info());
+    Base::visitChildren(thisObject, visitor);
+    
+    visitor.append(&amp;thisObject-&gt;m_emptyRegExp);
+}
+
</ins><span class="cx"> // ------------------------------ Functions ---------------------------
</span><span class="cx"> 
</span><span class="cx"> EncodedJSValue JSC_HOST_CALL regExpProtoFuncTest(ExecState* exec)
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeRegExpPrototypeh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/RegExpPrototype.h (198446 => 198447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/RegExpPrototype.h        2016-03-18 22:35:33 UTC (rev 198446)
+++ trunk/Source/JavaScriptCore/runtime/RegExpPrototype.h        2016-03-18 23:14:34 UTC (rev 198447)
</span><span class="lines">@@ -1,6 +1,6 @@
</span><span class="cx"> /*
</span><span class="cx">  *  Copyright (C) 1999-2000 Harri Porten (porten@kde.org)
</span><del>- *  Copyright (C) 2003, 2007, 2008 Apple Inc. All Rights Reserved.
</del><ins>+ *  Copyright (C) 2003, 2007-2008, 2016 Apple Inc. All Rights Reserved.
</ins><span class="cx">  *
</span><span class="cx">  *  This library is free software; you can redistribute it and/or
</span><span class="cx">  *  modify it under the terms of the GNU Lesser General Public
</span><span class="lines">@@ -21,19 +21,19 @@
</span><span class="cx"> #ifndef RegExpPrototype_h
</span><span class="cx"> #define RegExpPrototype_h
</span><span class="cx"> 
</span><del>-#include &quot;RegExpObject.h&quot;
</del><span class="cx"> #include &quot;JSObject.h&quot;
</span><ins>+#include &quot;RegExp.h&quot;
</ins><span class="cx"> 
</span><span class="cx"> namespace JSC {
</span><span class="cx"> 
</span><del>-class RegExpPrototype : public RegExpObject {
</del><ins>+class RegExpPrototype : public JSNonFinalObject {
</ins><span class="cx"> public:
</span><del>-    typedef RegExpObject Base;
</del><ins>+    typedef JSNonFinalObject Base;
</ins><span class="cx">     static const unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot;
</span><span class="cx"> 
</span><del>-    static RegExpPrototype* create(VM&amp; vm, JSGlobalObject* globalObject, Structure* structure, RegExp* regExp)
</del><ins>+    static RegExpPrototype* create(VM&amp; vm, JSGlobalObject* globalObject, Structure* structure)
</ins><span class="cx">     {
</span><del>-        RegExpPrototype* prototype = new (NotNull, allocateCell&lt;RegExpPrototype&gt;(vm.heap)) RegExpPrototype(vm, structure, regExp);
</del><ins>+        RegExpPrototype* prototype = new (NotNull, allocateCell&lt;RegExpPrototype&gt;(vm.heap)) RegExpPrototype(vm, structure);
</ins><span class="cx">         prototype-&gt;finishCreation(vm, globalObject);
</span><span class="cx">         return prototype;
</span><span class="cx">     }
</span><span class="lines">@@ -45,12 +45,18 @@
</span><span class="cx">         return Structure::create(vm, globalObject, prototype, TypeInfo(ObjectType, StructureFlags), info());
</span><span class="cx">     }
</span><span class="cx"> 
</span><ins>+    JS_EXPORT_PRIVATE static void visitChildren(JSCell*, SlotVisitor&amp;);
+
+    RegExp* emptyRegExp() const { return m_emptyRegExp.get(); }
+
</ins><span class="cx"> protected:
</span><del>-    RegExpPrototype(VM&amp;, Structure*, RegExp*);
</del><ins>+    RegExpPrototype(VM&amp;, Structure*);
</ins><span class="cx"> 
</span><span class="cx"> private:
</span><span class="cx">     void finishCreation(VM&amp;, JSGlobalObject*);
</span><span class="cx">     static bool getOwnPropertySlot(JSObject*, ExecState*, PropertyName, PropertySlot&amp;);
</span><ins>+
+    WriteBarrier&lt;RegExp&gt; m_emptyRegExp;
</ins><span class="cx"> };
</span><span class="cx"> 
</span><span class="cx"> } // namespace JSC
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoretestses6yaml"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/tests/es6.yaml (198446 => 198447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/tests/es6.yaml        2016-03-18 22:35:33 UTC (rev 198446)
+++ trunk/Source/JavaScriptCore/tests/es6.yaml        2016-03-18 23:14:34 UTC (rev 198447)
</span><span class="lines">@@ -867,7 +867,7 @@
</span><span class="cx"> - path: es6/Map_Map[Symbol.species].js
</span><span class="cx">   cmd: runES6 :normal
</span><span class="cx"> - path: es6/miscellaneous_built-in_prototypes_are_not_instances.js
</span><del>-  cmd: runES6 :fail
</del><ins>+  cmd: runES6 :normal
</ins><span class="cx"> - path: es6/miscellaneous_function_length_is_configurable.js
</span><span class="cx">   cmd: runES6 :normal
</span><span class="cx"> - path: es6/miscellaneous_no_assignments_allowed_in_for-in_head.js
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoretestsmozillaecma_2shelljs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/tests/mozilla/ecma_2/shell.js (198446 => 198447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/tests/mozilla/ecma_2/shell.js        2016-03-18 22:35:33 UTC (rev 198446)
+++ trunk/Source/JavaScriptCore/tests/mozilla/ecma_2/shell.js        2016-03-18 23:14:34 UTC (rev 198447)
</span><span class="lines">@@ -42,13 +42,23 @@
</span><span class="cx"> var PASSED = &quot; PASSED!&quot;
</span><span class="cx"> var FAILED = &quot; FAILED! expected: &quot;;
</span><span class="cx"> 
</span><ins>+function stringify(x) {
+    let str;
+    try {
+        str = &quot;&quot; + x;
+    } catch (e) {
+        str = Object.prototype.toString.call(x);
+    }
+    return str;
+}
+
</ins><span class="cx"> function test() {
</span><span class="cx">     for ( tc=0; tc &lt; testcases.length; tc++ ) {
</span><span class="cx">         testcases[tc].passed = writeTestCaseResult(
</span><span class="cx">                             testcases[tc].expect,
</span><span class="cx">                             testcases[tc].actual,
</span><span class="cx">                             testcases[tc].description +&quot; = &quot;+
</span><del>-                            testcases[tc].actual );
</del><ins>+                            stringify(testcases[tc].actual));
</ins><span class="cx"> 
</span><span class="cx">         testcases[tc].reason += ( testcases[tc].passed ) ? &quot;&quot; : &quot;wrong value &quot;;
</span><span class="cx">     }
</span><span class="lines">@@ -167,7 +177,7 @@
</span><span class="cx"> function getFailedCases() {
</span><span class="cx">   for ( var i = 0; i &lt; testcases.length; i++ ) {
</span><span class="cx">      if ( ! testcases[i].passed ) {
</span><del>-        print( testcases[i].description +&quot; = &quot; +testcases[i].actual +&quot; expected: &quot;+ testcases[i].expect );
</del><ins>+        print( testcases[i].description +&quot; = &quot; +stringify(testcases[i].actual) +&quot; expected: &quot;+ stringify(testcases[i].expect));
</ins><span class="cx">      }
</span><span class="cx">   }
</span><span class="cx"> }
</span><span class="lines">@@ -177,7 +187,7 @@
</span><span class="cx">     testcases[tc].reason = msg;
</span><span class="cx">     writeTestCaseResult( testcases[tc].expect,
</span><span class="cx">                          testcases[tc].actual,
</span><del>-                         testcases[tc].description +&quot; = &quot;+ testcases[tc].actual +
</del><ins>+                         testcases[tc].description +&quot; = &quot;+ stringify(testcases[tc].actual) +
</ins><span class="cx">                          &quot;: &quot; + testcases[tc].reason );
</span><span class="cx">     stopTest();
</span><span class="cx">     return true;
</span><span class="lines">@@ -194,8 +204,8 @@
</span><span class="cx"> function getFailedCases() {
</span><span class="cx">   for (        var        i =        0; i &lt; testcases.length; i++ ) {
</span><span class="cx">          if        ( !        testcases[i].passed        ) {
</span><del>-                writeLineToLog( testcases[i].description        +&quot; = &quot; +testcases[i].actual        +
-                    &quot; expected: &quot;+        testcases[i].expect        );
</del><ins>+                writeLineToLog( testcases[i].description        +&quot; = &quot; + stringify(testcases[i].actual) +
+                    &quot; expected: &quot;+        stringify(testcases[i].expect));
</ins><span class="cx">          }
</span><span class="cx">   }
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoretestsstressstaticgetterinnamesjs"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/tests/stress/static-getter-in-names.js (198446 => 198447)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/tests/stress/static-getter-in-names.js        2016-03-18 22:35:33 UTC (rev 198446)
+++ trunk/Source/JavaScriptCore/tests/stress/static-getter-in-names.js        2016-03-18 23:14:34 UTC (rev 198447)
</span><span class="lines">@@ -3,5 +3,5 @@
</span><span class="cx">         throw new Error('bad value: ' + actual);
</span><span class="cx"> }
</span><span class="cx"> 
</span><del>-shouldBe(JSON.stringify(Object.getOwnPropertyNames(RegExp.prototype).sort()), '[&quot;compile&quot;,&quot;constructor&quot;,&quot;exec&quot;,&quot;flags&quot;,&quot;global&quot;,&quot;ignoreCase&quot;,&quot;lastIndex&quot;,&quot;multiline&quot;,&quot;source&quot;,&quot;sticky&quot;,&quot;test&quot;,&quot;toString&quot;,&quot;unicode&quot;]');
</del><ins>+shouldBe(JSON.stringify(Object.getOwnPropertyNames(RegExp.prototype).sort()), '[&quot;compile&quot;,&quot;constructor&quot;,&quot;exec&quot;,&quot;flags&quot;,&quot;global&quot;,&quot;ignoreCase&quot;,&quot;multiline&quot;,&quot;source&quot;,&quot;sticky&quot;,&quot;test&quot;,&quot;toString&quot;,&quot;unicode&quot;]');
</ins><span class="cx"> shouldBe(JSON.stringify(Object.getOwnPropertyNames(/Cocoa/).sort()), '[&quot;lastIndex&quot;]');
</span></span></pre>
</div>
</div>

</body>
</html>