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