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/Parser.cpp

    r191946 r192141  
    32513251}
    32523252
    3253 #if ENABLE(ES6_TEMPLATE_LITERAL_SYNTAX)
    32543253template <typename LexerType>
    32553254template <class TreeBuilder> typename TreeBuilder::TemplateString Parser<LexerType>::parseTemplateString(TreeBuilder& context, bool isTemplateHead, typename LexerType::RawStringsBuildMode rawStringsBuildMode, bool& elementIsTail)
     
    33093308    return context.createTemplateLiteral(location, templateStringList, templateExpressionList);
    33103309}
    3311 #endif
    33123310
    33133311template <typename LexerType>
Note: See TracChangeset for help on using the changeset viewer.