Changeset 181419 in webkit
- Timestamp:
- Mar 11, 2015, 5:35:28 PM (11 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 4 edited
-
ChangeLog (modified) (1 diff)
-
parser/Keywords.table (modified) (2 diffs)
-
parser/Parser.cpp (modified) (1 diff)
-
parser/ParserTokens.h (modified) (1 diff)
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r181411 r181419 1 2015-03-11 Ryosuke Niwa <rniwa@webkit.org> 2 3 "static" should not be a reserved keyword in non-strict mode even when ES6 class is enabled 4 https://bugs.webkit.org/show_bug.cgi?id=142600 5 6 Reviewed by Mark Lam. 7 8 Make "static" RESERVED_IF_STRICT and manually detect it in parseClass. 9 10 No new tests. This is already checked by js/reserved-words.html and js/keywords-and-reserved_words.html 11 12 * parser/Keywords.table: 13 * parser/Parser.cpp: 14 (JSC::Parser<LexerType>::parseClass): 15 * parser/ParserTokens.h: 16 1 17 2015-03-11 Geoffrey Garen <ggaren@apple.com> 2 18 -
trunk/Source/JavaScriptCore/parser/Keywords.table
r178954 r181419 31 31 else ELSE 32 32 in INTOKEN 33 static STATICTOKEN34 33 super SUPER 35 34 switch SWITCH … … 53 52 protected RESERVED_IF_STRICT 54 53 public RESERVED_IF_STRICT 54 static RESERVED_IF_STRICT 55 55 yield RESERVED_IF_STRICT 56 56 -
trunk/Source/JavaScriptCore/parser/Parser.cpp
r181404 r181419 1492 1492 unsigned methodStart = tokenStart(); 1493 1493 1494 bool isStaticMethod = match(STATICTOKEN); 1494 // For backwards compatibility, "static" is a non-reserved keyword in non-strict mode. 1495 bool isStaticMethod = match(RESERVED_IF_STRICT) && *m_token.m_data.ident == m_vm->propertyNames->staticKeyword; 1495 1496 if (isStaticMethod) 1496 1497 next(); -
trunk/Source/JavaScriptCore/parser/ParserTokens.h
r180813 r181419 79 79 CLASSTOKEN, 80 80 EXTENDS, 81 STATICTOKEN,82 81 SUPER, 83 82 #else 84 83 CLASSTOKEN = RESERVED, 85 84 EXTENDS = RESERVED, 86 STATICTOKEN = RESERVED_IF_STRICT,87 85 SUPER = RESERVED, 88 86 #endif
Note:
See TracChangeset
for help on using the changeset viewer.