Ignore:
Timestamp:
Nov 8, 2015, 5:34:09 PM (10 years ago)
Author:
Yusuke Suzuki
Message:

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

Reviewed by Darin Adler.

This patch minimizes ENABLE_ES6_CLASS_SYNTAX ifdefs.
It keeps several ENABLE_ES6_CLASS_SYNTAX ifdefs in Parser.cpp.

  • super meta property
  • class declaration parsing
  • class expression parsing
  • class with import declaration

This change makes difference minimal between the enabled and disabled configurations;
reducing accidental build breaks of the disabled configuration.

  • bytecompiler/BytecodeGenerator.h:

(JSC::BytecodeGenerator::constructorKind): Deleted.

  • bytecompiler/NodesCodegen.cpp:
  • parser/ASTBuilder.h:
  • parser/NodeConstructors.h:
  • parser/Nodes.h:
  • parser/Parser.cpp:
  • parser/Parser.h:

(JSC::Scope::hasDirectSuper): Deleted.
(JSC::Scope::needsSuperBinding): Deleted.

  • parser/ParserFunctionInfo.h:
  • parser/ParserTokens.h:
  • parser/SyntaxChecker.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/parser/Parser.cpp

    r192141 r192147  
    19091909}
    19101910
    1911 #if ENABLE(ES6_CLASS_SYNTAX)
    19121911template <typename LexerType>
    19131912template <class TreeBuilder> TreeStatement Parser<LexerType>::parseClassDeclaration(TreeBuilder& context, ExportType exportType)
     
    20872086    return classExpression;
    20882087}
    2089 #endif
    20902088
    20912089struct LabelInfo {
Note: See TracChangeset for help on using the changeset viewer.