Ignore:
Timestamp:
Nov 8, 2015, 12:03:40 AM (10 years ago)
Author:
Yusuke Suzuki
Message:

[ES6] Minimize ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX ifdefs
https://bugs.webkit.org/show_bug.cgi?id=150998

Reviewed by Geoffrey Garen.

This patch minimizes ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX ifdefs.
It only keeps 2 ENABLE_ES6_TEMPLATE_LITERAL_SYNTAX in Parser.cpp, one for
template literals and one for tagged templates.
This change makes difference minimal between the enabled and disabled configurations;
reducing accidental build breaks of the disabled configuration.

  • bytecompiler/BytecodeGenerator.cpp:
  • bytecompiler/BytecodeGenerator.h:
  • bytecompiler/NodesCodegen.cpp:
  • parser/ASTBuilder.h:
  • parser/Lexer.cpp:

(JSC::Lexer<T>::Lexer): Deleted.
(JSC::Lexer<T>::lex): Deleted.

  • parser/Lexer.h:
  • parser/NodeConstructors.h:
  • parser/Nodes.h:
  • parser/Parser.cpp:
  • parser/Parser.h:
  • parser/SyntaxChecker.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/parser/SyntaxChecker.h

    r191875 r192141  
    117117    typedef int ElementList;
    118118    typedef int ArgumentsList;
    119 #if ENABLE(ES6_TEMPLATE_LITERAL_SYNTAX)
    120119    typedef int TemplateExpressionList;
    121120    typedef int TemplateString;
    122121    typedef int TemplateStringList;
    123122    typedef int TemplateLiteral;
    124 #endif
    125123    typedef int FormalParameterList;
    126124    typedef int FunctionBody;
     
    195193    int createArguments(int) { return ArgumentsResult; }
    196194    ExpressionType createSpreadExpression(const JSTokenLocation&, ExpressionType, int, int, int) { return SpreadExpr; }
    197 #if ENABLE(ES6_TEMPLATE_LITERAL_SYNTAX)
    198195    TemplateString createTemplateString(const JSTokenLocation&, const Identifier&, const Identifier&) { return TemplateStringResult; }
    199196    TemplateStringList createTemplateStringList(TemplateString) { return TemplateStringListResult; }
     
    204201    TemplateLiteral createTemplateLiteral(const JSTokenLocation&, TemplateStringList, TemplateExpressionList) { return TemplateExpr; }
    205202    ExpressionType createTaggedTemplate(const JSTokenLocation&, ExpressionType, TemplateLiteral, int, int, int) { return TaggedTemplateExpr; }
    206 #endif
    207203
    208204    int createArgumentsList(const JSTokenLocation&, int) { return ArgumentsListResult; }
Note: See TracChangeset for help on using the changeset viewer.