import changes from rmottola/Arctic-Fox:

- Bug 1101903 - Part 1: Convert SharedContext::strict to a method. (c419cb895)
- Bug 1101903 - Part 2: Allow parsing and emitting strict mode code in smaller than script-sized units. (d00819026)
- Bug 1124362 - Allow strict-reserved names to be method names. (6fd24146f)
- Bug 1066227 - Part 1: Create a clean way to create lexical bindings at initalizer sites. (2305b65c6)
- Bug 1066227 - Part 2: Rename objectLiteral() propertyList() in preparation for classes. (e53b9cf12)
- Bug 1066227 - Part 3: Parser support for basic ES6 ClassStatements (Nightly Only). (5ff4cb3b9)
- Bug 1066227 - Part 4: Reflect.parse support for ClassStatements (a67bae8a3)
- Bug 1066227 - Tests. (ebe27243e)
- Bug 1066229 - Part 1: Create a clean way to emit lexical initializers (2d4900e5b)
- Bug 1066229 - Part 2: Factor EmitPropertyList() out of EmitObject(). (09b97b557)
- Bug 1066229 - Part 3: Create JSOP_INITLOCKEDDPROP, which adds non-configurable non-writable non-enumerable properties. (80d4961b4)
- Bug 1066229 - Part 4: Create JSOP_INITHIDDENPROP, which adds non-enumerable properties. (1c79190e4)
- Bug 1066229 - Follow up: Enable |let| in ecma_6/Class/ in browser JS reftests. (12a117456)
- Bug 1066229 - Tests. (8577d220a)
- Bug 1066229 - Tests. (957f4fead)
This commit is contained in:
2019-01-23 11:35:44 +08:00
parent 038d035c34
commit 3d819c1eaf
44 changed files with 1389 additions and 286 deletions
+7 -1
View File
@@ -985,8 +985,14 @@ TokenStream::putIdentInTokenbuf(const char16_t* identStart)
bool
TokenStream::checkForKeyword(const KeywordInfo* kw, TokenKind* ttp)
{
if (kw->tokentype == TOK_RESERVED)
if (kw->tokentype == TOK_RESERVED
#ifndef JS_HAS_CLASSES
|| kw->tokentype == TOK_CLASS
#endif
)
{
return reportError(JSMSG_RESERVED_ID, kw->chars);
}
if (kw->tokentype != TOK_STRICT_RESERVED) {
if (kw->version <= versionNumber()) {