Changeset 191037 in webkit for trunk/Source/JavaScriptCore/parser/Parser.cpp
- Timestamp:
- Oct 14, 2015, 12:08:54 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/parser/Parser.cpp
r191030 r191037 1924 1924 1925 1925 AutoPopScopeRef classScope(this, pushScope()); 1926 classScope->setIsLexicalScope();1927 classScope->preventVarDeclarations();1928 1926 classScope->setStrictMode(); 1929 1927 … … 1933 1931 info.className = className; 1934 1932 next(); 1935 failIfTrue(classScope->declare LexicalVariable(className, true) & DeclarationResult::InvalidStrictMode, "'", className->impl(), "' is not a valid class name");1933 failIfTrue(classScope->declareVariable(className) & DeclarationResult::InvalidStrictMode, "'", className->impl(), "' is not a valid class name"); 1936 1934 } else if (requirements == FunctionNeedsName) { 1937 1935 if (match(OPENBRACE)) … … 2050 2048 } 2051 2049 2050 popScope(classScope, TreeBuilder::NeedsFreeVariableInfo); 2052 2051 consumeOrFail(CLOSEBRACE, "Expected a closing '}' after a class body"); 2053 2052 2054 auto classExpression = context.createClassExpr(location, *className, classScope->finalizeLexicalEnvironment(), constructor, parentClass, instanceMethods, staticMethods); 2055 popScope(classScope, TreeBuilder::NeedsFreeVariableInfo); 2056 return classExpression; 2053 return context.createClassExpr(location, *className, constructor, parentClass, instanceMethods, staticMethods); 2057 2054 } 2058 2055 #endif
Note:
See TracChangeset
for help on using the changeset viewer.