⚠ Archived content — this site is no longer maintained.   Current WebKit documentation is at docs.webkit.org.

Changeset 252421 in webkit


Ignore:
Timestamp:
Nov 13, 2019, 11:40:11 AM (7 years ago)
Author:
ysuzuki@apple.com
Message:

[JSC] Put more into IsoSubspace part 2
https://bugs.webkit.org/show_bug.cgi?id=204144

Reviewed by Mark Lam.

We are doing this step by step to carefully watch the bot status.
This patch puts following things into IsoSubspace.

  1. FunctionRareData
  2. ProxyObject
  3. SparseArrayValueMap
  • runtime/FunctionRareData.h:
  • runtime/ProxyObject.h:
  • runtime/SparseArrayValueMap.h:
  • runtime/VM.cpp:

(JSC::VM::VM):

  • runtime/VM.h:
Location:
trunk/Source/JavaScriptCore
Files:
6 edited

Legend:

Unmodified
Added
Removed
  • trunk/Source/JavaScriptCore/ChangeLog

    r252416 r252421  
     12019-11-13  Yusuke Suzuki  <ysuzuki@apple.com>
     2
     3        [JSC] Put more into IsoSubspace part 2
     4        https://bugs.webkit.org/show_bug.cgi?id=204144
     5
     6        Reviewed by Mark Lam.
     7
     8        We are doing this step by step to carefully watch the bot status.
     9        This patch puts following things into IsoSubspace.
     10
     11            1. FunctionRareData
     12            2. ProxyObject
     13            3. SparseArrayValueMap
     14
     15        * runtime/FunctionRareData.h:
     16        * runtime/ProxyObject.h:
     17        * runtime/SparseArrayValueMap.h:
     18        * runtime/VM.cpp:
     19        (JSC::VM::VM):
     20        * runtime/VM.h:
     21
    1222019-11-13  Yusuke Suzuki  <ysuzuki@apple.com>
    223
  • trunk/Source/JavaScriptCore/runtime/FunctionRareData.h

    r251425 r252421  
    5454
    5555    static constexpr bool needsDestruction = true;
     56
     57    template<typename CellType, SubspaceAccess mode>
     58    static IsoSubspace* subspaceFor(VM& vm)
     59    {
     60        return vm.functionRareDataSpace<mode>();
     61    }
     62
    5663    static void destroy(JSCell*);
    5764
  • trunk/Source/JavaScriptCore/runtime/ProxyObject.h

    r251425 r252421  
    3636
    3737    static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetCallData | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | OverridesGetPropertyNames | ProhibitsPropertyCaching;
     38
     39    template<typename CellType, SubspaceAccess mode>
     40    static IsoSubspace* subspaceFor(VM& vm)
     41    {
     42        return vm.proxyObjectSpace<mode>();
     43    }
    3844
    3945    static ProxyObject* create(JSGlobalObject* globalObject, JSValue target, JSValue handler)
  • trunk/Source/JavaScriptCore/runtime/SparseArrayValueMap.h

    r251425 r252421  
    3030#include "PropertyDescriptor.h"
    3131#include "PutDirectIndexMode.h"
     32#include "VM.h"
    3233#include "WriteBarrier.h"
    3334#include <wtf/HashMap.h>
     
    106107    static constexpr bool needsDestruction = true;
    107108    static void destroy(JSCell*);
     109
     110    template<typename CellType, SubspaceAccess>
     111    static IsoSubspace* subspaceFor(VM& vm)
     112    {
     113        return &vm.sparseArrayValueMapSpace;
     114    }
    108115   
    109116    static Structure* createStructure(VM&, JSGlobalObject*, JSValue prototype);
  • trunk/Source/JavaScriptCore/runtime/VM.cpp

    r252390 r252421  
    282282    , nativeExecutableSpace ISO_SUBSPACE_INIT(heap, destructibleCellHeapCellType.get(), NativeExecutable) // Hash:0x67567f95
    283283    , propertyTableSpace ISO_SUBSPACE_INIT(heap, destructibleCellHeapCellType.get(), PropertyTable) // Hash:0xc6bc9f12
     284    , ropeStringSpace ISO_SUBSPACE_INIT(heap, stringHeapCellType.get(), JSRopeString)
     285    , sparseArrayValueMapSpace ISO_SUBSPACE_INIT(heap, destructibleCellHeapCellType.get(), SparseArrayValueMap)
    284286    , stringSpace ISO_SUBSPACE_INIT(heap, stringHeapCellType.get(), JSString) // Hash:0x90cf758f
    285     , ropeStringSpace ISO_SUBSPACE_INIT(heap, stringHeapCellType.get(), JSRopeString)
    286287    , structureRareDataSpace ISO_SUBSPACE_INIT(heap, destructibleCellHeapCellType.get(), StructureRareData) // Hash:0xaca4e62d
    287288    , structureSpace ISO_SUBSPACE_INIT(heap, destructibleCellHeapCellType.get(), Structure) // Hash:0x1f1bcdca
     
    12941295DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(customGetterSetterFunctionSpace, cellHeapCellType.get(), JSCustomGetterSetterFunction) // Hash:0x18091000
    12951296DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(errorInstanceSpace, destructibleObjectHeapCellType.get(), ErrorInstance) // Hash:0x3f40d4a
     1297DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(functionRareDataSpace, destructibleCellHeapCellType.get(), FunctionRareData)
    12961298DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(nativeStdFunctionSpace, cellHeapCellType.get(), JSNativeStdFunction) // Hash:0x70ed61e4
     1299DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(proxyObjectSpace, cellHeapCellType.get(), ProxyObject)
    12971300DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(proxyRevokeSpace, destructibleObjectHeapCellType.get(), ProxyRevoke) // Hash:0xb506a939
    12981301DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(symbolSpace, destructibleCellHeapCellType.get(), Symbol)
  • trunk/Source/JavaScriptCore/runtime/VM.h

    r252390 r252421  
    383383    IsoSubspace nativeExecutableSpace;
    384384    IsoSubspace propertyTableSpace;
     385    IsoSubspace ropeStringSpace;
     386    IsoSubspace sparseArrayValueMapSpace;
    385387    IsoSubspace stringSpace;
    386     IsoSubspace ropeStringSpace;
    387388    IsoSubspace structureRareDataSpace;
    388389    IsoSubspace structureSpace;
     
    397398        return name##Slow(); \
    398399    } \
    399     IsoSubspace* name##Slow(); \
     400    JS_EXPORT_PRIVATE IsoSubspace* name##Slow(); \
    400401    std::unique_ptr<IsoSubspace> m_##name;
    401402
     
    408409    DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(customGetterSetterFunctionSpace)
    409410    DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(errorInstanceSpace)
     411    DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(functionRareDataSpace)
    410412    DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(nativeStdFunctionSpace)
     413    DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(proxyObjectSpace)
    411414    DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(proxyRevokeSpace)
    412415    DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(symbolSpace)
Note: See TracChangeset for help on using the changeset viewer.