Changeset 253321 in webkit for trunk/Source/JavaScriptCore/tools


Ignore:
Timestamp:
Dec 10, 2019, 1:41:35 AM (5 years ago)
Author:
[email protected]
Message:

[JSC] Put JSArray in IsoSubspace
https://bugs.webkit.org/show_bug.cgi?id=205049

Reviewed by Mark Lam.

Source/JavaScriptCore:

Put JSArray in IsoSubspace.

  • runtime/ArrayPrototype.h:
  • runtime/JSArray.h:

(JSC::JSArray::subspaceFor):

  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
  • tools/JSDollarVM.cpp:

Source/WebCore:

RuntimeArray is inheriting JSArray. We should have separate IsoSubspace for this.

  • bindings/js/WebCoreJSClientData.cpp:

(WebCore::JSVMClientData::JSVMClientData):

  • bindings/js/WebCoreJSClientData.h:

(WebCore::JSVMClientData::runtimeArraySpace):

  • bridge/runtime_array.cpp:

(JSC::RuntimeArray::subspaceForImpl):

  • bridge/runtime_array.h:

(JSC::RuntimeArray::create): Deleted.
(JSC::RuntimeArray::getLength const): Deleted.
(JSC::RuntimeArray::getConcreteArray const): Deleted.
(JSC::RuntimeArray::createPrototype): Deleted.
(JSC::RuntimeArray::createStructure): Deleted.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/tools/JSDollarVM.cpp

    r253019 r253321  
    493493};
    494494
    495 class RuntimeArray : public JSArray {
     495class RuntimeArray final : public JSArray {
    496496public:
    497     typedef JSArray Base;
     497    using Base = JSArray;
    498498    static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | OverridesGetPropertyNames;
     499
     500    template<typename CellType, SubspaceAccess>
     501    static CompleteSubspace* subspaceFor(VM& vm)
     502    {
     503        return &vm.cellSpace;
     504    }
    499505
    500506    static RuntimeArray* create(JSGlobalObject* globalObject, CallFrame* callFrame)
Note: See TracChangeset for help on using the changeset viewer.