[ES6] Support Generator Syntax
authorutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Nov 2015 05:46:17 +0000 (05:46 +0000)
committerutatane.tea@gmail.com <utatane.tea@gmail.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Mon, 2 Nov 2015 05:46:17 +0000 (05:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=150769

Reviewed by Geoffrey Garen.

.:

Added ENABLE_ES6_GENERATORS flag.

* Source/cmake/OptionsWin.cmake:
* Source/cmake/WebKitFeatures.cmake:

Source/JavaScriptCore:

This patch implements syntax part of ES6 Generators.

1. Add ENABLE_ES6_GENERATORS compile time flag. It is disabled by default, and will be enabled once ES6 generator functionality is implemented.
2. Add lexer support for YIELD. It changes "yield" from reserved-if-strict word to keyword. And it is correct under the ES6 spec.
3. Implement parsing functionality and YieldExprNode stub. YieldExprNode does not emit meaningful bytecodes yet. This should be implemented in the future patch.
4. Accept "yield" Identifier as an label etc. under sloppy mode && non-generator code. http://ecma-international.org/ecma-262/6.0/#sec-generator-function-definitions-static-semantics-early-errors

* Configurations/FeatureDefines.xcconfig:
* bytecompiler/NodesCodegen.cpp:
(JSC::YieldExprNode::emitBytecode):
* parser/ASTBuilder.h:
(JSC::ASTBuilder::createYield):
* parser/Keywords.table:
* parser/NodeConstructors.h:
(JSC::YieldExprNode::YieldExprNode):
* parser/Nodes.h:
* parser/Parser.cpp:
(JSC::Parser<LexerType>::Parser):
(JSC::Parser<LexerType>::parseInner):
(JSC::Parser<LexerType>::parseStatementListItem):
(JSC::Parser<LexerType>::parseVariableDeclarationList):
(JSC::Parser<LexerType>::parseDestructuringPattern):
(JSC::Parser<LexerType>::parseBreakStatement):
(JSC::Parser<LexerType>::parseContinueStatement):
(JSC::Parser<LexerType>::parseTryStatement):
(JSC::Parser<LexerType>::parseStatement):
(JSC::stringForFunctionMode):
(JSC::Parser<LexerType>::parseFunctionParameters):
(JSC::Parser<LexerType>::parseFunctionInfo):
(JSC::Parser<LexerType>::parseFunctionDeclaration):
(JSC::Parser<LexerType>::parseClass):
(JSC::Parser<LexerType>::parseExpressionOrLabelStatement):
(JSC::Parser<LexerType>::parseExportDeclaration):
(JSC::Parser<LexerType>::parseAssignmentExpression):
(JSC::Parser<LexerType>::parseYieldExpression):
(JSC::Parser<LexerType>::parseProperty):
(JSC::Parser<LexerType>::parsePropertyMethod):
(JSC::Parser<LexerType>::parseGetterSetter):
(JSC::Parser<LexerType>::parseFunctionExpression):
(JSC::Parser<LexerType>::parsePrimaryExpression):
(JSC::Parser<LexerType>::parseArrowFunctionExpression):
* parser/Parser.h:
(JSC::Scope::Scope):
(JSC::Scope::setSourceParseMode):
(JSC::Scope::isGenerator):
(JSC::Scope::setIsFunction):
(JSC::Scope::setIsGenerator):
(JSC::Scope::setIsModule):
(JSC::Parser::pushScope):
(JSC::Parser::isYIELDMaskedAsIDENT):
(JSC::Parser::matchSpecIdentifier):
(JSC::Parser::saveState):
(JSC::Parser::restoreState):
* parser/ParserModes.h:
(JSC::isFunctionParseMode):
(JSC::isModuleParseMode):
(JSC::isProgramParseMode):
* parser/ParserTokens.h:
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::createYield):
* tests/stress/generator-methods.js: Added.
(Hello.prototype.gen):
(Hello.gen):
(Hello):
(Hello.prototype.set get string_appeared_here):
(Hello.string_appeared_here):
(Hello.prototype.20):
(Hello.20):
(Hello.prototype.42):
(Hello.42):
(let.object.gen):
(let.object.set get string_appeared_here):
(let.object.20):
(let.object.42):
* tests/stress/generator-syntax.js: Added.
(testSyntax):
(testSyntaxError):
(testSyntaxError.Hello.prototype.get gen):
(testSyntaxError.Hello):
(SyntaxError.Unexpected.token.string_appeared_here.Expected.an.opening.string_appeared_here.before.a.method.testSyntaxError.Hello.prototype.set gen):
(SyntaxError.Unexpected.token.string_appeared_here.Expected.an.opening.string_appeared_here.before.a.method.testSyntaxError.Hello):
(SyntaxError.Unexpected.token.string_appeared_here.Expected.an.opening.string_appeared_here.before.a.method.testSyntaxError.gen):
(testSyntaxError.value):
(testSyntaxError.gen.ng):
(testSyntaxError.gen):
(testSyntax.gen):
* tests/stress/yield-and-line-terminator.js: Added.
(testSyntax):
(testSyntaxError):
(testSyntax.gen):
(testSyntaxError.gen):
* tests/stress/yield-label-generator.js: Added.
(testSyntax):
(testSyntaxError):
(testSyntaxError.test):
(SyntaxError.Unexpected.keyword.string_appeared_here.Expected.an.identifier.as.the.target.a.continue.statement.testSyntax.test):
* tests/stress/yield-label.js: Added.
(yield):
(testSyntaxError):
(testSyntaxError.test):
* tests/stress/yield-named-accessors-generator.js: Added.
(t1.let.object.get yield):
(t1.let.object.set yield):
(t1):
(t2.let.object.get yield):
(t2.let.object.set yield):
(t2):
* tests/stress/yield-named-accessors.js: Added.
(t1.let.object.get yield):
(t1.let.object.set yield):
(t1):
(t2.let.object.get yield):
(t2.let.object.set yield):
(t2):
* tests/stress/yield-named-variable-generator.js: Added.
(testSyntax):
(testSyntaxError):
(testSyntaxError.t1):
(testSyntaxError.t1.yield):
(testSyntax.t1.yield):
(testSyntax.t1):
* tests/stress/yield-named-variable.js: Added.
(testSyntax):
(testSyntaxError):
(testSyntax.t1):
(testSyntaxError.t1):
(testSyntax.t1.yield):
(testSyntaxError.t1.yield):
* tests/stress/yield-out-of-generator.js: Added.
(testSyntax):
(testSyntaxError):
(testSyntaxError.hello):
(testSyntaxError.gen.hello):
(testSyntaxError.gen):
(testSyntax.gen):
(testSyntax.gen.ok):
(testSyntaxError.gen.ok):

Source/WebCore:

Added ENABLE_ES6_GENERATORS flag.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit/mac:

Added ENABLE_ES6_GENERATORS flag.

* Configurations/FeatureDefines.xcconfig:

Source/WebKit2:

Added ENABLE_ES6_GENERATORS flag.

* Configurations/FeatureDefines.xcconfig:

Source/WTF:

Added ENABLE_ES6_GENERATORS flag.

* wtf/FeatureDefines.h:

Tools:

Added ENABLE_ES6_GENERATORS flag.

* Scripts/webkitperl/FeatureList.pm:

WebKitLibraries:

Added ENABLE_ES6_GENERATORS flag.

* win/tools/vsprops/FeatureDefines.props:
* win/tools/vsprops/FeatureDefinesCairo.props:

LayoutTests:

Change "yield" from reserved-if-strict word to keyword.
http://ecma-international.org/ecma-262/6.0/#sec-keywords

* js/dom/reserved-words-as-property-expected.txt:
* js/keywords-and-reserved_words-expected.txt:
* js/let-syntax-expected.txt:
* js/reserved-words-strict-expected.txt:
* js/script-tests/keywords-and-reserved_words.js:
* js/script-tests/reserved-words-strict.js:

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@191875 268f45cc-cd09-0410-ab3c-d52691b4dbfc

45 files changed:
ChangeLog
LayoutTests/ChangeLog
LayoutTests/js/dom/reserved-words-as-property-expected.txt
LayoutTests/js/keywords-and-reserved_words-expected.txt
LayoutTests/js/let-syntax-expected.txt
LayoutTests/js/reserved-words-strict-expected.txt
LayoutTests/js/script-tests/keywords-and-reserved_words.js
LayoutTests/js/script-tests/reserved-words-strict.js
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/Configurations/FeatureDefines.xcconfig
Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp
Source/JavaScriptCore/parser/ASTBuilder.h
Source/JavaScriptCore/parser/Keywords.table
Source/JavaScriptCore/parser/NodeConstructors.h
Source/JavaScriptCore/parser/Nodes.h
Source/JavaScriptCore/parser/Parser.cpp
Source/JavaScriptCore/parser/Parser.h
Source/JavaScriptCore/parser/ParserModes.h
Source/JavaScriptCore/parser/ParserTokens.h
Source/JavaScriptCore/parser/SyntaxChecker.h
Source/JavaScriptCore/tests/stress/generator-methods.js [new file with mode: 0644]
Source/JavaScriptCore/tests/stress/generator-syntax.js [new file with mode: 0644]
Source/JavaScriptCore/tests/stress/yield-and-line-terminator.js [new file with mode: 0644]
Source/JavaScriptCore/tests/stress/yield-label-generator.js [new file with mode: 0644]
Source/JavaScriptCore/tests/stress/yield-label.js [new file with mode: 0644]
Source/JavaScriptCore/tests/stress/yield-named-accessors-generator.js [new file with mode: 0644]
Source/JavaScriptCore/tests/stress/yield-named-accessors.js [new file with mode: 0644]
Source/JavaScriptCore/tests/stress/yield-named-variable-generator.js [new file with mode: 0644]
Source/JavaScriptCore/tests/stress/yield-named-variable.js [new file with mode: 0644]
Source/JavaScriptCore/tests/stress/yield-out-of-generator.js [new file with mode: 0644]
Source/WTF/ChangeLog
Source/WTF/wtf/FeatureDefines.h
Source/WebCore/ChangeLog
Source/WebCore/Configurations/FeatureDefines.xcconfig
Source/WebKit/mac/ChangeLog
Source/WebKit/mac/Configurations/FeatureDefines.xcconfig
Source/WebKit2/ChangeLog
Source/WebKit2/Configurations/FeatureDefines.xcconfig
Source/cmake/OptionsWin.cmake
Source/cmake/WebKitFeatures.cmake
Tools/ChangeLog
Tools/Scripts/webkitperl/FeatureList.pm
WebKitLibraries/ChangeLog
WebKitLibraries/win/tools/vsprops/FeatureDefines.props
WebKitLibraries/win/tools/vsprops/FeatureDefinesCairo.props

index 12c34cd..1446036 100644 (file)
--- a/ChangeLog
+++ b/ChangeLog
@@ -1,3 +1,15 @@
+2015-11-01  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        [ES6] Support Generator Syntax
+        https://bugs.webkit.org/show_bug.cgi?id=150769
+
+        Reviewed by Geoffrey Garen.
+
+        Added ENABLE_ES6_GENERATORS flag.
+
+        * Source/cmake/OptionsWin.cmake:
+        * Source/cmake/WebKitFeatures.cmake:
+
 2015-10-30  Gyuyoung Kim  <gyuyoung.kim@webkit.org>
 
         [EFL] Add Shadow DOM feature
index 1074fae..6b2c8ca 100644 (file)
@@ -1,3 +1,20 @@
+2015-11-01  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        [ES6] Support Generator Syntax
+        https://bugs.webkit.org/show_bug.cgi?id=150769
+
+        Reviewed by Geoffrey Garen.
+
+        Change "yield" from reserved-if-strict word to keyword.
+        http://ecma-international.org/ecma-262/6.0/#sec-keywords
+
+        * js/dom/reserved-words-as-property-expected.txt:
+        * js/keywords-and-reserved_words-expected.txt:
+        * js/let-syntax-expected.txt:
+        * js/reserved-words-strict-expected.txt:
+        * js/script-tests/keywords-and-reserved_words.js:
+        * js/script-tests/reserved-words-strict.js:
+
 2015-11-01  Darin Adler  <darin@apple.com>
 
         Re-land a piece of the patch for:
index 6cc26b9..b7034b4 100644 (file)
@@ -1461,18 +1461,18 @@ PASS ({ yield: 42 }.yield === 42) is true
 PASS (function(){({ yield: 42 }.yield === 42)}); true is true
 PASS ({ get yield(){}, set yield(x){}, parsedOkay: 42 }.parsedOkay === 42) is true
 PASS (function(){({ get yield(){}, set yield(x){}, parsedOkay: 42 }.parsedOkay === 42)}); true is true
-PASS "use strict";var yield; true threw exception SyntaxError: Cannot use the reserved word 'yield' as a variable name in strict mode..
-PASS (function(){"use strict";var yield; true}); true threw exception SyntaxError: Cannot use the reserved word 'yield' as a variable name in strict mode..
-PASS "use strict";var yield = 42; yield === 42 threw exception SyntaxError: Cannot use the reserved word 'yield' as a variable name in strict mode..
-PASS (function(){"use strict";var yield = 42; yield === 42}); true threw exception SyntaxError: Cannot use the reserved word 'yield' as a variable name in strict mode..
-PASS "use strict";function g(yield){ "use strict"; }; true threw exception SyntaxError: Cannot use the reserved word 'yield' as a variable name in strict mode..
-PASS (function(){"use strict";function g(yield){ "use strict"; }; true}); true threw exception SyntaxError: Cannot use the reserved word 'yield' as a variable name in strict mode..
-PASS "use strict";/yield/.test(function g(yield){ "use strict"; }) threw exception SyntaxError: Cannot use the reserved word 'yield' as a variable name in strict mode..
-PASS (function(){"use strict";/yield/.test(function g(yield){ "use strict"; })}); true threw exception SyntaxError: Cannot use the reserved word 'yield' as a variable name in strict mode..
-PASS "use strict";try{}catch(yield){}; true threw exception SyntaxError: Cannot use the reserved word 'yield' as a catch variable name in strict mode..
-PASS (function(){"use strict";try{}catch(yield){}; true}); true threw exception SyntaxError: Cannot use the reserved word 'yield' as a catch variable name in strict mode..
-PASS "use strict";function yield(){ "use strict"; }; true threw exception SyntaxError: Cannot use the reserved word 'yield' as a function name in strict mode..
-PASS (function(){"use strict";function yield(){ "use strict"; }; true}); true threw exception SyntaxError: Cannot use the reserved word 'yield' as a function name in strict mode..
+PASS "use strict";var yield; true threw exception SyntaxError: Cannot use the keyword 'yield' as a variable name..
+PASS (function(){"use strict";var yield; true}); true threw exception SyntaxError: Cannot use the keyword 'yield' as a variable name..
+PASS "use strict";var yield = 42; yield === 42 threw exception SyntaxError: Cannot use the keyword 'yield' as a variable name..
+PASS (function(){"use strict";var yield = 42; yield === 42}); true threw exception SyntaxError: Cannot use the keyword 'yield' as a variable name..
+PASS "use strict";function g(yield){ "use strict"; }; true threw exception SyntaxError: Cannot use the keyword 'yield' as a variable name..
+PASS (function(){"use strict";function g(yield){ "use strict"; }; true}); true threw exception SyntaxError: Cannot use the keyword 'yield' as a variable name..
+PASS "use strict";/yield/.test(function g(yield){ "use strict"; }) threw exception SyntaxError: Cannot use the keyword 'yield' as a variable name..
+PASS (function(){"use strict";/yield/.test(function g(yield){ "use strict"; })}); true threw exception SyntaxError: Cannot use the keyword 'yield' as a variable name..
+PASS "use strict";try{}catch(yield){}; true threw exception SyntaxError: Cannot use the keyword 'yield' as a catch variable name..
+PASS (function(){"use strict";try{}catch(yield){}; true}); true threw exception SyntaxError: Cannot use the keyword 'yield' as a catch variable name..
+PASS "use strict";function yield(){ "use strict"; }; true threw exception SyntaxError: Cannot use the keyword 'yield' as a function name..
+PASS (function(){"use strict";function yield(){ "use strict"; }; true}); true threw exception SyntaxError: Cannot use the keyword 'yield' as a function name..
 PASS "use strict";({ "yield": 42 }.yield === 42) is true
 PASS (function(){"use strict";({ "yield": 42 }.yield === 42)}); true is true
 PASS "use strict";({ yield: 42 }.yield === 42) is true
index c58c77d..48e170e 100644 (file)
@@ -65,9 +65,10 @@ PASS classifyIdentifier("private") is "strict"
 PASS classifyIdentifier("protected") is "strict"
 PASS classifyIdentifier("public") is "strict"
 PASS classifyIdentifier("static") is "strict"
-PASS classifyIdentifier("yield") is "strict"
 PASS isKeyword("let") is false
 PASS isStrictKeyword("let") is true
+PASS isKeyword("yield") is false
+PASS isStrictKeyword("yield") is true
 PASS successfullyParsed is true
 
 TEST COMPLETE
index 789e370..2fdaed9 100644 (file)
@@ -33,8 +33,8 @@ PASS Does not have syntax error: ';({ get let() { return 50; }, set let(x) { ret
 PASS Does not have syntax error: ''use strict'; ;({ get let() { return 50; }, set let(x) { return 50;} });'
 PASS Does not have syntax error: 'function foo() { { let x; } var x; }'
 PASS Does not have syntax error: ''use strict'; function foo() { { let x; } var x; }'
-SyntaxError: Unexpected keyword 'let'
-SyntaxError: Unexpected keyword 'let'
+SyntaxError: Unexpected keyword 'let'. Can't use 'let' as an identifier name for a LexicalDeclaration.
+SyntaxError: Unexpected keyword 'let'. Can't use 'let' as an identifier name for a LexicalDeclaration.
 PASS Has syntax error: 'let let;'
 SyntaxError: Cannot use the keyword 'let' as a variable name.
 SyntaxError: Cannot use the keyword 'let' as a variable name.
