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/ParserTokens.h

    r191946 r192147  
    8080    EXPORT,
    8181    YIELD,
    82 #if ENABLE(ES6_CLASS_SYNTAX)
    8382    CLASSTOKEN,
    8483    EXTENDS,
    8584    SUPER,
    86 #else
    87     CLASSTOKEN = RESERVED,
    88     EXTENDS = RESERVED,
    89     SUPER = RESERVED,
    90 #endif
    9185    OPENBRACE = 0,
    9286    CLOSEBRACE,
Note: See TracChangeset for help on using the changeset viewer.