- Revision
- 225835
- Author
- fpi...@apple.com
- Date
- 2017-12-12 19:26:39 -0800 (Tue, 12 Dec 2017)
Log Message
Structure, StructureRareData, and PropertyTable should be in IsoSubspaces
https://bugs.webkit.org/show_bug.cgi?id=180732
Rubber stamped by Mark Lam.
We should eventually move all fixed-size cells into IsoSubspaces. I don't know if they are
scalable enough to support that, so we should do it carefully.
* heap/MarkedSpace.cpp:
* runtime/PropertyMapHashTable.h:
* runtime/Structure.h:
* runtime/StructureRareData.h:
* runtime/VM.cpp:
(JSC::VM::VM):
* runtime/VM.h:
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (225834 => 225835)
--- trunk/Source/_javascript_Core/ChangeLog 2017-12-13 03:04:22 UTC (rev 225834)
+++ trunk/Source/_javascript_Core/ChangeLog 2017-12-13 03:26:39 UTC (rev 225835)
@@ -1,3 +1,21 @@
+2017-12-12 Filip Pizlo <fpi...@apple.com>
+
+ Structure, StructureRareData, and PropertyTable should be in IsoSubspaces
+ https://bugs.webkit.org/show_bug.cgi?id=180732
+
+ Rubber stamped by Mark Lam.
+
+ We should eventually move all fixed-size cells into IsoSubspaces. I don't know if they are
+ scalable enough to support that, so we should do it carefully.
+
+ * heap/MarkedSpace.cpp:
+ * runtime/PropertyMapHashTable.h:
+ * runtime/Structure.h:
+ * runtime/StructureRareData.h:
+ * runtime/VM.cpp:
+ (JSC::VM::VM):
+ * runtime/VM.h:
+
2017-12-12 Saam Barati <sbar...@apple.com>
We need to model effects of Spread(@PhantomCreateRest) in Clobberize/PreciseLocalClobberize
Modified: trunk/Source/_javascript_Core/heap/MarkedSpace.cpp (225834 => 225835)
--- trunk/Source/_javascript_Core/heap/MarkedSpace.cpp 2017-12-13 03:04:22 UTC (rev 225834)
+++ trunk/Source/_javascript_Core/heap/MarkedSpace.cpp 2017-12-13 03:26:39 UTC (rev 225835)
@@ -134,13 +134,10 @@
// Manually inject size classes for objects we know will be allocated in high volume.
// FIXME: All of these things should have IsoSubspaces.
// https://bugs.webkit.org/show_bug.cgi?id=179876
- add(sizeof(UnlinkedFunctionExecutable));
add(sizeof(UnlinkedFunctionCodeBlock));
add(sizeof(FunctionCodeBlock));
add(sizeof(JSString));
add(sizeof(JSFunction));
- add(sizeof(PropertyTable));
- add(sizeof(Structure));
{
// Sort and deduplicate.
Modified: trunk/Source/_javascript_Core/runtime/PropertyMapHashTable.h (225834 => 225835)
--- trunk/Source/_javascript_Core/runtime/PropertyMapHashTable.h 2017-12-13 03:04:22 UTC (rev 225834)
+++ trunk/Source/_javascript_Core/runtime/PropertyMapHashTable.h 2017-12-13 03:26:39 UTC (rev 225835)
@@ -121,6 +121,12 @@
typedef JSCell Base;
static const unsigned StructureFlags = Base::StructureFlags | StructureIsImmortal;
+ template<typename CellType>
+ static IsoSubspace* subspaceFor(VM& vm)
+ {
+ return &vm.propertyTableSpace;
+ }
+
static const bool needsDestruction = true;
static void destroy(JSCell*);
Modified: trunk/Source/_javascript_Core/runtime/Structure.h (225834 => 225835)
--- trunk/Source/_javascript_Core/runtime/Structure.h 2017-12-13 03:04:22 UTC (rev 225834)
+++ trunk/Source/_javascript_Core/runtime/Structure.h 2017-12-13 03:26:39 UTC (rev 225835)
@@ -134,6 +134,12 @@
static Structure* create(PolyProtoTag, VM&, JSGlobalObject*, JSObject* prototype, const TypeInfo&, const ClassInfo*, IndexingType = NonArray, unsigned inlineCapacity = 0);
~Structure();
+
+ template<typename CellType>
+ static IsoSubspace* subspaceFor(VM& vm)
+ {
+ return &vm.structureSpace;
+ }
protected:
void finishCreation(VM& vm)
Modified: trunk/Source/_javascript_Core/runtime/StructureRareData.h (225834 => 225835)
--- trunk/Source/_javascript_Core/runtime/StructureRareData.h 2017-12-13 03:04:22 UTC (rev 225834)
+++ trunk/Source/_javascript_Core/runtime/StructureRareData.h 2017-12-13 03:26:39 UTC (rev 225835)
@@ -43,6 +43,12 @@
typedef JSCell Base;
static const unsigned StructureFlags = Base::StructureFlags | StructureIsImmortal;
+ template<typename CellType>
+ static IsoSubspace* subspaceFor(VM& vm)
+ {
+ return &vm.structureRareDataSpace;
+ }
+
static StructureRareData* create(VM&, Structure*);
static const bool needsDestruction = true;
Modified: trunk/Source/_javascript_Core/runtime/VM.cpp (225834 => 225835)
--- trunk/Source/_javascript_Core/runtime/VM.cpp 2017-12-13 03:04:22 UTC (rev 225834)
+++ trunk/Source/_javascript_Core/runtime/VM.cpp 2017-12-13 03:26:39 UTC (rev 225835)
@@ -211,6 +211,9 @@
, moduleProgramExecutableSpace ISO_SUBSPACE_INIT(heap, destructibleCellHeapCellType.get(), ModuleProgramExecutable)
, nativeExecutableSpace ISO_SUBSPACE_INIT(heap, destructibleCellHeapCellType.get(), NativeExecutable)
, programExecutableSpace ISO_SUBSPACE_INIT(heap, destructibleCellHeapCellType.get(), ProgramExecutable)
+ , propertyTableSpace ISO_SUBSPACE_INIT(heap, destructibleCellHeapCellType.get(), PropertyTable)
+ , structureRareDataSpace ISO_SUBSPACE_INIT(heap, destructibleCellHeapCellType.get(), StructureRareData)
+ , structureSpace ISO_SUBSPACE_INIT(heap, destructibleCellHeapCellType.get(), Structure)
, inferredTypesWithFinalizers(inferredTypeSpace)
, vmType(vmType)
, clientData(0)
Modified: trunk/Source/_javascript_Core/runtime/VM.h (225834 => 225835)
--- trunk/Source/_javascript_Core/runtime/VM.h 2017-12-13 03:04:22 UTC (rev 225834)
+++ trunk/Source/_javascript_Core/runtime/VM.h 2017-12-13 03:26:39 UTC (rev 225835)
@@ -345,6 +345,9 @@
IsoSubspace moduleProgramExecutableSpace;
IsoSubspace nativeExecutableSpace;
IsoSubspace programExecutableSpace;
+ IsoSubspace propertyTableSpace;
+ IsoSubspace structureRareDataSpace;
+ IsoSubspace structureSpace;
IsoCellSet inferredTypesWithFinalizers;