index fa017ff..b511450 100644 (file)
@@ -11,7 +11,6 @@ PASS isReserved('private') is true
 PASS isReserved('protected') is true
 PASS isReserved('public') is true
 PASS isReserved('static') is true
-PASS isReserved('yield') is true
 
 SHOULD NOT BE RESERVED:
 PASS isReserved('abstract') is false
index 22a8685..831860b 100644 (file)
@@ -109,10 +109,13 @@ shouldBe('classifyIdentifier("private")', '"strict"');
 shouldBe('classifyIdentifier("protected")', '"strict"');
 shouldBe('classifyIdentifier("public")', '"strict"');
 shouldBe('classifyIdentifier("static")', '"strict"');
-shouldBe('classifyIdentifier("yield")', '"strict"');
 
 // This is in a class of its own because it's treated as a keyword
 // in strict-mode and not a keyword in sloppy mode
 // (non-keyword in sloppy mode is temporary).
 shouldBeFalse('isKeyword("let")'); // "var let" is allowed but "let let" is not.
 shouldBeTrue('isStrictKeyword("let")');
+
+
+shouldBeFalse('isKeyword("yield")');
+shouldBeTrue('isStrictKeyword("yield")');
index 18b8a21..d86bff3 100644 (file)
@@ -18,7 +18,6 @@ var reservedWords = [
     "implements",
     "private",
     "public",
-    "yield",
     "interface",
     "package",
     "protected",
index 676a47a..027b719 100644 (file)
@@ -1,3 +1,148 @@
+2015-11-01  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        [ES6] Support Generator Syntax
+        https://bugs.webkit.org/show_bug.cgi?id=150769
+
+        Reviewed by Geoffrey Garen.
+
+        This patch implements syntax part of ES6 Generators.
+
+        1. Add ENABLE_ES6_GENERATORS compile time flag. It is disabled by default, and will be enabled once ES6 generator functionality is implemented.
+        2. Add lexer support for YIELD. It changes "yield" from reserved-if-strict word to keyword. And it is correct under the ES6 spec.
+        3. Implement parsing functionality and YieldExprNode stub. YieldExprNode does not emit meaningful bytecodes yet. This should be implemented in the future patch.
+        4. Accept "yield" Identifier as an label etc. under sloppy mode && non-generator code. http://ecma-international.org/ecma-262/6.0/#sec-generator-function-definitions-static-semantics-early-errors
+
+        * Configurations/FeatureDefines.xcconfig:
+        * bytecompiler/NodesCodegen.cpp:
+        (JSC::YieldExprNode::emitBytecode):
+        * parser/ASTBuilder.h:
+        (JSC::ASTBuilder::createYield):
+        * parser/Keywords.table:
+        * parser/NodeConstructors.h:
+        (JSC::YieldExprNode::YieldExprNode):
+        * parser/Nodes.h:
+        * parser/Parser.cpp:
+        (JSC::Parser<LexerType>::Parser):
+        (JSC::Parser<LexerType>::parseInner):
+        (JSC::Parser<LexerType>::parseStatementListItem):
+        (JSC::Parser<LexerType>::parseVariableDeclarationList):
+        (JSC::Parser<LexerType>::parseDestructuringPattern):
+        (JSC::Parser<LexerType>::parseBreakStatement):
+        (JSC::Parser<LexerType>::parseContinueStatement):
+        (JSC::Parser<LexerType>::parseTryStatement):
+        (JSC::Parser<LexerType>::parseStatement):
+        (JSC::stringForFunctionMode):
+        (JSC::Parser<LexerType>::parseFunctionParameters):
+        (JSC::Parser<LexerType>::parseFunctionInfo):
+        (JSC::Parser<LexerType>::parseFunctionDeclaration):
+        (JSC::Parser<LexerType>::parseClass):
+        (JSC::Parser<LexerType>::parseExpressionOrLabelStatement):
+        (JSC::Parser<LexerType>::parseExportDeclaration):
+        (JSC::Parser<LexerType>::parseAssignmentExpression):
+        (JSC::Parser<LexerType>::parseYieldExpression):
+        (JSC::Parser<LexerType>::parseProperty):
+        (JSC::Parser<LexerType>::parsePropertyMethod):
+        (JSC::Parser<LexerType>::parseGetterSetter):
+        (JSC::Parser<LexerType>::parseFunctionExpression):
+        (JSC::Parser<LexerType>::parsePrimaryExpression):
+        (JSC::Parser<LexerType>::parseArrowFunctionExpression):
+        * parser/Parser.h:
+        (JSC::Scope::Scope):
+        (JSC::Scope::setSourceParseMode):
+        (JSC::Scope::isGenerator):
+        (JSC::Scope::setIsFunction):
+        (JSC::Scope::setIsGenerator):
+        (JSC::Scope::setIsModule):
+        (JSC::Parser::pushScope):
+        (JSC::Parser::isYIELDMaskedAsIDENT):
+        (JSC::Parser::matchSpecIdentifier):
+        (JSC::Parser::saveState):
+        (JSC::Parser::restoreState):
+        * parser/ParserModes.h:
+        (JSC::isFunctionParseMode):
+        (JSC::isModuleParseMode):
+        (JSC::isProgramParseMode):
+        * parser/ParserTokens.h:
+        * parser/SyntaxChecker.h:
+        (JSC::SyntaxChecker::createYield):
+        * tests/stress/generator-methods.js: Added.
+        (Hello.prototype.gen):
+        (Hello.gen):
+        (Hello):
+        (Hello.prototype.set get string_appeared_here):
+        (Hello.string_appeared_here):
+        (Hello.prototype.20):
+        (Hello.20):
+        (Hello.prototype.42):
+        (Hello.42):
+        (let.object.gen):
+        (let.object.set get string_appeared_here):
+        (let.object.20):
+        (let.object.42):
+        * tests/stress/generator-syntax.js: Added.
+        (testSyntax):
+        (testSyntaxError):
+        (testSyntaxError.Hello.prototype.get gen):
+        (testSyntaxError.Hello):
+        (SyntaxError.Unexpected.token.string_appeared_here.Expected.an.opening.string_appeared_here.before.a.method.testSyntaxError.Hello.prototype.set gen):
+        (SyntaxError.Unexpected.token.string_appeared_here.Expected.an.opening.string_appeared_here.before.a.method.testSyntaxError.Hello):
+        (SyntaxError.Unexpected.token.string_appeared_here.Expected.an.opening.string_appeared_here.before.a.method.testSyntaxError.gen):
+        (testSyntaxError.value):
+        (testSyntaxError.gen.ng):
+        (testSyntaxError.gen):
+        (testSyntax.gen):
+        * tests/stress/yield-and-line-terminator.js: Added.
+        (testSyntax):
+        (testSyntaxError):
+        (testSyntax.gen):
+        (testSyntaxError.gen):
+        * tests/stress/yield-label-generator.js: Added.
+        (testSyntax):
+        (testSyntaxError):
+        (testSyntaxError.test):
+        (SyntaxError.Unexpected.keyword.string_appeared_here.Expected.an.identifier.as.the.target.a.continue.statement.testSyntax.test):
+        * tests/stress/yield-label.js: Added.
+        (yield):
+        (testSyntaxError):
+        (testSyntaxError.test):
+        * tests/stress/yield-named-accessors-generator.js: Added.
+        (t1.let.object.get yield):
+        (t1.let.object.set yield):
+        (t1):
+        (t2.let.object.get yield):
+        (t2.let.object.set yield):
+        (t2):
+        * tests/stress/yield-named-accessors.js: Added.
+        (t1.let.object.get yield):
+        (t1.let.object.set yield):
+        (t1):
+        (t2.let.object.get yield):
+        (t2.let.object.set yield):
+        (t2):
+        * tests/stress/yield-named-variable-generator.js: Added.
+        (testSyntax):
+        (testSyntaxError):
+        (testSyntaxError.t1):
+        (testSyntaxError.t1.yield):
+        (testSyntax.t1.yield):
+        (testSyntax.t1):
+        * tests/stress/yield-named-variable.js: Added.
+        (testSyntax):
+        (testSyntaxError):
+        (testSyntax.t1):
+        (testSyntaxError.t1):
+        (testSyntax.t1.yield):
+        (testSyntaxError.t1.yield):
+        * tests/stress/yield-out-of-generator.js: Added.
+        (testSyntax):
+        (testSyntaxError):
+        (testSyntaxError.hello):
+        (testSyntaxError.gen.hello):
+        (testSyntaxError.gen):
+        (testSyntax.gen):
+        (testSyntax.gen.ok):
+        (testSyntaxError.gen.ok):
+
 2015-11-01  Filip Pizlo  <fpizlo@apple.com>
 
         Dominators should be factored out of the DFG
index f8c20e8..e43c6bb 100644 (file)
@@ -47,6 +47,7 @@ ENABLE_CANVAS_PROXY = ;
 ENABLE_CHANNEL_MESSAGING = ENABLE_CHANNEL_MESSAGING;
 ENABLE_ES6_ARROWFUNCTION_SYNTAX = ENABLE_ES6_ARROWFUNCTION_SYNTAX;
 ENABLE_ES6_CLASS_SYNTAX = ENABLE_ES6_CLASS_SYNTAX;
+ENABLE_ES6_GENERATORS = ;
 ENABLE_ES6_MODULES = ;
 ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX = ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX;
 ENABLE_CONTENT_FILTERING = ENABLE_CONTENT_FILTERING;
@@ -232,4 +233,4 @@ ENABLE_SATURATED_LAYOUT_ARITHMETIC = ENABLE_SATURATED_LAYOUT_ARITHMETIC;
 
 ENABLE_SHADOW_DOM = ENABLE_SHADOW_DOM;
 
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_AVF_CAPTIONS) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_ES6_ARROWFUNCTION_SYNTAX) $(ENABLE_ES6_CLASS_SYNTAX) $(ENABLE_ES6_MODULES) $(ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_GRID_LAYOUT) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS3_TEXT_LINE_BREAK) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_ICONDATABASE) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TEXT_AUTOSIZING) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_HWCONCURRENCY) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_CURRENTSRC) $(ENABLE_POINTER_LOCK) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RUBBER_BANDING) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_OTF_CONVERTER) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_DATACUE_VALUE) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_REPLAY) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_XSLT) $(ENABLE_FTL_JIT) $(ENABLE_JIT) $(ENABLE_SATURATED_LAYOUT_ARITHMETIC) $(ENABLE_SHADOW_DOM) $(ENABLE_VIDEO_PRESENTATION_MODE);
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_AVF_CAPTIONS) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_ES6_ARROWFUNCTION_SYNTAX) $(ENABLE_ES6_CLASS_SYNTAX) $(ENABLE_ES6_GENERATORS) $(ENABLE_ES6_MODULES) $(ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_GRID_LAYOUT) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS3_TEXT_LINE_BREAK) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_ICONDATABASE) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TEXT_AUTOSIZING) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_HWCONCURRENCY) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_CURRENTSRC) $(ENABLE_POINTER_LOCK) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RUBBER_BANDING) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_OTF_CONVERTER) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_DATACUE_VALUE) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_REPLAY) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_XSLT) $(ENABLE_FTL_JIT) $(ENABLE_JIT) $(ENABLE_SATURATED_LAYOUT_ARITHMETIC) $(ENABLE_SHADOW_DOM) $(ENABLE_VIDEO_PRESENTATION_MODE);
index 1fbb14f..290ba43 100644 (file)
@@ -2997,7 +2997,18 @@ RegisterID* ArrowFuncExprNode::emitBytecode(BytecodeGenerator& generator, Regist
 {
     return generator.emitNewArrowFunctionExpression(generator.finalDestination(dst), this);
 }
-    
+
+// ------------------------------ YieldExprNode --------------------------------
+
+RegisterID* YieldExprNode::emitBytecode(BytecodeGenerator& generator, RegisterID* dst)
+{
+    // FIXME: This is just a stub. When completing ES6 Generators, we need to implement it.
+    generator.emitThrowTypeError(ASCIILiteral("Not implemented yet."));
+    if (dst == generator.ignoredResult())
+        return 0;
+    return generator.emitLoad(dst, jsUndefined());
+}
+
 #if ENABLE(ES6_CLASS_SYNTAX)
 // ------------------------------ ClassDeclNode ---------------------------------
 
index 8af2346..39e3539 100644 (file)
@@ -341,6 +341,16 @@ public:
         return node;
     }
 
+    YieldExprNode* createYield(const JSTokenLocation& location)
+    {
+        return new (m_parserArena) YieldExprNode(location, nullptr, /* delegate */ false);
+    }
+
+    YieldExprNode* createYield(const JSTokenLocation& location, ExpressionNode* argument, bool delegate)
+    {
+        return new (m_parserArena) YieldExprNode(location, argument, delegate);
+    }
+
 #if ENABLE(ES6_CLASS_SYNTAX)
     ClassExprNode* createClassExpr(const JSTokenLocation& location, const Identifier& name, VariableEnvironment& classEnvironment, ExpressionNode* constructor,
         ExpressionNode* parentClass, PropertyListNode* instanceMethods, PropertyListNode* staticMethods)
index e2ba528..4582d00 100644 (file)
@@ -38,6 +38,7 @@ try           TRY
 typeof         TYPEOF
 with           WITH
 debugger       DEBUGGER
+yield  YIELD
 
 # Reserved for future use.
 enum            RESERVED
@@ -52,6 +53,5 @@ private         RESERVED_IF_STRICT
 protected       RESERVED_IF_STRICT
 public          RESERVED_IF_STRICT
 static          RESERVED_IF_STRICT
-yield           RESERVED_IF_STRICT
 
 @end
