Support Generator Syntax, this is the first step toward implementing Generators.
Created attachment 264508 [details] Patch WIP
Created attachment 264517 [details] Patch
Attachment 264517 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/parser/ParserTokens.h:81: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] ERROR: Source/JavaScriptCore/parser/Keywords.table:41: Line contains tab character. [whitespace/tab] [5] ERROR: Source/JavaScriptCore/parser/Parser.cpp:207: Wrong number of spaces before statement. (expected: 8) [whitespace/indent] [4] ERROR: Source/JavaScriptCore/parser/Parser.cpp:2505: Multi line control clauses should use braces. [whitespace/braces] [4] Total errors found: 4 in 42 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 264517 [details] Patch Attachment 264517 [details] did not pass mac-ews (mac): Output: http://webkit-queues.webkit.org/results/367906 New failing tests: js/dom/reserved-words-as-property.html
Created attachment 264518 [details] Archive of layout-test-results from ews101 for mac-mavericks The attached test failures were seen while running run-webkit-tests on the mac-ews. Bot: ews101 Port: mac-mavericks Platform: Mac OS X 10.9.5
Comment on attachment 264517 [details] Patch Attachment 264517 [details] did not pass mac-wk2-ews (mac-wk2): Output: http://webkit-queues.webkit.org/results/367910 New failing tests: js/dom/reserved-words-as-property.html
Created attachment 264519 [details] Archive of layout-test-results from ews104 for mac-mavericks-wk2 The attached test failures were seen while running run-webkit-tests on the mac-wk2-ews. Bot: ews104 Port: mac-mavericks-wk2 Platform: Mac OS X 10.9.5
Comment on attachment 264517 [details] Patch Attachment 264517 [details] did not pass mac-debug-ews (mac): Output: http://webkit-queues.webkit.org/results/367900 New failing tests: js/dom/reserved-words-as-property.html
Created attachment 264520 [details] Archive of layout-test-results from ews117 for mac-yosemite The attached test failures were seen while running run-webkit-tests on the mac-debug-ews. Bot: ews117 Port: mac-yosemite Platform: Mac OS X 10.10.5
Comment on attachment 264517 [details] Patch EWS is red.
Created attachment 264547 [details] Patch Oops. Updated the patch
Attachment 264547 [details] did not pass style-queue: ERROR: Source/JavaScriptCore/parser/ParserTokens.h:81: enum members should use InterCaps with an initial capital letter. [readability/enum_casing] [4] ERROR: Source/JavaScriptCore/parser/Keywords.table:41: Line contains tab character. [whitespace/tab] [5] ERROR: Source/JavaScriptCore/parser/Parser.cpp:207: Wrong number of spaces before statement. (expected: 8) [whitespace/indent] [4] ERROR: Source/JavaScriptCore/parser/Parser.cpp:2505: Multi line control clauses should use braces. [whitespace/braces] [4] Total errors found: 4 in 43 files If any of these errors are false positives, please file a bug against check-webkit-style.
Comment on attachment 264547 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=264547&action=review r=me > Source/JavaScriptCore/parser/Parser.cpp:478 > + // Intentionally use `match(IDENT) || match(YIELD) || match(LET)` and not use `matchSpecIdentifier()`. not use => don't use > Source/JavaScriptCore/parser/Parser.cpp:479 > + // Because, we would like to fall into parseVariableDeclaration path even if "yield" is not treated as an Identifier. Because, we => We > Source/JavaScriptCore/parser/Parser.cpp:483 > + if (!(match(IDENT) || match(YIELD) || match(LET)) && !match(OPENBRACE) && !match(OPENBRACKET)) Should we test let before yield since it will be more common? > Source/JavaScriptCore/parser/Parser.cpp:1751 > - > + > matchOrFail(OPENBRACE, "Expected an opening '{' at the start of a ", stringForFunctionMode(mode), " body"); > - > + > // BytecodeGenerator emits code to throw TypeError when a class constructor is "call"ed. > // Set ConstructorKind to None for non-constructor methods of classes. > - > + Revert whitespace changes please.
Comment on attachment 264547 [details] Patch View in context: https://bugs.webkit.org/attachment.cgi?id=264547&action=review Thanks for your review :) After ensuring the patch passes EWS, I'll land it with pointed fixes. >> Source/JavaScriptCore/parser/Parser.cpp:478 >> + // Intentionally use `match(IDENT) || match(YIELD) || match(LET)` and not use `matchSpecIdentifier()`. > > not use => don't use Fixed. >> Source/JavaScriptCore/parser/Parser.cpp:479 >> + // Because, we would like to fall into parseVariableDeclaration path even if "yield" is not treated as an Identifier. > > Because, we => We Changed. >> Source/JavaScriptCore/parser/Parser.cpp:483 >> + if (!(match(IDENT) || match(YIELD) || match(LET)) && !match(OPENBRACE) && !match(OPENBRACKET)) > > Should we test let before yield since it will be more common? Nice! I've exchanged :) >> Source/JavaScriptCore/parser/Parser.cpp:1751 >> + > > Revert whitespace changes please. OK, reverted.
Committed r191875: <http://trac.webkit.org/changeset/191875>