Title: [187760] trunk/Source/_javascript_Core
Revision
187760
Author
commit-qu...@webkit.org
Date
2015-08-03 13:47:54 -0700 (Mon, 03 Aug 2015)

Log Message

Clean up the naming for AST _expression_ generation.
https://bugs.webkit.org/show_bug.cgi?id=147581

Patch by Keith Miller <keith_mil...@apple.com> on 2015-08-03
Reviewed by Yusuke Suzuki.

* parser/ASTBuilder.h:
(JSC::ASTBuilder::createThisExpr):
(JSC::ASTBuilder::createSuperExpr):
(JSC::ASTBuilder::createNewTargetExpr):
(JSC::ASTBuilder::thisExpr): Deleted.
(JSC::ASTBuilder::superExpr): Deleted.
(JSC::ASTBuilder::newTargetExpr): Deleted.
* parser/Parser.cpp:
(JSC::Parser<LexerType>::parsePrimaryExpression):
(JSC::Parser<LexerType>::parseMemberExpression):
* parser/SyntaxChecker.h:
(JSC::SyntaxChecker::createThisExpr):
(JSC::SyntaxChecker::createSuperExpr):
(JSC::SyntaxChecker::createNewTargetExpr):
(JSC::SyntaxChecker::thisExpr): Deleted.
(JSC::SyntaxChecker::superExpr): Deleted.
(JSC::SyntaxChecker::newTargetExpr): Deleted.

Modified Paths

Diff

Modified: trunk/Source/_javascript_Core/ChangeLog (187759 => 187760)


--- trunk/Source/_javascript_Core/ChangeLog	2015-08-03 20:46:01 UTC (rev 187759)
+++ trunk/Source/_javascript_Core/ChangeLog	2015-08-03 20:47:54 UTC (rev 187760)
@@ -1,3 +1,28 @@
+2015-08-03  Keith Miller  <keith_mil...@apple.com>
+
+        Clean up the naming for AST _expression_ generation.
+        https://bugs.webkit.org/show_bug.cgi?id=147581
+
+        Reviewed by Yusuke Suzuki.
+
+        * parser/ASTBuilder.h:
+        (JSC::ASTBuilder::createThisExpr):
+        (JSC::ASTBuilder::createSuperExpr):
+        (JSC::ASTBuilder::createNewTargetExpr):
+        (JSC::ASTBuilder::thisExpr): Deleted.
+        (JSC::ASTBuilder::superExpr): Deleted.
+        (JSC::ASTBuilder::newTargetExpr): Deleted.
+        * parser/Parser.cpp:
+        (JSC::Parser<LexerType>::parsePrimaryExpression):
+        (JSC::Parser<LexerType>::parseMemberExpression):
+        * parser/SyntaxChecker.h:
+        (JSC::SyntaxChecker::createThisExpr):
+        (JSC::SyntaxChecker::createSuperExpr):
+        (JSC::SyntaxChecker::createNewTargetExpr):
+        (JSC::SyntaxChecker::thisExpr): Deleted.
+        (JSC::SyntaxChecker::superExpr): Deleted.
+        (JSC::SyntaxChecker::newTargetExpr): Deleted.
+
 2015-08-03  Yusuke Suzuki  <utatane....@gmail.com>
 
         Don't set up the callsite to operationGetByValDefault when the optimization is already done

Modified: trunk/Source/_javascript_Core/parser/ASTBuilder.h (187759 => 187760)


--- trunk/Source/_javascript_Core/parser/ASTBuilder.h	2015-08-03 20:46:01 UTC (rev 187759)
+++ trunk/Source/_javascript_Core/parser/ASTBuilder.h	2015-08-03 20:47:54 UTC (rev 187760)
@@ -168,16 +168,16 @@
         incConstants();
         return new (m_parserArena) VoidNode(location, expr);
     }