index 0b47158..ea3142a 100644 (file)
@@ -915,6 +915,13 @@ namespace JSC {
     {
     }
 
+    inline YieldExprNode::YieldExprNode(const JSTokenLocation& location, ExpressionNode* argument, bool delegate)
+        : ExpressionNode(location)
+        , m_argument(argument)
+        , m_delegate(delegate)
+    {
+    }
+
 #if ENABLE(ES6_CLASS_SYNTAX)
     inline ClassDeclNode::ClassDeclNode(const JSTokenLocation& location, ExpressionNode* classDeclaration)
         : StatementNode(location)
index 850ca80..874878b 100644 (file)
@@ -1929,6 +1929,20 @@ namespace JSC {
         virtual bool isArrowFuncExprNode() const override { return true; }
     };
 
+    class YieldExprNode final : public ExpressionNode {
+    public:
+        YieldExprNode(const JSTokenLocation&, ExpressionNode* argument, bool delegate);
+
+        ExpressionNode* argument() const { return m_argument; }
+        bool delegate() const { return m_delegate; }
+
+    private:
+        virtual RegisterID* emitBytecode(BytecodeGenerator&, RegisterID* = 0) override;
+
+        ExpressionNode* m_argument;
+        bool m_delegate;
+    };
+
 #if ENABLE(ES6_CLASS_SYNTAX)
     class ClassExprNode final : public ExpressionNode, public VariableEnvironmentNode {
     public:
index d84db17..806666c 100644 (file)
@@ -29,6 +29,7 @@
 #include "JSCJSValueInlines.h"
 #include "Lexer.h"
 #include "JSCInlines.h"
+#include "SetForScope.h"
 #include "SourceProvider.h"
 #include "VM.h"
 #include <utility>
@@ -203,6 +204,7 @@ Parser<LexerType>::Parser(
     , m_syntaxAlreadyValidated(source.provider()->isValid())
     , m_statementDepth(0)
     , m_nonTrivialExpressionCount(0)
+    , m_functionParsePhase(FunctionParsePhase::Body)
     , m_lastIdentifier(0)
     , m_lastFunctionName(nullptr)
     , m_sourceElements(0)
@@ -217,11 +219,10 @@ Parser<LexerType>::Parser(
     m_token.m_location.endOffset = source.startOffset();
     m_token.m_location.lineStartOffset = source.startOffset();
     m_functionCache = vm->addSourceProviderCache(source.provider());
+
     ScopeRef scope = pushScope();
-    if (isFunctionParseMode(parseMode))
-        scope->setIsFunction();
-    if (isModuleParseMode(parseMode))
-        scope->setIsModule();
+    scope->setSourceParseMode(parseMode);
+
     if (strictMode == JSParserStrictMode::Strict)
         scope->setStrictMode();
 
@@ -241,6 +242,7 @@ String Parser<LexerType>::parseInner(const Identifier& calleeName, SourceParseMo
     ASTBuilder context(const_cast<VM*>(m_vm), m_parserArena, const_cast<SourceCode*>(m_source));
     ScopeRef scope = currentScope();
     scope->setIsLexicalScope();
+    SetForScope<FunctionParsePhase> functionParsePhasePoisoner(m_functionParsePhase, FunctionParsePhase::Body);
 
     bool isArrowFunctionBodyExpression = false;
     if (m_lexer->isReparsingFunction()) {
@@ -473,7 +475,12 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseStatementList
         if (!strictMode()) {
             SavePoint savePoint = createSavePoint();
             next();
-            if (!match(IDENT) && !match(OPENBRACE) && !match(OPENBRACKET))
+            // Intentionally use `match(IDENT) || match(LET) || match(YIELD)` and don't use `matchSpecIdentifier()`.
+            // We would like to fall into parseVariableDeclaration path even if "yield" is not treated as an Identifier.
+            // For example, under a generator context, matchSpecIdentifier() for "yield" returns `false`.
+            // But we would like to enter parseVariableDeclaration and raise an error under the context of parseVariableDeclaration
+            // to raise consistent errors between "var", "const" and "let".
+            if (!(match(IDENT) || match(LET) || match(YIELD)) && !match(OPENBRACE) && !match(OPENBRACKET))
                 shouldParseVariableDeclaration = false;
             restoreSavePoint(savePoint);
         }
@@ -585,7 +592,7 @@ template <class TreeBuilder> TreeExpression Parser<LexerType>::parseVariableDecl
         TreeExpression node = 0;
         declarations++;
         bool hasInitializer = false;
-        if (match(IDENT) || isLETMaskedAsIDENT()) {
+        if (matchSpecIdentifier()) {
             failIfTrue(match(LET) && (declarationType == DeclarationType::LetDeclaration || declarationType == DeclarationType::ConstDeclaration), 
                 "Can't use 'let' as an identifier name for a LexicalDeclaration");
             JSTextPosition varStart = tokenStartPosition();
@@ -834,7 +841,7 @@ template <class TreeBuilder> TreeDestructuringPattern Parser<LexerType>::parseDe
             const Identifier* propertyName = nullptr;
             TreeDestructuringPattern innerPattern = 0;
             JSTokenLocation location = m_token.m_location;
-            if (match(IDENT) || isLETMaskedAsIDENT()) {
+            if (matchSpecIdentifier()) {
                 failIfTrue(match(LET) && (kind == DestructureToLet || kind == DestructureToConst), "Can't use 'let' as an identifier name for a LexicalDeclaration");
                 propertyName = m_token.m_data.ident;
                 JSToken identifierToken = m_token;
@@ -891,7 +898,7 @@ template <class TreeBuilder> TreeDestructuringPattern Parser<LexerType>::parseDe
     }
 
     default: {
-        if (!match(IDENT) && !isLETMaskedAsIDENT()) {
+        if (!matchSpecIdentifier()) {
             if (kind == DestructureToExpressions)
                 return 0;
             semanticFailureDueToKeyword("variable name");
@@ -1128,7 +1135,7 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseBreakStatemen
         semanticFailIfFalse(breakIsValid(), "'break' is only valid inside a switch or loop statement");
         return context.createBreakStatement(location, &m_vm->propertyNames->nullIdentifier, start, end);
     }
-    failIfFalse(match(IDENT) || isLETMaskedAsIDENT(), "Expected an identifier as the target for a break statement");
+    failIfFalse(matchSpecIdentifier(), "Expected an identifier as the target for a break statement");
     const Identifier* ident = m_token.m_data.ident;
     semanticFailIfFalse(getLabel(ident), "Cannot use the undeclared label '", ident->impl(), "'");
     end = tokenEndPosition();
@@ -1150,7 +1157,7 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseContinueState
         semanticFailIfFalse(continueIsValid(), "'continue' is only valid inside a loop statement");
         return context.createContinueStatement(location, &m_vm->propertyNames->nullIdentifier, start, end);
     }
-    failIfFalse(match(IDENT) || isLETMaskedAsIDENT(), "Expected an identifier as the target for a continue statement");
+    failIfFalse(matchSpecIdentifier(), "Expected an identifier as the target for a continue statement");
     const Identifier* ident = m_token.m_data.ident;
     ScopeLabelInfo* label = getLabel(ident);
     semanticFailIfFalse(label, "Cannot use the undeclared label '", ident->impl(), "'");
@@ -1332,7 +1339,7 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseTryStatement(
         next();
         
         handleProductionOrFail(OPENPAREN, "(", "start", "'catch' target");
-        if (!(match(IDENT) || isLETMaskedAsIDENT())) {
+        if (!matchSpecIdentifier()) {
             semanticFailureDueToKeyword("catch variable name");
             failWithMessage("Expected identifier name as catch target");
         }
@@ -1491,6 +1498,7 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseStatement(Tre
         // These tokens imply the end of a set of source elements
         return 0;
     case IDENT:
+    case YIELD:
         result = parseExpressionOrLabelStatement(context);
         break;
     case STRING:
@@ -1580,6 +1588,8 @@ static const char* stringForFunctionMode(SourceParseMode mode)
         return "function";
     case SourceParseMode::MethodMode:
         return "method";
+    case SourceParseMode::GeneratorMode:
+        return "generator";
     case SourceParseMode::ArrowFunctionMode:
         return "arrow function";
     case SourceParseMode::ProgramMode:
@@ -1599,6 +1609,7 @@ template <typename LexerType> template <class TreeBuilder> int Parser<LexerType>
     TreeFormalParameterList parameterList = context.createFormalParameterList();
     functionInfo.parameters = parameterList;
     functionInfo.startOffset = parametersStart;
+    SetForScope<FunctionParsePhase> functionParsePhasePoisoner(m_functionParsePhase, FunctionParsePhase::Parameters);
     
     if (mode == SourceParseMode::ArrowFunctionMode) {
         if (!match(IDENT) && !match(OPENPAREN)) {
@@ -1657,12 +1668,14 @@ template <typename LexerType> template <class TreeBuilder> int Parser<LexerType>
 }
 
 template <typename LexerType>
-template <class TreeBuilder> bool Parser<LexerType>::parseFunctionInfo(TreeBuilder& context, FunctionRequirements requirements, SourceParseMode mode, bool nameIsInContainingScope, ConstructorKind constructorKind, SuperBinding expectedSuperBinding, int functionKeywordStart, ParserFunctionInfo<TreeBuilder>& functionInfo, FunctionParseType parseType)
+template <class TreeBuilder> bool Parser<LexerType>::parseFunctionInfo(TreeBuilder& context, FunctionRequirements requirements, SourceParseMode mode, bool nameIsInContainingScope, ConstructorKind constructorKind, SuperBinding expectedSuperBinding, int functionKeywordStart, ParserFunctionInfo<TreeBuilder>& functionInfo, FunctionDefinitionType functionDefinitionType)
 {
     RELEASE_ASSERT(isFunctionParseMode(mode));
 
+    bool upperScopeIsGenerator = currentScope()->isGenerator();
     AutoPopScopeRef functionScope(this, pushScope());
-    functionScope->setIsFunction();
+    functionScope->setSourceParseMode(mode);
+    SetForScope<FunctionParsePhase> functionParsePhasePoisoner(m_functionParsePhase, FunctionParsePhase::Body);
     int functionNameStart = m_token.m_location.startOffset;
     const Identifier* lastFunctionName = m_lastFunctionName;
     m_lastFunctionName = nullptr;
@@ -1670,11 +1683,47 @@ template <class TreeBuilder> bool Parser<LexerType>::parseFunctionInfo(TreeBuild
     JSTokenLocation startLocation;
     int startColumn;
     FunctionBodyType functionBodyType;
-    
-    switch (parseType) {
-    case StandardFunctionParseType: {
-        RELEASE_ASSERT(mode != SourceParseMode::ArrowFunctionMode);
-        if (match(IDENT) || isLETMaskedAsIDENT()) {
+
+    if (mode == SourceParseMode::ArrowFunctionMode) {
+        startLocation = tokenLocation();
+        functionInfo.startLine = tokenLine();
+        startColumn = tokenColumn();
+
+        parametersStart = parseFunctionParameters(context, mode, functionInfo);
+        propagateError();
+
+        matchOrFail(ARROWFUNCTION, "Expected a '=>' after arrow function parameter declaration");
+
+        if (m_lexer->prevTerminator())
+            failDueToUnexpectedToken();
+
+        ASSERT(constructorKind == ConstructorKind::None);
+
+        // Check if arrow body start with {. If it true it mean that arrow function is Fat arrow function
+        // and we need use common approach to parse function body
+        next();
+        functionBodyType = match(OPENBRACE) ? ArrowFunctionBodyBlock : ArrowFunctionBodyExpression;
+    } else {
+        // http://ecma-international.org/ecma-262/6.0/#sec-function-definitions
+        // FunctionExpression :
+        //     function BindingIdentifieropt ( FormalParameters ) { FunctionBody }
+        //
+        // FunctionDeclaration[Yield, Default] :
+        //     function BindingIdentifier[?Yield] ( FormalParameters ) { FunctionBody }
+        //     [+Default] function ( FormalParameters ) { FunctionBody }
+        //
+        // GeneratorDeclaration[Yield, Default] :
+        //     function * BindingIdentifier[?Yield] ( FormalParameters[Yield] ) { GeneratorBody }
+        //     [+Default] function * ( FormalParameters[Yield] ) { GeneratorBody }
+        //
+        // GeneratorExpression :
+        //     function * BindingIdentifier[Yield]opt ( FormalParameters[Yield] ) { GeneratorBody }
+        //
+        // The name of FunctionExpression can accept "yield" even in the context of generator.
+        if (functionDefinitionType == FunctionDefinitionType::Expression && mode == SourceParseMode::NormalFunctionMode)
+            upperScopeIsGenerator = false;
+
+        if (matchSpecIdentifier(upperScopeIsGenerator)) {
             functionInfo.name = m_token.m_data.ident;
             m_lastFunctionName = functionInfo.name;
             next();
@@ -1706,40 +1755,8 @@ template <class TreeBuilder> bool Parser<LexerType>::parseFunctionInfo(TreeBuild
         }
 
         functionBodyType = StandardFunctionBodyBlock;
-        
-        break;
     }
-#if ENABLE(ES6_ARROWFUNCTION_SYNTAX)
-    case ArrowFunctionParseType: {
-        RELEASE_ASSERT(mode == SourceParseMode::ArrowFunctionMode);
 
-        startLocation = tokenLocation();
-        functionInfo.startLine = tokenLine();
-        startColumn = tokenColumn();
-
-        parametersStart = parseFunctionParameters(context, mode, functionInfo);
-        propagateError();
-        
-        matchOrFail(ARROWFUNCTION, "Expected a '=>' after arrow function parameter declaration");
-        
-        if (m_lexer->prevTerminator())
-            failDueToUnexpectedToken();
-
-        ASSERT(constructorKind == ConstructorKind::None);
-        
-        // Check if arrow body start with {. If it true it mean that arrow function is Fat arrow function
-        // and we need use common approach to parse function body
-        next();
-        functionBodyType = match(OPENBRACE) ? ArrowFunctionBodyBlock : ArrowFunctionBodyExpression;
-        
-        break;
-    }
-#else
-    default:
-        RELEASE_ASSERT_NOT_REACHED();
-#endif
-    }
-    
     bool isClassConstructor = constructorKind != ConstructorKind::None;
     
     functionInfo.bodyStartColumn = startColumn;
@@ -1761,7 +1778,7 @@ template <class TreeBuilder> bool Parser<LexerType>::parseFunctionInfo(TreeBuild
             endLocation.startOffset - endLocation.lineStartOffset;
         unsigned currentLineStartOffset = m_token.m_location.lineStartOffset;
         
-        bool isArrowFunction = parseType == ArrowFunctionParseType;
+        bool isArrowFunction = mode == SourceParseMode::ArrowFunctionMode;
         
         functionInfo.body = context.createFunctionMetadata(
             startLocation, endLocation, functionInfo.bodyStartColumn, bodyEndColumn, 
@@ -1809,7 +1826,7 @@ template <class TreeBuilder> bool Parser<LexerType>::parseFunctionInfo(TreeBuild
     failIfFalse(functionInfo.body, "Cannot parse the body of this ", stringForFunctionMode(mode));
     context.setEndOffset(functionInfo.body, m_lexer->currentOffset());
     if (functionScope->strictMode() && functionInfo.name) {
-        RELEASE_ASSERT(mode == SourceParseMode::NormalFunctionMode || mode == SourceParseMode::MethodMode || mode == SourceParseMode::ArrowFunctionMode);
+        RELEASE_ASSERT(mode == SourceParseMode::NormalFunctionMode || mode == SourceParseMode::MethodMode || mode == SourceParseMode::ArrowFunctionMode || mode == SourceParseMode::GeneratorMode);
         semanticFailIfTrue(m_vm->propertyNames->arguments == *functionInfo.name, "'", functionInfo.name->impl(), "' is not a valid function name in strict mode");
         semanticFailIfTrue(m_vm->propertyNames->eval == *functionInfo.name, "'", functionInfo.name->impl(), "' is not a valid function name in strict mode");
     }
@@ -1874,9 +1891,14 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseFunctionDecla
     unsigned functionKeywordStart = tokenStart();
     next();
     ParserFunctionInfo<TreeBuilder> functionInfo;
-    failIfFalse((parseFunctionInfo(context, FunctionNeedsName, SourceParseMode::NormalFunctionMode, true, ConstructorKind::None, SuperBinding::NotNeeded,
-        functionKeywordStart, functionInfo, StandardFunctionParseType)), "Cannot parse this function");
+    SourceParseMode parseMode = SourceParseMode::NormalFunctionMode;
+#if ENABLE(ES6_GENERATORS)
+    if (consume(TIMES))
+        parseMode = SourceParseMode::GeneratorMode;
+#endif
+    failIfFalse((parseFunctionInfo(context, FunctionNeedsName, parseMode, true, ConstructorKind::None, SuperBinding::NotNeeded, functionKeywordStart, functionInfo, FunctionDefinitionType::Declaration)), "Cannot parse this function");
     failIfFalse(functionInfo.name, "Function statements must have a name");
+
     DeclarationResultMask declarationResult = declareVariable(functionInfo.name);
     failIfTrueIfStrict(declarationResult & DeclarationResult::InvalidStrictMode, "Cannot declare a function named '", functionInfo.name->impl(), "' in strict mode");
     if (declarationResult & DeclarationResult::InvalidDuplicateDeclaration)
@@ -1976,6 +1998,11 @@ template <class TreeBuilder> TreeClassExpression Parser<LexerType>::parseClass(T
         TreeExpression computedPropertyName = 0;
         bool isGetter = false;
         bool isSetter = false;
+        bool isGenerator = false;
+#if ENABLE(ES6_GENERATORS)
+        if (consume(TIMES))
+            isGenerator = true;
+#endif
         switch (m_token.m_type) {
         case STRING:
             ident = m_token.m_data.ident;
@@ -1986,7 +2013,7 @@ template <class TreeBuilder> TreeClassExpression Parser<LexerType>::parseClass(T
             ident = m_token.m_data.ident;
             ASSERT(ident);
             next();
-            if (match(IDENT) || match(STRING) || match(DOUBLE) || match(INTEGER) || match(OPENBRACKET)) {
+            if (!isGenerator && (match(IDENT) || match(STRING) || match(DOUBLE) || match(INTEGER) || match(OPENBRACKET))) {
                 isGetter = *ident == propertyNames.get;
                 isSetter = *ident == propertyNames.set;
             }
@@ -2016,7 +2043,14 @@ template <class TreeBuilder> TreeClassExpression Parser<LexerType>::parseClass(T
         } else {
             ParserFunctionInfo<TreeBuilder> methodInfo;
             bool isConstructor = !isStaticMethod && *ident == propertyNames.constructor;
-            failIfFalse((parseFunctionInfo(context, FunctionNoRequirements, SourceParseMode::MethodMode, false, isConstructor ? constructorKind : ConstructorKind::None, SuperBinding::Needed, methodStart, methodInfo, StandardFunctionParseType)), "Cannot parse this method");
+            SourceParseMode parseMode = SourceParseMode::MethodMode;
+            if (isGenerator) {
+                isConstructor = false;
+                parseMode = SourceParseMode::GeneratorMode;
+                semanticFailIfTrue(*ident == m_vm->propertyNames->prototype, "Cannot declare a generator named 'prototype'");
+                semanticFailIfTrue(*ident == m_vm->propertyNames->constructor, "Cannot declare a generator named 'constructor'");
+            }
+            failIfFalse((parseFunctionInfo(context, FunctionNoRequirements, parseMode, false, isConstructor ? constructorKind : ConstructorKind::None, SuperBinding::Needed, methodStart, methodInfo, FunctionDefinitionType::Method)), "Cannot parse this method");
             methodInfo.name = isConstructor ? className : ident;
 
             TreeExpression method = context.createFunctionExpr(methodLocation, methodInfo);
@@ -2103,7 +2137,7 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseExpressionOrL
             failIfTrue(getLabel(ident), "Cannot find scope for the label '", ident->impl(), "'");
             labels.append(LabelInfo(ident, start, end));
         }
-    } while (match(IDENT) || isLETMaskedAsIDENT());
+    } while (matchSpecIdentifier());
     bool isLoop = false;
     switch (m_token.m_type) {
     case FOR:
@@ -2466,14 +2500,21 @@ template <class TreeBuilder> TreeStatement Parser<LexerType>::parseExportDeclara
         bool isFunctionOrClassDeclaration = false;
         const Identifier* localName = nullptr;
         SavePoint savePoint = createSavePoint();
-        if (match(FUNCTION)
+
+        bool startsWithFunction = match(FUNCTION);
+        if (startsWithFunction
 #if ENABLE(ES6_CLASS_SYNTAX)
                 || match(CLASSTOKEN)
 #endif
                 ) {
             isFunctionOrClassDeclaration = true;
             next();
-            // FIXME: When landing ES6 generators, we need to take care of that '*' comes.
+
+#if ENABLE(ES6_GENERATORS)
+            // ES6 Generators
+            if (startsWithFunction && match(TIMES))
+                next();
+#endif
             if (match(IDENT))
                 localName = m_token.m_data.ident;
             restoreSavePoint(savePoint);
@@ -2662,7 +2703,12 @@ template <typename TreeBuilder> TreeExpression Parser<LexerType>::parseAssignmen
         }
         restoreSavePoint(savePoint);
     }
-    
+
+#if ENABLE(ES6_GENERATORS)
+    if (match(YIELD))
+        return parseYieldExpression(context);
+#endif
+
 #if ENABLE(ES6_ARROWFUNCTION_SYNTAX)
     if (isArrowFunctionParamters())
         return parseArrowFunctionExpression(context);
@@ -2731,6 +2777,37 @@ end:
 }
 
 template <typename LexerType>
+template <class TreeBuilder> TreeExpression Parser<LexerType>::parseYieldExpression(TreeBuilder& context)
+{
+    // YieldExpression[In] :
+    //     yield
+    //     yield [no LineTerminator here] AssignmentExpression[?In, Yield]
+    //     yield [no LineTerminator here] * AssignmentExpression[?In, Yield]
+
+    // http://ecma-international.org/ecma-262/6.0/#sec-generator-function-definitions
+    failIfFalse(currentScope()->isGenerator(), "Cannot use yield expression out of generator");
+
+    // http://ecma-international.org/ecma-262/6.0/#sec-generator-function-definitions-static-semantics-early-errors
+    failIfTrue(m_functionParsePhase == FunctionParsePhase::Parameters, "Cannot use yield expression within parameters");
+
+    JSTokenLocation location(tokenLocation());
+    ASSERT(match(YIELD));
+    SavePoint savePoint = createSavePoint();
+    next();
+    if (m_lexer->prevTerminator())
+        return context.createYield(location);
+
+    bool delegate = consume(TIMES);
+    TreeExpression argument = parseAssignmentExpression(context);
+    if (!argument) {
+        restoreSavePoint(savePoint);
+        next();
+        return context.createYield(location);
+    }
+    return context.createYield(location, argument, delegate);
+}
+
+template <typename LexerType>
 template <class TreeBuilder> TreeExpression Parser<LexerType>::parseConditionalExpression(TreeBuilder& context)
 {
     JSTokenLocation location(tokenLocation());
@@ -2814,6 +2891,11 @@ template <typename LexerType>
 template <class TreeBuilder> TreeProperty Parser<LexerType>::parseProperty(TreeBuilder& context, bool complete)
 {
     bool wasIdent = false;
+    bool isGenerator = false;
+#if ENABLE(ES6_GENERATORS)
+    if (consume(TIMES))
+        isGenerator = true;
+#endif
     switch (m_token.m_type) {
     namedProperty:
     case IDENT:
@@ -2822,12 +2904,12 @@ template <class TreeBuilder> TreeProperty Parser<LexerType>::parseProperty(TreeB
     case STRING: {
         const Identifier* ident = m_token.m_data.ident;
         unsigned getterOrSetterStartOffset = tokenStart();
-        if (complete || (wasIdent && (*ident == m_vm->propertyNames->get || *ident == m_vm->propertyNames->set)))
+        if (complete || (wasIdent && !isGenerator && (*ident == m_vm->propertyNames->get || *ident == m_vm->propertyNames->set)))
             nextExpectIdentifier(LexerFlagsIgnoreReservedWords);
         else
             nextExpectIdentifier(LexerFlagsIgnoreReservedWords | TreeBuilder::DontBuildKeywords);
 
-        if (match(COLON)) {
+        if (!isGenerator && match(COLON)) {
             next();
             TreeExpression node = parseAssignmentExpression(context);
             failIfFalse(node, "Cannot parse expression for property declaration");
@@ -2836,10 +2918,11 @@ template <class TreeBuilder> TreeProperty Parser<LexerType>::parseProperty(TreeB
         }
 
         if (match(OPENPAREN)) {
-            auto method = parsePropertyMethod(context, ident);
+            auto method = parsePropertyMethod(context, ident, isGenerator);
             propagateError();
             return context.createProperty(ident, method, PropertyNode::Constant, PropertyNode::KnownDirect, complete);
         }
+        failIfTrue(isGenerator, "Expected a parenthesis for argument list");
 
         failIfFalse(wasIdent, "Expected an identifier as property name");
 
@@ -2867,10 +2950,11 @@ template <class TreeBuilder> TreeProperty Parser<LexerType>::parseProperty(TreeB
 
         if (match(OPENPAREN)) {
             const Identifier& ident = m_parserArena.identifierArena().makeNumericIdentifier(const_cast<VM*>(m_vm), propertyName);
-            auto method = parsePropertyMethod(context, &ident);
+            auto method = parsePropertyMethod(context, &ident, isGenerator);
             propagateError();
             return context.createProperty(&ident, method, PropertyNode::Constant, PropertyNode::Unknown, complete);
         }
+        failIfTrue(isGenerator, "Expected a parenthesis for argument list");
 
         consumeOrFail(COLON, "Expected ':' after property name");
         TreeExpression node = parseAssignmentExpression(context);
@@ -2885,10 +2969,11 @@ template <class TreeBuilder> TreeProperty Parser<LexerType>::parseProperty(TreeB
         handleProductionOrFail(CLOSEBRACKET, "]", "end", "computed property name");
 
         if (match(OPENPAREN)) {
-            auto method = parsePropertyMethod(context, &m_vm->propertyNames->nullIdentifier);
+            auto method = parsePropertyMethod(context, &m_vm->propertyNames->nullIdentifier, isGenerator);
             propagateError();
             return context.createProperty(propertyName, method, static_cast<PropertyNode::Type>(PropertyNode::Constant | PropertyNode::Computed), PropertyNode::KnownDirect, complete);
         }
+        failIfTrue(isGenerator, "Expected a parenthesis for argument list");
 
         consumeOrFail(COLON, "Expected ':' after property name");
         TreeExpression node = parseAssignmentExpression(context);
@@ -2903,12 +2988,13 @@ template <class TreeBuilder> TreeProperty Parser<LexerType>::parseProperty(TreeB
 }
 
 template <typename LexerType>
-template <class TreeBuilder> TreeExpression Parser<LexerType>::parsePropertyMethod(TreeBuilder& context, const Identifier* methodName)
+template <class TreeBuilder> TreeExpression Parser<LexerType>::parsePropertyMethod(TreeBuilder& context, const Identifier* methodName, bool isGenerator)
 {
     JSTokenLocation methodLocation(tokenLocation());
     unsigned methodStart = tokenStart();
     ParserFunctionInfo<TreeBuilder> methodInfo;
-    failIfFalse((parseFunctionInfo(context, FunctionNoRequirements, SourceParseMode::MethodMode, false, ConstructorKind::None, SuperBinding::NotNeeded, methodStart, methodInfo, StandardFunctionParseType)), "Cannot parse this method");
+    SourceParseMode parseMode = isGenerator ? SourceParseMode::GeneratorMode : SourceParseMode::MethodMode;
+    failIfFalse((parseFunctionInfo(context, FunctionNoRequirements, parseMode, false, ConstructorKind::None, SuperBinding::NotNeeded, methodStart, methodInfo, FunctionDefinitionType::Method)), "Cannot parse this method");
     methodInfo.name = methodName;
     return context.createFunctionExpr(methodLocation, methodInfo);
 }
@@ -2923,7 +3009,7 @@ template <class TreeBuilder> TreeProperty Parser<LexerType>::parseGetterSetter(T
 
     JSTokenLocation location(tokenLocation());
 
-    if (match(IDENT) || match(STRING) || isLETMaskedAsIDENT()) {
+    if (matchSpecIdentifier() || match(STRING)) {
         stringPropertyName = m_token.m_data.ident;
         semanticFailIfTrue(superBinding == SuperBinding::Needed && *stringPropertyName == m_vm->propertyNames->prototype,
             "Cannot declare a static method named 'prototype'");
@@ -2944,12 +3030,10 @@ template <class TreeBuilder> TreeProperty Parser<LexerType>::parseGetterSetter(T
     ParserFunctionInfo<TreeBuilder> info;
     if (type & PropertyNode::Getter) {
         failIfFalse(match(OPENPAREN), "Expected a parameter list for getter definition");
-        failIfFalse((parseFunctionInfo(context, FunctionNoRequirements, SourceParseMode::GetterMode, false, constructorKind, superBinding,
-            getterOrSetterStartOffset, info, StandardFunctionParseType)), "Cannot parse getter definition");
+        failIfFalse((parseFunctionInfo(context, FunctionNoRequirements, SourceParseMode::GetterMode, false, constructorKind, superBinding, getterOrSetterStartOffset, info, FunctionDefinitionType::Method)), "Cannot parse getter definition");
     } else {
         failIfFalse(match(OPENPAREN), "Expected a parameter list for setter definition");
-        failIfFalse((parseFunctionInfo(context, FunctionNoRequirements, SourceParseMode::SetterMode, false, constructorKind, superBinding,
-            getterOrSetterStartOffset, info, StandardFunctionParseType)), "Cannot parse setter definition");
+        failIfFalse((parseFunctionInfo(context, FunctionNoRequirements, SourceParseMode::SetterMode, false, constructorKind, superBinding, getterOrSetterStartOffset, info, FunctionDefinitionType::Method)), "Cannot parse setter definition");
     }
 
     if (stringPropertyName)
@@ -3150,6 +3234,24 @@ template <class TreeBuilder> TreeExpression Parser<LexerType>::parseArrayLiteral
     return context.createArray(location, elementList);
 }
 
+template <typename LexerType>
+template <class TreeBuilder> TreeExpression Parser<LexerType>::parseFunctionExpression(TreeBuilder& context)
+{
+    ASSERT(match(FUNCTION));
+    JSTokenLocation location(tokenLocation());
+    unsigned functionKeywordStart = tokenStart();
+    next();
+    ParserFunctionInfo<TreeBuilder> functionInfo;
+    functionInfo.name = &m_vm->propertyNames->nullIdentifier;
+    SourceParseMode parseMode = SourceParseMode::NormalFunctionMode;
+#if ENABLE(ES6_GENERATORS)
+    if (consume(TIMES))
+        parseMode = SourceParseMode::GeneratorMode;
+#endif
+    failIfFalse((parseFunctionInfo(context, FunctionNoRequirements, parseMode, false, ConstructorKind::None, SuperBinding::NotNeeded, functionKeywordStart, functionInfo, FunctionDefinitionType::Expression)), "Cannot parse function expression");
+    return context.createFunctionExpr(location, functionInfo);
+}
+
 #if ENABLE(ES6_TEMPLATE_LITERAL_SYNTAX)
 template <typename LexerType>
 template <class TreeBuilder> typename TreeBuilder::TemplateString Parser<LexerType>::parseTemplateString(TreeBuilder& context, bool isTemplateHead, typename LexerType::RawStringsBuildMode rawStringsBuildMode, bool& elementIsTail)
@@ -3215,15 +3317,8 @@ template <class TreeBuilder> TreeExpression Parser<LexerType>::parsePrimaryExpre
 {
     failIfStackOverflow();
     switch (m_token.m_type) {
-    case FUNCTION: {
-        JSTokenLocation location(tokenLocation());
-        unsigned functionKeywordStart = tokenStart();
-        next();
-        ParserFunctionInfo<TreeBuilder> info;
-        info.name = &m_vm->propertyNames->nullIdentifier;
-        failIfFalse((parseFunctionInfo(context, FunctionNoRequirements, SourceParseMode::NormalFunctionMode, false, ConstructorKind::None, SuperBinding::NotNeeded, functionKeywordStart, info, StandardFunctionParseType)), "Cannot parse function expression");
-        return context.createFunctionExpr(location, info);
-    }
+    case FUNCTION:
+        return parseFunctionExpression(context);
 #if ENABLE(ES6_CLASS_SYNTAX)
     case CLASSTOKEN: {
         ParserClassInfo<TreeBuilder> info;
@@ -3316,6 +3411,10 @@ template <class TreeBuilder> TreeExpression Parser<LexerType>::parsePrimaryExpre
     case TEMPLATE:
         return parseTemplateLiteral(context, LexerType::RawStringsBuildMode::DontBuildRawStrings);
 #endif
+    case YIELD:
+        if (!strictMode() && !currentScope()->isGenerator())
+            goto identifierExpression;
+        failDueToUnexpectedToken();
     case LET:
         if (!strictMode())
             goto identifierExpression;
@@ -3493,7 +3592,7 @@ template <class TreeBuilder> TreeExpression Parser<LexerType>::parseArrowFunctio
     location = tokenLocation();
     ParserFunctionInfo<TreeBuilder> info;
     info.name = &m_vm->propertyNames->nullIdentifier;
-    failIfFalse((parseFunctionInfo(context, FunctionNoRequirements, SourceParseMode::ArrowFunctionMode, true, ConstructorKind::None, SuperBinding::NotNeeded, functionKeywordStart, info, ArrowFunctionParseType)), "Cannot parse arrow function expression");
+    failIfFalse((parseFunctionInfo(context, FunctionNoRequirements, SourceParseMode::ArrowFunctionMode, true, ConstructorKind::None, SuperBinding::NotNeeded, functionKeywordStart, info, FunctionDefinitionType::Expression)), "Cannot parse arrow function expression");
 
     return context.createArrowFunctionExpr(location, info);
 }
index b9089bc..07ad334 100644 (file)
@@ -80,7 +80,6 @@ class SourceCode;
 COMPILE_ASSERT(LastUntaggedToken < 64, LessThan64UntaggedTokens);
 
 enum SourceElementsMode { CheckForStrictMode, DontCheckForStrictMode };
-enum FunctionParseType { StandardFunctionParseType, ArrowFunctionParseType };
 enum FunctionBodyType { ArrowFunctionBodyExpression, ArrowFunctionBodyBlock, StandardFunctionBodyBlock };
 enum FunctionRequirements { FunctionNoRequirements, FunctionNeedsName };
 
@@ -160,7 +159,7 @@ private:
 };
 
 struct Scope {
-    Scope(const VM* vm, bool isFunction, bool strictMode)
+    Scope(const VM* vm, bool isFunction, bool isGenerator, bool strictMode)
         : m_vm(vm)
         , m_shadowsArguments(false)
         , m_usesEval(false)
@@ -171,6 +170,7 @@ struct Scope {
         , m_allowsLexicalDeclarations(true)
         , m_strictMode(strictMode)
         , m_isFunction(isFunction)
+        , m_isGenerator(isGenerator)
         , m_isLexicalScope(false)
         , m_isFunctionBoundary(false)
         , m_isValidStrictMode(true)
@@ -190,6 +190,7 @@ struct Scope {
         , m_allowsLexicalDeclarations(rhs.m_allowsLexicalDeclarations)
         , m_strictMode(rhs.m_strictMode)
         , m_isFunction(rhs.m_isFunction)
+        , m_isGenerator(rhs.m_isGenerator)
         , m_isLexicalScope(rhs.m_isLexicalScope)
         , m_isFunctionBoundary(rhs.m_isFunctionBoundary)
         , m_isValidStrictMode(rhs.m_isValidStrictMode)
@@ -240,20 +241,34 @@ struct Scope {
         return 0;
     }
 
-    void setIsFunction()
+    void setSourceParseMode(SourceParseMode mode)
     {
-        m_isFunction = true;
-        m_isFunctionBoundary = true;
-        setIsLexicalScope();
-    }
+        switch (mode) {
+        case SourceParseMode::GeneratorMode:
+            setIsGenerator();
+            break;
 
-    void setIsModule()
-    {
-        m_moduleScopeData = ModuleScopeData::create();
+        case SourceParseMode::NormalFunctionMode:
+        case SourceParseMode::GetterMode:
+        case SourceParseMode::SetterMode:
+        case SourceParseMode::MethodMode:
+        case SourceParseMode::ArrowFunctionMode:
+            setIsFunction();
+            break;
+
+        case SourceParseMode::ProgramMode:
+            break;
+
+        case SourceParseMode::ModuleAnalyzeMode:
+        case SourceParseMode::ModuleEvaluateMode:
+            setIsModule();
+            break;
+        }
     }
 
     bool isFunction() const { return m_isFunction; }
     bool isFunctionBoundary() const { return m_isFunctionBoundary; }
+    bool isGenerator() const { return m_isGenerator; }
 
     void setIsLexicalScope() 
     { 
@@ -561,6 +576,25 @@ struct Scope {
     }
 
 private:
+    void setIsFunction()
+    {
+        m_isFunction = true;
+        m_isFunctionBoundary = true;
+        setIsLexicalScope();
+        m_isGenerator = false;
+    }
+
+    void setIsGenerator()
+    {
+        setIsFunction();
+        m_isGenerator = true;
+    }
+
+    void setIsModule()
+    {
+        m_moduleScopeData = ModuleScopeData::create();
+    }
+
     const VM* m_vm;
     bool m_shadowsArguments : 1;
     bool m_usesEval : 1;
@@ -571,6 +605,7 @@ private:
     bool m_allowsLexicalDeclarations : 1;
     bool m_strictMode : 1;
     bool m_isFunction : 1;
+    bool m_isGenerator : 1;
     bool m_isLexicalScope : 1;
     bool m_isFunctionBoundary : 1;
     bool m_isValidStrictMode : 1;
@@ -748,11 +783,13 @@ private:
     {
         bool isFunction = false;
         bool isStrict = false;
+        bool isGenerator = false;
         if (!m_scopeStack.isEmpty()) {
             isStrict = m_scopeStack.last().strictMode();
             isFunction = m_scopeStack.last().isFunction();
+            isGenerator = m_scopeStack.last().isGenerator();
         }
-        m_scopeStack.append(Scope(m_vm, isFunction, isStrict));
+        m_scopeStack.append(Scope(m_vm, isFunction, isGenerator, isStrict));
         return currentScope();
     }
     
@@ -1064,11 +1101,29 @@ private:
         return result;
     }
 
+    // http://ecma-international.org/ecma-262/6.0/#sec-identifiers-static-semantics-early-errors
     ALWAYS_INLINE bool isLETMaskedAsIDENT()
     {
         return match(LET) && !strictMode();
     }
 
+    // http://ecma-international.org/ecma-262/6.0/#sec-identifiers-static-semantics-early-errors
+    ALWAYS_INLINE bool isYIELDMaskedAsIDENT(bool inGenerator)
+    {
+        return match(YIELD) && !strictMode() && !inGenerator;
+    }
+
+    // http://ecma-international.org/ecma-262/6.0/#sec-generator-function-definitions-static-semantics-early-errors
+    ALWAYS_INLINE bool matchSpecIdentifier(bool inGenerator)
+    {
+        return match(IDENT) || isLETMaskedAsIDENT() || isYIELDMaskedAsIDENT(inGenerator);
+    }
+
+    ALWAYS_INLINE bool matchSpecIdentifier()
+    {
+        return matchSpecIdentifier(currentScope()->isGenerator());
+    }
+
     template <class TreeBuilder> TreeSourceElements parseSourceElements(TreeBuilder&, SourceElementsMode);
     template <class TreeBuilder> TreeStatement parseStatementListItem(TreeBuilder&, const Identifier*& directive, unsigned* directiveLiteralLength);
     template <class TreeBuilder> TreeStatement parseStatement(TreeBuilder&, const Identifier*& directive, unsigned* directiveLiteralLength = 0);
@@ -1097,6 +1152,7 @@ private:
     template <class TreeBuilder> TreeStatement parseBlockStatement(TreeBuilder&);
     template <class TreeBuilder> TreeExpression parseExpression(TreeBuilder&);
     template <class TreeBuilder> TreeExpression parseAssignmentExpression(TreeBuilder&);
+    template <class TreeBuilder> TreeExpression parseYieldExpression(TreeBuilder&);
     template <class TreeBuilder> ALWAYS_INLINE TreeExpression parseConditionalExpression(TreeBuilder&);
     template <class TreeBuilder> ALWAYS_INLINE TreeExpression parseBinaryExpression(TreeBuilder&);
     template <class TreeBuilder> ALWAYS_INLINE TreeExpression parseUnaryExpression(TreeBuilder&);
@@ -1105,10 +1161,11 @@ private:
     template <class TreeBuilder> ALWAYS_INLINE TreeExpression parseArrayLiteral(TreeBuilder&);
     template <class TreeBuilder> ALWAYS_INLINE TreeExpression parseObjectLiteral(TreeBuilder&);
     template <class TreeBuilder> NEVER_INLINE TreeExpression parseStrictObjectLiteral(TreeBuilder&);
+    template <class TreeBuilder> ALWAYS_INLINE TreeExpression parseFunctionExpression(TreeBuilder&);
     enum SpreadMode { AllowSpread, DontAllowSpread };
     template <class TreeBuilder> ALWAYS_INLINE TreeArguments parseArguments(TreeBuilder&, SpreadMode);
     template <class TreeBuilder> TreeProperty parseProperty(TreeBuilder&, bool strict);
-    template <class TreeBuilder> TreeExpression parsePropertyMethod(TreeBuilder& context, const Identifier* methodName);
+    template <class TreeBuilder> TreeExpression parsePropertyMethod(TreeBuilder& context, const Identifier* methodName, bool isGenerator);
     template <class TreeBuilder> TreeProperty parseGetterSetter(TreeBuilder&, bool strict, PropertyNode::Type, unsigned getterOrSetterStartOffset, ConstructorKind = ConstructorKind::None, SuperBinding = SuperBinding::NotNeeded);
     template <class TreeBuilder> ALWAYS_INLINE TreeFunctionBody parseFunctionBody(TreeBuilder&, const JSTokenLocation&, int, int functionKeywordStart, int functionNameStart, int parametersStart, ConstructorKind, FunctionBodyType, unsigned, SourceParseMode);
     template <class TreeBuilder> ALWAYS_INLINE bool parseFormalParameters(TreeBuilder&, TreeFormalParameterList, unsigned&);
@@ -1128,7 +1185,8 @@ private:
     template <class TreeBuilder> typename TreeBuilder::ExportSpecifier parseExportSpecifier(TreeBuilder& context, Vector<const Identifier*>& maybeLocalNames, bool& hasKeywordForLocalBindings);
     template <class TreeBuilder> TreeStatement parseExportDeclaration(TreeBuilder&);
 
-    template <class TreeBuilder> NEVER_INLINE bool parseFunctionInfo(TreeBuilder&, FunctionRequirements, SourceParseMode, bool nameIsInContainingScope, ConstructorKind, SuperBinding, int functionKeywordStart, ParserFunctionInfo<TreeBuilder>&, FunctionParseType);
+    enum class FunctionDefinitionType { Expression, Declaration, Method };
+    template <class TreeBuilder> NEVER_INLINE bool parseFunctionInfo(TreeBuilder&, FunctionRequirements, SourceParseMode, bool nameIsInContainingScope, ConstructorKind, SuperBinding, int functionKeywordStart, ParserFunctionInfo<TreeBuilder>&, FunctionDefinitionType);
     
     template <class TreeBuilder> NEVER_INLINE int parseFunctionParameters(TreeBuilder&, SourceParseMode, ParserFunctionInfo<TreeBuilder>&);
 
@@ -1202,10 +1260,12 @@ private:
         m_lexer->setLineNumber(savePoint.oldLineNumber);
     }
 
+    enum class FunctionParsePhase { Parameters, Body };
     struct ParserState {
         int assignmentCount;
         int nonLHSCount;
         int nonTrivialExpressionCount;
+        FunctionParsePhase functionParsePhase;
     };
 
     ALWAYS_INLINE ParserState saveState()
@@ -1214,17 +1274,17 @@ private:
         result.assignmentCount = m_assignmentCount;
         result.nonLHSCount = m_nonLHSCount;
         result.nonTrivialExpressionCount = m_nonTrivialExpressionCount;
+        result.functionParsePhase = m_functionParsePhase;
         return result;
     }
-    
+
     ALWAYS_INLINE void restoreState(const ParserState& state)
     {
         m_assignmentCount = state.assignmentCount;
         m_nonLHSCount = state.nonLHSCount;
         m_nonTrivialExpressionCount = state.nonTrivialExpressionCount;
-        
+        m_functionParsePhase = state.functionParsePhase;
     }
-    
 
     VM* m_vm;
     const SourceCode* m_source;
@@ -1242,6 +1302,7 @@ private:
     bool m_syntaxAlreadyValidated;
     int m_statementDepth;
     int m_nonTrivialExpressionCount;
+    FunctionParsePhase m_functionParsePhase;
     const Identifier* m_lastIdentifier;
     const Identifier* m_lastFunctionName;
     RefPtr<SourceProviderCache> m_functionCache;
index aaa4eca..49585cb 100644 (file)
@@ -46,6 +46,7 @@ enum FunctionMode { FunctionExpression, FunctionDeclaration };
 
 enum class SourceParseMode {
     NormalFunctionMode,
+    GeneratorMode,
     GetterMode,
     SetterMode,
     MethodMode,
@@ -59,6 +60,7 @@ inline bool isFunctionParseMode(SourceParseMode parseMode)
 {
     switch (parseMode) {
     case SourceParseMode::NormalFunctionMode:
+    case SourceParseMode::GeneratorMode:
     case SourceParseMode::GetterMode:
     case SourceParseMode::SetterMode:
     case SourceParseMode::MethodMode:
@@ -82,6 +84,7 @@ inline bool isModuleParseMode(SourceParseMode parseMode)
         return true;
 
     case SourceParseMode::NormalFunctionMode:
+    case SourceParseMode::GeneratorMode:
     case SourceParseMode::GetterMode:
     case SourceParseMode::SetterMode:
     case SourceParseMode::MethodMode:
@@ -100,6 +103,7 @@ inline bool isProgramParseMode(SourceParseMode parseMode)
         return true;
 
     case SourceParseMode::NormalFunctionMode:
+    case SourceParseMode::GeneratorMode:
     case SourceParseMode::GetterMode:
     case SourceParseMode::SetterMode:
     case SourceParseMode::MethodMode:
index 42c212d..43666f2 100644 (file)
@@ -78,6 +78,7 @@ enum JSTokenType {
     ELSE,
     IMPORT,
     EXPORT,
+    YIELD,
 #if ENABLE(ES6_CLASS_SYNTAX)
     CLASSTOKEN,
     EXTENDS,
index 247538d..41b9417 100644 (file)
@@ -83,7 +83,7 @@ public:
         ClauseListResult, CommaExpr, DestructuringAssignment,
         TemplateStringResult, TemplateStringListResult,
         TemplateExpressionListResult, TemplateExpr,
-        TaggedTemplateExpr,
+        TaggedTemplateExpr, YieldExpr,
         ModuleNameResult,
         ImportSpecifierResult, ImportSpecifierListResult,
         ExportSpecifierResult, ExportSpecifierListResult
@@ -182,6 +182,8 @@ public:
     ExpressionType createAssignResolve(const JSTokenLocation&, const Identifier&, ExpressionType, int, int, int, AssignmentContext) { return AssignmentExpr; }
     ExpressionType createEmptyVarExpression(const JSTokenLocation&, const Identifier&) { return AssignmentExpr; }
     ExpressionType createEmptyLetExpression(const JSTokenLocation&, const Identifier&) { return AssignmentExpr; }
+    ExpressionType createYield(const JSTokenLocation&) { return YieldExpr; }
+    ExpressionType createYield(const JSTokenLocation&, ExpressionType, bool) { return YieldExpr; }
 #if ENABLE(ES6_CLASS_SYNTAX)
     ClassExpression createClassExpr(const JSTokenLocation&, const Identifier&, VariableEnvironment&, ExpressionType, ExpressionType, PropertyList, PropertyList) { return ClassExpr; }
 #endif
diff --git a/Source/JavaScriptCore/tests/stress/generator-methods.js b/Source/JavaScriptCore/tests/stress/generator-methods.js
new file mode 100644 (file)
index 0000000..4cddae1
--- /dev/null
@@ -0,0 +1,61 @@
+//@ skip
+class Hello {
+    *gen() {
+        yield;
+    }
+
+    static *gen() {
+        yield;
+    }
+
+    *get() {
+    }
+
+    static *get() {
+    }
+
+    *set() {
+    }
+
+    static *set() {
+    }
+
+    *"Hello"() {
+    }
+
+    static *"Hello"() {
+    }
+
+    *20() {
+    }
+
+    static *20() {
+    }
+
+    *[42]() {
+    }
+
+    static *[42]() {
+    }
+}
+
+let object = {
+    *gen() {
+        yield;
+    },
+
+    *get() {
+    },
+
+    *set() {
+    },
+
+    *"Hello"() {
+    },
+
+    *20() {
+    },
+
+    *[42]() {
+    }
+}
diff --git a/Source/JavaScriptCore/tests/stress/generator-syntax.js b/Source/JavaScriptCore/tests/stress/generator-syntax.js
new file mode 100644 (file)
index 0000000..f397959
--- /dev/null
@@ -0,0 +1,95 @@
+//@ skip
+function testSyntax(script) {
+    try {
+        eval(script);
+    } catch (error) {
+        if (error instanceof SyntaxError)
+            throw new Error("Bad error: " + String(error));
+    }
+}
+
+function testSyntaxError(script, message) {
+    var error = null;
+    try {
+        eval(script);
+    } catch (e) {
+        error = e;
+    }
+    if (!error)
+        throw new Error("Expected syntax error not thrown");
+
+    if (String(error) !== message)
+        throw new Error("Bad error: " + String(error));
+}
+
+testSyntaxError(`
+class Hello {
+    get *gen() {
+    }
+}
+`, `SyntaxError: Unexpected token '*'. Expected an opening '(' before a method's parameter list.`);
+
+
+testSyntaxError(`
+class Hello {
+    set *gen(value) {
+    }
+}
+`, `SyntaxError: Unexpected token '*'. Expected an opening '(' before a method's parameter list.`);
+
+testSyntaxError(`
+function ** gen() { }
+`, `SyntaxError: Unexpected token '*'`);
+
+// http://ecma-international.org/ecma-262/6.0/#sec-arrow-function-definitions-static-semantics-early-errors
+testSyntaxError(`
+var value = () => {
+    yield
+}
+`, `SyntaxError: Unexpected keyword 'yield'. Cannot use yield expression out of generator.`);
+
+testSyntaxError(`
+var value = (val = yield) => {
+}
+`, `SyntaxError: Unexpected keyword 'yield'. Cannot use yield expression out of generator.`);
+
+testSyntaxError(`
+function *gen() {
+    function ng(val = yield) {
+    }
+}
+`, `SyntaxError: Unexpected keyword 'yield'. Cannot use yield expression out of generator.`);
+
+testSyntaxError(`
+function *gen() {
+    var ng = (val = yield) => {
+    }
+}
+`, `SyntaxError: Unexpected token '=>'. Expected ';' after variable declaration.`);
+
+// http://ecma-international.org/ecma-262/6.0/#sec-generator-function-definitions-static-semantics-early-errors
+testSyntaxError(`
+function gen(val = yield) {
+}
+`, `SyntaxError: Unexpected keyword 'yield'. Cannot use yield expression out of generator.`);
+
+testSyntaxError(`
+function *gen(val = yield) {
+}
+`, `SyntaxError: Unexpected keyword 'yield'. Cannot use yield expression within parameters.`);
+
+testSyntaxError(`
+function *gen(val = yield 20) {
+}
+`, `SyntaxError: Unexpected keyword 'yield'. Cannot use yield expression within parameters.`);
+
+testSyntaxError(`
+function *gen(val = yield * g) {
+}
+`, `SyntaxError: Unexpected keyword 'yield'. Cannot use yield expression within parameters.`);
+
+
+testSyntax(`
+function *gen(g = function *() { yield  }) {
+}
+`);
diff --git a/Source/JavaScriptCore/tests/stress/yield-and-line-terminator.js b/Source/JavaScriptCore/tests/stress/yield-and-line-terminator.js
new file mode 100644 (file)
index 0000000..d61cd35
--- /dev/null
@@ -0,0 +1,37 @@
+//@ skip
+function testSyntax(script) {
+    try {
+        eval(script);
+    } catch (error) {
+        if (error instanceof SyntaxError)
+            throw new Error("Bad error: " + String(error));
+    }
+}
+
+function testSyntaxError(script, message) {
+    var error = null;
+    try {
+        eval(script);
+    } catch (e) {
+        error = e;
+    }
+    if (!error)
+        throw new Error("Expected syntax error not thrown");
+
+    if (String(error) !== message)
+        throw new Error("Bad error: " + String(error));
+}
+
+testSyntax(`
+function * gen() {
+    yield
+    20;
+}
+`);
+
+testSyntaxError(`
+function * gen() {
+    yield
+    *20;
+}
+`, "SyntaxError: Unexpected token '*'");
diff --git a/Source/JavaScriptCore/tests/stress/yield-label-generator.js b/Source/JavaScriptCore/tests/stress/yield-label-generator.js
new file mode 100644 (file)
index 0000000..d2b6ee0
--- /dev/null
@@ -0,0 +1,50 @@
+//@ skip
+
+function testSyntax(script) {
+    try {
+        eval(script);
+    } catch (error) {
+        if (error instanceof SyntaxError)
+            throw new Error("Bad error: " + String(error));
+    }
+}
+
+function testSyntaxError(script, message) {
+    var error = null;
+    try {
+        eval(script);
+    } catch (e) {
+        error = e;
+    }
+    if (!error)
+        throw new Error("Expected syntax error not thrown");
+
+    if (String(error) !== message)
+        throw new Error("Bad error: " + String(error));
+}
+
+testSyntaxError(`
+function *test() {
+    {
+        yield: for (var i = 0; i < 1000; ++i) {
+            break yield;
+        }
+    }
+}
+`, `SyntaxError: Unexpected keyword 'yield'. Expected an identifier as the target for a break statement.`);
+
+testSyntaxError(`
+function *test() {
+    {
+        yield: for (var i = 0; i < 1000; ++i) {
+            continue yield;
+        }
+    }
+}
+`, `SyntaxError: Unexpected keyword 'yield'. Expected an identifier as the target for a continue statement.`)
+
+testSyntax(`
+function *test() {
+    "OK" ? yield : "NG";  // This is not a label.
+}
+`);
diff --git a/Source/JavaScriptCore/tests/stress/yield-label.js b/Source/JavaScriptCore/tests/stress/yield-label.js
new file mode 100644 (file)
index 0000000..5779b2f
--- /dev/null
@@ -0,0 +1,53 @@
+// http://ecma-international.org/ecma-262/6.0/#sec-identifiers-static-semantics-early-errors
+// If the "yield" label is used under the sloppy mode and the context is not
+// a generator context, we can use "yield" as a label.
+
+(function () {
+    {
+        yield: for (var i = 0; i < 1000; ++i) {
+            break yield;
+        }
+    }
+    {
+        yield: for (var i = 0; i < 1000; ++i) {
+            continue yield;
+        }
+    }
+}());
+
+
+function testSyntaxError(script, message) {
+    var error = null;
+    try {
+        eval(script);
+    } catch (e) {
+        error = e;
+    }
+    if (!error)
+        throw new Error("Expected syntax error not thrown");
+
+    if (String(error) !== message)
+        throw new Error("Bad error: " + String(error));
+}
+
+testSyntaxError(`
+function test() {
+    "use strict";
+    {
+        yield: for (var i = 0; i < 1000; ++i) {
+            break yield;
+        }
+    }
+}
+`, `SyntaxError: Unexpected keyword 'yield'. Expected an identifier as the target for a break statement.`);
+
+testSyntaxError(`
+function test() {
+    "use strict";
+    {
+        yield: for (var i = 0; i < 1000; ++i) {
+            continue yield;
+        }
+    }
+}
+`, `SyntaxError: Unexpected keyword 'yield'. Expected an identifier as the target for a continue statement.`)
diff --git a/Source/JavaScriptCore/tests/stress/yield-named-accessors-generator.js b/Source/JavaScriptCore/tests/stress/yield-named-accessors-generator.js
new file mode 100644 (file)
index 0000000..4f25868
--- /dev/null
@@ -0,0 +1,18 @@
+//@ skip
+function *t1() {
+    let object = {
+        get yield() {
+        },
+        set yield(value) {
+        }
+    }
+}
+function *t2() {
+    "use strict";
+    let object = {
+        get yield() {
+        },
+        set yield(value) {
+        }
+    }
+}
diff --git a/Source/JavaScriptCore/tests/stress/yield-named-accessors.js b/Source/JavaScriptCore/tests/stress/yield-named-accessors.js
new file mode 100644 (file)
index 0000000..e292422
--- /dev/null
@@ -0,0 +1,17 @@
+function t1() {
+    let object = {
+        get yield() {
+        },
+        set yield(value) {
+        }
+    }
+}
+function t2() {
+    "use strict";
+    let object = {
+        get yield() {
+        },
+        set yield(value) {
+        }
+    }
+}
diff --git a/Source/JavaScriptCore/tests/stress/yield-named-variable-generator.js b/Source/JavaScriptCore/tests/stress/yield-named-variable-generator.js
new file mode 100644 (file)
index 0000000..31084ff
--- /dev/null
@@ -0,0 +1,113 @@
+//@ skip
+function testSyntax(script) {
+    try {
+        eval(script);
+    } catch (error) {
+        if (error instanceof SyntaxError)
+            throw new Error("Bad error: " + String(error));
+    }
+}
+
+function testSyntaxError(script, message) {
+    var error = null;
+    try {
+        eval(script);
+    } catch (e) {
+        error = e;
+    }
+    if (!error)
+        throw new Error("Expected syntax error not thrown");
+
+    if (String(error) !== message)
+        throw new Error("Bad error: " + String(error));
+}
+
+testSyntaxError(`
+function *t1() {
+    var yield = 20;
+}
+`, `SyntaxError: Cannot use the keyword 'yield' as a variable name.`);
+testSyntaxError(`
+function *t1() {
+    let yield = 20;
+}
+`, `SyntaxError: Cannot use the keyword 'yield' as a variable name.`);
+testSyntaxError(`
+function *t1() {
+    const yield = 20;
+}
+`, `SyntaxError: Cannot use the keyword 'yield' as a variable name.`);
+
+testSyntaxError(`
+function *t1() {
+    var { yield } = 20;
+}
+`, `SyntaxError: Cannot use abbreviated destructuring syntax for keyword 'yield'.`);
+testSyntaxError(`
+function *t1() {
+    let { yield } = 20;
+}
+`, `SyntaxError: Cannot use abbreviated destructuring syntax for keyword 'yield'.`);
+testSyntaxError(`
+function *t1() {
+    const { yield } = 20;
+}
+`, `SyntaxError: Cannot use abbreviated destructuring syntax for keyword 'yield'.`);
+
+testSyntaxError(`
+function *t1() {
+    var { i: yield } = 20;
+}
+`, `SyntaxError: Cannot use the keyword 'yield' as a variable name.`);
+testSyntaxError(`
+function *t1() {
+    let { i: yield } = 20;
+}
+`, `SyntaxError: Cannot use the keyword 'yield' as a variable name.`);
+testSyntaxError(`
+function *t1() {
+    const { i: yield } = 20;
+}
+`, `SyntaxError: Cannot use the keyword 'yield' as a variable name.`);
+
+testSyntaxError(`
+function *t1() {
+    var [ yield ] = 20;
+}
+`, `SyntaxError: Cannot use the keyword 'yield' as a variable name.`);
+testSyntaxError(`
+function *t1() {
+    let [ yield ] = 20;
+}
+`, `SyntaxError: Cannot use the keyword 'yield' as a variable name.`);
+testSyntaxError(`
+function *t1() {
+    const [ yield ] = 20;
+}
+`, `SyntaxError: Cannot use the keyword 'yield' as a variable name.`);
+
+testSyntaxError(`
+function *t1() {
+    function yield() { }
+}
+`, `SyntaxError: Cannot use the keyword 'yield' as a function name.`);
+testSyntax(`
+function t1() {
+    function *yield() {
+    }
+}
+`);
+
+testSyntaxError(`
+function *t1() {
+    try {
+    } catch (yield) {
+    }
+}
+`, `SyntaxError: Cannot use the keyword 'yield' as a catch variable name.`);
+
+testSyntax(`
+function *t1() {
+    (function yield() {})
+}
+`);
diff --git a/Source/JavaScriptCore/tests/stress/yield-named-variable.js b/Source/JavaScriptCore/tests/stress/yield-named-variable.js
new file mode 100644 (file)
index 0000000..51b4921
--- /dev/null
@@ -0,0 +1,198 @@
+function testSyntax(script) {
+    try {
+        eval(script);
+    } catch (error) {
+        if (error instanceof SyntaxError)
+            throw new Error("Bad error: " + String(error));
+    }
+}
+
+function testSyntaxError(script, message) {
+    var error = null;
+    try {
+        eval(script);
+    } catch (e) {
+        error = e;
+    }
+    if (!error)
+        throw new Error("Expected syntax error not thrown");
+
+    if (String(error) !== message)
+        throw new Error("Bad error: " + String(error));
+}
+
+testSyntax(`
+function t1() {
+    var yield = 20;
+}
+`);
+testSyntax(`
+function t1() {
+    let yield = 20;
+}
+`);
+testSyntax(`
+function t1() {
+    const yield = 20;
+}
+`);
+
+testSyntaxError(`
+function t1() {
+    "use strict";
+    var yield = 20;
+}
+`, `SyntaxError: Cannot use the keyword 'yield' as a variable name.`);
+testSyntaxError(`
+function t1() {
+    "use strict";
+    let yield = 20;
+}
+`, `SyntaxError: Cannot use the keyword 'yield' as a variable name.`);
+testSyntaxError(`
+function t1() {
+    "use strict";
+    const yield = 20;
+}
+`, `SyntaxError: Cannot use the keyword 'yield' as a variable name.`);
+
+testSyntax(`
+function t1() {
+    var { yield } = 20;
+}
+`);
+testSyntax(`
+function t1() {
+    let { yield } = 20;
+}
+`);
+testSyntax(`
+function t1() {
+    const { yield } = 20;
+}
+`);
+
+testSyntaxError(`
+function t1() {
+    "use strict";
+    var { yield } = 20;
+}
+`, `SyntaxError: Cannot use abbreviated destructuring syntax for keyword 'yield'.`);
+testSyntaxError(`
+function t1() {
+    "use strict";
+    let { yield } = 20;
+}
+`, `SyntaxError: Cannot use abbreviated destructuring syntax for keyword 'yield'.`);
+testSyntaxError(`
+function t1() {
+    "use strict";
+    const { yield } = 20;
+}
+`, `SyntaxError: Cannot use abbreviated destructuring syntax for keyword 'yield'.`);
+
+testSyntax(`
+function t1() {
+    var { i: yield } = 20;
+}
+`);
+testSyntax(`
+function t1() {
+    let { i: yield } = 20;
+}
+`);
+testSyntax(`
+function t1() {
+    const { i: yield } = 20;
+}
+`);
+
+testSyntaxError(`
+function t1() {
+    "use strict";
+    var { i: yield } = 20;
+}
+`, `SyntaxError: Cannot use the keyword 'yield' as a variable name.`);
+testSyntaxError(`
+function t1() {
+    "use strict";
+    let { i: yield } = 20;
+}
+`, `SyntaxError: Cannot use the keyword 'yield' as a variable name.`);
+testSyntaxError(`
+function t1() {
+    "use strict";
+    const { i: yield } = 20;
+}
+`, `SyntaxError: Cannot use the keyword 'yield' as a variable name.`);
+
+testSyntax(`
+function t1() {
+    var [ yield ] = 20;
+}
+`);
+testSyntax(`
+function t1() {
+    let [ yield ] = 20;
+}
+`);
+testSyntax(`
+function t1() {
+    const [ yield ] = 20;
+}
+`);
+
+testSyntaxError(`
+function t1() {
+    "use strict";
+    var [ yield ] = 20;
+}
+`, `SyntaxError: Cannot use the keyword 'yield' as a variable name.`);
+testSyntaxError(`
+function t1() {
+    "use strict";
+    let [ yield ] = 20;
+}
+`, `SyntaxError: Cannot use the keyword 'yield' as a variable name.`);
+testSyntaxError(`
+function t1() {
+    "use strict";
+    const [ yield ] = 20;
+}
+`, `SyntaxError: Cannot use the keyword 'yield' as a variable name.`);
+
+testSyntax(`
+function t1() {
+    function yield() { }
+}
+`);
+testSyntaxError(`
+function t1() {
+    "use strict";
+    function yield() { }
+}
+`, `SyntaxError: Cannot use the keyword 'yield' as a function name.`);
+
+testSyntax(`
+function t1() {
+    try {
+    } catch (yield) {
+    }
+}
+`);
+testSyntaxError(`
+function t1() {
+    "use strict";
+    try {
+    } catch (yield) {
+    }
+}
+`, `SyntaxError: Cannot use the keyword 'yield' as a catch variable name.`);
+
+testSyntax(`
+function t1() {
+    function yield() {
+        "use strict";
+    }
+}
+`);
diff --git a/Source/JavaScriptCore/tests/stress/yield-out-of-generator.js b/Source/JavaScriptCore/tests/stress/yield-out-of-generator.js
new file mode 100644 (file)
index 0000000..66fc4ee
--- /dev/null
@@ -0,0 +1,167 @@
+//@ skip
+function testSyntax(script) {
+    try {
+        eval(script);
+    } catch (error) {
+        if (error instanceof SyntaxError)
+            throw new Error("Bad error: " + String(error));
+    }
+}
+
+function testSyntaxError(script, message) {
+    var error = null;
+    try {
+        eval(script);
+    } catch (e) {
+        error = e;
+    }
+    if (!error)
+        throw new Error("Expected syntax error not thrown");
+
+    if (String(error) !== message)
+        throw new Error("Bad error: " + String(error));
+}
+
+testSyntaxError(`
+yield;
+`, "SyntaxError: Unexpected keyword 'yield'. Cannot use yield expression out of generator.");
+
+testSyntaxError(`
+yield*;
+`, "SyntaxError: Unexpected keyword 'yield'. Cannot use yield expression out of generator.");
+
+testSyntaxError(`
+yield 0;
+`, "SyntaxError: Unexpected keyword 'yield'. Cannot use yield expression out of generator.");
+
+testSyntaxError(`
+yield* 0;
+`, "SyntaxError: Unexpected keyword 'yield'. Cannot use yield expression out of generator.");
+
+testSyntaxError(`
+function hello() {
+    yield;
+}
+`, "SyntaxError: Unexpected keyword 'yield'. Cannot use yield expression out of generator.");
+
+testSyntaxError(`
+function hello() {
+    yield*;
+}
+`, "SyntaxError: Unexpected keyword 'yield'. Cannot use yield expression out of generator.");
+
+testSyntaxError(`
+function hello() {
+    yield 0;
+}
+`, "SyntaxError: Unexpected keyword 'yield'. Cannot use yield expression out of generator.");
+
+testSyntaxError(`
+function hello() {
+    yield* 0;
+}
+`, "SyntaxError: Unexpected keyword 'yield'. Cannot use yield expression out of generator.");
+
+testSyntaxError(`
+function *gen() {
+    function hello() {
+        yield;
+    }
+}
+`, "SyntaxError: Unexpected keyword 'yield'. Cannot use yield expression out of generator.");
+
+testSyntaxError(`
+function *gen() {
+    function hello() {
+        yield*;
+    }
+}
+`, "SyntaxError: Unexpected keyword 'yield'. Cannot use yield expression out of generator.");
+
+testSyntaxError(`
+function *gen() {
+    function hello() {
+        yield 0;
+    }
+}
+`, "SyntaxError: Unexpected keyword 'yield'. Cannot use yield expression out of generator.");
+
+testSyntaxError(`
+function *gen() {
+    function hello() {
+        yield* 0;
+    }
+}
+`, "SyntaxError: Unexpected keyword 'yield'. Cannot use yield expression out of generator.");
+
+testSyntax(`
+function *gen() {
+    yield;
+}
+`);
+
+testSyntaxError(`
+function *gen() {
+    yield*;
+}
+`, "SyntaxError: Unexpected token '*'");
+
+testSyntax(`
+function *gen() {
+    yield 0;
+}
+`);
+
+testSyntax(`
+function *gen() {
+    yield* 0;
+}
+`);
+
+testSyntax(`
+function *gen() {
+    {
+        let i = 30;
+        function ok() {
+            return i;
+        }
+        yield;
+    }
+}
+`);
+
+testSyntaxError(`
+function *gen() {
+    {
+        let i = 30;
+        function ok() {
+            return i;
+        }
+        yield*;
+    }
+}
+`, "SyntaxError: Unexpected token '*'");
+
+testSyntax(`
+function *gen() {
+    {
+        let i = 30;
+        function ok() {
+            return i;
+        }
+        yield 0;
+    }
+}
+`);
+
+testSyntax(`
+function *gen() {
+    {
+        let i = 30;
+        function ok() {
+            return i;
+        }
+        yield* 0;
+    }
+}
+`);
index 3bd4ce4..58b3c19 100644 (file)
@@ -1,3 +1,14 @@
+2015-11-01  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        [ES6] Support Generator Syntax
+        https://bugs.webkit.org/show_bug.cgi?id=150769
+
+        Reviewed by Geoffrey Garen.
+
+        Added ENABLE_ES6_GENERATORS flag.
+
+        * wtf/FeatureDefines.h:
+
 2015-11-01  Darin Adler  <darin@apple.com>
 
         ASCIICType refinements
index 399bda2..171725f 100644 (file)
@@ -363,6 +363,10 @@ the public iOS SDK. We will also need to update the FeatureDefines.xcconfig file
 #define ENABLE_ES6_CLASS_SYNTAX 1
 #endif
 
+#if !defined(ENABLE_ES6_CLASS_SYNTAX)
+#define ENABLE_ES6_GENERATORS 0
+#endif
+
 #if !defined(ENABLE_ES6_MODULES)
 #define ENABLE_ES6_MODULES 0
 #endif
index 5807ad0..9ba04f9 100644 (file)
@@ -1,3 +1,14 @@
+2015-11-01  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        [ES6] Support Generator Syntax
+        https://bugs.webkit.org/show_bug.cgi?id=150769
+
+        Reviewed by Geoffrey Garen.
+
+        Added ENABLE_ES6_GENERATORS flag.
+
+        * Configurations/FeatureDefines.xcconfig:
+
 2015-11-01  Myles C. Maxfield  <mmaxfield@apple.com>
 
         Clean up some CSS & Font code
index f8c20e8..e43c6bb 100644 (file)
@@ -47,6 +47,7 @@ ENABLE_CANVAS_PROXY = ;
 ENABLE_CHANNEL_MESSAGING = ENABLE_CHANNEL_MESSAGING;
 ENABLE_ES6_ARROWFUNCTION_SYNTAX = ENABLE_ES6_ARROWFUNCTION_SYNTAX;
 ENABLE_ES6_CLASS_SYNTAX = ENABLE_ES6_CLASS_SYNTAX;
+ENABLE_ES6_GENERATORS = ;
 ENABLE_ES6_MODULES = ;
 ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX = ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX;
 ENABLE_CONTENT_FILTERING = ENABLE_CONTENT_FILTERING;
@@ -232,4 +233,4 @@ ENABLE_SATURATED_LAYOUT_ARITHMETIC = ENABLE_SATURATED_LAYOUT_ARITHMETIC;
 
 ENABLE_SHADOW_DOM = ENABLE_SHADOW_DOM;
 
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_AVF_CAPTIONS) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_ES6_ARROWFUNCTION_SYNTAX) $(ENABLE_ES6_CLASS_SYNTAX) $(ENABLE_ES6_MODULES) $(ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_GRID_LAYOUT) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS3_TEXT_LINE_BREAK) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_ICONDATABASE) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TEXT_AUTOSIZING) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_HWCONCURRENCY) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_CURRENTSRC) $(ENABLE_POINTER_LOCK) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RUBBER_BANDING) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_OTF_CONVERTER) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_DATACUE_VALUE) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_REPLAY) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_XSLT) $(ENABLE_FTL_JIT) $(ENABLE_JIT) $(ENABLE_SATURATED_LAYOUT_ARITHMETIC) $(ENABLE_SHADOW_DOM) $(ENABLE_VIDEO_PRESENTATION_MODE);
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_AVF_CAPTIONS) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_ES6_ARROWFUNCTION_SYNTAX) $(ENABLE_ES6_CLASS_SYNTAX) $(ENABLE_ES6_GENERATORS) $(ENABLE_ES6_MODULES) $(ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_GRID_LAYOUT) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS3_TEXT_LINE_BREAK) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_ICONDATABASE) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TEXT_AUTOSIZING) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_HWCONCURRENCY) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_CURRENTSRC) $(ENABLE_POINTER_LOCK) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RUBBER_BANDING) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_OTF_CONVERTER) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_DATACUE_VALUE) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_REPLAY) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_XSLT) $(ENABLE_FTL_JIT) $(ENABLE_JIT) $(ENABLE_SATURATED_LAYOUT_ARITHMETIC) $(ENABLE_SHADOW_DOM) $(ENABLE_VIDEO_PRESENTATION_MODE);
index e445283..2277444 100644 (file)
@@ -1,3 +1,14 @@
+2015-11-01  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        [ES6] Support Generator Syntax
+        https://bugs.webkit.org/show_bug.cgi?id=150769
+
+        Reviewed by Geoffrey Garen.
+
+        Added ENABLE_ES6_GENERATORS flag.
+
+        * Configurations/FeatureDefines.xcconfig:
+
 2015-10-30  Dan Bernstein  <mitz@apple.com>
 
         Fixed the build.
index f8c20e8..e43c6bb 100644 (file)
@@ -47,6 +47,7 @@ ENABLE_CANVAS_PROXY = ;
 ENABLE_CHANNEL_MESSAGING = ENABLE_CHANNEL_MESSAGING;
 ENABLE_ES6_ARROWFUNCTION_SYNTAX = ENABLE_ES6_ARROWFUNCTION_SYNTAX;
 ENABLE_ES6_CLASS_SYNTAX = ENABLE_ES6_CLASS_SYNTAX;
+ENABLE_ES6_GENERATORS = ;
 ENABLE_ES6_MODULES = ;
 ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX = ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX;
 ENABLE_CONTENT_FILTERING = ENABLE_CONTENT_FILTERING;
@@ -232,4 +233,4 @@ ENABLE_SATURATED_LAYOUT_ARITHMETIC = ENABLE_SATURATED_LAYOUT_ARITHMETIC;
 
 ENABLE_SHADOW_DOM = ENABLE_SHADOW_DOM;
 
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_AVF_CAPTIONS) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_ES6_ARROWFUNCTION_SYNTAX) $(ENABLE_ES6_CLASS_SYNTAX) $(ENABLE_ES6_MODULES) $(ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_GRID_LAYOUT) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS3_TEXT_LINE_BREAK) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_ICONDATABASE) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TEXT_AUTOSIZING) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_HWCONCURRENCY) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_CURRENTSRC) $(ENABLE_POINTER_LOCK) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RUBBER_BANDING) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_OTF_CONVERTER) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_DATACUE_VALUE) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_REPLAY) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_XSLT) $(ENABLE_FTL_JIT) $(ENABLE_JIT) $(ENABLE_SATURATED_LAYOUT_ARITHMETIC) $(ENABLE_SHADOW_DOM) $(ENABLE_VIDEO_PRESENTATION_MODE);
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_AVF_CAPTIONS) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_ES6_ARROWFUNCTION_SYNTAX) $(ENABLE_ES6_CLASS_SYNTAX) $(ENABLE_ES6_GENERATORS) $(ENABLE_ES6_MODULES) $(ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_GRID_LAYOUT) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS3_TEXT_LINE_BREAK) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_ICONDATABASE) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TEXT_AUTOSIZING) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_HWCONCURRENCY) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_CURRENTSRC) $(ENABLE_POINTER_LOCK) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RUBBER_BANDING) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_OTF_CONVERTER) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_DATACUE_VALUE) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_REPLAY) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_XSLT) $(ENABLE_FTL_JIT) $(ENABLE_JIT) $(ENABLE_SATURATED_LAYOUT_ARITHMETIC) $(ENABLE_SHADOW_DOM) $(ENABLE_VIDEO_PRESENTATION_MODE);
index 42a14d6..930fa14 100644 (file)
@@ -1,3 +1,14 @@
+2015-11-01  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        [ES6] Support Generator Syntax
+        https://bugs.webkit.org/show_bug.cgi?id=150769
+
+        Reviewed by Geoffrey Garen.
+
+        Added ENABLE_ES6_GENERATORS flag.
+
+        * Configurations/FeatureDefines.xcconfig:
+
 2015-11-01  Brent Fulgham  <bfulgham@apple.com>
 
         Use convenience function in sandbox profile
