Log Message
[JSC] Put more cells into IsoSubspace https://bugs.webkit.org/show_bug.cgi?id=204845
Reviewed by Saam Barati.
This patch puts following cells in IsoSubspace.
- ClonedArguments
- JSMap
- JSSet
- RegExpObject
* runtime/ClonedArguments.h:
* runtime/JSMap.h:
* runtime/JSSet.h:
* runtime/RegExpObject.h:
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:
* runtime/WeakMapImpl.h:
(JSC::WeakMapImpl::subspaceFor):
Modified Paths
- trunk/Source/_javascript_Core/ChangeLog
- trunk/Source/_javascript_Core/runtime/ClonedArguments.h
- trunk/Source/_javascript_Core/runtime/JSMap.h
- trunk/Source/_javascript_Core/runtime/JSSet.h
- trunk/Source/_javascript_Core/runtime/RegExpObject.h
- trunk/Source/_javascript_Core/runtime/VM.cpp
- trunk/Source/_javascript_Core/runtime/VM.h
- trunk/Source/_javascript_Core/runtime/WeakMapImpl.h
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (253115 => 253116)
--- trunk/Source/_javascript_Core/ChangeLog 2019-12-04 18:46:01 UTC (rev 253115)
+++ trunk/Source/_javascript_Core/ChangeLog 2019-12-04 18:49:12 UTC (rev 253116)
@@ -1,5 +1,29 @@
2019-12-04 Yusuke Suzuki <[email protected]>
+ [JSC] Put more cells into IsoSubspace
+ https://bugs.webkit.org/show_bug.cgi?id=204845
+
+ Reviewed by Saam Barati.
+
+ This patch puts following cells in IsoSubspace.
+
+ - ClonedArguments
+ - JSMap
+ - JSSet
+ - RegExpObject
+
+ * runtime/ClonedArguments.h:
+ * runtime/JSMap.h:
+ * runtime/JSSet.h:
+ * runtime/RegExpObject.h:
+ * runtime/VM.cpp:
+ (JSC::VM::VM):
+ * runtime/VM.h:
+ * runtime/WeakMapImpl.h:
+ (JSC::WeakMapImpl::subspaceFor):
+
+2019-12-04 Yusuke Suzuki <[email protected]>
+
[JSC] Remove m_sharingMode field from JSArrayBufferPrototype and make it plain object
https://bugs.webkit.org/show_bug.cgi?id=204832
Modified: trunk/Source/_javascript_Core/runtime/ClonedArguments.h (253115 => 253116)
--- trunk/Source/_javascript_Core/runtime/ClonedArguments.h 2019-12-04 18:46:01 UTC (rev 253115)
+++ trunk/Source/_javascript_Core/runtime/ClonedArguments.h 2019-12-04 18:49:12 UTC (rev 253116)
@@ -39,8 +39,15 @@
// caller/callee/@@iterator properties unless someone asks for them.
class ClonedArguments final : public JSNonFinalObject {
public:
- typedef JSNonFinalObject Base;
+ using Base = JSNonFinalObject;
static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetPropertyNames;
+
+ template<typename CellType, SubspaceAccess mode>
+ static IsoSubspace* subspaceFor(VM& vm)
+ {
+ static_assert(!CellType::needsDestruction, "");
+ return &vm.clonedArgumentsSpace;
+ }
private:
ClonedArguments(VM&, Structure*, Butterfly*);
Modified: trunk/Source/_javascript_Core/runtime/JSMap.h (253115 => 253116)
--- trunk/Source/_javascript_Core/runtime/JSMap.h 2019-12-04 18:46:01 UTC (rev 253115)
+++ trunk/Source/_javascript_Core/runtime/JSMap.h 2019-12-04 18:49:12 UTC (rev 253116)
@@ -36,6 +36,12 @@
DECLARE_EXPORT_INFO;
+ template<typename CellType, SubspaceAccess mode>
+ static IsoSubspace* subspaceFor(VM& vm)
+ {
+ return vm.mapSpace<mode>();
+ }
+
static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
{
return Structure::create(vm, globalObject, prototype, TypeInfo(JSMapType, StructureFlags), info());
Modified: trunk/Source/_javascript_Core/runtime/JSSet.h (253115 => 253116)
--- trunk/Source/_javascript_Core/runtime/JSSet.h 2019-12-04 18:46:01 UTC (rev 253115)
+++ trunk/Source/_javascript_Core/runtime/JSSet.h 2019-12-04 18:49:12 UTC (rev 253116)
@@ -36,6 +36,12 @@
DECLARE_EXPORT_INFO;
+ template<typename CellType, SubspaceAccess mode>
+ static IsoSubspace* subspaceFor(VM& vm)
+ {
+ return vm.setSpace<mode>();
+ }
+
static Structure* createStructure(VM& vm, JSGlobalObject* globalObject, JSValue prototype)
{
return Structure::create(vm, globalObject, prototype, TypeInfo(JSSetType, StructureFlags), info());
Modified: trunk/Source/_javascript_Core/runtime/RegExpObject.h (253115 => 253116)
--- trunk/Source/_javascript_Core/runtime/RegExpObject.h 2019-12-04 18:46:01 UTC (rev 253115)
+++ trunk/Source/_javascript_Core/runtime/RegExpObject.h 2019-12-04 18:49:12 UTC (rev 253116)
@@ -32,6 +32,13 @@
using Base = JSNonFinalObject;
static constexpr unsigned StructureFlags = Base::StructureFlags | OverridesGetOwnPropertySlot | OverridesGetPropertyNames;
+ template<typename CellType, SubspaceAccess mode>
+ static IsoSubspace* subspaceFor(VM& vm)
+ {
+ static_assert(!CellType::needsDestruction, "");
+ return &vm.regExpObjectSpace;
+ }
+
static constexpr uintptr_t lastIndexIsNotWritableFlag = 1;
static RegExpObject* create(VM& vm, Structure* structure, RegExp* regExp)
Modified: trunk/Source/_javascript_Core/runtime/VM.cpp (253115 => 253116)
--- trunk/Source/_javascript_Core/runtime/VM.cpp 2019-12-04 18:46:01 UTC (rev 253115)
+++ trunk/Source/_javascript_Core/runtime/VM.cpp 2019-12-04 18:49:12 UTC (rev 253116)
@@ -33,6 +33,7 @@
#include "ArrayBufferNeuteringWatchpointSet.h"
#include "BuiltinExecutables.h"
#include "BytecodeIntrinsicRegistry.h"
+#include "ClonedArguments.h"
#include "CodeBlock.h"
#include "CodeCache.h"
#include "CommonIdentifiers.h"
@@ -314,6 +315,7 @@
, destructibleCellSpace("Destructible JSCell", heap, destructibleCellHeapCellType.get(), fastMallocAllocator.get()) // Hash:0xbfff3d73
, destructibleObjectSpace("JSDestructibleObject", heap, destructibleObjectHeapCellType.get(), fastMallocAllocator.get()) // Hash:0x4f5ed7a9
, bigIntSpace ISO_SUBSPACE_INIT(heap, destructibleCellHeapCellType.get(), JSBigInt)
+ , clonedArgumentsSpace ISO_SUBSPACE_INIT(heap, cellHeapCellType.get(), ClonedArguments)
, dateInstanceSpace ISO_SUBSPACE_INIT(heap, dateInstanceHeapCellType.get(), DateInstance)
, executableToCodeBlockEdgeSpace ISO_SUBSPACE_INIT(heap, cellHeapCellType.get(), ExecutableToCodeBlockEdge) // Hash:0x7b730b20
, functionSpace ISO_SUBSPACE_INIT(heap, cellHeapCellType.get(), JSFunction) // Hash:0x800fca72
@@ -322,6 +324,7 @@
, nativeExecutableSpace ISO_SUBSPACE_INIT(heap, destructibleCellHeapCellType.get(), NativeExecutable) // Hash:0x67567f95
, 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)
, ropeStringSpace ISO_SUBSPACE_INIT(heap, stringHeapCellType.get(), JSRopeString)
, scopedArgumentsSpace ISO_SUBSPACE_INIT(heap, cellHeapCellType.get(), ScopedArguments)
, sparseArrayValueMapSpace ISO_SUBSPACE_INIT(heap, destructibleCellHeapCellType.get(), SparseArrayValueMap)
@@ -1346,9 +1349,11 @@
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(errorInstanceSpace, errorInstanceHeapCellType.get(), ErrorInstance) // Hash:0x3f40d4a
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(functionRareDataSpace, destructibleCellHeapCellType.get(), FunctionRareData)
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(generatorSpace, cellHeapCellType.get(), JSGenerator)
+DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(mapSpace, cellHeapCellType.get(), JSMap)
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(nativeStdFunctionSpace, cellHeapCellType.get(), JSNativeStdFunction) // Hash:0x70ed61e4
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(proxyObjectSpace, cellHeapCellType.get(), ProxyObject)
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(unlinkedEvalCodeBlockSpace, destructibleCellHeapCellType.get(), UnlinkedEvalCodeBlock)
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER_SLOW(unlinkedFunctionCodeBlockSpace, destructibleCellHeapCellType.get(), UnlinkedFunctionCodeBlock)
Modified: trunk/Source/_javascript_Core/runtime/VM.h (253115 => 253116)
--- trunk/Source/_javascript_Core/runtime/VM.h 2019-12-04 18:46:01 UTC (rev 253115)
+++ trunk/Source/_javascript_Core/runtime/VM.h 2019-12-04 18:49:12 UTC (rev 253116)
@@ -414,6 +414,7 @@
CompleteSubspace destructibleObjectSpace;
IsoSubspace bigIntSpace;
+ IsoSubspace clonedArgumentsSpace;
IsoSubspace dateInstanceSpace;
IsoSubspace executableToCodeBlockEdgeSpace;
IsoSubspace functionSpace;
@@ -422,6 +423,7 @@
IsoSubspace nativeExecutableSpace;
IsoSubspace promiseSpace;
IsoSubspace propertyTableSpace;
+ IsoSubspace regExpObjectSpace;
IsoSubspace ropeStringSpace;
IsoSubspace scopedArgumentsSpace;
IsoSubspace sparseArrayValueMapSpace;
@@ -455,9 +457,11 @@
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(errorInstanceSpace)
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(functionRareDataSpace)
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(generatorSpace)
+ DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(mapSpace)
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(nativeStdFunctionSpace)
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(proxyObjectSpace)
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(proxyRevokeSpace)
+ DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(setSpace)
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(symbolSpace)
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(unlinkedEvalCodeBlockSpace)
DYNAMIC_ISO_SUBSPACE_DEFINE_MEMBER(unlinkedFunctionCodeBlockSpace)
Modified: trunk/Source/_javascript_Core/runtime/WeakMapImpl.h (253115 => 253116)
--- trunk/Source/_javascript_Core/runtime/WeakMapImpl.h 2019-12-04 18:46:01 UTC (rev 253115)
+++ trunk/Source/_javascript_Core/runtime/WeakMapImpl.h 2019-12-04 18:49:12 UTC (rev 253116)
@@ -306,7 +306,7 @@
template<typename CellType, SubspaceAccess mode>
static IsoSubspace* subspaceFor(VM& vm)
{
- if (isWeakMap())
+ if constexpr (isWeakMap())
return vm.weakMapSpace<mode>();
return vm.weakSetSpace<mode>();
}
_______________________________________________ webkit-changes mailing list [email protected] https://lists.webkit.org/mailman/listinfo/webkit-changes
