[heap] Move all Maps into RO_SPACE

Allocates almost all maps found in the start up snapshot into RO_SPACE.
There are 2 JSObject maps that are excluded as they contain a mutable cell.

Also updates VerifyReadOnlyPointers to check that RO_SPACE objects' maps are
also in RO_SPACE. Previously the invariant did not hold for Strings which still
had their maps in MAP_SPACE.

Also moves invalid_prototype_validity_cell to RO_SPACE.

    RO_SPACE  NEW_SPACE  OLD_SPACE  CODE_SPACE  MAP_SPACE  LO_SPACE
old    22024          0     229184       32928       8184         0
new    31488          0     229184       32928        176         0

Bug: v8:7464
Change-Id: I870d22cc5234ba60b3ef8a2ada590ee6ae426c9f
Reviewed-on: https://chromium-review.googlesource.com/1013494
Reviewed-by: Hannes Payer <hpayer@chromium.org>
Commit-Queue: Dan Elphick <delphick@chromium.org>
Cr-Commit-Position: refs/heads/master@{#52848}
This commit is contained in:
Dan Elphick 2018-04-26 16:01:22 +01:00 committed by Commit Bot
parent e4df13984c
commit 4655c9d369
8 changed files with 187 additions and 159 deletions

View File

@ -1685,7 +1685,7 @@ Handle<Map> Factory::NewMap(InstanceType type, int instance_size,
ElementsKind elements_kind,
int inobject_properties) {
STATIC_ASSERT(LAST_JS_OBJECT_TYPE == LAST_TYPE);
DCHECK_IMPLIES(type >= FIRST_JS_OBJECT_TYPE &&
DCHECK_IMPLIES(Map::IsJSObject(type) &&
!Map::CanHaveFastTransitionableElementsKind(type),
IsDictionaryElementsKind(elements_kind) ||
IsTerminalElementsKind(elements_kind));
@ -1705,6 +1705,7 @@ Map* Factory::InitializeMap(Map* map, InstanceType type, int instance_size,
map->set_constructor_or_backpointer(*null_value(), SKIP_WRITE_BARRIER);
map->set_instance_size(instance_size);
if (map->IsJSObjectMap()) {
DCHECK(!isolate()->heap()->InReadOnlySpace(map));
map->SetInObjectPropertiesStartInWords(instance_size / kPointerSize -
inobject_properties);
DCHECK_EQ(map->GetInObjectProperties(), inobject_properties);

View File

@ -366,6 +366,10 @@ bool Heap::InToSpace(HeapObject* heap_object) {
bool Heap::InOldSpace(Object* object) { return old_space_->Contains(object); }
bool Heap::InReadOnlySpace(Object* object) {
return read_only_space_->Contains(object);
}
bool Heap::InNewSpaceSlow(Address address) {
return new_space_->ContainsSlow(address);
}

View File

@ -3669,13 +3669,16 @@ class VerifyReadOnlyPointersVisitor : public VerifyPointersVisitor {
protected:
void VerifyPointers(HeapObject* host, MaybeObject** start,
MaybeObject** end) override {
Heap* heap = host->GetIsolate()->heap();
if (host != nullptr) {
CHECK(heap->InReadOnlySpace(host->map()));
}
VerifyPointersVisitor::VerifyPointers(host, start, end);
for (MaybeObject** current = start; current < end; current++) {
HeapObject* object;
if ((*current)->ToStrongOrWeakHeapObject(&object)) {
CHECK(
object->GetIsolate()->heap()->read_only_space()->Contains(object));
CHECK(heap->InReadOnlySpace(object));
}
}
}

View File

@ -1365,6 +1365,9 @@ class Heap {
// Returns whether the object resides in old space.
inline bool InOldSpace(Object* object);
// Returns whether the object resides in read-only space.
inline bool InReadOnlySpace(Object* object);
// Checks whether an address/object in the heap (including auxiliary
// area and unused area).
bool Contains(HeapObject* value);

View File

@ -83,18 +83,33 @@ AllocationResult Heap::AllocateMap(InstanceType instance_type,
ElementsKind elements_kind,
int inobject_properties) {
STATIC_ASSERT(LAST_JS_OBJECT_TYPE == LAST_TYPE);
DCHECK_IMPLIES(instance_type >= FIRST_JS_OBJECT_TYPE &&
bool is_js_object = Map::IsJSObject(instance_type);
DCHECK_IMPLIES(is_js_object &&
!Map::CanHaveFastTransitionableElementsKind(instance_type),
IsDictionaryElementsKind(elements_kind) ||
IsTerminalElementsKind(elements_kind));
HeapObject* result = nullptr;
AllocationResult allocation = AllocateRaw(Map::kSize, MAP_SPACE);
// JSObjects have maps with a mutable prototype_validity_cell, so they cannot
// go in RO_SPACE.
AllocationResult allocation =
AllocateRaw(Map::kSize, is_js_object ? MAP_SPACE : RO_SPACE);
if (!allocation.To(&result)) return allocation;
result->set_map_after_allocation(meta_map(), SKIP_WRITE_BARRIER);
return isolate()->factory()->InitializeMap(Map::cast(result), instance_type,
instance_size, elements_kind,
inobject_properties);
Map* map = isolate()->factory()->InitializeMap(
Map::cast(result), instance_type, instance_size, elements_kind,
inobject_properties);
if (!is_js_object) {
// Eagerly initialize the WeakCell cache for the map as it will not be
// writable in RO_SPACE.
HandleScope handle_scope(isolate());
Handle<WeakCell> weak_cell =
isolate()->factory()->NewWeakCell(Handle<Map>(map), TENURED_READ_ONLY);
map->set_weak_cell_cache(*weak_cell);
}
return map;
}
AllocationResult Heap::AllocatePartialMap(InstanceType instance_type,

View File

@ -487,25 +487,25 @@ void Map::NotifyLeafMapLayoutChange() {
}
}
bool Map::IsJSObject(InstanceType type) {
STATIC_ASSERT(LAST_TYPE == LAST_JS_OBJECT_TYPE);
return type >= FIRST_JS_OBJECT_TYPE;
}
bool Map::CanTransition() const {
// Only JSObject and subtypes have map transitions and back pointers.
STATIC_ASSERT(LAST_TYPE == LAST_JS_OBJECT_TYPE);
return instance_type() >= FIRST_JS_OBJECT_TYPE;
return IsJSObject(instance_type());
}
bool Map::IsBooleanMap() const { return this == GetHeap()->boolean_map(); }
bool Map::IsPrimitiveMap() const {
STATIC_ASSERT(FIRST_PRIMITIVE_TYPE == FIRST_TYPE);
return instance_type() <= LAST_PRIMITIVE_TYPE;
}
bool Map::IsJSReceiverMap() const {
STATIC_ASSERT(LAST_JS_RECEIVER_TYPE == LAST_TYPE);
return instance_type() >= FIRST_JS_RECEIVER_TYPE;
}
bool Map::IsJSObjectMap() const {
STATIC_ASSERT(LAST_JS_OBJECT_TYPE == LAST_TYPE);
return instance_type() >= FIRST_JS_OBJECT_TYPE;
}
bool Map::IsJSObjectMap() const { return IsJSObject(instance_type()); }
bool Map::IsJSPromiseMap() const { return instance_type() == JS_PROMISE_TYPE; }
bool Map::IsJSArrayMap() const { return instance_type() == JS_ARRAY_TYPE; }
bool Map::IsJSFunctionMap() const {

View File

@ -736,6 +736,8 @@ class Map : public HeapObject {
// found at all.
Map* FindElementsKindTransitionedMap(MapHandles const& candidates);
inline static bool IsJSObject(InstanceType type);
inline bool CanTransition() const;
inline bool IsBooleanMap() const;

View File

@ -159,154 +159,154 @@ INSTANCE_TYPES = {
# List of known V8 maps.
KNOWN_MAPS = {
("RO_SPACE", 0x02201): (132, "MetaMap"),
("RO_SPACE", 0x02289): (131, "NullMap"),
("RO_SPACE", 0x02301): (185, "DescriptorArrayMap"),
("RO_SPACE", 0x02369): (183, "FixedArrayMap"),
("RO_SPACE", 0x023d1): (211, "WeakCellMap"),
("RO_SPACE", 0x024e9): (131, "UndefinedMap"),
("RO_SPACE", 0x02591): (131, "TheHoleMap"),
("RO_SPACE", 0x02701): (183, "FixedCOWArrayMap"),
("RO_SPACE", 0x02839): (197, "WeakFixedArrayMap"),
("RO_SPACE", 0x028a1): (212, "WeakArrayListMap"),
("RO_SPACE", 0x02921): (173, "Tuple2Map"),
("RO_SPACE", 0x02999): (171, "ScriptMap"),
("RO_SPACE", 0x02a01): (163, "InterceptorInfoMap"),
("RO_SPACE", 0x068c9): (154, "AccessorInfoMap"),
("RO_SPACE", 0x06ad9): (153, "AccessCheckInfoMap"),
("RO_SPACE", 0x06b41): (155, "AccessorPairMap"),
("RO_SPACE", 0x06ba9): (156, "AliasedArgumentsEntryMap"),
("RO_SPACE", 0x06c11): (157, "AllocationMementoMap"),
("RO_SPACE", 0x06c79): (158, "AllocationSiteMap"),
("RO_SPACE", 0x06ce1): (159, "AsyncGeneratorRequestMap"),
("RO_SPACE", 0x06d49): (160, "ContextExtensionMap"),
("RO_SPACE", 0x06db1): (161, "DebugInfoMap"),
("RO_SPACE", 0x06e19): (162, "FunctionTemplateInfoMap"),
("RO_SPACE", 0x06e81): (164, "InterpreterDataMap"),
("RO_SPACE", 0x06ee9): (165, "ModuleInfoEntryMap"),
("RO_SPACE", 0x06f51): (166, "ModuleMap"),
("RO_SPACE", 0x06fb9): (167, "ObjectTemplateInfoMap"),
("RO_SPACE", 0x07021): (168, "PromiseCapabilityMap"),
("RO_SPACE", 0x07089): (169, "PromiseReactionMap"),
("RO_SPACE", 0x070f1): (170, "PrototypeInfoMap"),
("RO_SPACE", 0x07159): (172, "StackFrameInfoMap"),
("RO_SPACE", 0x071c1): (174, "Tuple3Map"),
("RO_SPACE", 0x07229): (175, "WasmCompiledModuleMap"),
("RO_SPACE", 0x07291): (176, "WasmDebugInfoMap"),
("RO_SPACE", 0x072f9): (177, "WasmSharedModuleDataMap"),
("RO_SPACE", 0x07361): (178, "CallableTaskMap"),
("RO_SPACE", 0x073c9): (179, "CallbackTaskMap"),
("RO_SPACE", 0x07431): (180, "PromiseFulfillReactionJobTaskMap"),
("RO_SPACE", 0x07499): (181, "PromiseRejectReactionJobTaskMap"),
("RO_SPACE", 0x07501): (182, "PromiseResolveThenableJobTaskMap"),
("MAP_SPACE", 0x02201): (138, "FreeSpaceMap"),
("MAP_SPACE", 0x02259): (152, "OnePointerFillerMap"),
("MAP_SPACE", 0x022b1): (152, "TwoPointerFillerMap"),
("MAP_SPACE", 0x02309): (131, "UninitializedMap"),
("MAP_SPACE", 0x02361): (8, "OneByteInternalizedStringMap"),
("MAP_SPACE", 0x023b9): (129, "HeapNumberMap"),
("MAP_SPACE", 0x02411): (131, "BooleanMap"),
("MAP_SPACE", 0x02469): (136, "ByteArrayMap"),
("MAP_SPACE", 0x024c1): (186, "HashTableMap"),
("MAP_SPACE", 0x02519): (128, "SymbolMap"),
("MAP_SPACE", 0x02571): (72, "OneByteStringMap"),
("MAP_SPACE", 0x025c9): (187, "ScopeInfoMap"),
("MAP_SPACE", 0x02621): (207, "SharedFunctionInfoMap"),
("MAP_SPACE", 0x02679): (133, "CodeMap"),
("MAP_SPACE", 0x026d1): (192, "FunctionContextMap"),
("MAP_SPACE", 0x02729): (200, "CellMap"),
("MAP_SPACE", 0x02781): (206, "GlobalPropertyCellMap"),
("MAP_SPACE", 0x027d9): (135, "ForeignMap"),
("MAP_SPACE", 0x02831): (198, "TransitionArrayMap"),
("MAP_SPACE", 0x02889): (203, "FeedbackVectorMap"),
("MAP_SPACE", 0x028e1): (131, "ArgumentsMarkerMap"),
("MAP_SPACE", 0x02939): (131, "ExceptionMap"),
("MAP_SPACE", 0x02991): (131, "TerminationExceptionMap"),
("MAP_SPACE", 0x029e9): (131, "OptimizedOutMap"),
("MAP_SPACE", 0x02a41): (131, "StaleRegisterMap"),
("MAP_SPACE", 0x02a99): (194, "NativeContextMap"),
("MAP_SPACE", 0x02af1): (193, "ModuleContextMap"),
("MAP_SPACE", 0x02b49): (191, "EvalContextMap"),
("MAP_SPACE", 0x02ba1): (195, "ScriptContextMap"),
("MAP_SPACE", 0x02bf9): (188, "BlockContextMap"),
("MAP_SPACE", 0x02c51): (189, "CatchContextMap"),
("MAP_SPACE", 0x02ca9): (196, "WithContextMap"),
("MAP_SPACE", 0x02d01): (190, "DebugEvaluateContextMap"),
("MAP_SPACE", 0x02d59): (183, "ScriptContextTableMap"),
("MAP_SPACE", 0x02db1): (151, "FeedbackMetadataArrayMap"),
("MAP_SPACE", 0x02e09): (183, "ArrayListMap"),
("MAP_SPACE", 0x02e61): (130, "BigIntMap"),
("MAP_SPACE", 0x02eb9): (184, "BoilerplateDescriptionMap"),
("MAP_SPACE", 0x02f11): (137, "BytecodeArrayMap"),
("MAP_SPACE", 0x02f69): (201, "CodeDataContainerMap"),
("MAP_SPACE", 0x02fc1): (1057, "ExternalMap"),
("MAP_SPACE", 0x03019): (150, "FixedDoubleArrayMap"),
("MAP_SPACE", 0x03071): (186, "GlobalDictionaryMap"),
("MAP_SPACE", 0x030c9): (202, "ManyClosuresCellMap"),
("MAP_SPACE", 0x03121): (1072, "JSMessageObjectMap"),
("MAP_SPACE", 0x03179): (183, "ModuleInfoMap"),
("MAP_SPACE", 0x031d1): (134, "MutableHeapNumberMap"),
("MAP_SPACE", 0x03229): (186, "NameDictionaryMap"),
("MAP_SPACE", 0x03281): (202, "NoClosuresCellMap"),
("MAP_SPACE", 0x032d9): (186, "NumberDictionaryMap"),
("MAP_SPACE", 0x03331): (202, "OneClosureCellMap"),
("MAP_SPACE", 0x03389): (186, "OrderedHashMapMap"),
("MAP_SPACE", 0x033e1): (186, "OrderedHashSetMap"),
("MAP_SPACE", 0x03439): (205, "PropertyArrayMap"),
("MAP_SPACE", 0x03491): (199, "SideEffectCallHandlerInfoMap"),
("MAP_SPACE", 0x034e9): (199, "SideEffectFreeCallHandlerInfoMap"),
("MAP_SPACE", 0x03541): (186, "SimpleNumberDictionaryMap"),
("MAP_SPACE", 0x03599): (183, "SloppyArgumentsElementsMap"),
("MAP_SPACE", 0x035f1): (208, "SmallOrderedHashMapMap"),
("MAP_SPACE", 0x03649): (209, "SmallOrderedHashSetMap"),
("MAP_SPACE", 0x036a1): (186, "StringTableMap"),
("MAP_SPACE", 0x036f9): (106, "NativeSourceStringMap"),
("MAP_SPACE", 0x03751): (64, "StringMap"),
("MAP_SPACE", 0x037a9): (73, "ConsOneByteStringMap"),
("MAP_SPACE", 0x03801): (65, "ConsStringMap"),
("MAP_SPACE", 0x03859): (77, "ThinOneByteStringMap"),
("MAP_SPACE", 0x038b1): (69, "ThinStringMap"),
("MAP_SPACE", 0x03909): (67, "SlicedStringMap"),
("MAP_SPACE", 0x03961): (75, "SlicedOneByteStringMap"),
("MAP_SPACE", 0x039b9): (66, "ExternalStringMap"),
("MAP_SPACE", 0x03a11): (82, "ExternalStringWithOneByteDataMap"),
("MAP_SPACE", 0x03a69): (74, "ExternalOneByteStringMap"),
("MAP_SPACE", 0x03ac1): (98, "ShortExternalStringMap"),
("MAP_SPACE", 0x03b19): (114, "ShortExternalStringWithOneByteDataMap"),
("MAP_SPACE", 0x03b71): (0, "InternalizedStringMap"),
("MAP_SPACE", 0x03bc9): (2, "ExternalInternalizedStringMap"),
("MAP_SPACE", 0x03c21): (18, "ExternalInternalizedStringWithOneByteDataMap"),
("MAP_SPACE", 0x03c79): (10, "ExternalOneByteInternalizedStringMap"),
("MAP_SPACE", 0x03cd1): (34, "ShortExternalInternalizedStringMap"),
("MAP_SPACE", 0x03d29): (50, "ShortExternalInternalizedStringWithOneByteDataMap"),
("MAP_SPACE", 0x03d81): (42, "ShortExternalOneByteInternalizedStringMap"),
("MAP_SPACE", 0x03dd9): (106, "ShortExternalOneByteStringMap"),
("MAP_SPACE", 0x03e31): (140, "FixedUint8ArrayMap"),
("MAP_SPACE", 0x03e89): (139, "FixedInt8ArrayMap"),
("MAP_SPACE", 0x03ee1): (142, "FixedUint16ArrayMap"),
("MAP_SPACE", 0x03f39): (141, "FixedInt16ArrayMap"),
("MAP_SPACE", 0x03f91): (144, "FixedUint32ArrayMap"),
("MAP_SPACE", 0x03fe9): (143, "FixedInt32ArrayMap"),
("MAP_SPACE", 0x04041): (145, "FixedFloat32ArrayMap"),
("MAP_SPACE", 0x04099): (146, "FixedFloat64ArrayMap"),
("MAP_SPACE", 0x040f1): (147, "FixedUint8ClampedArrayMap"),
("MAP_SPACE", 0x04149): (149, "FixedBigUint64ArrayMap"),
("MAP_SPACE", 0x041a1): (148, "FixedBigInt64ArrayMap"),
("RO_SPACE", 0x02201): (138, "FreeSpaceMap"),
("RO_SPACE", 0x02259): (132, "MetaMap"),
("RO_SPACE", 0x022e1): (131, "NullMap"),
("RO_SPACE", 0x02359): (185, "DescriptorArrayMap"),
("RO_SPACE", 0x023c1): (183, "FixedArrayMap"),
("RO_SPACE", 0x02429): (211, "WeakCellMap"),
("RO_SPACE", 0x024d1): (152, "OnePointerFillerMap"),
("RO_SPACE", 0x02539): (152, "TwoPointerFillerMap"),
("RO_SPACE", 0x025a1): (131, "UninitializedMap"),
("RO_SPACE", 0x02631): (8, "OneByteInternalizedStringMap"),
("RO_SPACE", 0x026f1): (131, "UndefinedMap"),
("RO_SPACE", 0x02769): (129, "HeapNumberMap"),
("RO_SPACE", 0x02801): (131, "TheHoleMap"),
("RO_SPACE", 0x028c9): (131, "BooleanMap"),
("RO_SPACE", 0x029d9): (136, "ByteArrayMap"),
("RO_SPACE", 0x02a41): (183, "FixedCOWArrayMap"),
("RO_SPACE", 0x02aa9): (186, "HashTableMap"),
("RO_SPACE", 0x02b11): (128, "SymbolMap"),
("RO_SPACE", 0x02b79): (72, "OneByteStringMap"),
("RO_SPACE", 0x02be1): (187, "ScopeInfoMap"),
("RO_SPACE", 0x02c49): (207, "SharedFunctionInfoMap"),
("RO_SPACE", 0x02cb1): (133, "CodeMap"),
("RO_SPACE", 0x02d19): (192, "FunctionContextMap"),
("RO_SPACE", 0x02d81): (200, "CellMap"),
("RO_SPACE", 0x02de9): (206, "GlobalPropertyCellMap"),
("RO_SPACE", 0x02e51): (135, "ForeignMap"),
("RO_SPACE", 0x02eb9): (198, "TransitionArrayMap"),
("RO_SPACE", 0x02f21): (203, "FeedbackVectorMap"),
("RO_SPACE", 0x02f89): (131, "ArgumentsMarkerMap"),
("RO_SPACE", 0x03019): (131, "ExceptionMap"),
("RO_SPACE", 0x030a9): (131, "TerminationExceptionMap"),
("RO_SPACE", 0x03141): (131, "OptimizedOutMap"),
("RO_SPACE", 0x031d1): (131, "StaleRegisterMap"),
("RO_SPACE", 0x03261): (194, "NativeContextMap"),
("RO_SPACE", 0x032c9): (193, "ModuleContextMap"),
("RO_SPACE", 0x03331): (191, "EvalContextMap"),
("RO_SPACE", 0x03399): (195, "ScriptContextMap"),
("RO_SPACE", 0x03401): (188, "BlockContextMap"),
("RO_SPACE", 0x03469): (189, "CatchContextMap"),
("RO_SPACE", 0x034d1): (196, "WithContextMap"),
("RO_SPACE", 0x03539): (190, "DebugEvaluateContextMap"),
("RO_SPACE", 0x035a1): (183, "ScriptContextTableMap"),
("RO_SPACE", 0x03609): (151, "FeedbackMetadataArrayMap"),
("RO_SPACE", 0x03671): (183, "ArrayListMap"),
("RO_SPACE", 0x036d9): (130, "BigIntMap"),
("RO_SPACE", 0x03741): (184, "BoilerplateDescriptionMap"),
("RO_SPACE", 0x037a9): (137, "BytecodeArrayMap"),
("RO_SPACE", 0x03811): (201, "CodeDataContainerMap"),
("RO_SPACE", 0x03879): (150, "FixedDoubleArrayMap"),
("RO_SPACE", 0x038e1): (186, "GlobalDictionaryMap"),
("RO_SPACE", 0x03949): (202, "ManyClosuresCellMap"),
("RO_SPACE", 0x039b1): (183, "ModuleInfoMap"),
("RO_SPACE", 0x03a19): (134, "MutableHeapNumberMap"),
("RO_SPACE", 0x03a81): (186, "NameDictionaryMap"),
("RO_SPACE", 0x03ae9): (202, "NoClosuresCellMap"),
("RO_SPACE", 0x03b51): (186, "NumberDictionaryMap"),
("RO_SPACE", 0x03bb9): (202, "OneClosureCellMap"),
("RO_SPACE", 0x03c21): (186, "OrderedHashMapMap"),
("RO_SPACE", 0x03c89): (186, "OrderedHashSetMap"),
("RO_SPACE", 0x03cf1): (205, "PropertyArrayMap"),
("RO_SPACE", 0x03d59): (199, "SideEffectCallHandlerInfoMap"),
("RO_SPACE", 0x03dc1): (199, "SideEffectFreeCallHandlerInfoMap"),
("RO_SPACE", 0x03e29): (186, "SimpleNumberDictionaryMap"),
("RO_SPACE", 0x03e91): (183, "SloppyArgumentsElementsMap"),
("RO_SPACE", 0x03ef9): (208, "SmallOrderedHashMapMap"),
("RO_SPACE", 0x03f61): (209, "SmallOrderedHashSetMap"),
("RO_SPACE", 0x03fc9): (186, "StringTableMap"),
("RO_SPACE", 0x04031): (197, "WeakFixedArrayMap"),
("RO_SPACE", 0x04099): (212, "WeakArrayListMap"),
("RO_SPACE", 0x04101): (106, "NativeSourceStringMap"),
("RO_SPACE", 0x04169): (64, "StringMap"),
("RO_SPACE", 0x041d1): (73, "ConsOneByteStringMap"),
("RO_SPACE", 0x04239): (65, "ConsStringMap"),
("RO_SPACE", 0x042a1): (77, "ThinOneByteStringMap"),
("RO_SPACE", 0x04309): (69, "ThinStringMap"),
("RO_SPACE", 0x04371): (67, "SlicedStringMap"),
("RO_SPACE", 0x043d9): (75, "SlicedOneByteStringMap"),
("RO_SPACE", 0x04441): (66, "ExternalStringMap"),
("RO_SPACE", 0x044a9): (82, "ExternalStringWithOneByteDataMap"),
("RO_SPACE", 0x04511): (74, "ExternalOneByteStringMap"),
("RO_SPACE", 0x04579): (98, "ShortExternalStringMap"),
("RO_SPACE", 0x045e1): (114, "ShortExternalStringWithOneByteDataMap"),
("RO_SPACE", 0x04649): (0, "InternalizedStringMap"),
("RO_SPACE", 0x046b1): (2, "ExternalInternalizedStringMap"),
("RO_SPACE", 0x04719): (18, "ExternalInternalizedStringWithOneByteDataMap"),
("RO_SPACE", 0x04781): (10, "ExternalOneByteInternalizedStringMap"),
("RO_SPACE", 0x047e9): (34, "ShortExternalInternalizedStringMap"),
("RO_SPACE", 0x04851): (50, "ShortExternalInternalizedStringWithOneByteDataMap"),
("RO_SPACE", 0x048b9): (42, "ShortExternalOneByteInternalizedStringMap"),
("RO_SPACE", 0x04921): (106, "ShortExternalOneByteStringMap"),
("RO_SPACE", 0x04989): (140, "FixedUint8ArrayMap"),
("RO_SPACE", 0x049f1): (139, "FixedInt8ArrayMap"),
("RO_SPACE", 0x04a59): (142, "FixedUint16ArrayMap"),
("RO_SPACE", 0x04ac1): (141, "FixedInt16ArrayMap"),
("RO_SPACE", 0x04b29): (144, "FixedUint32ArrayMap"),
("RO_SPACE", 0x04b91): (143, "FixedInt32ArrayMap"),
("RO_SPACE", 0x04bf9): (145, "FixedFloat32ArrayMap"),
("RO_SPACE", 0x04c61): (146, "FixedFloat64ArrayMap"),
("RO_SPACE", 0x04cc9): (147, "FixedUint8ClampedArrayMap"),
("RO_SPACE", 0x04d31): (149, "FixedBigUint64ArrayMap"),
("RO_SPACE", 0x04d99): (148, "FixedBigInt64ArrayMap"),
("RO_SPACE", 0x04e19): (173, "Tuple2Map"),
("RO_SPACE", 0x04e91): (171, "ScriptMap"),
("RO_SPACE", 0x04ef9): (163, "InterceptorInfoMap"),
("RO_SPACE", 0x08dc1): (154, "AccessorInfoMap"),
("RO_SPACE", 0x08fd1): (153, "AccessCheckInfoMap"),
("RO_SPACE", 0x09039): (155, "AccessorPairMap"),
("RO_SPACE", 0x090a1): (156, "AliasedArgumentsEntryMap"),
("RO_SPACE", 0x09109): (157, "AllocationMementoMap"),
("RO_SPACE", 0x09171): (158, "AllocationSiteMap"),
("RO_SPACE", 0x091d9): (159, "AsyncGeneratorRequestMap"),
("RO_SPACE", 0x09241): (160, "ContextExtensionMap"),
("RO_SPACE", 0x092a9): (161, "DebugInfoMap"),
("RO_SPACE", 0x09311): (162, "FunctionTemplateInfoMap"),
("RO_SPACE", 0x09379): (164, "InterpreterDataMap"),
("RO_SPACE", 0x093e1): (165, "ModuleInfoEntryMap"),
("RO_SPACE", 0x09449): (166, "ModuleMap"),
("RO_SPACE", 0x094b1): (167, "ObjectTemplateInfoMap"),
("RO_SPACE", 0x09519): (168, "PromiseCapabilityMap"),
("RO_SPACE", 0x09581): (169, "PromiseReactionMap"),
("RO_SPACE", 0x095e9): (170, "PrototypeInfoMap"),
("RO_SPACE", 0x09651): (172, "StackFrameInfoMap"),
("RO_SPACE", 0x096b9): (174, "Tuple3Map"),
("RO_SPACE", 0x09721): (175, "WasmCompiledModuleMap"),
("RO_SPACE", 0x09789): (176, "WasmDebugInfoMap"),
("RO_SPACE", 0x097f1): (177, "WasmSharedModuleDataMap"),
("RO_SPACE", 0x09859): (178, "CallableTaskMap"),
("RO_SPACE", 0x098c1): (179, "CallbackTaskMap"),
("RO_SPACE", 0x09929): (180, "PromiseFulfillReactionJobTaskMap"),
("RO_SPACE", 0x09991): (181, "PromiseRejectReactionJobTaskMap"),
("RO_SPACE", 0x099f9): (182, "PromiseResolveThenableJobTaskMap"),
("MAP_SPACE", 0x02201): (1057, "ExternalMap"),
("MAP_SPACE", 0x02259): (1072, "JSMessageObjectMap"),
}
# List of known V8 objects.
KNOWN_OBJECTS = {
("RO_SPACE", 0x02259): "NullValue",
("RO_SPACE", 0x022e1): "EmptyDescriptorArray",
("RO_SPACE", 0x02359): "EmptyFixedArray",
("RO_SPACE", 0x024b9): "UndefinedValue",
("RO_SPACE", 0x02551): "NanValue",
("RO_SPACE", 0x02561): "TheHoleValue",
("RO_SPACE", 0x02619): "HoleNanValue",
("RO_SPACE", 0x02629): "TrueValue",
("RO_SPACE", 0x02699): "FalseValue",
("RO_SPACE", 0x026e9): "empty_string",
("RO_SPACE", 0x02989): "EmptyByteArray",
("RO_SPACE", 0x022b1): "NullValue",
("RO_SPACE", 0x02339): "EmptyDescriptorArray",
("RO_SPACE", 0x023b1): "EmptyFixedArray",
("RO_SPACE", 0x026c1): "UndefinedValue",
("RO_SPACE", 0x02759): "NanValue",
("RO_SPACE", 0x027d1): "TheHoleValue",
("RO_SPACE", 0x02889): "HoleNanValue",
("RO_SPACE", 0x02899): "TrueValue",
("RO_SPACE", 0x02971): "FalseValue",
("RO_SPACE", 0x029c1): "empty_string",
("RO_SPACE", 0x04e81): "EmptyByteArray",
("OLD_SPACE", 0x02201): "UninitializedValue",
("OLD_SPACE", 0x02231): "EmptyScopeInfo",
("OLD_SPACE", 0x02241): "ArgumentsMarker",