index f8c20e8..e43c6bb 100644 (file)
@@ -47,6 +47,7 @@ ENABLE_CANVAS_PROXY = ;
 ENABLE_CHANNEL_MESSAGING = ENABLE_CHANNEL_MESSAGING;
 ENABLE_ES6_ARROWFUNCTION_SYNTAX = ENABLE_ES6_ARROWFUNCTION_SYNTAX;
 ENABLE_ES6_CLASS_SYNTAX = ENABLE_ES6_CLASS_SYNTAX;
+ENABLE_ES6_GENERATORS = ;
 ENABLE_ES6_MODULES = ;
 ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX = ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX;
 ENABLE_CONTENT_FILTERING = ENABLE_CONTENT_FILTERING;
@@ -232,4 +233,4 @@ ENABLE_SATURATED_LAYOUT_ARITHMETIC = ENABLE_SATURATED_LAYOUT_ARITHMETIC;
 
 ENABLE_SHADOW_DOM = ENABLE_SHADOW_DOM;
 
-FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_AVF_CAPTIONS) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_ES6_ARROWFUNCTION_SYNTAX) $(ENABLE_ES6_CLASS_SYNTAX) $(ENABLE_ES6_MODULES) $(ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_GRID_LAYOUT) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS3_TEXT_LINE_BREAK) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_ICONDATABASE) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TEXT_AUTOSIZING) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_HWCONCURRENCY) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_CURRENTSRC) $(ENABLE_POINTER_LOCK) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RUBBER_BANDING) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_OTF_CONVERTER) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_DATACUE_VALUE) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_REPLAY) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_XSLT) $(ENABLE_FTL_JIT) $(ENABLE_JIT) $(ENABLE_SATURATED_LAYOUT_ARITHMETIC) $(ENABLE_SHADOW_DOM) $(ENABLE_VIDEO_PRESENTATION_MODE);
+FEATURE_DEFINES = $(ENABLE_3D_TRANSFORMS) $(ENABLE_ACCELERATED_2D_CANVAS) $(ENABLE_ACCELERATED_OVERFLOW_SCROLLING) $(ENABLE_AVF_CAPTIONS) $(ENABLE_ATTACHMENT_ELEMENT) $(ENABLE_CACHE_PARTITIONING) $(ENABLE_CANVAS_PATH) $(ENABLE_CANVAS_PROXY) $(ENABLE_CHANNEL_MESSAGING) $(ENABLE_ES6_ARROWFUNCTION_SYNTAX) $(ENABLE_ES6_CLASS_SYNTAX) $(ENABLE_ES6_GENERATORS) $(ENABLE_ES6_MODULES) $(ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX) $(ENABLE_CONTENT_FILTERING) $(ENABLE_CSP_NEXT) $(ENABLE_CSS_ANIMATIONS_LEVEL_2) $(ENABLE_CSS_BOX_DECORATION_BREAK) $(ENABLE_CSS_COMPOSITING) $(ENABLE_CSS_DEVICE_ADAPTATION) $(ENABLE_CSS_GRID_LAYOUT) $(ENABLE_CSS_IMAGE_ORIENTATION) $(ENABLE_CSS_IMAGE_RESOLUTION) $(ENABLE_CSS_REGIONS) $(ENABLE_CSS_SELECTORS_LEVEL4) $(ENABLE_CSS_SHAPES) $(ENABLE_CSS3_TEXT) $(ENABLE_CSS3_TEXT_LINE_BREAK) $(ENABLE_CURSOR_VISIBILITY) $(ENABLE_CUSTOM_SCHEME_HANDLER) $(ENABLE_DASHBOARD_SUPPORT) $(ENABLE_DATALIST_ELEMENT) $(ENABLE_DATA_TRANSFER_ITEMS) $(ENABLE_DETAILS_ELEMENT) $(ENABLE_DEVICE_ORIENTATION) $(ENABLE_DOM4_EVENTS_CONSTRUCTOR) $(ENABLE_ENCRYPTED_MEDIA) $(ENABLE_ENCRYPTED_MEDIA_V2) $(ENABLE_FILTERS_LEVEL_2) $(ENABLE_FONT_LOAD_EVENTS) $(ENABLE_FULLSCREEN_API) $(ENABLE_GAMEPAD) $(ENABLE_GAMEPAD_DEPRECATED) $(ENABLE_GEOLOCATION) $(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING) $(ENABLE_ICONDATABASE) $(ENABLE_SERVICE_CONTROLS) $(ENABLE_INDEXED_DATABASE) $(ENABLE_INDEXED_DATABASE_IN_WORKERS) $(ENABLE_INDIE_UI) $(ENABLE_INPUT_TYPE_COLOR) $(ENABLE_INPUT_TYPE_COLOR_POPOVER) $(ENABLE_INPUT_TYPE_DATE) $(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE) $(ENABLE_INPUT_TYPE_DATETIMELOCAL) $(ENABLE_INPUT_TYPE_MONTH) $(ENABLE_INPUT_TYPE_TIME) $(ENABLE_INPUT_TYPE_WEEK) $(ENABLE_WIRELESS_PLAYBACK_TARGET) $(ENABLE_INTL) $(ENABLE_IOS_GESTURE_EVENTS) $(ENABLE_IOS_TEXT_AUTOSIZING) $(ENABLE_IOS_TOUCH_EVENTS) $(ENABLE_LEGACY_CSS_VENDOR_PREFIXES) $(ENABLE_LEGACY_NOTIFICATIONS) $(ENABLE_LEGACY_VENDOR_PREFIXES) $(ENABLE_LEGACY_WEB_AUDIO) $(ENABLE_LETTERPRESS) $(ENABLE_LINK_PREFETCH) $(ENABLE_MAC_GESTURE_EVENTS) $(ENABLE_MATHML) $(ENABLE_MEDIA_CONTROLS_SCRIPT) $(ENABLE_MEDIA_SESSION) $(ENABLE_MEDIA_SOURCE) $(ENABLE_MEDIA_STATISTICS) $(ENABLE_MEDIA_STREAM) $(ENABLE_METER_ELEMENT) $(ENABLE_MHTML) $(ENABLE_MOUSE_CURSOR_SCALE) $(ENABLE_NAVIGATOR_CONTENT_UTILS) $(ENABLE_NAVIGATOR_HWCONCURRENCY) $(ENABLE_NOTIFICATIONS) $(ENABLE_PDFKIT_PLUGIN) $(ENABLE_CURRENTSRC) $(ENABLE_POINTER_LOCK) $(ENABLE_PROXIMITY_EVENTS) $(ENABLE_PUBLIC_SUFFIX_LIST) $(ENABLE_QUOTA) $(ENABLE_REQUEST_ANIMATION_FRAME) $(ENABLE_REQUEST_AUTOCOMPLETE) $(ENABLE_REMOTE_INSPECTOR) $(ENABLE_RESOLUTION_MEDIA_QUERY) $(ENABLE_RUBBER_BANDING) $(ENABLE_CSS_SCROLL_SNAP) $(ENABLE_SPEECH_SYNTHESIS) $(ENABLE_STREAMS_API) $(ENABLE_SUBTLE_CRYPTO) $(ENABLE_SVG_FONTS) $(ENABLE_SVG_OTF_CONVERTER) $(ENABLE_TELEPHONE_NUMBER_DETECTION) $(ENABLE_TEMPLATE_ELEMENT) $(ENABLE_TEXT_AUTOSIZING) $(ENABLE_TOUCH_EVENTS) $(ENABLE_TOUCH_ICON_LOADING) $(ENABLE_CSS_TRAILING_WORD) $(ENABLE_USERSELECT_ALL) $(ENABLE_VIDEO) $(ENABLE_VIDEO_TRACK) $(ENABLE_DATACUE_VALUE) $(ENABLE_VIEW_MODE_CSS_MEDIA) $(ENABLE_WEBASSEMBLY) $(ENABLE_WEBGL) $(ENABLE_WEBGL2) $(ENABLE_WEB_AUDIO) $(ENABLE_WEB_REPLAY) $(ENABLE_WEB_SOCKETS) $(ENABLE_WEB_TIMING) $(ENABLE_XSLT) $(ENABLE_FTL_JIT) $(ENABLE_JIT) $(ENABLE_SATURATED_LAYOUT_ARITHMETIC) $(ENABLE_SHADOW_DOM) $(ENABLE_VIDEO_PRESENTATION_MODE);
index 0e18c27..93b5adb 100644 (file)
@@ -34,6 +34,7 @@ WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DEVICE_ORIENTATION PUBLIC OFF)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DIRECTORY_UPLOAD PUBLIC OFF)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DOM4_EVENTS_CONSTRUCTOR PUBLIC ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_DRAG_SUPPORT PUBLIC ON)
+WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ES6_GENERATORS PUBLIC OFF)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ES6_MODULES PUBLIC OFF)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX PUBLIC ON)
 WEBKIT_OPTION_DEFAULT_PORT_VALUE(ENABLE_FILE_SYSTEM PUBLIC OFF)
