Changeset 187760 in webkit


Ignore:
Timestamp:
Aug 3, 2015 1:47:54 PM (9 years ago)
Author:
commit-queue@webkit.org
Message:

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

Patch by Keith Miller <keith_miller@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.

Location:
trunk/Source/JavaScriptCore
Files:
4 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r187750 r187760  
     12015-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
    1262015-08-03  Yusuke Suzuki  <utatane.tea@gmail.com>
    227
  • trunk/Source/JavaScriptCore/parser/ASTBuilder.h

    r187680 r187760  
    169169        return new (m_parserArena) VoidNode(location, expr);
    170170    }
    171     ExpressionNode* thisExpr(const JSTokenLocation& location, ThisTDZMode thisTDZMode)
     171    ExpressionNode* createThisExpr(const JSTokenLocation& location, ThisTDZMode thisTDZMode)
    172172    {
    173173        usesThis();
    174174        return new (m_parserArena) ThisNode(location, thisTDZMode);
    175175    }
    176     ExpressionNode* superExpr(const JSTokenLocation& location)
     176    ExpressionNode* createSuperExpr(const JSTokenLocation& location)
    177177    {
    178178        return new (m_parserArena) SuperNode(location);
    179179    }
    180     ExpressionNode* newTargetExpr(const JSTokenLocation location)
     180    ExpressionNode* createNewTargetExpr(const JSTokenLocation location)
    181181    {
    182182        return new (m_parserArena) NewTargetNode(location);
  • trunk/Source/JavaScriptCore/parser/Parser.cpp

    r187680 r187760  
    27672767        JSTokenLocation location(tokenLocation());
    27682768        next();
    2769         return context.thisExpr(location, m_thisTDZMode);
     2769        return context.createThisExpr(location, m_thisTDZMode);
    27702770    }
    27712771    case IDENT: {
     
    29172917                semanticFailIfFalse(currentScope()->isFunction(), "new.target is only valid inside functions");
    29182918                baseIsNewTarget = true;
    2919                 base = context.newTargetExpr(location);
     2919                base = context.createNewTargetExpr(location);
    29202920                newCount--;
    29212921                next();
     
    29272927
    29282928    if (baseIsSuper) {
    2929         base = context.superExpr(location);
     2929        base = context.createSuperExpr(location);
    29302930        next();
    29312931        currentScope()->setNeedsSuperBinding();
  • trunk/Source/JavaScriptCore/parser/SyntaxChecker.h

    r187515 r187760  
    153153    ExpressionType createUnaryPlus(const JSTokenLocation&, ExpressionType) { return UnaryExpr; }
    154154    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; }
    158158    ExpressionType createResolve(const JSTokenLocation&, const Identifier*, int) { return ResolveExpr; }
    159159    ExpressionType createObjectLiteral(const JSTokenLocation&) { return ObjectLiteralExpr; }
Note: See TracChangeset for help on using the changeset viewer.