Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (253246 => 253247)
--- trunk/Source/_javascript_Core/ChangeLog 2019-12-07 09:28:21 UTC (rev 253246)
+++ trunk/Source/_javascript_Core/ChangeLog 2019-12-07 10:00:13 UTC (rev 253247)
@@ -1,3 +1,35 @@
+2019-12-07 Yusuke Suzuki <[email protected]>
+
+ [JSC] Put JSWrapperObject derived classes in IsoSubspace
+ https://bugs.webkit.org/show_bug.cgi?id=204976
+
+ Reviewed by Mark Lam.
+
+ Put JSWrapperObject derived classes in IsoSubspace.
+
+ 1. StringObject
+ 2. NumberObject
+ 3. SymbolObject
+ 4. BigIntObject
+ 5. BooleanObject
+
+ * runtime/BigIntObject.h:
+ * runtime/BooleanObject.h:
+ (JSC::BooleanObject::subspaceFor):
+ * runtime/BooleanPrototype.h:
+ * runtime/JSWrapperObject.h:
+ (JSC::JSWrapperObject::subspaceFor):
+ * runtime/NumberObject.h:
+ (JSC::NumberObject::subspaceFor):
+ * runtime/NumberPrototype.h:
+ * runtime/StringObject.h:
+ (JSC::StringObject::subspaceFor):
+ * runtime/StringPrototype.h:
+ * runtime/SymbolObject.h:
+ * runtime/VM.cpp:
+ (JSC::VM::VM):
+ * runtime/VM.h:
+
2019-12-07 Devin Rousso <[email protected]>
Web Inspector: non-regex Local Overrides and Script Blackboxing shouldn't apply to scripts that just contain the URL
Modified: trunk/Source/_javascript_Core/runtime/BigIntObject.h (253246 => 253247)
--- trunk/Source/_javascript_Core/runtime/BigIntObject.h 2019-12-07 09:28:21 UTC (rev 253246)
+++ trunk/Source/_javascript_Core/runtime/BigIntObject.h 2019-12-07 10:00:13 UTC (rev 253247)
@@ -35,6 +35,12 @@
public:
using Base = JSWrapperObject;
+ template<typename, SubspaceAccess mode>
+ static IsoSubspace* subspaceFor(VM& vm)
+ {
+ return vm.bigIntObjectSpace<mode>();
+ }
+
static BigIntObject* create(VM&, JSGlobalObject*, JSBigInt*);
DECLARE_EXPORT_INFO;
Modified: trunk/Source/_javascript_Core/runtime/BooleanObject.h (253246 => 253247)
--- trunk/Source/_javascript_Core/runtime/BooleanObject.h 2019-12-07 09:28:21 UTC (rev 253246)
+++ trunk/Source/_javascript_Core/runtime/BooleanObject.h 2019-12-07 10:00:13 UTC (rev 253247)
@@ -32,6 +32,12 @@
public:
using Base = JSWrapperObject;
+ template<typename, SubspaceAccess mode>
+ static IsoSubspace* subspaceFor(VM& vm)
+ {
+ return vm.booleanObjectSpace<mode>();
+ }
+
static BooleanObject* create(VM& vm, Structure* structure)
{
BooleanObject* boolean = new (NotNull, allocateCell<BooleanObject>(vm.heap)) BooleanObject(vm, structure);
Modified: trunk/Source/_javascript_Core/runtime/BooleanPrototype.h (253246 => 253247)
--- trunk/Source/_javascript_Core/runtime/BooleanPrototype.h 2019-12-07 09:28:21 UTC (rev 253246)
+++ trunk/Source/_javascript_Core/runtime/BooleanPrototype.h 2019-12-07 10:00:13 UTC (rev 253247)
@@ -26,7 +26,7 @@
class BooleanPrototype final : public BooleanObject {
public:
- typedef BooleanObject Base;
+ using Base = BooleanObject;
static constexpr unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
static BooleanPrototype* create(VM& vm, JSGlobalObject* globalObject, Structure* structure)
@@ -49,5 +49,6 @@
private:
BooleanPrototype(VM&, Structure*);
};
+STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(BooleanPrototype, BooleanObject);
} // namespace JSC
Modified: trunk/Source/_javascript_Core/runtime/JSWrapperObject.h (253246 => 253247)
--- trunk/Source/_javascript_Core/runtime/JSWrapperObject.h 2019-12-07 09:28:21 UTC (rev 253246)
+++ trunk/Source/_javascript_Core/runtime/JSWrapperObject.h 2019-12-07 10:00:13 UTC (rev 253247)
@@ -31,6 +31,13 @@
public:
using Base = JSNonFinalObject;
+ template<typename, SubspaceAccess>
+ static IsoSubspace* subspaceFor(VM&)
+ {
+ RELEASE_ASSERT_NOT_REACHED();
+ return nullptr;
+ }
+
static size_t allocationSize(Checked<size_t> inlineCapacity)
{
ASSERT_UNUSED(inlineCapacity, !inlineCapacity);
Modified: trunk/Source/_javascript_Core/runtime/NumberObject.h (253246 => 253247)
--- trunk/Source/_javascript_Core/runtime/NumberObject.h 2019-12-07 09:28:21 UTC (rev 253246)
+++ trunk/Source/_javascript_Core/runtime/NumberObject.h 2019-12-07 10:00:13 UTC (rev 253247)
@@ -32,6 +32,12 @@
public:
using Base = JSWrapperObject;
+ template<typename, SubspaceAccess mode>
+ static IsoSubspace* subspaceFor(VM& vm)
+ {
+ return &vm.numberObjectSpace;
+ }
+
static NumberObject* create(VM& vm, Structure* structure)
{
NumberObject* number = new (NotNull, allocateCell<NumberObject>(vm.heap)) NumberObject(vm, structure);
Modified: trunk/Source/_javascript_Core/runtime/NumberPrototype.h (253246 => 253247)
--- trunk/Source/_javascript_Core/runtime/NumberPrototype.h 2019-12-07 09:28:21 UTC (rev 253246)
+++ trunk/Source/_javascript_Core/runtime/NumberPrototype.h 2019-12-07 10:00:13 UTC (rev 253247)
@@ -26,7 +26,7 @@
class NumberPrototype final : public NumberObject {
public:
- typedef NumberObject Base;
+ using Base = NumberObject;
static constexpr unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
static NumberPrototype* create(VM& vm, JSGlobalObject* globalObject, Structure* structure)
@@ -49,6 +49,7 @@
private:
NumberPrototype(VM&, Structure*);
};
+STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(NumberPrototype, NumberObject);
EncodedJSValue JSC_HOST_CALL numberProtoFuncValueOf(JSGlobalObject*, CallFrame*);
EncodedJSValue JSC_HOST_CALL numberProtoFuncToString(JSGlobalObject*, CallFrame*);
Modified: trunk/Source/_javascript_Core/runtime/StringObject.h (253246 => 253247)
--- trunk/Source/_javascript_Core/runtime/StringObject.h 2019-12-07 09:28:21 UTC (rev 253246)
+++ trunk/Source/_javascript_Core/runtime/StringObject.h 2019-12-07 10:00:13 UTC (rev 253247)
@@ -30,6 +30,12 @@
using Base = JSWrapperObject;
static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | InterceptsGetOwnPropertySlotByIndexEvenWhenLengthIsNotZero | OverridesGetPropertyNames;
+ template<typename, SubspaceAccess mode>
+ static IsoSubspace* subspaceFor(VM& vm)
+ {
+ return &vm.stringObjectSpace;
+ }
+
static StringObject* create(VM& vm, Structure* structure)
{
JSString* string = jsEmptyString(vm);
Modified: trunk/Source/_javascript_Core/runtime/StringPrototype.h (253246 => 253247)
--- trunk/Source/_javascript_Core/runtime/StringPrototype.h 2019-12-07 09:28:21 UTC (rev 253246)
+++ trunk/Source/_javascript_Core/runtime/StringPrototype.h 2019-12-07 10:00:13 UTC (rev 253247)
@@ -34,7 +34,7 @@
StringPrototype(VM&, Structure*);
public:
- typedef StringObject Base;
+ using Base = StringObject;
static constexpr unsigned StructureFlags = Base::StructureFlags | HasStaticPropertyTable;
static StringPrototype* create(VM&, JSGlobalObject*, Structure*);
@@ -49,6 +49,7 @@
protected:
void finishCreation(VM&, JSGlobalObject*, JSString*);
};
+STATIC_ASSERT_ISO_SUBSPACE_SHARABLE(StringPrototype, StringObject);
JSCell* JIT_OPERATION operationStringProtoFuncReplaceGeneric(JSGlobalObject*, EncodedJSValue thisValue, EncodedJSValue searchValue, EncodedJSValue replaceValue);
JSCell* JIT_OPERATION operationStringProtoFuncReplaceRegExpEmptyStr(JSGlobalObject*, JSString* thisValue, RegExpObject* searchValue);
Modified: trunk/Source/_javascript_Core/runtime/SymbolObject.h (253246 => 253247)
--- trunk/Source/_javascript_Core/runtime/SymbolObject.h 2019-12-07 09:28:21 UTC (rev 253246)
+++ trunk/Source/_javascript_Core/runtime/SymbolObject.h 2019-12-07 10:00:13 UTC (rev 253247)
@@ -30,6 +30,12 @@
public:
using Base = JSWrapperObject;
+ template<typename, SubspaceAccess mode>
+ static IsoSubspace* subspaceFor(VM& vm)
+ {
+ return vm.symbolObjectSpace<mode>();
+ }
+
static SymbolObject* create(VM& vm, Structure* structure)
{
Symbol* symbol = Symbol::create(vm);
Modified: trunk/Source/_javascript_Core/runtime/VM.cpp (253246 => 253247)
--- trunk/Source/_javascript_Core/runtime/VM.cpp 2019-12-07 09:28:21 UTC (rev 253246)
+++ trunk/Source/_javascript_Core/runtime/VM.cpp 2019-12-07 10:00:13 UTC (rev 253247)
@@ -31,6 +31,8 @@
#include "ArgList.h"
#include "ArrayBufferNeuteringWatchpointSet.h"
+#include "BigIntObject.h"
+#include "BooleanObject.h"
#include "BuiltinExecutables.h"
#include "BytecodeIntrinsicRegistry.h"
#include "ClonedArguments.h"
@@ -128,6 +130,7 @@
#include "NativeExecutable.h"
#include "NativeStdFunctionCell.h"
#include "Nodes.h"
+#include "NumberObject.h"
#include "ObjCCallbackFunction.h"
#include "Parser.h"
#include "PredictionFileCreatingFuzzerAgent.h"
@@ -149,8 +152,10 @@
#include "SourceProviderCache.h"
#include "StackVisitor.h"
#include "StrictEvalActivation.h"
+#include "StringObject.h"
#include "StrongInlines.h"
#include "StructureInlines.h"
+#include "SymbolObject.h"
#include "TestRunnerUtils.h"
#include "ThunkGenerators.h"
#include "TypeProfiler.h"
@@ -333,6 +338,7 @@
, getterSetterSpace ISO_SUBSPACE_INIT(heap, cellHeapCellType.get(), GetterSetter)
, internalFunctionSpace ISO_SUBSPACE_INIT(heap, cellHeapCellType.get(), InternalFunction) // Hash:0xf845c464
, nativeExecutableSpace ISO_SUBSPACE_INIT(heap, destructibleCellHeapCellType.get(), NativeExecutable) // Hash:0x67567f95
+ , numberObjectSpace ISO_SUBSPACE_INIT(heap, cellHeapCellType.get(), NumberObject)
, promiseSpace ISO_SUBSPACE_INIT(heap, cellHeapCellType.get(), JSPromise)
, propertyTableSpace ISO_SUBSPACE_INIT(heap, destructibleCellHeapCellType.get(), PropertyTable) // Hash:0xc6bc9f12
, regExpObjectSpace ISO_SUBSPACE_INIT(heap, cellHeapCellType.get(), RegExpObject)
@@ -340,6 +346,7 @@
, scopedArgumentsSpace ISO_SUBSPACE_INIT(heap, cellHeapCellType.get(), ScopedArguments)
, sparseArrayValueMapSpace ISO_SUBSPACE_INIT(heap, destructibleCellHeapCellType.get(), SparseArrayValueMap)
, stringSpace ISO_SUBSPACE_INIT(heap, stringHeapCellType.get(), JSString) // Hash:0x90cf758f
+ , stringObjectSpace ISO_SUBSPACE_INIT(heap, cellHeapCellType.get(), StringObject)
, structureRareDataSpace ISO_SUBSPACE_INIT(heap, destructibleCellHeapCellType.get(), StructureRareData) // Hash:0xaca4e62d
, structureSpace ISO_SUBSPACE_INIT(heap, destructibleCellHeapCellType.get(), Structure) // Hash:0x1f1bcdca
, symbolTableSpace ISO_SUBSPACE_INIT(heap, destructibleCellHeapCellType.get(), SymbolTable) // Hash:0xc5215afd
@@ -1353,6 +1360,8 @@
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(arrayBufferSpace, cellHeapCellType.get(), JSArrayBuffer)
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(asyncGeneratorSpace, cellHeapCellType.get(), JSAsyncGenerator)
+DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(bigIntObjectSpace, cellHeapCellType.get(), BigIntObject)
+DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(booleanObjectSpace, cellHeapCellType.get(), BooleanObject)
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(boundFunctionSpace, cellHeapCellType.get(), JSBoundFunction) // Hash:0xd7916d41
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(callbackFunctionSpace, cellHeapCellType.get(), JSCallbackFunction) // Hash:0xe7648ebc
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(customGetterSetterFunctionSpace, cellHeapCellType.get(), JSCustomGetterSetterFunction) // Hash:0x18091000
@@ -1373,6 +1382,7 @@
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(proxyRevokeSpace, cellHeapCellType.get(), ProxyRevoke) // Hash:0xb506a939
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(setSpace, cellHeapCellType.get(), JSSet)
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(symbolSpace, destructibleCellHeapCellType.get(), Symbol)
+DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(symbolObjectSpace, cellHeapCellType.get(), SymbolObject)
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(uint8ArraySpace, cellHeapCellType.get(), JSUint8Array)
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(uint8ClampedArraySpace, cellHeapCellType.get(), JSUint8ClampedArray)
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(uint16ArraySpace, cellHeapCellType.get(), JSUint16Array)
Modified: trunk/Source/_javascript_Core/runtime/VM.h (253246 => 253247)
--- trunk/Source/_javascript_Core/runtime/VM.h 2019-12-07 09:28:21 UTC (rev 253246)
+++ trunk/Source/_javascript_Core/runtime/VM.h 2019-12-07 10:00:13 UTC (rev 253247)
@@ -428,6 +428,7 @@
IsoSubspace getterSetterSpace;
IsoSubspace internalFunctionSpace;
IsoSubspace nativeExecutableSpace;
+ IsoSubspace numberObjectSpace;
IsoSubspace promiseSpace;
IsoSubspace propertyTableSpace;
IsoSubspace regExpObjectSpace;
@@ -435,6 +436,7 @@
IsoSubspace scopedArgumentsSpace;
IsoSubspace sparseArrayValueMapSpace;
IsoSubspace stringSpace;
+ IsoSubspace stringObjectSpace;
IsoSubspace structureRareDataSpace;
IsoSubspace structureSpace;
IsoSubspace symbolTableSpace;
@@ -459,6 +461,8 @@
#endif
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(arrayBufferSpace)
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(asyncGeneratorSpace)
+ DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(bigIntObjectSpace)
+ DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(booleanObjectSpace)
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(boundFunctionSpace)
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(callbackFunctionSpace)
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(customGetterSetterFunctionSpace)
@@ -479,6 +483,7 @@
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(proxyRevokeSpace)
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(setSpace)
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(symbolSpace)
+ DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(symbolObjectSpace)
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(uint8ArraySpace)
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(uint8ClampedArraySpace)
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(uint16ArraySpace)