index fdd6963..bd622ba 100644 (file)
@@ -77,6 +77,7 @@ macro(WEBKIT_OPTION_BEGIN)
     WEBKIT_OPTION_DEFINE(ENABLE_ENCRYPTED_MEDIA_V2 "Support EME v2" PRIVATE OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_ES6_ARROWFUNCTION_SYNTAX "Toggle ES6 arrow function syntax support" PRIVATE ON)
     WEBKIT_OPTION_DEFINE(ENABLE_ES6_CLASS_SYNTAX "Toggle ES6 class syntax support" PRIVATE ON)
+    WEBKIT_OPTION_DEFINE(ENABLE_ES6_GENERATORS "Toggle ES6 generators support" PRIVATE OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_ES6_MODULES "Toggle ES6 modules support" PRIVATE OFF)
     WEBKIT_OPTION_DEFINE(ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX "Toggle ES6 template literal syntax support" PRIVATE ON)
     WEBKIT_OPTION_DEFINE(ENABLE_FILTERS_LEVEL_2 "Toggle Filters Module Level 2" PRIVATE OFF)
index 879c009..c4b853a 100644 (file)
@@ -1,3 +1,14 @@
+2015-11-01  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        [ES6] Support Generator Syntax
+        https://bugs.webkit.org/show_bug.cgi?id=150769
+
+        Reviewed by Geoffrey Garen.
+
+        Added ENABLE_ES6_GENERATORS flag.
+
+        * Scripts/webkitperl/FeatureList.pm:
+
 2015-11-01  Alexey Proskuryakov  <ap@apple.com>
 
         Sort EWS bots in popovers
