Changeset 187760 in webkit
- Timestamp:
- Aug 3, 2015 1:47:54 PM (9 years ago)
- Location:
- trunk/Source/JavaScriptCore
- Files:
-
- 4 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/Source/JavaScriptCore/ChangeLog
r187750 r187760 1 2015-08-03 Keith Miller <keith_miller@apple.com> 2 3 Clean up the naming for AST expression generation. 4 https://bugs.webkit.org/show_bug.cgi?id=147581 5 6 Reviewed by Yusuke Suzuki. 7 8 * parser/ASTBuilder.h: 9 (JSC::ASTBuilder::createThisExpr): 10 (JSC::ASTBuilder::createSuperExpr): 11 (JSC::ASTBuilder::createNewTargetExpr): 12 (JSC::ASTBuilder::thisExpr): Deleted. 13 (JSC::ASTBuilder::superExpr): Deleted. 14 (JSC::ASTBuilder::newTargetExpr): Deleted. 15 * parser/Parser.cpp: 16 (JSC::Parser<LexerType>::parsePrimaryExpression): 17 (JSC::Parser<LexerType>::parseMemberExpression): 18 * parser/SyntaxChecker.h: 19 (JSC::SyntaxChecker::createThisExpr): 20 (JSC::SyntaxChecker::createSuperExpr): 21 (JSC::SyntaxChecker::createNewTargetExpr): 22 (JSC::SyntaxChecker::thisExpr): Deleted. 23 (JSC::SyntaxChecker::superExpr): Deleted. 24 (JSC::SyntaxChecker::newTargetExpr): Deleted. 25 1 26 2015-08-03 Yusuke Suzuki <utatane.tea@gmail.com> 2 27 -
trunk/Source/JavaScriptCore/parser/ASTBuilder.h
r187680 r187760 169 169 return new (m_parserArena) VoidNode(location, expr); 170 170 } 171 ExpressionNode* thisExpr(const JSTokenLocation& location, ThisTDZMode thisTDZMode)171 ExpressionNode* createThisExpr(const JSTokenLocation& location, ThisTDZMode thisTDZMode) 172 172 { 173 173 usesThis(); 174 174 return new (m_parserArena) ThisNode(location, thisTDZMode); 175 175 } 176 ExpressionNode* superExpr(const JSTokenLocation& location)176 ExpressionNode* createSuperExpr(const JSTokenLocation& location) 177 177 { 178 178 return new (m_parserArena) SuperNode(location); 179 179 } 180 ExpressionNode* newTargetExpr(const JSTokenLocation location)180 ExpressionNode* createNewTargetExpr(const JSTokenLocation location) 181 181 { 182 182 return new (m_parserArena) NewTargetNode(location); -
trunk/Source/JavaScriptCore/parser/Parser.cpp
r187680 r187760 2767 2767 JSTokenLocation location(tokenLocation()); 2768 2768 next(); 2769 return context. thisExpr(location, m_thisTDZMode);2769 return context.createThisExpr(location, m_thisTDZMode); 2770 2770 } 2771 2771 case IDENT: { … … 2917 2917 semanticFailIfFalse(currentScope()->isFunction(), "new.target is only valid inside functions"); 2918 2918 baseIsNewTarget = true; 2919 base = context. newTargetExpr(location);2919 base = context.createNewTargetExpr(location); 2920 2920 newCount--; 2921 2921 next(); … … 2927 2927 2928 2928 if (baseIsSuper) { 2929 base = context. superExpr(location);2929 base = context.createSuperExpr(location); 2930 2930 next(); 2931 2931 currentScope()->setNeedsSuperBinding(); -
trunk/Source/JavaScriptCore/parser/SyntaxChecker.h
r187515 r187760 153 153 ExpressionType createUnaryPlus(const JSTokenLocation&, ExpressionType) { return UnaryExpr; } 154 154 ExpressionType createVoid(const JSTokenLocation&, ExpressionType) { return UnaryExpr; } 155 ExpressionType thisExpr(const JSTokenLocation&, ThisTDZMode) { return ThisExpr; }156 ExpressionType superExpr(const JSTokenLocation&) { return SuperExpr; }157 ExpressionType newTargetExpr(const JSTokenLocation&) { return NewTargetExpr; }155 ExpressionType createThisExpr(const JSTokenLocation&, ThisTDZMode) { return ThisExpr; } 156 ExpressionType createSuperExpr(const JSTokenLocation&) { return SuperExpr; } 157 ExpressionType createNewTargetExpr(const JSTokenLocation&) { return NewTargetExpr; } 158 158 ExpressionType createResolve(const JSTokenLocation&, const Identifier*, int) { return ResolveExpr; } 159 159 ExpressionType createObjectLiteral(const JSTokenLocation&) { return ObjectLiteralExpr; }
Note: See TracChangeset
for help on using the changeset viewer.