<!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>[195178] 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/195178">195178</a></dd>
<dt>Author</dt> <dd>commit-queue@webkit.org</dd>
<dt>Date</dt> <dd>2016-01-16 16:04:37 -0800 (Sat, 16 Jan 2016)</dd>
</dl>
<h3>Log Message</h3>
<pre>[ES6] Arrow function syntax. Arrow function should support the destructuring parameters.
https://bugs.webkit.org/show_bug.cgi?id=146934
Patch by Skachkov Oleksandr <gskachkov@gmail.com> on 2016-01-16
Reviewed by Saam Barati.
Source/JavaScriptCore:
Added support of destructuring parameters, before arrow function expect only simple parameters,
e.g. (), (x), (x, y) or x in assigment expressio. To support destructuring parameters added
additional check that check for destructuring paramters if check does not pass for simple parameters.
* parser/Parser.cpp:
(JSC::Parser<LexerType>::isArrowFunctionParameters):
(JSC::Parser<LexerType>::parseAssignmentExpression):
* parser/Parser.h:
LayoutTests:
* js/arrowfunction-syntax-errors-expected.txt:
* js/arrowfunction-syntax-expected.txt:
* js/script-tests/arrowfunction-syntax-errors.js:
* js/script-tests/arrowfunction-syntax.js:</pre>
<h3>Modified Paths</h3>
<ul>
<li><a href="#trunkLayoutTestsChangeLog">trunk/LayoutTests/ChangeLog</a></li>
<li><a href="#trunkLayoutTestsjsarrowfunctionsyntaxerrorsexpectedtxt">trunk/LayoutTests/js/arrowfunction-syntax-errors-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsarrowfunctionsyntaxexpectedtxt">trunk/LayoutTests/js/arrowfunction-syntax-expected.txt</a></li>
<li><a href="#trunkLayoutTestsjsscripttestsarrowfunctionsyntaxerrorsjs">trunk/LayoutTests/js/script-tests/arrowfunction-syntax-errors.js</a></li>
<li><a href="#trunkLayoutTestsjsscripttestsarrowfunctionsyntaxjs">trunk/LayoutTests/js/script-tests/arrowfunction-syntax.js</a></li>
<li><a href="#trunkSourceJavaScriptCoreChangeLog">trunk/Source/JavaScriptCore/ChangeLog</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserParsercpp">trunk/Source/JavaScriptCore/parser/Parser.cpp</a></li>
<li><a href="#trunkSourceJavaScriptCoreparserParserh">trunk/Source/JavaScriptCore/parser/Parser.h</a></li>
</ul>
</div>
<div id="patch">
<h3>Diff</h3>
<a id="trunkLayoutTestsChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/ChangeLog (195177 => 195178)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/ChangeLog        2016-01-17 00:00:43 UTC (rev 195177)
+++ trunk/LayoutTests/ChangeLog        2016-01-17 00:04:37 UTC (rev 195178)
</span><span class="lines">@@ -1,3 +1,15 @@
</span><ins>+2016-01-16 Skachkov Oleksandr <gskachkov@gmail.com>
+
+ [ES6] Arrow function syntax. Arrow function should support the destructuring parameters.
+ https://bugs.webkit.org/show_bug.cgi?id=146934
+
+ Reviewed by Saam Barati.
+
+ * js/arrowfunction-syntax-errors-expected.txt:
+ * js/arrowfunction-syntax-expected.txt:
+ * js/script-tests/arrowfunction-syntax-errors.js:
+ * js/script-tests/arrowfunction-syntax.js:
+
</ins><span class="cx"> 2016-01-16 Joseph Pecoraro <pecoraro@apple.com>
</span><span class="cx">
</span><span class="cx"> Web Inspector: Add tests for Array Utilities like lowerBound/upperBound
</span></span></pre></div>
<a id="trunkLayoutTestsjsarrowfunctionsyntaxerrorsexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/arrowfunction-syntax-errors-expected.txt (195177 => 195178)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/arrowfunction-syntax-errors-expected.txt        2016-01-17 00:00:43 UTC (rev 195177)
+++ trunk/LayoutTests/js/arrowfunction-syntax-errors-expected.txt        2016-01-17 00:04:37 UTC (rev 195178)
</span><span class="lines">@@ -123,6 +123,14 @@
</span><span class="cx"> =>y+1 threw exception SyntaxError: Unexpected token '=>'.
</span><span class="cx"> PASS var af3=(x, y)
</span><span class="cx"> =>y+1 threw exception SyntaxError: Unexpected token '=>'.
</span><ins>+PASS ([a, b] => a + b)(["a_", "b_"]) threw exception SyntaxError: Unexpected token '=>'. Expected ')' to end a compound expression..
+PASS ({a, b} => a + b)({a:"a_", b:"b_"}) threw exception SyntaxError: Unexpected token '=>'. Expected ')' to end a compound expression..
+PASS ({c:a,d:b} => a + b)({c:"a_", d:"b_"}) threw exception SyntaxError: Unexpected token '=>'. Expected ')' to end a compound expression..
+PASS ({c:b,d:a} => a + b)({c:"a_", d:"b_"}) threw exception SyntaxError: Unexpected token '=>'. Expected ')' to end a compound expression..
+PASS var arr1 = [a, b] => a + b; threw exception SyntaxError: Unexpected token '=>'. Expected ';' after variable declaration..
+PASS var arr2 = {a, b} => a + b; threw exception SyntaxError: Unexpected token '=>'. Expected ';' after variable declaration..
+PASS var arr3 = {c:a,d:b} => a + b; threw exception SyntaxError: Unexpected token '=>'. Expected ';' after variable declaration..
+PASS var arr3 = {c:b,d:a} => a + b; threw exception SyntaxError: Unexpected token '=>'. Expected ';' after variable declaration..
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsjsarrowfunctionsyntaxexpectedtxt"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/arrowfunction-syntax-expected.txt (195177 => 195178)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/arrowfunction-syntax-expected.txt        2016-01-17 00:00:43 UTC (rev 195177)
+++ trunk/LayoutTests/js/arrowfunction-syntax-expected.txt        2016-01-17 00:04:37 UTC (rev 195178)
</span><span class="lines">@@ -40,6 +40,22 @@
</span><span class="cx"> PASS (function funcSelfExecAE2(value) { var f = x => { x++; return x + 1; }; return f(value);})(123); is 125
</span><span class="cx"> PASS (function funcSelfExecAE3(value) { var f = (x) => { x++; return x + 1; }; return f(value);})(123); is 125
</span><span class="cx"> PASS (function funcSelfExecAE4(value) { var f = (x, y) => { x++; return x + y; }; return f(value, value * 2);})(123); is 370
</span><ins>+PASS (([a, b]) => a + b)(["a_", "b_"]) is "a_b_"
+PASS (({a, b}) => a + b)({a:"a_", b:"b_"}) is "a_b_"
+PASS (({c:a, d:b}) => a + b)({c:"a_", d:"b_"}) is "a_b_"
+PASS (({c:b, d:a}) => a + b)({c:"a_", d:"b_"}) is "b_a_"
+PASS ((x, y, {c:b, d:a}) => x + y + a + b)("x_", "y_", {c:"a_", d:"b_"}) is "x_y_b_a_"
+PASS (({c:b, d:a}, x, y) => x + y + a + b)({c:"a_", d:"b_"}, "x_", "y_") is "x_y_b_a_"
+PASS ((x, y, {c:b, d:a}, [e, f]) => x + y + a + b + e + f)("x_", "y_", {c:"a_", d:"b_"}, ["e_", "f_"]) is "x_y_b_a_e_f_"
+PASS ((x, y, {c:b, d:a}, [e, f], ...theArgs) => x + y + a + b + e + f + theArgs[0] + theArgs[1])("x_", "y_", {c:"a_", d:"b_"}, ["e_", "f_"], "g_", "h_") is "x_y_b_a_e_f_g_h_"
+PASS arr1(["a_", "b_"]) is "a_b_"
+PASS arr2({a:"a_", b:"b_"}) is "a_b_"
+PASS arr3({c:"a_", d:"b_"}) is "a_b_"
+PASS arr4({c:"a_", d:"b_"}) is "b_a_"
+PASS arr5("x_", "y_", {c:"a_", d:"b_"}) is "x_y_b_a_"
+PASS arr6({c:"a_", d:"b_"}, "x_", "y_") is "x_y_b_a_"
+PASS arr7("x_", "y_", {c:"a_", d:"b_"}, ["e_", "f_"]) is "x_y_b_a_e_f_"
+PASS arr8("x_", "y_", {c:"a_", d:"b_"}, ["e_", "f_"], "g_", "h_") is "x_y_b_a_e_f_g_h_"
</ins><span class="cx"> PASS successfullyParsed is true
</span><span class="cx">
</span><span class="cx"> TEST COMPLETE
</span></span></pre></div>
<a id="trunkLayoutTestsjsscripttestsarrowfunctionsyntaxerrorsjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/script-tests/arrowfunction-syntax-errors.js (195177 => 195178)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/script-tests/arrowfunction-syntax-errors.js        2016-01-17 00:00:43 UTC (rev 195177)
+++ trunk/LayoutTests/js/script-tests/arrowfunction-syntax-errors.js        2016-01-17 00:04:37 UTC (rev 195178)
</span><span class="lines">@@ -38,4 +38,14 @@
</span><span class="cx"> shouldThrow("var af2=(y)\n=>y+1");
</span><span class="cx"> shouldThrow("var af3=(x, y)\n=>y+1");
</span><span class="cx">
</span><ins>+shouldThrow('([a, b] => a + b)(["a_", "b_"])' );
+shouldThrow('({a, b} => a + b)({a:"a_", b:"b_"})');
+shouldThrow('({c:a,d:b} => a + b)({c:"a_", d:"b_"})');
+shouldThrow('({c:b,d:a} => a + b)({c:"a_", d:"b_"})');
+
+shouldThrow('var arr1 = [a, b] => a + b;');
+shouldThrow('var arr2 = {a, b} => a + b;');
+shouldThrow('var arr3 = {c:a,d:b} => a + b;');
+shouldThrow('var arr3 = {c:b,d:a} => a + b;');
+
</ins><span class="cx"> var successfullyParsed = true;
</span></span></pre></div>
<a id="trunkLayoutTestsjsscripttestsarrowfunctionsyntaxjs"></a>
<div class="modfile"><h4>Modified: trunk/LayoutTests/js/script-tests/arrowfunction-syntax.js (195177 => 195178)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/LayoutTests/js/script-tests/arrowfunction-syntax.js        2016-01-17 00:00:43 UTC (rev 195177)
+++ trunk/LayoutTests/js/script-tests/arrowfunction-syntax.js        2016-01-17 00:04:37 UTC (rev 195178)
</span><span class="lines">@@ -79,4 +79,37 @@
</span><span class="cx">
</span><span class="cx"> shouldBe('(function funcSelfExecAE4(value) { var f = (x, y) => { x++; return x + y; }; return f(value, value * 2);})(123);', '370');
</span><span class="cx">
</span><ins>+shouldBe('(([a, b]) => a + b)(["a_", "b_"])', '"a_b_"');
+shouldBe('(({a, b}) => a + b)({a:"a_", b:"b_"})', '"a_b_"');
+shouldBe('(({c:a, d:b}) => a + b)({c:"a_", d:"b_"})', '"a_b_"');
+shouldBe('(({c:b, d:a}) => a + b)({c:"a_", d:"b_"})', '"b_a_"');
+shouldBe('((x, y, {c:b, d:a}) => x + y + a + b)("x_", "y_", {c:"a_", d:"b_"})', '"x_y_b_a_"');
+shouldBe('(({c:b, d:a}, x, y) => x + y + a + b)({c:"a_", d:"b_"}, "x_", "y_")', '"x_y_b_a_"');
+shouldBe('((x, y, {c:b, d:a}, [e, f]) => x + y + a + b + e + f)("x_", "y_", {c:"a_", d:"b_"}, ["e_", "f_"])', '"x_y_b_a_e_f_"');
+shouldBe('((x, y, {c:b, d:a}, [e, f], ...theArgs) => x + y + a + b + e + f + theArgs[0] + theArgs[1])("x_", "y_", {c:"a_", d:"b_"}, ["e_", "f_"], "g_", "h_")', '"x_y_b_a_e_f_g_h_"');
+
+var arr1 = ([a, b]) => a + b;
+shouldBe('arr1(["a_", "b_"])', '"a_b_"');
+
+var arr2 = ({a, b}) => a + b;
+shouldBe('arr2({a:"a_", b:"b_"})', '"a_b_"');
+
+var arr3 = ({c:a, d:b}) => a + b;
+shouldBe('arr3({c:"a_", d:"b_"})', '"a_b_"');
+
+var arr4 = ({c:b, d:a}) => a + b;
+shouldBe('arr4({c:"a_", d:"b_"})', '"b_a_"');
+
+var arr5 = (x, y, {c:b, d:a}) => x + y + a + b;
+shouldBe('arr5("x_", "y_", {c:"a_", d:"b_"})', '"x_y_b_a_"');
+
+var arr6 = ({c:b, d:a}, x, y) => x + y + a + b;
+shouldBe('arr6({c:"a_", d:"b_"}, "x_", "y_")', '"x_y_b_a_"');
+
+var arr7 = (x, y, {c:b, d:a}, [e, f]) => x + y + a + b + e + f;
+shouldBe('arr7("x_", "y_", {c:"a_", d:"b_"}, ["e_", "f_"])', '"x_y_b_a_e_f_"');
+
+var arr8 = (x, y, {c:b, d:a}, [e, f], ...theArgs) => x + y + a + b + e + f + theArgs[0] + theArgs[1];
+shouldBe('arr8("x_", "y_", {c:"a_", d:"b_"}, ["e_", "f_"], "g_", "h_")', '"x_y_b_a_e_f_g_h_"');
+
</ins><span class="cx"> var successfullyParsed = true;
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreChangeLog"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/ChangeLog (195177 => 195178)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/ChangeLog        2016-01-17 00:00:43 UTC (rev 195177)
+++ trunk/Source/JavaScriptCore/ChangeLog        2016-01-17 00:04:37 UTC (rev 195178)
</span><span class="lines">@@ -1,3 +1,19 @@
</span><ins>+2016-01-16 Skachkov Oleksandr <gskachkov@gmail.com>
+
+ [ES6] Arrow function syntax. Arrow function should support the destructuring parameters.
+ https://bugs.webkit.org/show_bug.cgi?id=146934
+
+ Reviewed by Saam Barati.
+
+ Added support of destructuring parameters, before arrow function expect only simple parameters,
+ e.g. (), (x), (x, y) or x in assigment expressio. To support destructuring parameters added
+ additional check that check for destructuring paramters if check does not pass for simple parameters.
+
+ * parser/Parser.cpp:
+ (JSC::Parser<LexerType>::isArrowFunctionParameters):
+ (JSC::Parser<LexerType>::parseAssignmentExpression):
+ * parser/Parser.h:
+
</ins><span class="cx"> 2016-01-15 Benjamin Poulain <bpoulain@apple.com>
</span><span class="cx">
</span><span class="cx"> [JSC] Legalize Memory Offsets for ARM64 before lowering to Air
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserParsercpp"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/Parser.cpp (195177 => 195178)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/Parser.cpp        2016-01-17 00:00:43 UTC (rev 195177)
+++ trunk/Source/JavaScriptCore/parser/Parser.cpp        2016-01-17 00:04:37 UTC (rev 195178)
</span><span class="lines">@@ -374,6 +374,49 @@
</span><span class="cx"> }
</span><span class="cx">
</span><span class="cx"> template <typename LexerType>
</span><ins>+bool Parser<LexerType>::isArrowFunctionParameters()
+{
+ bool isArrowFunction = false;
+
+ if (match(EOFTOK))
+ return false;
+
+ bool isOpenParen = match(OPENPAREN);
+ bool isIdent = match(IDENT);
+
+ if (!isOpenParen && !isIdent)
+ return false;
+
+ SavePoint saveArrowFunctionPoint = createSavePoint();
+
+ if (isIdent) {
+ next();
+ isArrowFunction = match(ARROWFUNCTION);
+ } else {
+ RELEASE_ASSERT(isOpenParen);
+ next();
+ if (match(CLOSEPAREN)) {
+ next();
+ isArrowFunction = match(ARROWFUNCTION);
+ } else {
+ SyntaxChecker syntaxChecker(const_cast<VM*>(m_vm), m_lexer.get());
+ // We make fake scope, otherwise parseFormalParameters will add variable to current scope that lead to errors
+ AutoPopScopeRef fakeScope(this, pushScope());
+ fakeScope->setSourceParseMode(SourceParseMode::ArrowFunctionMode);
+
+ unsigned parametersCount = 0;
+ isArrowFunction = parseFormalParameters(syntaxChecker, syntaxChecker.createFormalParameterList(), parametersCount) && consume(CLOSEPAREN) && match(ARROWFUNCTION);
+
+ popScope(fakeScope, syntaxChecker.NeedsFreeVariableInfo);
+ }
+ }
+
+ restoreSavePoint(saveArrowFunctionPoint);
+
+ return isArrowFunction;
+}
+
+template <typename LexerType>
</ins><span class="cx"> bool Parser<LexerType>::allowAutomaticSemicolon()
</span><span class="cx"> {
</span><span class="cx"> return match(CLOSEBRACE) || match(EOFTOK) || m_lexer->prevTerminator();
</span><span class="lines">@@ -2887,7 +2930,7 @@
</span><span class="cx"> #endif
</span><span class="cx">
</span><span class="cx"> #if ENABLE(ES6_ARROWFUNCTION_SYNTAX)
</span><del>- if (isArrowFunctionParamters())
</del><ins>+ if (isArrowFunctionParameters())
</ins><span class="cx"> return parseArrowFunctionExpression(context);
</span><span class="cx"> #endif
</span><span class="cx">
</span></span></pre></div>
<a id="trunkSourceJavaScriptCoreparserParserh"></a>
<div class="modfile"><h4>Modified: trunk/Source/JavaScriptCore/parser/Parser.h (195177 => 195178)</h4>
<pre class="diff"><span>
<span class="info">--- trunk/Source/JavaScriptCore/parser/Parser.h        2016-01-17 00:00:43 UTC (rev 195177)
+++ trunk/Source/JavaScriptCore/parser/Parser.h        2016-01-17 00:04:37 UTC (rev 195178)
</span><span class="lines">@@ -1027,41 +1027,7 @@
</span><span class="cx"> {
</span><span class="cx"> return match(SEMICOLON) || match(COMMA) || match(CLOSEPAREN) || match(CLOSEBRACE) || match(CLOSEBRACKET) || match(EOFTOK) || m_lexer->prevTerminator();
</span><span class="cx"> }
</span><del>-
- ALWAYS_INLINE bool isArrowFunctionParamters()
- {
- bool isArrowFunction = false;
-
- if (match(EOFTOK))
- return isArrowFunction;
-
- SavePoint saveArrowFunctionPoint = createSavePoint();
-
- if (consume(OPENPAREN)) {
- bool isArrowFunctionParamters = true;
-
- while (consume(IDENT)) {
- if (consume(COMMA)) {
- if (!match(IDENT)) {
- isArrowFunctionParamters = false;
- break;
- }
- } else
- break;
- }
-
- if (isArrowFunctionParamters) {
- if (consume(CLOSEPAREN) && match(ARROWFUNCTION))
- isArrowFunction = true;
- }
- } else if (consume(IDENT) && match(ARROWFUNCTION))
- isArrowFunction = true;
</del><span class="cx">
</span><del>- restoreSavePoint(saveArrowFunctionPoint);
-
- return isArrowFunction;
- }
-
</del><span class="cx"> ALWAYS_INLINE unsigned tokenStart()
</span><span class="cx"> {
</span><span class="cx"> return m_token.m_location.startOffset;
</span><span class="lines">@@ -1258,6 +1224,8 @@
</span><span class="cx"> enum class FunctionDefinitionType { Expression, Declaration, Method };
</span><span class="cx"> template <class TreeBuilder> NEVER_INLINE bool parseFunctionInfo(TreeBuilder&, FunctionRequirements, SourceParseMode, bool nameIsInContainingScope, ConstructorKind, SuperBinding, int functionKeywordStart, ParserFunctionInfo<TreeBuilder>&, FunctionDefinitionType);
</span><span class="cx">
</span><ins>+ ALWAYS_INLINE bool isArrowFunctionParameters();
+
</ins><span class="cx"> template <class TreeBuilder> NEVER_INLINE int parseFunctionParameters(TreeBuilder&, SourceParseMode, ParserFunctionInfo<TreeBuilder>&);
</span><span class="cx"> template <class TreeBuilder> NEVER_INLINE typename TreeBuilder::FormalParameterList createGeneratorParameters(TreeBuilder&);
</span><span class="cx">
</span></span></pre>
</div>
</div>
</body>
</html>