index b2e7892..0b477f1 100644 (file)
@@ -79,6 +79,7 @@ my (
     $ftpDirSupport,
     $fullscreenAPISupport,
     $gamepadSupport,
+    $generatorsSupport,
     $geolocationSupport,
     $hardwareConcurrencySupport,
     $highDPICanvasSupport,
@@ -182,6 +183,9 @@ my @features = (
     { option => "class-syntax", desc => "Toggle ES6 class syntax support",
       define => "ENABLE_ES6_CLASS_SYNTAX", default => 1, value => \$classSyntax },
 
+    { option => "generators", desc => "Toggle ES6 generators support",
+      define => "ENABLE_ES6_GENERATORS", default => 0, value => \$generatorsSupport },
+
     { option => "modules", desc => "Toggle ES6 modules support",
       define => "ENABLE_ES6_MODULES", default => 0, value => \$modulesSupport },
 
index 0d96d9c..49af452 100644 (file)
@@ -1,3 +1,15 @@
+2015-11-01  Yusuke Suzuki  <utatane.tea@gmail.com>
+
+        [ES6] Support Generator Syntax
+        https://bugs.webkit.org/show_bug.cgi?id=150769
+
+        Reviewed by Geoffrey Garen.
+
+        Added ENABLE_ES6_GENERATORS flag.
+
+        * win/tools/vsprops/FeatureDefines.props:
+        * win/tools/vsprops/FeatureDefinesCairo.props:
+
 2015-10-26  Dana Burkart  <dburkart@apple.com>
 
         `make analyze` should build using the debug configuration
index da910d8..c0597a2 100644 (file)
@@ -32,6 +32,7 @@
     <ENABLE_DIRECTORY_UPLOAD />
     <ENABLE_DOM4_EVENTS_CONSTRUCTOR>ENABLE_DOM4_EVENTS_CONSTRUCTOR</ENABLE_DOM4_EVENTS_CONSTRUCTOR>
     <ENABLE_ENCRYPTED_MEDIA_V2>ENABLE_ENCRYPTED_MEDIA_V2</ENABLE_ENCRYPTED_MEDIA_V2>
+    <ENABLE_ES6_GENERATORS />
     <ENABLE_ES6_MODULES />
     <ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX>ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX</ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX>
     <ENABLE_FILE_SYSTEM />
@@ -96,7 +97,7 @@
   </PropertyGroup>
   <ItemDefinitionGroup>
     <ClCompile>
-      <PreprocessorDefinitions>$(ENABLE_CSP_NEXT);$(ENABLE_PROMISES);$(ENABLE_REQUEST_ANIMATION_FRAME);$(ENABLE_3D_TRANSFORMS);$(ENABLE_ACCELERATED_2D_CANVAS);$(ENABLE_ACCELERATED_OVERFLOW_SCROLLING);$(ENABLE_ATTACHMENT_ELEMENT);$(ENABLE_CANVAS_PATH);$(ENABLE_CANVAS_PROXY);$(ENABLE_CHANNEL_MESSAGING);$(ENABLE_CSS3_CONDITIONAL_RULES);$(ENABLE_CSS_IMAGE_SET);$(ENABLE_CSS3_TEXT);$(ENABLE_CSS_BOX_DECORATION_BREAK);$(ENABLE_CSS_GRID_LAYOUT);$(ENABLE_CSS_SHADERS);$(ENABLE_CSS_COMPOSITING);$(ENABLE_CSS_REGIONS);$(ENABLE_CSS_SELECTORS_LEVEL4);$(ENABLE_CSS_SHAPES);$(ENABLE_CSS_SHAPE_INSIDE);$(ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED);$(ENABLE_CURSOR_VISIBILITY);$(ENABLE_CUSTOM_SCHEME_HANDLER);$(ENABLE_DATAGRID);$(ENABLE_DATALIST_ELEMENT);$(ENABLE_DATA_TRANSFER_ITEMS);$(ENABLE_DETAILS_ELEMENT);$(ENABLE_DEVICE_ORIENTATION);$(ENABLE_DIRECTORY_UPLOAD);$(ENABLE_DOM4_EVENTS_CONSTRUCTOR);$(ENABLE_ENCRYPTED_MEDIA_V2);$(ENABLE_ES6_MODULES);$(ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX);$(ENABLE_FILE_SYSTEM);$(ENABLE_FULLSCREEN_API);$(ENABLE_GAMEPAD);$(ENABLE_GEOLOCATION);$(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING);$(ENABLE_HIGH_DPI_CANVAS);$(ENABLE_ICONDATABASE);$(ENABLE_INDEXED_DATABASE);$(ENABLE_INPUT_TYPE_COLOR);$(ENABLE_INPUT_SPEECH);$(ENABLE_INPUT_TYPE_DATE);$(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE);$(ENABLE_INPUT_TYPE_DATETIMELOCAL);$(ENABLE_INPUT_TYPE_MONTH);$(ENABLE_INPUT_TYPE_TIME);$(ENABLE_INPUT_TYPE_WEEK);$(ENABLE_INTL);$(ENABLE_LEGACY_CSS_VENDOR_PREFIXES);$(ENABLE_LEGACY_NOTIFICATIONS);$(ENABLE_LINK_PREFETCH);$(ENABLE_LINK_PRERENDER);$(ENABLE_MATHML);$(ENABLE_METER_ELEMENT);$(ENABLE_MICRODATA);$(ENABLE_MOUSE_CURSOR_SCALE);$(ENABLE_NOTIFICATIONS);$(ENABLE_CURRENTSRC);$(ENABLE_PROXIMITY_EVENTS);$(ENABLE_QUOTA);$(ENABLE_NAVIGATOR_CONTENT_UTILS);$(ENABLE_SCRIPTED_SPEECH);$(ENABLE_SHADOW_DOM);$(ENABLE_SHARED_WORKERS);$(ENABLE_MEDIA_CONTROLS_SCRIPT);$(ENABLE_MEDIA_SOURCE);$(ENABLE_MEDIA_STATISTICS);$(ENABLE_SQL_DATABASE);$(ENABLE_STREAMS_API);$(ENABLE_STYLE_SCOPED);$(ENABLE_SUBPIXEL_LAYOUT);$(ENABLE_SVG_DOM_OBJC_BINDINGS);$(ENABLE_SVG_FONTS);$(ENABLE_SVG_OTF_CONVERTER);$(ENABLE_TEMPLATE_ELEMENT);$(ENABLE_TEXT_AUTOSIZING);$(ENABLE_VIDEO);$(ENABLE_VIDEO_TRACK);$(ENABLE_VIEW_MODE_CSS_MEDIA);$(ENABLE_WEB_AUDIO);$(ENABLE_WEB_SOCKETS);$(ENABLE_WEB_TIMING);$(ENABLE_WEBGL);$(ENABLE_WEBVTT_REGIONS);$(ENABLE_XHR_TIMEOUT);$(ENABLE_XSLT);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>$(ENABLE_CSP_NEXT);$(ENABLE_PROMISES);$(ENABLE_REQUEST_ANIMATION_FRAME);$(ENABLE_3D_TRANSFORMS);$(ENABLE_ACCELERATED_2D_CANVAS);$(ENABLE_ACCELERATED_OVERFLOW_SCROLLING);$(ENABLE_ATTACHMENT_ELEMENT);$(ENABLE_CANVAS_PATH);$(ENABLE_CANVAS_PROXY);$(ENABLE_CHANNEL_MESSAGING);$(ENABLE_CSS3_CONDITIONAL_RULES);$(ENABLE_CSS_IMAGE_SET);$(ENABLE_CSS3_TEXT);$(ENABLE_CSS_BOX_DECORATION_BREAK);$(ENABLE_CSS_GRID_LAYOUT);$(ENABLE_CSS_SHADERS);$(ENABLE_CSS_COMPOSITING);$(ENABLE_CSS_REGIONS);$(ENABLE_CSS_SELECTORS_LEVEL4);$(ENABLE_CSS_SHAPES);$(ENABLE_CSS_SHAPE_INSIDE);$(ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED);$(ENABLE_CURSOR_VISIBILITY);$(ENABLE_CUSTOM_SCHEME_HANDLER);$(ENABLE_DATAGRID);$(ENABLE_DATALIST_ELEMENT);$(ENABLE_DATA_TRANSFER_ITEMS);$(ENABLE_DETAILS_ELEMENT);$(ENABLE_DEVICE_ORIENTATION);$(ENABLE_DIRECTORY_UPLOAD);$(ENABLE_DOM4_EVENTS_CONSTRUCTOR);$(ENABLE_ENCRYPTED_MEDIA_V2);$(ENABLE_ES6_GENERATORS);$(ENABLE_ES6_MODULES);$(ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX);$(ENABLE_FILE_SYSTEM);$(ENABLE_FULLSCREEN_API);$(ENABLE_GAMEPAD);$(ENABLE_GEOLOCATION);$(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING);$(ENABLE_HIGH_DPI_CANVAS);$(ENABLE_ICONDATABASE);$(ENABLE_INDEXED_DATABASE);$(ENABLE_INPUT_TYPE_COLOR);$(ENABLE_INPUT_SPEECH);$(ENABLE_INPUT_TYPE_DATE);$(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE);$(ENABLE_INPUT_TYPE_DATETIMELOCAL);$(ENABLE_INPUT_TYPE_MONTH);$(ENABLE_INPUT_TYPE_TIME);$(ENABLE_INPUT_TYPE_WEEK);$(ENABLE_INTL);$(ENABLE_LEGACY_CSS_VENDOR_PREFIXES);$(ENABLE_LEGACY_NOTIFICATIONS);$(ENABLE_LINK_PREFETCH);$(ENABLE_LINK_PRERENDER);$(ENABLE_MATHML);$(ENABLE_METER_ELEMENT);$(ENABLE_MICRODATA);$(ENABLE_MOUSE_CURSOR_SCALE);$(ENABLE_NOTIFICATIONS);$(ENABLE_CURRENTSRC);$(ENABLE_PROXIMITY_EVENTS);$(ENABLE_QUOTA);$(ENABLE_NAVIGATOR_CONTENT_UTILS);$(ENABLE_SCRIPTED_SPEECH);$(ENABLE_SHADOW_DOM);$(ENABLE_SHARED_WORKERS);$(ENABLE_MEDIA_CONTROLS_SCRIPT);$(ENABLE_MEDIA_SOURCE);$(ENABLE_MEDIA_STATISTICS);$(ENABLE_SQL_DATABASE);$(ENABLE_STREAMS_API);$(ENABLE_STYLE_SCOPED);$(ENABLE_SUBPIXEL_LAYOUT);$(ENABLE_SVG_DOM_OBJC_BINDINGS);$(ENABLE_SVG_FONTS);$(ENABLE_SVG_OTF_CONVERTER);$(ENABLE_TEMPLATE_ELEMENT);$(ENABLE_TEXT_AUTOSIZING);$(ENABLE_VIDEO);$(ENABLE_VIDEO_TRACK);$(ENABLE_VIEW_MODE_CSS_MEDIA);$(ENABLE_WEB_AUDIO);$(ENABLE_WEB_SOCKETS);$(ENABLE_WEB_TIMING);$(ENABLE_WEBGL);$(ENABLE_WEBVTT_REGIONS);$(ENABLE_XHR_TIMEOUT);$(ENABLE_XSLT);%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
   </ItemDefinitionGroup>
   <ItemGroup>
       <Value>$(ENABLE_ENCRYPTED_MEDIA_V2)</Value>
       <EnvironmentVariable>true</EnvironmentVariable>
     </BuildMacro>
+    <BuildMacro Include="ENABLE_ES6_GENERATORS">
+      <Value>$(ENABLE_ES6_GENERATORS)</Value>
+      <EnvironmentVariable>true</EnvironmentVariable>
+    </BuildMacro>
     <BuildMacro Include="ENABLE_ES6_MODULES">
       <Value>$(ENABLE_ES6_MODULES)</Value>
       <EnvironmentVariable>true</EnvironmentVariable>
index b6cf8a6..4cb7194 100644 (file)
@@ -32,6 +32,7 @@
     <ENABLE_DIRECTORY_UPLOAD />
     <ENABLE_DOM4_EVENTS_CONSTRUCTOR>ENABLE_DOM4_EVENTS_CONSTRUCTOR</ENABLE_DOM4_EVENTS_CONSTRUCTOR>
     <ENABLE_ENCRYPTED_MEDIA_V2 />
+    <ENABLE_ES6_GENERATORS />
     <ENABLE_ES6_MODULES />
     <ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX>ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX</ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX>
     <ENABLE_FILE_SYSTEM />
@@ -95,7 +96,7 @@
   </PropertyGroup>
   <ItemDefinitionGroup>
     <ClCompile>
-      <PreprocessorDefinitions>$(ENABLE_CSP_NEXT);$(ENABLE_PROMISES);$(ENABLE_REQUEST_ANIMATION_FRAME);$(ENABLE_3D_TRANSFORMS);$(ENABLE_ACCELERATED_2D_CANVAS);$(ENABLE_ACCELERATED_OVERFLOW_SCROLLING);$(ENABLE_ATTACHMENT_ELEMENT);$(ENABLE_CANVAS_PATH);$(ENABLE_CANVAS_PROXY);$(ENABLE_CHANNEL_MESSAGING);$(ENABLE_CSS3_CONDITIONAL_RULES);$(ENABLE_CSS_IMAGE_SET);$(ENABLE_CSS3_TEXT);$(ENABLE_CSS_BOX_DECORATION_BREAK);$(ENABLE_CSS_GRID_LAYOUT);$(ENABLE_CSS_SHADERS);$(ENABLE_CSS_COMPOSITING);$(ENABLE_CSS_REGIONS);$(ENABLE_CSS_SELECTORS_LEVEL4);$(ENABLE_CSS_SHAPES);$(ENABLE_CSS_SHAPE_INSIDE);$(ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED);$(ENABLE_CURSOR_VISIBILITY);$(ENABLE_CUSTOM_SCHEME_HANDLER);$(ENABLE_DATAGRID);$(ENABLE_DATALIST_ELEMENT);$(ENABLE_DATA_TRANSFER_ITEMS);$(ENABLE_DETAILS_ELEMENT);$(ENABLE_DEVICE_ORIENTATION);$(ENABLE_DIRECTORY_UPLOAD);$(ENABLE_DOM4_EVENTS_CONSTRUCTOR);$(ENABLE_ENCRYPTED_MEDIA_V2);$(ENABLE_ES6_MODULES);$(ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX);$(ENABLE_FILE_SYSTEM);$(ENABLE_FULLSCREEN_API);$(ENABLE_GAMEPAD);$(ENABLE_GEOLOCATION);$(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING);$(ENABLE_HIGH_DPI_CANVAS);$(ENABLE_ICONDATABASE);$(ENABLE_INDEXED_DATABASE);$(ENABLE_INPUT_TYPE_COLOR);$(ENABLE_INPUT_SPEECH);$(ENABLE_INPUT_TYPE_DATE);$(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE);$(ENABLE_INPUT_TYPE_DATETIMELOCAL);$(ENABLE_INPUT_TYPE_MONTH);$(ENABLE_INPUT_TYPE_TIME);$(ENABLE_INPUT_TYPE_WEEK);$(ENABLE_INTL);$(ENABLE_LEGACY_CSS_VENDOR_PREFIXES);$(ENABLE_LEGACY_NOTIFICATIONS);$(ENABLE_LINK_PREFETCH);$(ENABLE_LINK_PRERENDER);$(ENABLE_MATHML);$(ENABLE_METER_ELEMENT);$(ENABLE_MICRODATA);$(ENABLE_MOUSE_CURSOR_SCALE);$(ENABLE_NOTIFICATIONS);$(ENABLE_CURRENTSRC);$(ENABLE_PROXIMITY_EVENTS);$(ENABLE_QUOTA);$(ENABLE_NAVIGATOR_CONTENT_UTILS);$(ENABLE_SCRIPTED_SPEECH);$(ENABLE_SHADOW_DOM);$(ENABLE_SHARED_WORKERS);$(ENABLE_MEDIA_CONTROLS_SCRIPT);$(ENABLE_MEDIA_SOURCE);$(ENABLE_MEDIA_STATISTICS);$(ENABLE_SQL_DATABASE);$(ENABLE_STYLE_SCOPED);$(ENABLE_SUBPIXEL_LAYOUT);$(ENABLE_SVG_DOM_OBJC_BINDINGS);$(ENABLE_SVG_FONTS);$(ENABLE_SVG_OTF_CONVERTER);$(ENABLE_TEMPLATE_ELEMENT);$(ENABLE_TEXT_AUTOSIZING);$(ENABLE_VIDEO);$(ENABLE_VIDEO_TRACK);$(ENABLE_VIEW_MODE_CSS_MEDIA);$(ENABLE_WEB_AUDIO);$(ENABLE_WEB_SOCKETS);$(ENABLE_WEB_TIMING);$(ENABLE_WEBGL);$(ENABLE_WEBVTT_REGIONS);$(ENABLE_XHR_TIMEOUT);$(ENABLE_XSLT);%(PreprocessorDefinitions)</PreprocessorDefinitions>
+      <PreprocessorDefinitions>$(ENABLE_CSP_NEXT);$(ENABLE_PROMISES);$(ENABLE_REQUEST_ANIMATION_FRAME);$(ENABLE_3D_TRANSFORMS);$(ENABLE_ACCELERATED_2D_CANVAS);$(ENABLE_ACCELERATED_OVERFLOW_SCROLLING);$(ENABLE_ATTACHMENT_ELEMENT);$(ENABLE_CANVAS_PATH);$(ENABLE_CANVAS_PROXY);$(ENABLE_CHANNEL_MESSAGING);$(ENABLE_CSS3_CONDITIONAL_RULES);$(ENABLE_CSS_IMAGE_SET);$(ENABLE_CSS3_TEXT);$(ENABLE_CSS_BOX_DECORATION_BREAK);$(ENABLE_CSS_GRID_LAYOUT);$(ENABLE_CSS_SHADERS);$(ENABLE_CSS_COMPOSITING);$(ENABLE_CSS_REGIONS);$(ENABLE_CSS_SELECTORS_LEVEL4);$(ENABLE_CSS_SHAPES);$(ENABLE_CSS_SHAPE_INSIDE);$(ENABLE_CSS_TRANSFORMS_ANIMATIONS_TRANSITIONS_UNPREFIXED);$(ENABLE_CURSOR_VISIBILITY);$(ENABLE_CUSTOM_SCHEME_HANDLER);$(ENABLE_DATAGRID);$(ENABLE_DATALIST_ELEMENT);$(ENABLE_DATA_TRANSFER_ITEMS);$(ENABLE_DETAILS_ELEMENT);$(ENABLE_DEVICE_ORIENTATION);$(ENABLE_DIRECTORY_UPLOAD);$(ENABLE_DOM4_EVENTS_CONSTRUCTOR);$(ENABLE_ENCRYPTED_MEDIA_V2);$(ENABLE_ES6_GENERATORS);$(ENABLE_ES6_MODULES);$(ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX);$(ENABLE_FILE_SYSTEM);$(ENABLE_FULLSCREEN_API);$(ENABLE_GAMEPAD);$(ENABLE_GEOLOCATION);$(ENABLE_HIDDEN_PAGE_DOM_TIMER_THROTTLING);$(ENABLE_HIGH_DPI_CANVAS);$(ENABLE_ICONDATABASE);$(ENABLE_INDEXED_DATABASE);$(ENABLE_INPUT_TYPE_COLOR);$(ENABLE_INPUT_SPEECH);$(ENABLE_INPUT_TYPE_DATE);$(ENABLE_INPUT_TYPE_DATETIME_INCOMPLETE);$(ENABLE_INPUT_TYPE_DATETIMELOCAL);$(ENABLE_INPUT_TYPE_MONTH);$(ENABLE_INPUT_TYPE_TIME);$(ENABLE_INPUT_TYPE_WEEK);$(ENABLE_INTL);$(ENABLE_LEGACY_CSS_VENDOR_PREFIXES);$(ENABLE_LEGACY_NOTIFICATIONS);$(ENABLE_LINK_PREFETCH);$(ENABLE_LINK_PRERENDER);$(ENABLE_MATHML);$(ENABLE_METER_ELEMENT);$(ENABLE_MICRODATA);$(ENABLE_MOUSE_CURSOR_SCALE);$(ENABLE_NOTIFICATIONS);$(ENABLE_CURRENTSRC);$(ENABLE_PROXIMITY_EVENTS);$(ENABLE_QUOTA);$(ENABLE_NAVIGATOR_CONTENT_UTILS);$(ENABLE_SCRIPTED_SPEECH);$(ENABLE_SHADOW_DOM);$(ENABLE_SHARED_WORKERS);$(ENABLE_MEDIA_CONTROLS_SCRIPT);$(ENABLE_MEDIA_SOURCE);$(ENABLE_MEDIA_STATISTICS);$(ENABLE_SQL_DATABASE);$(ENABLE_STYLE_SCOPED);$(ENABLE_SUBPIXEL_LAYOUT);$(ENABLE_SVG_DOM_OBJC_BINDINGS);$(ENABLE_SVG_FONTS);$(ENABLE_SVG_OTF_CONVERTER);$(ENABLE_TEMPLATE_ELEMENT);$(ENABLE_TEXT_AUTOSIZING);$(ENABLE_VIDEO);$(ENABLE_VIDEO_TRACK);$(ENABLE_VIEW_MODE_CSS_MEDIA);$(ENABLE_WEB_AUDIO);$(ENABLE_WEB_SOCKETS);$(ENABLE_WEB_TIMING);$(ENABLE_WEBGL);$(ENABLE_WEBVTT_REGIONS);$(ENABLE_XHR_TIMEOUT);$(ENABLE_XSLT);%(PreprocessorDefinitions)</PreprocessorDefinitions>
     </ClCompile>
   </ItemDefinitionGroup>
   <ItemGroup>
       <Value>$(ENABLE_ENCRYPTED_MEDIA_V2)</Value>
       <EnvironmentVariable>true</EnvironmentVariable>
     </BuildMacro>
+    <BuildMacro Include="ENABLE_ES6_GENERATORS">
+      <Value>$(ENABLE_ES6_GENERATORS)</Value>
+      <EnvironmentVariable>true</EnvironmentVariable>
+    </BuildMacro>
     <BuildMacro Include="ENABLE_ES6_MODULES">
       <Value>$(ENABLE_ES6_MODULES)</Value>
       <EnvironmentVariable>true</EnvironmentVariable>