<!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>[197962] 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/197962">197962</a></dd>
<dt>Author</dt> <dd>msaboff@apple.com</dd>
<dt>Date</dt> <dd>2016-03-10 15:38:15 -0800 (Thu, 10 Mar 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>[ES6] Allow RegExp constructor to take pattern from an existing RegExp with new flags
https://bugs.webkit.org/show_bug.cgi?id=155315
Reviewed by Saam Barati.
Source/JavaScriptCore:
Changed to comply with section 21.2.3.1, step 5. Eliminated syntax error.
In the process, change to get the VM at the top of the function.
Updated tests accordingly.
* runtime/RegExpConstructor.cpp:
(JSC::constructRegExp):
* tests/es6.yaml: Changed miscellaneous_RegExp_constructor_can_alter_flags.js to normal.
* tests/mozilla/mozilla-tests.yaml: Disabled ecma_3/RegExp/15.10.4.1-5-n.js as it checks
for the old behavior of throwing a syntax error.
LayoutTests:
New and updated test for change.
* fast/regex/constructor-expected.txt:
* fast/regex/script-tests/constructor.js:
Changed test for new behavior.`
* js/regexp-old-regexp-new-flags-expected.txt: Added.
* js/regexp-old-regexp-new-flags.html: Added.
* js/script-tests/regexp-old-regexp-new-flags.js: Added.
New test.
* sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.3/S15.10.3.1_A2_T1-expected.txt: Removed.
* sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.3/S15.10.3.1_A2_T1.html: Removed.
* sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.3/S15.10.3.1_A2_T2-expected.txt: Removed.
* sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.3/S15.10.3.1_A2_T2.html: Removed.
* sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A2_T1-expected.txt: Removed.
* sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A2_T1.html: Removed.
* sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A2_T2-expected.txt: Removed.
* sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A2_T2.html: Removed.
* sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A8_T8-expected.txt: Removed.
* sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A8_T8.html: Removed.
Removed obsolete tests.</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsfastregexconstructorexpectedtxt">trunk/LayoutTests/fast/regex/constructor-expected.txt</a></li>
<li><a href="#trunkLayoutTestsfastregexscripttestsconstructorjs">trunk/LayoutTests/fast/regex/script-tests/constructor.js</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreruntimeRegExpConstructorcpp">trunk/Source/JavaScriptCore/runtime/RegExpConstructor.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoretestses6yaml">trunk/Source/JavaScriptCore/tests/es6.yaml</a></li>
<li><a href="#trunkSourceJavaScriptCoretestsmozillamozillatestsyaml">trunk/Source/JavaScriptCore/tests/mozilla/mozilla-tests.yaml</a></li>
</ul>
<h3>Added Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsjsregexpoldregexpnewflagsexpectedtxt">trunk/LayoutTests/js/regexp-old-regexp-new-flags-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsregexpoldregexpnewflagshtml">trunk/LayoutTests/js/regexp-old-regexp-new-flags.html</a></li>
<li><a href="#trunkLayoutTestsjsscripttestsregexpoldregexpnewflagsjs">trunk/LayoutTests/js/script-tests/regexp-old-regexp-new-flags.js</a></li>
</ul>
<h3>Removed Paths</h3>
<ul>
<li><a href="#trunkLayoutTestssputnikConformance15_Native_Objects1510_RegExp15103S151031_A2_T1expectedtxt">trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.3/S15.10.3.1_A2_T1-expected.txt</a></li>
<li><a href="#trunkLayoutTestssputnikConformance15_Native_Objects1510_RegExp15103S151031_A2_T1html">trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.3/S15.10.3.1_A2_T1.html</a></li>
<li><a href="#trunkLayoutTestssputnikConformance15_Native_Objects1510_RegExp15103S151031_A2_T2expectedtxt">trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.3/S15.10.3.1_A2_T2-expected.txt</a></li>
<li><a href="#trunkLayoutTestssputnikConformance15_Native_Objects1510_RegExp15103S151031_A2_T2html">trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.3/S15.10.3.1_A2_T2.html</a></li>
<li><a href="#trunkLayoutTestssputnikConformance15_Native_Objects1510_RegExp15104S151041_A2_T1expectedtxt">trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A2_T1-expected.txt</a></li>
<li><a href="#trunkLayoutTestssputnikConformance15_Native_Objects1510_RegExp15104S151041_A2_T1html">trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A2_T1.html</a></li>
<li><a href="#trunkLayoutTestssputnikConformance15_Native_Objects1510_RegExp15104S151041_A2_T2expectedtxt">trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A2_T2-expected.txt</a></li>
<li><a href="#trunkLayoutTestssputnikConformance15_Native_Objects1510_RegExp15104S151041_A2_T2html">trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A2_T2.html</a></li>
<li><a href="#trunkLayoutTestssputnikConformance15_Native_Objects1510_RegExp15104S151041_A8_T8expectedtxt">trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A8_T8-expected.txt</a></li>
<li><a href="#trunkLayoutTestssputnikConformance15_Native_Objects1510_RegExp15104S151041_A8_T8html">trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A8_T8.html</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (197961 => 197962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-03-10 23:18:55 UTC (rev 197961)
+++ trunk/LayoutTests/ChangeLog        2016-03-10 23:38:15 UTC (rev 197962)
</span><span class="lines">@@ -1,3 +1,33 @@
</span><ins>+2016-03-10 Michael Saboff <msaboff@apple.com>
+
+ [ES6] Allow RegExp constructor to take pattern from an existing RegExp with new flags
+ https://bugs.webkit.org/show_bug.cgi?id=155315
+
+ Reviewed by Saam Barati.
+
+ New and updated test for change.
+
+ * fast/regex/constructor-expected.txt:
+ * fast/regex/script-tests/constructor.js:
+ Changed test for new behavior.`
+
+ * js/regexp-old-regexp-new-flags-expected.txt: Added.
+ * js/regexp-old-regexp-new-flags.html: Added.
+ * js/script-tests/regexp-old-regexp-new-flags.js: Added.
+ New test.
+
+ * sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.3/S15.10.3.1_A2_T1-expected.txt: Removed.
+ * sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.3/S15.10.3.1_A2_T1.html: Removed.
+ * sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.3/S15.10.3.1_A2_T2-expected.txt: Removed.
+ * sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.3/S15.10.3.1_A2_T2.html: Removed.
+ * sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A2_T1-expected.txt: Removed.
+ * sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A2_T1.html: Removed.
+ * sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A2_T2-expected.txt: Removed.
+ * sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A2_T2.html: Removed.
+ * sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A8_T8-expected.txt: Removed.
+ * sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A8_T8.html: Removed.
+ Removed obsolete tests.
+
</ins><span class="cx"> 2016-03-10 Myles C. Maxfield <mmaxfield@apple.com>
</span><span class="cx">
</span><span class="cx"> [OS X] Main frame scrollbars should appear on the left on RTL systems
</span></span></pre></div>
<a id="trunkLayoutTestsfastregexconstructorexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/regex/constructor-expected.txt (197961 => 197962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/regex/constructor-expected.txt        2016-03-10 23:18:55 UTC (rev 197961)
+++ trunk/LayoutTests/fast/regex/constructor-expected.txt        2016-03-10 23:38:15 UTC (rev 197962)
</span><span class="lines">@@ -5,8 +5,8 @@
</span><span class="cx">
</span><span class="cx"> PASS re === RegExp(re) is true
</span><span class="cx"> PASS re !== new RegExp(re) is true
</span><del>-PASS re === RegExp(re,'i') threw exception TypeError: Cannot supply flags when constructing one RegExp from another..
-PASS re !== new RegExp(re,'i') threw exception TypeError: Cannot supply flags when constructing one RegExp from another..
</del><ins>+PASS re === RegExp(re,'i') is true
+PASS re !== new RegExp(re,'i') is true
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsfastregexscripttestsconstructorjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/fast/regex/script-tests/constructor.js (197961 => 197962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/fast/regex/script-tests/constructor.js        2016-03-10 23:18:55 UTC (rev 197961)
+++ trunk/LayoutTests/fast/regex/script-tests/constructor.js        2016-03-10 23:38:15 UTC (rev 197962)
</span><span class="lines">@@ -4,6 +4,6 @@
</span><span class="cx">
</span><span class="cx"> shouldBeTrue("re === RegExp(re)");
</span><span class="cx"> shouldBeTrue("re !== new RegExp(re)");
</span><del>-shouldThrow("re === RegExp(re,'i')");
-shouldThrow("re !== new RegExp(re,'i')");
</del><ins>+shouldBeTrue("re === RegExp(re,'i')");
+shouldBeTrue("re !== new RegExp(re,'i')");
</ins><span class="cx">
</span></span></pre></div>
<a id="trunkLayoutTestsjsregexpoldregexpnewflagsexpectedtxt"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regexp-old-regexp-new-flags-expected.txt (0 => 197962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regexp-old-regexp-new-flags-expected.txt         (rev 0)
+++ trunk/LayoutTests/js/regexp-old-regexp-new-flags-expected.txt        2016-03-10 23:38:15 UTC (rev 197962)
</span><span class="lines">@@ -0,0 +1,21 @@
</span><ins>+Test for ES6 RegExp construct a new RegExp from exiting RegExp pattern and new flags
+
+On success, you will see a series of "PASS" messages, followed by "TEST COMPLETE".
+
+
+PASS re.test(" Abc ") is true
+PASS re.flags is ""
+PASS re.test(" ABC ") is true
+PASS re.flags is "i"
+PASS re.test(" Abc ") is true
+PASS re.flags is ""
+PASS re.exec("abcABCAbc").toString() is "abc"
+PASS re.exec("abcABCAbc").toString() is "ABC"
+PASS re.exec("abcABCAbc").toString() is "Abc"
+PASS re.flags is "iy"
+PASS re.test("abc") is false
+PASS new RegExp(re, "bad flags") threw exception SyntaxError: Invalid flags supplied to RegExp constructor..
+PASS successfullyParsed is true
+
+TEST COMPLETE
+
</ins></span></pre></div>
<a id="trunkLayoutTestsjsregexpoldregexpnewflagshtml"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/regexp-old-regexp-new-flags.html (0 => 197962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/regexp-old-regexp-new-flags.html         (rev 0)
+++ trunk/LayoutTests/js/regexp-old-regexp-new-flags.html        2016-03-10 23:38:15 UTC (rev 197962)
</span><span class="lines">@@ -0,0 +1,10 @@
</span><ins>+<!DOCTYPE HTML PUBLIC "-//IETF//DTD HTML//EN">
+<html>
+<head>
+<script src="../resources/js-test-pre.js"></script>
+</head>
+<body>
+<script src="script-tests/regexp-old-regexp-new-flags.js"></script>
+<script src="../resources/js-test-post.js"></script>
+</body>
+</html>
</ins></span></pre></div>
<a id="trunkLayoutTestsjsscripttestsregexpoldregexpnewflagsjs"></a>
<div class="addfile"><h4>Added: trunk/LayoutTests/js/script-tests/regexp-old-regexp-new-flags.js (0 => 197962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/script-tests/regexp-old-regexp-new-flags.js         (rev 0)
+++ trunk/LayoutTests/js/script-tests/regexp-old-regexp-new-flags.js        2016-03-10 23:38:15 UTC (rev 197962)
</span><span class="lines">@@ -0,0 +1,26 @@
</span><ins>+description(
+'Test for ES6 RegExp construct a new RegExp from exiting RegExp pattern and new flags'
+);
+
+var re = new RegExp("Abc");
+shouldBeTrue('re.test(" Abc ")');
+shouldBe('re.flags', '""');
+
+re = new RegExp(re, "i");
+shouldBeTrue('re.test(" ABC ")');
+shouldBe('re.flags', '"i"');
+
+re = new RegExp(re, "");
+shouldBeTrue('re.test(" Abc ")');
+shouldBe('re.flags', '""');
+
+re = new RegExp(re, "iy");
+shouldBe('re.exec("abcABCAbc").toString()', '"abc"');
+shouldBe('re.exec("abcABCAbc").toString()', '"ABC"');
+shouldBe('re.exec("abcABCAbc").toString()', '"Abc"');
+shouldBe('re.flags', '"iy"');
+
+re = new RegExp(re, "");
+shouldBeFalse('re.test("abc")');
+
+shouldThrow('new RegExp(re, "bad flags")', '"SyntaxError: Invalid flags supplied to RegExp constructor."');
</ins></span></pre></div>
<a id="trunkLayoutTestssputnikConformance15_Native_Objects1510_RegExp15103S151031_A2_T1expectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.3/S15.10.3.1_A2_T1-expected.txt (197961 => 197962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.3/S15.10.3.1_A2_T1-expected.txt        2016-03-10 23:18:55 UTC (rev 197961)
+++ trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.3/S15.10.3.1_A2_T1-expected.txt        2016-03-10 23:38:15 UTC (rev 197962)
</span><span class="lines">@@ -1,6 +0,0 @@
</span><del>-S15.10.3.1_A2_T1
-
-PASS
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestssputnikConformance15_Native_Objects1510_RegExp15103S151031_A2_T1html"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.3/S15.10.3.1_A2_T1.html (197961 => 197962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.3/S15.10.3.1_A2_T1.html        2016-03-10 23:18:55 UTC (rev 197961)
+++ trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.3/S15.10.3.1_A2_T1.html        2016-03-10 23:38:15 UTC (rev 197962)
</span><span class="lines">@@ -1,103 +0,0 @@
</span><del>-<html>
-<head>
-<meta charset='utf-8'>
-<style>
-.pass {
- font-weight: bold;
- color: green;
-}
-.fail {
- font-weight: bold;
- color: red;
-}
-</style>
-
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-
-function SputnikError(message)
-{
- this.message = message;
-}
-
-SputnikError.prototype.toString = function ()
-{
- return 'SputnikError: ' + this.message;
-};
-
-var sputnikException;
-
-function testPrint(msg)
-{
- var span = document.createElement("span");
- document.getElementById("console").appendChild(span); // insert it first so XHTML knows the namespace
- span.innerHTML = msg + '<br />';
-}
-
-function escapeHTML(text)
-{
- return text.toString().replace(/&/g, "&amp;").replace(/</g, "&lt;");
-}
-
-function printTestPassed(msg)
-{
- testPrint('<span><span class="pass">PASS</span> ' + escapeHTML(msg) + '</span>');
-}
-
-function printTestFailed(msg)
-{
- testPrint('<span><span class="fail">FAIL</span> ' + escapeHTML(msg) + '</span>');
-}
-
-function testFailed(msg)
-{
- throw new SputnikError(msg);
-}
-
-var successfullyParsed = false;
-</script>
-
-</head>
-<body>
-<p>S15.10.3.1_A2_T1</p>
-<div id='console'></div>
-<script>
-try {
-
-/**
-* @name: S15.10.3.1_A2_T1;
-* @section: 15.10.3.1;
-* @assertion: If pattern is an object R whose [[Class]] property is "RegExp" and flags is defined, then
-* call the RegExp constructor (15.10.4.1), passing it the pattern and flags arguments and return the object constructed by that constructor;
-* @description: Checking if using "1" as flags leads to throwing the correct exception;
-*/
-
-//CHECK#1
-try {
-        testFailed('#1.1: RegExp(new RegExp("\\d"), "1")) throw TypeError. Actual: ' + (RegExp(new RegExp("\d"), "1")));
-} catch (e) {
-        if ((e instanceof TypeError) !== true) {
-                testFailed('#1.2: RegExp(new RegExp("\\d"), "1")) throw TypeError. Actual: ' + (e));
-        }
-}
-
-
-} catch (ex) {
- sputnikException = ex;
-}
-
-var successfullyParsed = true;
-</script>
-
-<script>
-if (!successfullyParsed)
- printTestFailed('successfullyParsed is not set');
-else if (sputnikException)
- printTestFailed(sputnikException);
-else
- printTestPassed("");
-testPrint('<br /><span class="pass">TEST COMPLETE</span>');
-</script>
-</body>
-</html>
</del></span></pre></div>
<a id="trunkLayoutTestssputnikConformance15_Native_Objects1510_RegExp15103S151031_A2_T2expectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.3/S15.10.3.1_A2_T2-expected.txt (197961 => 197962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.3/S15.10.3.1_A2_T2-expected.txt        2016-03-10 23:18:55 UTC (rev 197961)
+++ trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.3/S15.10.3.1_A2_T2-expected.txt        2016-03-10 23:38:15 UTC (rev 197962)
</span><span class="lines">@@ -1,6 +0,0 @@
</span><del>-S15.10.3.1_A2_T2
-
-PASS
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestssputnikConformance15_Native_Objects1510_RegExp15103S151031_A2_T2html"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.3/S15.10.3.1_A2_T2.html (197961 => 197962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.3/S15.10.3.1_A2_T2.html        2016-03-10 23:18:55 UTC (rev 197961)
+++ trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.3/S15.10.3.1_A2_T2.html        2016-03-10 23:38:15 UTC (rev 197962)
</span><span class="lines">@@ -1,105 +0,0 @@
</span><del>-<html>
-<head>
-<meta charset='utf-8'>
-<style>
-.pass {
- font-weight: bold;
- color: green;
-}
-.fail {
- font-weight: bold;
- color: red;
-}
-</style>
-
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-
-function SputnikError(message)
-{
- this.message = message;
-}
-
-SputnikError.prototype.toString = function ()
-{
- return 'SputnikError: ' + this.message;
-};
-
-var sputnikException;
-
-function testPrint(msg)
-{
- var span = document.createElement("span");
- document.getElementById("console").appendChild(span); // insert it first so XHTML knows the namespace
- span.innerHTML = msg + '<br />';
-}
-
-function escapeHTML(text)
-{
- return text.toString().replace(/&/g, "&amp;").replace(/</g, "&lt;");
-}
-
-function printTestPassed(msg)
-{
- testPrint('<span><span class="pass">PASS</span> ' + escapeHTML(msg) + '</span>');
-}
-
-function printTestFailed(msg)
-{
- testPrint('<span><span class="fail">FAIL</span> ' + escapeHTML(msg) + '</span>');
-}
-
-function testFailed(msg)
-{
- throw new SputnikError(msg);
-}
-
-var successfullyParsed = false;
-</script>
-
-</head>
-<body>
-<p>S15.10.3.1_A2_T2</p>
-<div id='console'></div>
-<script>
-try {
-
-/**
-* @name: S15.10.3.1_A2_T2;
-* @section: 15.10.3.1;
-* @assertion: If pattern is an object R whose [[Class]] property is "RegExp" and flags is defined, then
-* call the RegExp constructor (15.10.4.1), passing it the pattern and flags arguments and return the object constructed by that constructor;
-* @description: Checking if using dafined variable "x = 1" as flags leads to throwing the correct exception;
-*/
-
-var x = 1;
-
-//CHECK#1
-try {
-        testFailed('#1.1: var x = 1; RegExp(/[a-b]?/, x) throw TypeError. Actual: ' + (RegExp(/[a-b]?/, x)));
-} catch (e) {
-        if ((e instanceof TypeError) !== true) {
-                testFailed('#1.2: var x = 1; RegExp(/[a-b]?/, x) throw TypeError. Actual: ' + (e));
-        }
-}
-
-
-} catch (ex) {
- sputnikException = ex;
-}
-
-var successfullyParsed = true;
-</script>
-
-<script>
-if (!successfullyParsed)
- printTestFailed('successfullyParsed is not set');
-else if (sputnikException)
- printTestFailed(sputnikException);
-else
- printTestPassed("");
-testPrint('<br /><span class="pass">TEST COMPLETE</span>');
-</script>
-</body>
-</html>
</del></span></pre></div>
<a id="trunkLayoutTestssputnikConformance15_Native_Objects1510_RegExp15104S151041_A2_T1expectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A2_T1-expected.txt (197961 => 197962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A2_T1-expected.txt        2016-03-10 23:18:55 UTC (rev 197961)
+++ trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A2_T1-expected.txt        2016-03-10 23:38:15 UTC (rev 197962)
</span><span class="lines">@@ -1,6 +0,0 @@
</span><del>-S15.10.4.1_A2_T1
-
-PASS
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestssputnikConformance15_Native_Objects1510_RegExp15104S151041_A2_T1html"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A2_T1.html (197961 => 197962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A2_T1.html        2016-03-10 23:18:55 UTC (rev 197961)
+++ trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A2_T1.html        2016-03-10 23:38:15 UTC (rev 197962)
</span><span class="lines">@@ -1,102 +0,0 @@
</span><del>-<html>
-<head>
-<meta charset='utf-8'>
-<style>
-.pass {
- font-weight: bold;
- color: green;
-}
-.fail {
- font-weight: bold;
- color: red;
-}
-</style>
-
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-
-function SputnikError(message)
-{
- this.message = message;
-}
-
-SputnikError.prototype.toString = function ()
-{
- return 'SputnikError: ' + this.message;
-};
-
-var sputnikException;
-
-function testPrint(msg)
-{
- var span = document.createElement("span");
- document.getElementById("console").appendChild(span); // insert it first so XHTML knows the namespace
- span.innerHTML = msg + '<br />';
-}
-
-function escapeHTML(text)
-{
- return text.toString().replace(/&/g, "&amp;").replace(/</g, "&lt;");
-}
-
-function printTestPassed(msg)
-{
- testPrint('<span><span class="pass">PASS</span> ' + escapeHTML(msg) + '</span>');
-}
-
-function printTestFailed(msg)
-{
- testPrint('<span><span class="fail">FAIL</span> ' + escapeHTML(msg) + '</span>');
-}
-
-function testFailed(msg)
-{
- throw new SputnikError(msg);
-}
-
-var successfullyParsed = false;
-</script>
-
-</head>
-<body>
-<p>S15.10.4.1_A2_T1</p>
-<div id='console'></div>
-<script>
-try {
-
-/**
-* @name: S15.10.4.1_A2_T1;
-* @section: 15.10.4.1;
-* @assertion: If pattern is an object R whose [[Class]] property is "RegExp" and flags is not undefined, then throw a TypeError exception;
-* @description: Checking if execution of "new RegExp(pattern, "i")", where the pattern is "/\u0042/i", fails;
-*/
-
-//CHECK#1
-try {
-        testFailed('#1.1: new RegExp(/\\u0042/i, "i") throw TypeError. Actual: ' + (new RegExp(/\u0042/i, "i")));
-} catch (e) {
-        if ((e instanceof TypeError) !== true) {
-                testFailed('#1.2: new RegExp(/\\u0042/i, "i") throw TypeError. Actual: ' + (e));
-        }
-}
-
-
-} catch (ex) {
- sputnikException = ex;
-}
-
-var successfullyParsed = true;
-</script>
-
-<script>
-if (!successfullyParsed)
- printTestFailed('successfullyParsed is not set');
-else if (sputnikException)
- printTestFailed(sputnikException);
-else
- printTestPassed("");
-testPrint('<br /><span class="pass">TEST COMPLETE</span>');
-</script>
-</body>
-</html>
</del></span></pre></div>
<a id="trunkLayoutTestssputnikConformance15_Native_Objects1510_RegExp15104S151041_A2_T2expectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A2_T2-expected.txt (197961 => 197962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A2_T2-expected.txt        2016-03-10 23:18:55 UTC (rev 197961)
+++ trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A2_T2-expected.txt        2016-03-10 23:38:15 UTC (rev 197962)
</span><span class="lines">@@ -1,6 +0,0 @@
</span><del>-S15.10.4.1_A2_T2
-
-PASS
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestssputnikConformance15_Native_Objects1510_RegExp15104S151041_A2_T2html"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A2_T2.html (197961 => 197962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A2_T2.html        2016-03-10 23:18:55 UTC (rev 197961)
+++ trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A2_T2.html        2016-03-10 23:38:15 UTC (rev 197962)
</span><span class="lines">@@ -1,102 +0,0 @@
</span><del>-<html>
-<head>
-<meta charset='utf-8'>
-<style>
-.pass {
- font-weight: bold;
- color: green;
-}
-.fail {
- font-weight: bold;
- color: red;
-}
-</style>
-
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-
-function SputnikError(message)
-{
- this.message = message;
-}
-
-SputnikError.prototype.toString = function ()
-{
- return 'SputnikError: ' + this.message;
-};
-
-var sputnikException;
-
-function testPrint(msg)
-{
- var span = document.createElement("span");
- document.getElementById("console").appendChild(span); // insert it first so XHTML knows the namespace
- span.innerHTML = msg + '<br />';
-}
-
-function escapeHTML(text)
-{
- return text.toString().replace(/&/g, "&amp;").replace(/</g, "&lt;");
-}
-
-function printTestPassed(msg)
-{
- testPrint('<span><span class="pass">PASS</span> ' + escapeHTML(msg) + '</span>');
-}
-
-function printTestFailed(msg)
-{
- testPrint('<span><span class="fail">FAIL</span> ' + escapeHTML(msg) + '</span>');
-}
-
-function testFailed(msg)
-{
- throw new SputnikError(msg);
-}
-
-var successfullyParsed = false;
-</script>
-
-</head>
-<body>
-<p>S15.10.4.1_A2_T2</p>
-<div id='console'></div>
-<script>
-try {
-
-/**
-* @name: S15.10.4.1_A2_T2;
-* @section: 15.10.4.1;
-* @assertion: If pattern is an object R whose [[Class]] property is "RegExp" and flags is not undefined, then throw a TypeError exception;
-* @description: Checking if execution of "new RegExp(pattern, {})", where the pattern is "/1?1/mig", fails;
-*/
-
-//CHECK#1
-try {
- testFailed('#1.1: new RegExp(/1?1/mig, {}) throw TypeError. Actual: ' + (new RegExp(/1?1/mig, {})));
-} catch (e) {
- if ((e instanceof TypeError) !== true) {
- testFailed('#1.2: new RegExp(/1?1/mig, {}) throw TypeError. Actual: ' + (e));
- }
-}
-
-
-} catch (ex) {
- sputnikException = ex;
-}
-
-var successfullyParsed = true;
-</script>
-
-<script>
-if (!successfullyParsed)
- printTestFailed('successfullyParsed is not set');
-else if (sputnikException)
- printTestFailed(sputnikException);
-else
- printTestPassed("");
-testPrint('<br /><span class="pass">TEST COMPLETE</span>');
-</script>
-</body>
-</html>
</del></span></pre></div>
<a id="trunkLayoutTestssputnikConformance15_Native_Objects1510_RegExp15104S151041_A8_T8expectedtxt"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A8_T8-expected.txt (197961 => 197962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A8_T8-expected.txt        2016-03-10 23:18:55 UTC (rev 197961)
+++ trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A8_T8-expected.txt        2016-03-10 23:38:15 UTC (rev 197962)
</span><span class="lines">@@ -1,6 +0,0 @@
</span><del>-S15.10.4.1_A8_T8
-
-PASS
-
-TEST COMPLETE
-
</del></span></pre></div>
<a id="trunkLayoutTestssputnikConformance15_Native_Objects1510_RegExp15104S151041_A8_T8html"></a>
<div class="delfile"><h4>Deleted: trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A8_T8.html (197961 => 197962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A8_T8.html        2016-03-10 23:18:55 UTC (rev 197961)
+++ trunk/LayoutTests/sputnik/Conformance/15_Native_Objects/15.10_RegExp/15.10.4/S15.10.4.1_A8_T8.html        2016-03-10 23:38:15 UTC (rev 197962)
</span><span class="lines">@@ -1,102 +0,0 @@
</span><del>-<html>
-<head>
-<meta charset='utf-8'>
-<style>
-.pass {
- font-weight: bold;
- color: green;
-}
-.fail {
- font-weight: bold;
- color: red;
-}
-</style>
-
-<script>
-if (window.testRunner)
- testRunner.dumpAsText();
-
-function SputnikError(message)
-{
- this.message = message;
-}
-
-SputnikError.prototype.toString = function ()
-{
- return 'SputnikError: ' + this.message;
-};
-
-var sputnikException;
-
-function testPrint(msg)
-{
- var span = document.createElement("span");
- document.getElementById("console").appendChild(span); // insert it first so XHTML knows the namespace
- span.innerHTML = msg + '<br />';
-}
-
-function escapeHTML(text)
-{
- return text.toString().replace(/&/g, "&amp;").replace(/</g, "&lt;");
-}
-
-function printTestPassed(msg)
-{
- testPrint('<span><span class="pass">PASS</span> ' + escapeHTML(msg) + '</span>');
-}
-
-function printTestFailed(msg)
-{
- testPrint('<span><span class="fail">FAIL</span> ' + escapeHTML(msg) + '</span>');
-}
-
-function testFailed(msg)
-{
- throw new SputnikError(msg);
-}
-
-var successfullyParsed = false;
-</script>
-
-</head>
-<body>
-<p>S15.10.4.1_A8_T8</p>
-<div id='console'></div>
-<script>
-try {
-
-/**
-* @name: S15.10.4.1_A8_T8;
-* @section: 15.10.4.1;
-* @assertion: let P be ToString(pattern) and let F be ToString(flags);
-* @description: Pattern is {toString:function(){throw "intostr";} } and flags is "error";
-*/
-
-//CHECK#1
-try {
-        testFailed('#1.1: new RegExp({toString:function(){throw "intostr";}}, "error") throw "intostr". Actual: ' + (new RegExp({toString:function(){throw "intostr";}}, "error")));
-} catch (e) {
-        if (e !== "intostr" ) {
-                testFailed('#1.2: new RegExp({toString:function(){throw "intostr";}}, "error") throw "intostr". Actual: ' + (e));
-        }
-}
-
-
-} catch (ex) {
- sputnikException = ex;
-}
-
-var successfullyParsed = true;
-</script>
-
-<script>
-if (!successfullyParsed)
- printTestFailed('successfullyParsed is not set');
-else if (sputnikException)
- printTestFailed(sputnikException);
-else
- printTestPassed("");
-testPrint('<br /><span class="pass">TEST COMPLETE</span>');
-</script>
-</body>
-</html>
</del></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (197961 => 197962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-03-10 23:18:55 UTC (rev 197961)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-03-10 23:38:15 UTC (rev 197962)
</span><span class="lines">@@ -1,3 +1,22 @@
</span><ins>+2016-03-10 Michael Saboff <msaboff@apple.com>
+
+ [ES6] Allow RegExp constructor to take pattern from an existing RegExp with new flags
+ https://bugs.webkit.org/show_bug.cgi?id=155315
+
+ Reviewed by Saam Barati.
+
+ Changed to comply with section 21.2.3.1, step 5. Eliminated syntax error.
+
+ In the process, change to get the VM at the top of the function.
+
+ Updated tests accordingly.
+
+ * runtime/RegExpConstructor.cpp:
+ (JSC::constructRegExp):
+ * tests/es6.yaml: Changed miscellaneous_RegExp_constructor_can_alter_flags.js to normal.
+ * tests/mozilla/mozilla-tests.yaml: Disabled ecma_3/RegExp/15.10.4.1-5-n.js as it checks
+ for the old behavior of throwing a syntax error.
+
</ins><span class="cx"> 2016-03-10 Saam barati <sbarati@apple.com>
</span><span class="cx">
</span><span class="cx"> [ES6] Make ToPropertyDescriptor spec compliant
</span><span class="lines">@@ -82,6 +101,7 @@
</span><span class="cx"> (noAssign): Deleted.
</span><span class="cx"> (catch): Deleted.
</span><span class="cx">
</span><ins>+>>>>>>> .r197960
</ins><span class="cx"> 2016-03-08 Skachkov Oleksandr <gskachkov@gmail.com>
</span><span class="cx">
</span><span class="cx"> How we load new.target in arrow functions is broken
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreruntimeRegExpConstructorcpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/runtime/RegExpConstructor.cpp (197961 => 197962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/runtime/RegExpConstructor.cpp        2016-03-10 23:18:55 UTC (rev 197961)
+++ trunk/Source/JavaScriptCore/runtime/RegExpConstructor.cpp        2016-03-10 23:38:15 UTC (rev 197962)
</span><span class="lines">@@ -260,41 +260,47 @@
</span><span class="cx"> JSValue arg0 = args.at(0);
</span><span class="cx"> JSValue arg1 = args.at(1);
</span><span class="cx">
</span><ins>+ VM& vm = exec->vm();
+ RegExpFlags flags = NoFlags;
+ bool haveFlags = false;
+ if (!arg1.isUndefined()) {
+ flags = regExpFlags(arg1.toString(exec)->value(exec));
+ if (vm.exception())
+ return 0;
+ if (flags == InvalidFlags)
+ return vm.throwException(exec, createSyntaxError(exec, ASCIILiteral("Invalid flags supplied to RegExp constructor.")));
+ haveFlags = true;
+ }
+
</ins><span class="cx"> if (arg0.inherits(RegExpObject::info())) {
</span><del>- if (!arg1.isUndefined())
- return exec->vm().throwException(exec, createTypeError(exec, ASCIILiteral("Cannot supply flags when constructing one RegExp from another.")));
</del><span class="cx"> // If called as a function, this just returns the first argument (see 15.10.3.1).
</span><span class="cx"> if (newTarget != jsUndefined()) {
</span><span class="cx"> RegExp* regExp = static_cast<RegExpObject*>(asObject(arg0))->regExp();
</span><span class="cx"> Structure* structure = getRegExpStructure(exec, globalObject, newTarget);
</span><del>- if (exec->hadException())
</del><ins>+ if (vm.exception())
</ins><span class="cx"> return nullptr;
</span><span class="cx">
</span><del>- return RegExpObject::create(exec->vm(), structure, regExp);
</del><ins>+ if (haveFlags) {
+ regExp = RegExp::create(vm, regExp->pattern(), flags);
+ if (vm.exception())
+ return nullptr;
+ }
+
+ return RegExpObject::create(vm, structure, regExp);
</ins><span class="cx"> }
</span><span class="cx"> return asObject(arg0);
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> String pattern = arg0.isUndefined() ? emptyString() : arg0.toString(exec)->value(exec);
</span><del>- if (exec->hadException())
</del><ins>+ if (vm.exception())
</ins><span class="cx"> return 0;
</span><span class="cx">
</span><del>- RegExpFlags flags = NoFlags;
- if (!arg1.isUndefined()) {
- flags = regExpFlags(arg1.toString(exec)->value(exec));
- if (exec->hadException())
- return 0;
- if (flags == InvalidFlags)
- return exec->vm().throwException(exec, createSyntaxError(exec, ASCIILiteral("Invalid flags supplied to RegExp constructor.")));
- }
-
- VM& vm = exec->vm();
</del><span class="cx"> RegExp* regExp = RegExp::create(vm, pattern, flags);
</span><span class="cx"> if (!regExp->isValid())
</span><span class="cx"> return vm.throwException(exec, createSyntaxError(exec, regExp->errorMessage()));
</span><span class="cx">
</span><span class="cx"> Structure* structure = getRegExpStructure(exec, globalObject, newTarget);
</span><del>- if (exec->hadException())
</del><ins>+ if (vm.exception())
</ins><span class="cx"> return nullptr;
</span><span class="cx"> return RegExpObject::create(vm, structure, regExp);
</span><span class="cx"> }
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoretestses6yaml"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/tests/es6.yaml (197961 => 197962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/tests/es6.yaml        2016-03-10 23:18:55 UTC (rev 197961)
+++ trunk/Source/JavaScriptCore/tests/es6.yaml        2016-03-10 23:38:15 UTC (rev 197962)
</span><span class="lines">@@ -873,7 +873,7 @@
</span><span class="cx"> - path: es6/miscellaneous_no_assignments_allowed_in_for-in_head.js
</span><span class="cx"> cmd: runES6 :fail
</span><span class="cx"> - path: es6/miscellaneous_RegExp_constructor_can_alter_flags.js
</span><del>- cmd: runES6 :fail
</del><ins>+ cmd: runES6 :normal
</ins><span class="cx"> - path: es6/new.target_assignment_is_an_early_error.js
</span><span class="cx"> cmd: runES6 :normal
</span><span class="cx"> - path: es6/non-strict_function_semantics_hoisted_block-level_function_declaration.js
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoretestsmozillamozillatestsyaml"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/tests/mozilla/mozilla-tests.yaml (197961 => 197962)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/tests/mozilla/mozilla-tests.yaml        2016-03-10 23:18:55 UTC (rev 197961)
+++ trunk/Source/JavaScriptCore/tests/mozilla/mozilla-tests.yaml        2016-03-10 23:38:15 UTC (rev 197962)
</span><span class="lines">@@ -1662,8 +1662,9 @@
</span><span class="cx"> cmd: defaultRunMozillaTest :normal, "../shell.js", "shell.js"
</span><span class="cx"> - path: ecma_3/RegExp/15.10.4.1-4.js
</span><span class="cx"> cmd: defaultRunMozillaTest :normal, "../shell.js", "shell.js"
</span><del>-- path: ecma_3/RegExp/15.10.4.1-5-n.js
- cmd: defaultRunMozillaTest :negative, "../shell.js", "shell.js"
</del><ins>+# Test is no longer valid with ES6 changes
+# - path: ecma_3/RegExp/15.10.4.1-5-n.js
+# cmd: defaultRunMozillaTest :negative, "../shell.js", "shell.js"
</ins><span class="cx"> - path: ecma_3/RegExp/15.10.6.2-1.js
</span><span class="cx"> cmd: defaultRunMozillaTest :normal, "../shell.js", "shell.js"
</span><span class="cx"> - path: ecma_3/RegExp/15.10.6.2-2.js
</span></span></pre>
</div>
</div>
</body>
</html>