Source/JavaScriptCore/ChangeLog

 12015-03-20 Geoffrey Garen <ggaren@apple.com>
 2
 3 FunctionBodyNode should known where its parameters started
 4 https://bugs.webkit.org/show_bug.cgi?id=142926
 5
 6 Reviewed by NOBODY (OOPS!).
 7
 8 This will allow us to re-parse parameters instead of keeping the
 9 parameters piece of the AST around forever.
 10
 11 I also took the opportunity to initialized most FunctionBodyNode data
 12 members at construction time, to help clarify that they are set right.
 13
 14 * parser/ASTBuilder.h:
 15 (JSC::ASTBuilder::createFunctionExpr): No need to pass
 16 functionKeywordStart here; we now provide it at FunctionBodyNode
 17 creation time.
 18
 19 (JSC::ASTBuilder::createFunctionBody): Require everything we need at
 20 construction time, including the start of our parameters.
 21
 22 (JSC::ASTBuilder::createGetterOrSetterProperty):
 23 (JSC::ASTBuilder::createFuncDeclStatement): No need to pass
 24 functionKeywordStart here; we now provide it at FunctionBodyNode
 25 creation time.
 26
 27 (JSC::ASTBuilder::setFunctionNameStart): Deleted.
 28
 29 * parser/Nodes.cpp:
 30 (JSC::FunctionBodyNode::FunctionBodyNode): Initialize everything at
 31 construction time.
 32
 33 * parser/Nodes.h: Added a field for the location of our parameters.
 34
 35 * parser/Parser.cpp:
 36 (JSC::Parser<LexerType>::parseFunctionBody):
 37 (JSC::Parser<LexerType>::parseFunctionInfo):
 38 (JSC::Parser<LexerType>::parseFunctionDeclaration):
 39 (JSC::Parser<LexerType>::parseClass):
 40 (JSC::Parser<LexerType>::parsePropertyMethod):
 41 (JSC::Parser<LexerType>::parseGetterSetter):
 42 (JSC::Parser<LexerType>::parsePrimaryExpression):
 43 * parser/Parser.h: Refactored to match above interface changes.
 44
 45 * parser/SyntaxChecker.h:
 46 (JSC::SyntaxChecker::createFunctionExpr):
 47 (JSC::SyntaxChecker::createFunctionBody):
 48 (JSC::SyntaxChecker::createFuncDeclStatement):
 49 (JSC::SyntaxChecker::createGetterOrSetterProperty): Refactored to match
 50 above interface changes.
 51
 52 (JSC::SyntaxChecker::setFunctionNameStart): Deleted.
 53
