Changeset 191110 in webkit for trunk/Source/JavaScriptCore/parser/Parser.cpp
- Timestamp:
- Oct 15, 2015, 7:35:12 AM (10 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/parser/Parser.cpp
r191086 r191110 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)) … … 2047 2049 } 2048 2050 2051 consumeOrFail(CLOSEBRACE, "Expected a closing '}' after a class body"); 2052 2053 auto classExpression = context.createClassExpr(location, *className, classScope->finalizeLexicalEnvironment(), constructor, parentClass, instanceMethods, staticMethods); 2049 2054 popScope(classScope, TreeBuilder::NeedsFreeVariableInfo); 2050 consumeOrFail(CLOSEBRACE, "Expected a closing '}' after a class body"); 2051 2052 return context.createClassExpr(location, *className, constructor, parentClass, instanceMethods, staticMethods); 2055 return classExpression; 2053 2056 } 2054 2057 #endif
Note:
See TracChangeset
for help on using the changeset viewer.