Ignore:
Timestamp:
Feb 28, 2016, 11:14:26 AM (9 years ago)
Author:
[email protected]
Message:

[ES6] Arrow function syntax. Emit loading&putting this/super only if they are used in arrow function. https://bugs.webkit.org/show_bug.cgi?id=153981

Small improvements

File:
1 edited

Legend:

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

    r197043 r197296  
    159159const CodeFeatures ArrowFunctionFeature =        1 << 8;
    160160const CodeFeatures ArrowFunctionContextFeature = 1 << 9;
     161const CodeFeatures SuperCallFeature =            1 << 10;
     162const CodeFeatures SuperPropertyFeature =        1 << 11;
    161163
    162 const CodeFeatures AllFeatures = EvalFeature | ArgumentsFeature | WithFeature | ThisFeature | StrictModeFeature | ShadowsArgumentsFeature | ModifiedParameterFeature | ArrowFunctionFeature | ArrowFunctionContextFeature;
     164const CodeFeatures AllFeatures = EvalFeature | ArgumentsFeature | WithFeature | ThisFeature | StrictModeFeature | ShadowsArgumentsFeature | ModifiedParameterFeature | ArrowFunctionFeature | ArrowFunctionContextFeature |
     165    SuperCallFeature | SuperPropertyFeature;
    163166
     167typedef uint8_t InnerArrowFunctionCodeFeatures;
     168   
     169const InnerArrowFunctionCodeFeatures NoInnerArrowFunctionFeatures =                0;
     170const InnerArrowFunctionCodeFeatures EvalInnerArrowFunctionFeature =          1 << 0;
     171const InnerArrowFunctionCodeFeatures ArgumentsInnerArrowFunctionFeature =     1 << 1;
     172const InnerArrowFunctionCodeFeatures ThisInnerArrowFunctionFeature =          1 << 2;
     173const InnerArrowFunctionCodeFeatures SuperCallInnerArrowFunctionFeature =     1 << 3;
     174const InnerArrowFunctionCodeFeatures SuperPropertyInnerArrowFunctionFeature = 1 << 4;
     175const InnerArrowFunctionCodeFeatures NewTargetInnerArrowFunctionFeature =     1 << 5;
     176   
     177const InnerArrowFunctionCodeFeatures AllInnerArrowFunctionCodeFeatures = EvalInnerArrowFunctionFeature | ArgumentsInnerArrowFunctionFeature | ThisInnerArrowFunctionFeature | SuperCallInnerArrowFunctionFeature | SuperPropertyInnerArrowFunctionFeature | NewTargetInnerArrowFunctionFeature;
    164178} // namespace JSC
    165179
Note: See TracChangeset for help on using the changeset viewer.