1542015-03-20 Yusuke Suzuki <utatane.tea@gmail.com>
255
356 REGRESSION (r179429): Potential Use after free in JavaScriptCore`WTF::StringImpl::ref + 83
181815

Source/JavaScriptCore/parser/ASTBuilder.h

@@public:
293293 }
294294#endif
295295
296  ExpressionNode* createFunctionExpr(const JSTokenLocation& location, const ParserFunctionInfo<ASTBuilder>& info, unsigned functionKeywordStart)
 296 ExpressionNode* createFunctionExpr(const JSTokenLocation& location, const ParserFunctionInfo<ASTBuilder>& info)
297297 {
298298 FuncExprNode* result = new (m_parserArena) FuncExprNode(location, *info.name, info.body,
299299 m_sourceCode->subExpression(info.openBraceOffset, info.closeBraceOffset, info.bodyStartLine, info.bodyStartColumn), info.parameters);
300300 info.body->setLoc(info.bodyStartLine, info.bodyEndLine, location.startOffset, location.lineStartOffset);
301  info.body->setFunctionKeywordStart(functionKeywordStart);
302301 return result;
303302 }
304303
305  FunctionBodyNode* createFunctionBody(const JSTokenLocation& startLocation, const JSTokenLocation& endLocation, unsigned startColumn, unsigned endColumn, bool inStrictContext, ConstructorKind constructorKind)
306  {
307  return new (m_parserArena) FunctionBodyNode(m_parserArena, startLocation, endLocation, startColumn, endColumn, inStrictContext, constructorKind);
 304 FunctionBodyNode* createFunctionBody(
 305 const JSTokenLocation& startLocation, const JSTokenLocation& endLocation,
 306 unsigned startColumn, unsigned endColumn, int functionKeywordStart,
 307 int functionNameStart, int parametersStart, bool inStrictContext,
 308 ConstructorKind constructorKind)
 309 {
 310 return new (m_parserArena) FunctionBodyNode(
 311 m_parserArena, startLocation, endLocation, startColumn, endColumn,
 312 functionKeywordStart, functionNameStart, parametersStart,
 313 inStrictContext, constructorKind);
308314 }
309315
310  void setFunctionNameStart(FunctionBodyNode* body, int functionNameStart)
311  {
312  body->setFunctionNameStart(functionNameStart);
313  }
314 
315316 NEVER_INLINE PropertyNode* createGetterOrSetterProperty(const JSTokenLocation& location, PropertyNode::Type type, bool,
316  const Identifier* name, const ParserFunctionInfo<ASTBuilder>& info, unsigned getOrSetStartOffset, SuperBinding superBinding)
 317 const Identifier* name, const ParserFunctionInfo<ASTBuilder>& info, SuperBinding superBinding)
317318 {
318319 ASSERT(name);
319320 info.body->setLoc(info.bodyStartLine, info.bodyEndLine, location.startOffset, location.lineStartOffset);
320321 info.body->setInferredName(*name);
321  info.body->setFunctionKeywordStart(getOrSetStartOffset);
322322 SourceCode source = m_sourceCode->subExpression(info.openBraceOffset, info.closeBraceOffset, info.bodyStartLine, info.bodyStartColumn);
323323 FuncExprNode* funcExpr = new (m_parserArena) FuncExprNode(location, m_vm->propertyNames->nullIdentifier, info.body, source, info.parameters);
324324 return new (m_parserArena) PropertyNode(*name, funcExpr, type, PropertyNode::Unknown, superBinding);
325325 }
326326
327327 NEVER_INLINE PropertyNode* createGetterOrSetterProperty(VM* vm, ParserArena& parserArena, const JSTokenLocation& location, PropertyNode::Type type, bool,
328  double name, const ParserFunctionInfo<ASTBuilder>& info, unsigned getOrSetStartOffset, SuperBinding superBinding)
 328 double name, const ParserFunctionInfo<ASTBuilder>& info, SuperBinding superBinding)
329329 {
330330 info.body->setLoc(info.bodyStartLine, info.bodyEndLine, location.startOffset, location.lineStartOffset);
331  info.body->setFunctionKeywordStart(getOrSetStartOffset);
332331 const Identifier& ident = parserArena.identifierArena().makeNumericIdentifier(vm, name);
333332 SourceCode source = m_sourceCode->subExpression(info.openBraceOffset, info.closeBraceOffset, info.bodyStartLine, info.bodyStartColumn);
334333 FuncExprNode* funcExpr = new (m_parserArena) FuncExprNode(location, vm->propertyNames->nullIdentifier, info.body, source, info.parameters);

@@public:
364363 ClauseListNode* createClauseList(CaseClauseNode* clause) { return new (m_parserArena) ClauseListNode(clause); }
365364 ClauseListNode* createClauseList(ClauseListNode* tail, CaseClauseNode* clause) { return new (m_parserArena) ClauseListNode(tail, clause); }
366365
367  StatementNode* createFuncDeclStatement(const JSTokenLocation& location, const ParserFunctionInfo<ASTBuilder>& info, unsigned functionKeywordStart)
 366 StatementNode* createFuncDeclStatement(const JSTokenLocation& location, const ParserFunctionInfo<ASTBuilder>& info)
368367 {
369368 FuncDeclNode* decl = new (m_parserArena) FuncDeclNode(location, *info.name, info.body,
370369 m_sourceCode->subExpression(info.openBraceOffset, info.closeBraceOffset, info.bodyStartLine, info.bodyStartColumn), info.parameters);

@@public:
372371 usesArguments();
373372 m_scope.m_funcDeclarations.append(decl->body());
374373 info.body->setLoc(info.bodyStartLine, info.bodyEndLine, location.startOffset, location.lineStartOffset);
375  info.body->setFunctionKeywordStart(functionKeywordStart);
376374 return decl;
377375 }
378376
181809

Source/JavaScriptCore/parser/Nodes.cpp

@@FunctionParameters::~FunctionParameters(
167167 patterns()[i]->deref();
168168}
169169
170 FunctionBodyNode::FunctionBodyNode(ParserArena&, const JSTokenLocation& startLocation, const JSTokenLocation& endLocation, unsigned startColumn, unsigned endColumn, bool isInStrictContext, ConstructorKind constructorKind)
 170FunctionBodyNode::FunctionBodyNode(
 171 ParserArena&, const JSTokenLocation& startLocation,
 172 const JSTokenLocation& endLocation, unsigned startColumn, unsigned endColumn,
 173 int functionKeywordStart, int functionNameStart, int parametersStart,
 174 bool isInStrictContext, ConstructorKind constructorKind)
171175 : StatementNode(endLocation)
172176 , m_startColumn(startColumn)
173177 , m_endColumn(endColumn)
 178 , m_functionKeywordStart(functionKeywordStart)
 179 , m_functionNameStart(functionNameStart)
 180 , m_parametersStart(parametersStart)
174181 , m_startStartOffset(startLocation.startOffset)
175182 , m_isInStrictContext(isInStrictContext)
176183 , m_constructorKind(static_cast<unsigned>(constructorKind))
181809

Source/JavaScriptCore/parser/Nodes.h

@@namespace JSC {
15601560 public:
15611561 using ParserArenaDeletable::operator new;
15621562
1563  FunctionBodyNode(ParserArena&, const JSTokenLocation& start, const JSTokenLocation& end, unsigned startColumn, unsigned endColumn, bool isInStrictContext, ConstructorKind);
 1563 FunctionBodyNode(
 1564 ParserArena&, const JSTokenLocation& start, const JSTokenLocation& end,
 1565 unsigned startColumn, unsigned endColumn, int functionKeywordStart,
 1566 int functionNameStart, int parametersStart, bool isInStrictContext,
 1567 ConstructorKind);
15641568
15651569 FunctionParameters* parameters() const { return m_parameters.get(); }
15661570

@@namespace JSC {
15751579
15761580 FunctionMode functionMode() { return m_functionMode; }
15771581
1578  void setFunctionNameStart(int functionNameStart) { m_functionNameStart = functionNameStart; }
15791582 int functionNameStart() const { return m_functionNameStart; }
1580  void setFunctionKeywordStart(int functionKeywordStart) { m_functionKeywordStart = functionKeywordStart; }
15811583 int functionKeywordStart() const { return m_functionKeywordStart; }
15821584 unsigned startColumn() const { return m_startColumn; }
15831585 unsigned endColumn() const { return m_endColumn; }

@@namespace JSC {
15951597 Identifier m_inferredName;
15961598 FunctionMode m_functionMode;
15971599 RefPtr<FunctionParameters> m_parameters;
1598  int m_functionNameStart;
1599  int m_functionKeywordStart;
16001600 unsigned m_startColumn;
16011601 unsigned m_endColumn;
 1602 int m_functionKeywordStart;
 1603 int m_functionNameStart;
 1604 int m_parametersStart;
16021605 SourceCode m_source;
16031606 int m_startStartOffset;
16041607 unsigned m_isInStrictContext : 1;
181810

Source/JavaScriptCore/parser/Parser.cpp

@@template <class TreeBuilder> TreeFormalP
12601260}
12611261
12621262template <typename LexerType>
1263 template <class TreeBuilder> TreeFunctionBody Parser<LexerType>::parseFunctionBody(TreeBuilder& context, ConstructorKind constructorKind)
 1263template <class TreeBuilder> TreeFunctionBody Parser<LexerType>::parseFunctionBody(
 1264 TreeBuilder& context, int functionKeywordStart, int functionNameStart,
 1265 int parametersStart, ConstructorKind constructorKind)
12641266{
12651267 JSTokenLocation startLocation(tokenLocation());
12661268 unsigned startColumn = tokenColumn();

@@template <class TreeBuilder> TreeFunctio
12681270
12691271 if (match(CLOSEBRACE)) {
12701272 unsigned endColumn = tokenColumn();
1271  return context.createFunctionBody(startLocation, tokenLocation(), startColumn, endColumn, strictMode(), constructorKind);
 1273 return context.createFunctionBody(startLocation, tokenLocation(), startColumn, endColumn, functionKeywordStart, functionNameStart, parametersStart, strictMode(), constructorKind);
12721274 }
12731275 DepthManager statementDepth(&m_statementDepth);
12741276 m_statementDepth = 0;
12751277 typename TreeBuilder::FunctionBodyBuilder bodyBuilder(const_cast<VM*>(m_vm), m_lexer.get());
12761278 failIfFalse(parseSourceElements(bodyBuilder, CheckForStrictMode), "Cannot parse body of this function");
12771279 unsigned endColumn = tokenColumn();
1278  return context.createFunctionBody(startLocation, tokenLocation(), startColumn, endColumn, strictMode(), constructorKind);
 1280 return context.createFunctionBody(startLocation, tokenLocation(), startColumn, endColumn, functionKeywordStart, functionNameStart, parametersStart, strictMode(), constructorKind);
12791281}
12801282
12811283static const char* stringForFunctionMode(FunctionParseMode mode)

@@static const char* stringForFunctionMode
12961298
12971299template <typename LexerType>
12981300template <class TreeBuilder> bool Parser<LexerType>::parseFunctionInfo(TreeBuilder& context, FunctionRequirements requirements, FunctionParseMode mode,
1299  bool nameIsInContainingScope, ConstructorKind ownerClassKind, ParserFunctionInfo<TreeBuilder>& info)
 1301 bool nameIsInContainingScope, ConstructorKind ownerClassKind, int functionKeywordStart, ParserFunctionInfo<TreeBuilder>& info)
13001302{
13011303 AutoPopScopeRef functionScope(this, pushScope());
13021304 functionScope->setIsFunction();

@@template <class TreeBuilder> bool Parser
13161318 failDueToUnexpectedToken();
13171319 return false;
13181320 }
 1321 int parametersStart = m_token.m_location.startOffset;
13191322 if (!consume(OPENPAREN)) {
13201323 semanticFailureDueToKeyword(stringForFunctionMode(mode), " name");
13211324 failWithMessage("Expected an opening '(' before a ", stringForFunctionMode(mode), "'s parameter list");

@@template <class TreeBuilder> bool Parser
13581361 endLocation.startOffset - endLocation.lineStartOffset;
13591362 unsigned currentLineStartOffset = m_token.m_location.lineStartOffset;
13601363
1361  info.body = context.createFunctionBody(startLocation, endLocation, info.bodyStartColumn, bodyEndColumn, cachedInfo->strictMode, constructorKind);
 1364 info.body = context.createFunctionBody(
 1365 startLocation, endLocation, info.bodyStartColumn, bodyEndColumn,
 1366 functionKeywordStart, functionNameStart, parametersStart,
 1367 cachedInfo->strictMode, constructorKind);
13621368
13631369 functionScope->restoreFromSourceProviderCache(cachedInfo);
13641370 failIfFalse(popScope(functionScope, TreeBuilder::NeedsFreeVariableInfo), "Parser error");
13651371
13661372 info.closeBraceOffset = cachedInfo->closeBraceOffset;
13671373
1368  context.setFunctionNameStart(info.body, functionNameStart);
13691374 m_token = cachedInfo->closeBraceToken();
13701375 if (endColumnIsOnStartLine)
13711376 m_token.m_location.lineStartOffset = currentLineStartOffset;

@@template <class TreeBuilder> bool Parser
13811386 }
13821387 m_lastFunctionName = lastFunctionName;
13831388 ParserState oldState = saveState();
1384  info.body = parseFunctionBody(context, constructorKind);
 1389 info.body = parseFunctionBody(context, functionKeywordStart, functionNameStart, parametersStart, constructorKind);
13851390 restoreState(oldState);
13861391 failIfFalse(info.body, "Cannot parse the body of this ", stringForFunctionMode(mode));
13871392 context.setEndOffset(info.body, m_lexer->currentOffset());

@@template <class TreeBuilder> bool Parser
14161421 newInfo = SourceProviderCacheItem::create(parameters);
14171422
14181423 }
1419  context.setFunctionNameStart(info.body, functionNameStart);
14201424
14211425 failIfFalse(popScope(functionScope, TreeBuilder::NeedsFreeVariableInfo), "Parser error");
14221426 matchOrFail(CLOSEBRACE, "Expected a closing '}' after a ", stringForFunctionMode(mode), " body");

@@template <class TreeBuilder> TreeStateme
14371441 unsigned functionKeywordStart = tokenStart();
14381442 next();
14391443 ParserFunctionInfo<TreeBuilder> info;
1440  failIfFalse((parseFunctionInfo(context, FunctionNeedsName, FunctionMode, true, ConstructorKind::None, info)), "Cannot parse this function");
 1444 failIfFalse((parseFunctionInfo(context, FunctionNeedsName, FunctionMode, true, ConstructorKind::None, functionKeywordStart, info)), "Cannot parse this function");
14411445 failIfFalse(info.name, "Function statements must have a name");
14421446 failIfFalseIfStrict(declareVariable(info.name), "Cannot declare a function named '", info.name->impl(), "' in strict mode");
1443  return context.createFuncDeclStatement(location, info, functionKeywordStart);
 1447 return context.createFuncDeclStatement(location, info);
14441448}
14451449
14461450#if ENABLE(ES6_CLASS_SYNTAX)

@@template <class TreeBuilder> TreeClassEx
15251529 failIfFalse(property, "Cannot parse this method");
15261530 } else {
15271531 ParserFunctionInfo<TreeBuilder> methodInfo;
1528  failIfFalse((parseFunctionInfo(context, FunctionNeedsName, isStaticMethod ? FunctionMode : MethodMode, false, constructorKind, methodInfo)), "Cannot parse this method");
 1532 failIfFalse((parseFunctionInfo(context, FunctionNeedsName, isStaticMethod ? FunctionMode : MethodMode, false, constructorKind, methodStart, methodInfo)), "Cannot parse this method");
15291533 failIfFalse(methodInfo.name, "method must have a name");
15301534 failIfFalse(declareVariable(methodInfo.name), "Cannot declare a method named '", methodInfo.name->impl(), "'");
15311535

@@template <class TreeBuilder> TreeClassEx
15331537 if (isConstructor)
15341538 methodInfo.name = className;
15351539
1536  TreeExpression method = context.createFunctionExpr(methodLocation, methodInfo, methodStart);
 1540 TreeExpression method = context.createFunctionExpr(methodLocation, methodInfo);
15371541 if (isConstructor) {
15381542 semanticFailIfTrue(constructor, "Cannot declare multiple constructors in a single class");
15391543 constructor = method;

@@template <class TreeBuilder> TreeExpress
20282032 JSTokenLocation methodLocation(tokenLocation());
20292033 unsigned methodStart = tokenStart();
20302034 ParserFunctionInfo<TreeBuilder> methodInfo;
2031  failIfFalse((parseFunctionInfo(context, FunctionNoRequirements, MethodMode, false, ConstructorKind::None, methodInfo)), "Cannot parse this method");
 2035 failIfFalse((parseFunctionInfo(context, FunctionNoRequirements, MethodMode, false, ConstructorKind::None, methodStart, methodInfo)), "Cannot parse this method");
20322036 methodInfo.name = methodName;
2033  return context.createFunctionExpr(methodLocation, methodInfo, methodStart);
 2037 return context.createFunctionExpr(methodLocation, methodInfo);
20342038}
20352039
20362040template <typename LexerType>

@@template <class TreeBuilder> TreePropert
20502054 ParserFunctionInfo<TreeBuilder> info;
20512055 if (type == PropertyNode::Getter) {
20522056 failIfFalse(match(OPENPAREN), "Expected a parameter list for getter definition");
2053  failIfFalse((parseFunctionInfo(context, FunctionNoRequirements, GetterMode, false, constructorKind, info)), "Cannot parse getter definition");
 2057 failIfFalse((parseFunctionInfo(context, FunctionNoRequirements, GetterMode, false, constructorKind, getterOrSetterStartOffset, info)), "Cannot parse getter definition");
20542058 } else {
20552059 failIfFalse(match(OPENPAREN), "Expected a parameter list for setter definition");
2056  failIfFalse((parseFunctionInfo(context, FunctionNoRequirements, SetterMode, false, constructorKind, info)), "Cannot parse setter definition");
 2060 failIfFalse((parseFunctionInfo(context, FunctionNoRequirements, SetterMode, false, constructorKind, getterOrSetterStartOffset, info)), "Cannot parse setter definition");
20572061 }
20582062 if (stringPropertyName)
2059  return context.createGetterOrSetterProperty(location, type, strict, stringPropertyName, info, getterOrSetterStartOffset, superBinding);
2060  return context.createGetterOrSetterProperty(const_cast<VM*>(m_vm), m_parserArena, location, type, strict, numericPropertyName, info, getterOrSetterStartOffset, superBinding);
 2063 return context.createGetterOrSetterProperty(location, type, strict, stringPropertyName, info, superBinding);
 2064 return context.createGetterOrSetterProperty(const_cast<VM*>(m_vm), m_parserArena, location, type, strict, numericPropertyName, info, superBinding);
20612065}
20622066
20632067template <typename LexerType>

@@template <class TreeBuilder> TreeExpress
22422246 next();
22432247 ParserFunctionInfo<TreeBuilder> info;
22442248 info.name = &m_vm->propertyNames->nullIdentifier;
2245  failIfFalse((parseFunctionInfo(context, FunctionNoRequirements, FunctionMode, false, ConstructorKind::None, info)), "Cannot parse function expression");
2246  return context.createFunctionExpr(location, info, functionKeywordStart);
 2249 failIfFalse((parseFunctionInfo(context, FunctionNoRequirements, FunctionMode, false, ConstructorKind::None, functionKeywordStart, info)), "Cannot parse function expression");
 2250 return context.createFunctionExpr(location, info);
22472251 }
22482252#if ENABLE(ES6_CLASS_SYNTAX)
22492253 case CLASSTOKEN:
181809

Source/JavaScriptCore/parser/Parser.h

@@private:
762762 template <class TreeBuilder> TreeProperty parseProperty(TreeBuilder&, bool strict);
763763 template <class TreeBuilder> TreeExpression parsePropertyMethod(TreeBuilder& context, const Identifier* methodName);
764764 template <class TreeBuilder> TreeProperty parseGetterSetter(TreeBuilder&, bool strict, PropertyNode::Type, unsigned getterOrSetterStartOffset, ConstructorKind = ConstructorKind::None, SuperBinding = SuperBinding::NotNeeded);
765  template <class TreeBuilder> ALWAYS_INLINE TreeFunctionBody parseFunctionBody(TreeBuilder&, ConstructorKind);
 765 template <class TreeBuilder> ALWAYS_INLINE TreeFunctionBody parseFunctionBody(TreeBuilder&, int functionKeywordStart, int functionNameStart, int parametersStart, ConstructorKind);
766766 template <class TreeBuilder> ALWAYS_INLINE TreeFormalParameterList parseFormalParameters(TreeBuilder&);
767767 enum VarDeclarationListContext { ForLoopContext, VarDeclarationContext };
768768 template <class TreeBuilder> TreeExpression parseVarDeclarationList(TreeBuilder&, int& declarations, TreeDeconstructionPattern& lastPattern, TreeExpression& lastInitializer, JSTextPosition& identStart, JSTextPosition& initStart, JSTextPosition& initEnd, VarDeclarationListContext);

@@private:
772772 template <class TreeBuilder> NEVER_INLINE TreeDeconstructionPattern parseDeconstructionPattern(TreeBuilder&, DeconstructionKind, int depth = 0);
773773 template <class TreeBuilder> NEVER_INLINE TreeDeconstructionPattern tryParseDeconstructionPatternExpression(TreeBuilder&);
774774
775  template <class TreeBuilder> NEVER_INLINE bool parseFunctionInfo(TreeBuilder&, FunctionRequirements, FunctionParseMode, bool nameIsInContainingScope, ConstructorKind, ParserFunctionInfo<TreeBuilder>&);
 775 template <class TreeBuilder> NEVER_INLINE bool parseFunctionInfo(TreeBuilder&, FunctionRequirements, FunctionParseMode, bool nameIsInContainingScope, ConstructorKind, int functionKeywordStart, ParserFunctionInfo<TreeBuilder>&);
776776#if ENABLE(ES6_CLASS_SYNTAX)
777777 template <class TreeBuilder> NEVER_INLINE TreeClassExpression parseClass(TreeBuilder&, FunctionRequirements);
778778#endif
181809

Source/JavaScriptCore/parser/SyntaxChecker.h

@@public:
168168#if ENABLE(ES6_CLASS_SYNTAX)
169169 ClassExpression createClassExpr(const JSTokenLocation&, const Identifier&, ExpressionType, ExpressionType, PropertyList, PropertyList) { return ClassExpr; }
170170#endif
171  ExpressionType createFunctionExpr(const JSTokenLocation&, const ParserFunctionInfo<SyntaxChecker>&, int) { return FunctionExpr; }
172  int createFunctionBody(const JSTokenLocation&, const JSTokenLocation&, int, int, bool, ConstructorKind) { return FunctionBodyResult; }
173  void setFunctionNameStart(int, int) { }
 171 ExpressionType createFunctionExpr(const JSTokenLocation&, const ParserFunctionInfo<SyntaxChecker>&) { return FunctionExpr; }
 172 int createFunctionBody(const JSTokenLocation&, const JSTokenLocation&, int, int, bool, int, int, int, ConstructorKind) { return FunctionBodyResult; }
174173 int createArguments() { return ArgumentsResult; }
175174 int createArguments(int) { return ArgumentsResult; }
176175 ExpressionType createSpreadExpression(const JSTokenLocation&, ExpressionType, int, int, int) { return SpreadExpr; }

@@public:
202201 int createClause(int, int) { return ClauseResult; }
203202 int createClauseList(int) { return ClauseListResult; }
204203 int createClauseList(int, int) { return ClauseListResult; }
205  int createFuncDeclStatement(const JSTokenLocation&, const ParserFunctionInfo<SyntaxChecker>&, int) { return StatementResult; }
 204 int createFuncDeclStatement(const JSTokenLocation&, const ParserFunctionInfo<SyntaxChecker>&) { return StatementResult; }
206205#if ENABLE(ES6_CLASS_SYNTAX)
207206 int createClassDeclStatement(const JSTokenLocation&, ClassExpression,
208207 const JSTextPosition&, const JSTextPosition&, int, int) { return StatementResult; }

@@public:
231230 int createDebugger(const JSTokenLocation&, int, int) { return StatementResult; }
232231 int createConstStatement(const JSTokenLocation&, int, int, int) { return StatementResult; }
233232 int appendConstDecl(const JSTokenLocation&, int, const Identifier*, int) { return StatementResult; }
234  Property createGetterOrSetterProperty(const JSTokenLocation&, PropertyNode::Type type, bool strict, const Identifier* name, const ParserFunctionInfo<SyntaxChecker>&, unsigned, SuperBinding)
 233 Property createGetterOrSetterProperty(const JSTokenLocation&, PropertyNode::Type type, bool strict, const Identifier* name, const ParserFunctionInfo<SyntaxChecker>&, SuperBinding)
235234 {
236235 ASSERT(name);
237236 if (!strict)
238237 return Property(type);
239238 return Property(name, type);
240239 }
241  Property createGetterOrSetterProperty(VM* vm, ParserArena& parserArena, const JSTokenLocation&, PropertyNode::Type type, bool strict, double name, const ParserFunctionInfo<SyntaxChecker>&, unsigned, SuperBinding)
 240 Property createGetterOrSetterProperty(VM* vm, ParserArena& parserArena, const JSTokenLocation&, PropertyNode::Type type, bool strict, double name, const ParserFunctionInfo<SyntaxChecker>&, SuperBinding)
242241 {
243242 if (!strict)
244243 return Property(type);
181809