-    ExpressionNode* thisExpr(const JSTokenLocation& location, ThisTDZMode thisTDZMode)
+    ExpressionNode* createThisExpr(const JSTokenLocation& location, ThisTDZMode thisTDZMode)
     {
         usesThis();
         return new (m_parserArena) ThisNode(location, thisTDZMode);
     }
-    ExpressionNode* superExpr(const JSTokenLocation& location)
+    ExpressionNode* createSuperExpr(const JSTokenLocation& location)
     {
         return new (m_parserArena) SuperNode(location);
     }
-    ExpressionNode* newTargetExpr(const JSTokenLocation location)
+    ExpressionNode* createNewTargetExpr(const JSTokenLocation location)
     {
         return new (m_parserArena) NewTargetNode(location);
     }

Modified: trunk/Source/_javascript_Core/parser/Parser.cpp (187759 => 187760)


--- trunk/Source/_javascript_Core/parser/Parser.cpp	2015-08-03 20:46:01 UTC (rev 187759)
+++ trunk/Source/_javascript_Core/parser/Parser.cpp	2015-08-03 20:47:54 UTC (rev 187760)
@@ -2766,7 +2766,7 @@
     case THISTOKEN: {
         JSTokenLocation location(tokenLocation());
         next();
-        return context.thisExpr(location, m_thisTDZMode);
+        return context.createThisExpr(location, m_thisTDZMode);
     }
     case IDENT: {
     identifierExpression:
@@ -2916,7 +2916,7 @@
             if (m_vm->propertyNames->target == *ident) {
                 semanticFailIfFalse(currentScope()->isFunction(), "new.target is only valid inside functions");
                 baseIsNewTarget = true;
-                base = context.newTargetExpr(location);
+                base = context.createNewTargetExpr(location);
                 newCount--;
                 next();
             } else
@@ -2926,7 +2926,7 @@
     }
 
     if (baseIsSuper) {
-        base = context.superExpr(location);
+        base = context.createSuperExpr(location);
         next();
         currentScope()->setNeedsSuperBinding();
     } else if (!baseIsNewTarget)

Modified: trunk/Source/_javascript_Core/parser/SyntaxChecker.h (187759 => 187760)


--- trunk/Source/_javascript_Core/parser/SyntaxChecker.h	2015-08-03 20:46:01 UTC (rev 187759)
+++ trunk/Source/_javascript_Core/parser/SyntaxChecker.h	2015-08-03 20:47:54 UTC (rev 187760)
@@ -152,9 +152,9 @@
     ExpressionType createLogicalNot(const JSTokenLocation&, ExpressionType) { return UnaryExpr; }
     ExpressionType createUnaryPlus(const JSTokenLocation&, ExpressionType) { return UnaryExpr; }
     ExpressionType createVoid(const JSTokenLocation&, ExpressionType) { return UnaryExpr; }
-    ExpressionType thisExpr(const JSTokenLocation&, ThisTDZMode) { return ThisExpr; }
-    ExpressionType superExpr(const JSTokenLocation&) { return SuperExpr; }
-    ExpressionType newTargetExpr(const JSTokenLocation&) { return NewTargetExpr; }
+    ExpressionType createThisExpr(const JSTokenLocation&, ThisTDZMode) { return ThisExpr; }
+    ExpressionType createSuperExpr(const JSTokenLocation&) { return SuperExpr; }
+    ExpressionType createNewTargetExpr(const JSTokenLocation&) { return NewTargetExpr; }
     ExpressionType createResolve(const JSTokenLocation&, const Identifier*, int) { return ResolveExpr; }
     ExpressionType createObjectLiteral(const JSTokenLocation&) { return ObjectLiteralExpr; }
     ExpressionType createObjectLiteral(const JSTokenLocation&, int) { return ObjectLiteralExpr; }
_______________________________________________
webkit-changes mailing list
webkit-changes@lists.webkit.org
https://lists.webkit.org/mailman/listinfo/webkit-changes

Reply via email to