Ignore:
Timestamp:
Nov 17, 2020, 7:19:04 PM (5 years ago)
Author:
[email protected]
Message:

[JSC] Enable static public class fields
https://bugs.webkit.org/show_bug.cgi?id=219058

Reviewed by Saam Barati.

JSTests:

  • stress/big-int-as-property-name.js:
  • stress/class-fields-bytecode-cache.js:
  • stress/class-fields-computed-to-property-key.js:
  • stress/class-fields-function-name.js:
  • stress/class-fields-harmony.js:
  • stress/class-fields-private-use-eval.js:
  • stress/class-fields-proxy-define-property.js:
  • stress/class-fields-stress-instance.js:
  • stress/class-fields-to-property-key-const-string-ftl.js:
  • stress/class-fields-to-property-key-const-symbol-ftl.js:
  • stress/class-fields-to-property-key-slow-object-tostring-ftl.js:
  • stress/class-fields-to-property-key-slow-object-valueof-ftl.js:
  • stress/class-fields-to-property-key-string-object-ftl.js:
  • stress/class-fields-to-property-key-string-or-string-object-ftl.js:
  • stress/class-fields-with-special-names.js:
  • stress/generator-syntax.js:
  • stress/method-name.js:
  • stress/private-name-access-in-computed-property.js:
  • test262/config.yaml:

Source/JavaScriptCore:

Let's flip the runtime flag (usePublicStaticClassFields). And we drop usePublicClassFields flag since it is already shipped.

  • bytecompiler/BytecodeGenerator.cpp:

(JSC::BytecodeGenerator::BytecodeGenerator):

  • bytecompiler/NodesCodegen.cpp:

(JSC::FunctionCallValueNode::emitBytecode):

  • parser/Parser.cpp:

(JSC::Parser<LexerType>::parseClass):

  • runtime/OptionsList.h:
File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/bytecompiler/NodesCodegen.cpp

    r269922 r269939  
    10921092
    10931093        // Initialize instance fields after super-call.
    1094         if (Options::usePublicClassFields() && generator.needsClassFieldInitializer() == NeedsClassFieldInitializer::Yes) {
     1094        if (generator.needsClassFieldInitializer() == NeedsClassFieldInitializer::Yes) {
    10951095            ASSERT(generator.isConstructor() || generator.isDerivedConstructorContext());
    10961096            func = generator.emitLoadDerivedConstructor();
Note: See TracChangeset for help on using the changeset viewer.