[wasm] Turn {WasmSharedModuleData} into a proper {Struct}.

This makes sure that the object can be identified by a unique instance
type and hence is not accidentally confused with other FixedArrays on
the heap.

R=clemensh@chromium.org
BUG=v8:7509

Change-Id: Ib3dcdb4559821d0ad9ca8cced37754e0e3c1d578
Reviewed-on: https://chromium-review.googlesource.com/943781
Commit-Queue: Michael Starzinger <mstarzinger@chromium.org>
Reviewed-by: Clemens Hammacher <clemensh@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51687}
This commit is contained in:
Michael Starzinger 2018-03-02 10:57:56 +01:00 committed by Commit Bot
parent 82345e9fbf
commit d623fcae9c
8 changed files with 133 additions and 139 deletions

View File

@ -312,6 +312,7 @@ Type::bitset BitsetType::Lub(i::Map* map) {
case TUPLE2_TYPE: case TUPLE2_TYPE:
case TUPLE3_TYPE: case TUPLE3_TYPE:
case WASM_DEBUG_INFO_TYPE: case WASM_DEBUG_INFO_TYPE:
case WASM_SHARED_MODULE_DATA_TYPE:
case LOAD_HANDLER_TYPE: case LOAD_HANDLER_TYPE:
case STORE_HANDLER_TYPE: case STORE_HANDLER_TYPE:
case CONTEXT_EXTENSION_TYPE: case CONTEXT_EXTENSION_TYPE:

View File

@ -1437,6 +1437,17 @@ void WasmDebugInfo::WasmDebugInfoVerify() {
VerifyObjectField(kCWasmEntryMapOffset); VerifyObjectField(kCWasmEntryMapOffset);
} }
void WasmSharedModuleData::WasmSharedModuleDataVerify() {
CHECK(IsWasmSharedModuleData());
VerifyObjectField(kModuleWrapperOffset);
CHECK(module_wrapper()->IsForeign());
VerifyObjectField(kModuleBytesOffset);
VerifyObjectField(kScriptOffset);
VerifyObjectField(kAsmJsOffsetTableOffset);
VerifyObjectField(kBreakPointInfosOffset);
VerifyObjectField(kLazyCompilationOrchestratorOffset);
}
void DataHandler::DataHandlerVerify() { void DataHandler::DataHandlerVerify() {
CHECK(IsDataHandler()); CHECK(IsDataHandler());
CHECK_IMPLIES(!smi_handler()->IsSmi(), CHECK_IMPLIES(!smi_handler()->IsSmi(),

View File

@ -1470,6 +1470,13 @@ void WasmDebugInfo::WasmDebugInfoPrint(std::ostream& os) { // NOLINT
os << "\n"; os << "\n";
} }
void WasmSharedModuleData::WasmSharedModuleDataPrint(
std::ostream& os) { // NOLINT
HeapObject::PrintHeader(os, "WasmSharedModuleData");
os << "\n - module: " << module();
os << "\n";
}
void LoadHandler::LoadHandlerPrint(std::ostream& os) { // NOLINT void LoadHandler::LoadHandlerPrint(std::ostream& os) { // NOLINT
HeapObject::PrintHeader(os, "LoadHandler"); HeapObject::PrintHeader(os, "LoadHandler");
// TODO(ishell): implement printing based on handler kind // TODO(ishell): implement printing based on handler kind

View File

@ -384,6 +384,7 @@ const int kStubMinorKeyBits = kSmiValueSize - kStubMajorKeyBits - 1;
V(TUPLE2_TYPE) \ V(TUPLE2_TYPE) \
V(TUPLE3_TYPE) \ V(TUPLE3_TYPE) \
V(WASM_DEBUG_INFO_TYPE) \ V(WASM_DEBUG_INFO_TYPE) \
V(WASM_SHARED_MODULE_DATA_TYPE) \
\ \
V(CALLABLE_TASK_TYPE) \ V(CALLABLE_TASK_TYPE) \
V(CALLBACK_TASK_TYPE) \ V(CALLBACK_TASK_TYPE) \
@ -585,6 +586,7 @@ const int kStubMinorKeyBits = kSmiValueSize - kStubMajorKeyBits - 1;
V(TUPLE2, Tuple2, tuple2) \ V(TUPLE2, Tuple2, tuple2) \
V(TUPLE3, Tuple3, tuple3) \ V(TUPLE3, Tuple3, tuple3) \
V(WASM_DEBUG_INFO, WasmDebugInfo, wasm_debug_info) \ V(WASM_DEBUG_INFO, WasmDebugInfo, wasm_debug_info) \
V(WASM_SHARED_MODULE_DATA, WasmSharedModuleData, wasm_shared_module_data) \
V(CALLABLE_TASK, CallableTask, callable_task) \ V(CALLABLE_TASK, CallableTask, callable_task) \
V(CALLBACK_TASK, CallbackTask, callback_task) \ V(CALLBACK_TASK, CallbackTask, callback_task) \
V(PROMISE_FULFILL_REACTION_JOB_TASK, PromiseFulfillReactionJobTask, \ V(PROMISE_FULFILL_REACTION_JOB_TASK, PromiseFulfillReactionJobTask, \
@ -776,6 +778,7 @@ enum InstanceType : uint16_t {
TUPLE2_TYPE, TUPLE2_TYPE,
TUPLE3_TYPE, TUPLE3_TYPE,
WASM_DEBUG_INFO_TYPE, WASM_DEBUG_INFO_TYPE,
WASM_SHARED_MODULE_DATA_TYPE,
CALLABLE_TASK_TYPE, // FIRST_MICROTASK_TYPE CALLABLE_TASK_TYPE, // FIRST_MICROTASK_TYPE
CALLBACK_TASK_TYPE, CALLBACK_TASK_TYPE,

View File

@ -18,6 +18,7 @@ CAST_ACCESSOR(WasmDebugInfo)
CAST_ACCESSOR(WasmInstanceObject) CAST_ACCESSOR(WasmInstanceObject)
CAST_ACCESSOR(WasmMemoryObject) CAST_ACCESSOR(WasmMemoryObject)
CAST_ACCESSOR(WasmModuleObject) CAST_ACCESSOR(WasmModuleObject)
CAST_ACCESSOR(WasmSharedModuleData)
CAST_ACCESSOR(WasmTableObject) CAST_ACCESSOR(WasmTableObject)
#define OPTIONAL_ACCESSORS(holder, name, type, offset) \ #define OPTIONAL_ACCESSORS(holder, name, type, offset) \
@ -63,6 +64,7 @@ ACCESSORS(WasmInstanceObject, js_imports_table, FixedArray,
kJsImportsTableOffset) kJsImportsTableOffset)
// WasmSharedModuleData // WasmSharedModuleData
ACCESSORS(WasmSharedModuleData, module_wrapper, Object, kModuleWrapperOffset)
ACCESSORS(WasmSharedModuleData, module_bytes, SeqOneByteString, ACCESSORS(WasmSharedModuleData, module_bytes, SeqOneByteString,
kModuleBytesOffset) kModuleBytesOffset)
ACCESSORS(WasmSharedModuleData, script, Script, kScriptOffset) ACCESSORS(WasmSharedModuleData, script, Script, kScriptOffset)
@ -72,6 +74,10 @@ OPTIONAL_ACCESSORS(WasmSharedModuleData, breakpoint_infos, FixedArray,
kBreakPointInfosOffset) kBreakPointInfosOffset)
OPTIONAL_ACCESSORS(WasmSharedModuleData, lazy_compilation_orchestrator, Foreign, OPTIONAL_ACCESSORS(WasmSharedModuleData, lazy_compilation_orchestrator, Foreign,
kLazyCompilationOrchestratorOffset) kLazyCompilationOrchestratorOffset)
void WasmSharedModuleData::reset_breakpoint_infos() {
DCHECK(IsWasmSharedModuleData());
WRITE_FIELD(this, kBreakPointInfosOffset, GetHeap()->undefined_value());
}
// WasmDebugInfo // WasmDebugInfo
ACCESSORS(WasmDebugInfo, wasm_instance, WasmInstanceObject, kInstanceOffset) ACCESSORS(WasmDebugInfo, wasm_instance, WasmInstanceObject, kInstanceOffset)

View File

@ -915,59 +915,33 @@ WasmCodeWrapper WasmExportedFunction::GetWasmCode() {
UNREACHABLE(); UNREACHABLE();
} }
bool WasmSharedModuleData::IsWasmSharedModuleData(Object* object) { WasmModule* WasmSharedModuleData::module() const {
if (!object->IsFixedArray()) return false;
FixedArray* arr = FixedArray::cast(object);
if (arr->length() != kFieldCount) return false;
Isolate* isolate = arr->GetIsolate();
if (!arr->get(kModuleWrapperIndex)->IsForeign()) return false;
if (!arr->get(kModuleBytesIndex)->IsUndefined(isolate) &&
!arr->get(kModuleBytesIndex)->IsSeqOneByteString())
return false;
if (!arr->get(kScriptIndex)->IsScript()) return false;
if (!arr->get(kAsmJsOffsetTableIndex)->IsUndefined(isolate) &&
!arr->get(kAsmJsOffsetTableIndex)->IsByteArray())
return false;
if (!arr->get(kBreakPointInfosIndex)->IsUndefined(isolate) &&
!arr->get(kBreakPointInfosIndex)->IsFixedArray())
return false;
return true;
}
WasmSharedModuleData* WasmSharedModuleData::cast(Object* object) {
DCHECK(IsWasmSharedModuleData(object));
return reinterpret_cast<WasmSharedModuleData*>(object);
}
WasmModule* WasmSharedModuleData::module() {
// We populate the kModuleWrapper field with a Foreign holding the // We populate the kModuleWrapper field with a Foreign holding the
// address to the address of a WasmModule. This is because we can // address to the address of a WasmModule. This is because we can
// handle both cases when the WasmModule's lifetime is managed through // handle both cases when the WasmModule's lifetime is managed through
// a Managed<WasmModule> object, as well as cases when it's managed // a Managed<WasmModule> object, as well as cases when it's managed
// by the embedder. CcTests fall into the latter case. // by the embedder. CcTests fall into the latter case.
return *(reinterpret_cast<WasmModule**>( return *(reinterpret_cast<WasmModule**>(
Foreign::cast(get(kModuleWrapperIndex))->foreign_address())); Foreign::cast(module_wrapper())->foreign_address()));
} }
Handle<WasmSharedModuleData> WasmSharedModuleData::New( Handle<WasmSharedModuleData> WasmSharedModuleData::New(
Isolate* isolate, Handle<Foreign> module_wrapper, Isolate* isolate, Handle<Foreign> module_wrapper,
Handle<SeqOneByteString> module_bytes, Handle<Script> script, Handle<SeqOneByteString> module_bytes, Handle<Script> script,
Handle<ByteArray> asm_js_offset_table) { Handle<ByteArray> asm_js_offset_table) {
Handle<FixedArray> arr = Handle<WasmSharedModuleData> data = Handle<WasmSharedModuleData>::cast(
isolate->factory()->NewFixedArray(kFieldCount, TENURED); isolate->factory()->NewStruct(WASM_SHARED_MODULE_DATA_TYPE, TENURED));
arr->set(kModuleWrapperIndex, *module_wrapper); data->set_module_wrapper(*module_wrapper);
if (!module_bytes.is_null()) { if (!module_bytes.is_null()) {
arr->set(kModuleBytesIndex, *module_bytes); data->set_module_bytes(*module_bytes);
} }
if (!script.is_null()) { if (!script.is_null()) {
arr->set(kScriptIndex, *script); data->set_script(*script);
} }
if (!asm_js_offset_table.is_null()) { if (!asm_js_offset_table.is_null()) {
arr->set(kAsmJsOffsetTableIndex, *asm_js_offset_table); data->set_asm_js_offset_table(*asm_js_offset_table);
} }
return data;
DCHECK(WasmSharedModuleData::IsWasmSharedModuleData(*arr));
return Handle<WasmSharedModuleData>::cast(arr);
} }
bool WasmSharedModuleData::is_asm_js() { bool WasmSharedModuleData::is_asm_js() {
@ -979,7 +953,7 @@ bool WasmSharedModuleData::is_asm_js() {
void WasmSharedModuleData::ReinitializeAfterDeserialization( void WasmSharedModuleData::ReinitializeAfterDeserialization(
Isolate* isolate, Handle<WasmSharedModuleData> shared) { Isolate* isolate, Handle<WasmSharedModuleData> shared) {
DCHECK(shared->get(kModuleWrapperIndex)->IsUndefined(isolate)); DCHECK(shared->module_wrapper()->IsUndefined(isolate));
#ifdef DEBUG #ifdef DEBUG
// No BreakpointInfo objects should survive deserialization. // No BreakpointInfo objects should survive deserialization.
if (shared->has_breakpoint_infos()) { if (shared->has_breakpoint_infos()) {
@ -989,7 +963,7 @@ void WasmSharedModuleData::ReinitializeAfterDeserialization(
} }
#endif #endif
shared->set(kBreakPointInfosIndex, isolate->heap()->undefined_value()); shared->reset_breakpoint_infos();
WasmModule* module = nullptr; WasmModule* module = nullptr;
{ {
@ -1014,8 +988,7 @@ void WasmSharedModuleData::ReinitializeAfterDeserialization(
Handle<wasm::WasmModuleWrapper> module_wrapper = Handle<wasm::WasmModuleWrapper> module_wrapper =
wasm::WasmModuleWrapper::From(isolate, module); wasm::WasmModuleWrapper::From(isolate, module);
shared->set(kModuleWrapperIndex, *module_wrapper); shared->set_module_wrapper(*module_wrapper);
DCHECK(WasmSharedModuleData::IsWasmSharedModuleData(*shared));
} }
namespace { namespace {
@ -1059,7 +1032,7 @@ void WasmSharedModuleData::AddBreakpoint(Handle<WasmSharedModuleData> shared,
breakpoint_infos = handle(shared->breakpoint_infos(), isolate); breakpoint_infos = handle(shared->breakpoint_infos(), isolate);
} else { } else {
breakpoint_infos = isolate->factory()->NewFixedArray(4, TENURED); breakpoint_infos = isolate->factory()->NewFixedArray(4, TENURED);
shared->set(kBreakPointInfosIndex, *breakpoint_infos); shared->set_breakpoint_infos(*breakpoint_infos);
} }
int insert_pos = int insert_pos =
@ -1083,7 +1056,7 @@ void WasmSharedModuleData::AddBreakpoint(Handle<WasmSharedModuleData> shared,
if (need_realloc) { if (need_realloc) {
new_breakpoint_infos = isolate->factory()->NewFixedArray( new_breakpoint_infos = isolate->factory()->NewFixedArray(
2 * breakpoint_infos->length(), TENURED); 2 * breakpoint_infos->length(), TENURED);
shared->set(kBreakPointInfosIndex, *new_breakpoint_infos); shared->set_breakpoint_infos(*new_breakpoint_infos);
// Copy over the entries [0, insert_pos). // Copy over the entries [0, insert_pos).
for (int i = 0; i < insert_pos; ++i) for (int i = 0; i < insert_pos; ++i)
new_breakpoint_infos->set(i, breakpoint_infos->get(i)); new_breakpoint_infos->set(i, breakpoint_infos->get(i));
@ -1699,7 +1672,6 @@ void WasmCompiledModule::ReinitializeAfterDeserialization(
static_cast<WasmSharedModuleData*>(compiled_module->get(kID_shared)), static_cast<WasmSharedModuleData*>(compiled_module->get(kID_shared)),
isolate); isolate);
if (!FLAG_wasm_jit_to_native) { if (!FLAG_wasm_jit_to_native) {
DCHECK(!WasmSharedModuleData::IsWasmSharedModuleData(*shared));
WasmSharedModuleData::ReinitializeAfterDeserialization(isolate, shared); WasmSharedModuleData::ReinitializeAfterDeserialization(isolate, shared);
} }
size_t function_table_count = size_t function_table_count =
@ -1728,7 +1700,6 @@ void WasmCompiledModule::ReinitializeAfterDeserialization(
// Reset, but don't delete any global handles, because their owning instance // Reset, but don't delete any global handles, because their owning instance
// may still be active. // may still be active.
WasmCompiledModule::Reset(isolate, *compiled_module); WasmCompiledModule::Reset(isolate, *compiled_module);
DCHECK(WasmSharedModuleData::IsWasmSharedModuleData(*shared));
} }
MaybeHandle<String> WasmSharedModuleData::GetModuleNameOrNull( MaybeHandle<String> WasmSharedModuleData::GetModuleNameOrNull(

View File

@ -40,11 +40,6 @@ class WasmInstanceObject;
#define WASM_CONTEXT_TABLES FLAG_wasm_jit_to_native #define WASM_CONTEXT_TABLES FLAG_wasm_jit_to_native
#define DECL_OOL_QUERY(type) static bool Is##type(Object* object);
#define DECL_OOL_CAST(type) static type* cast(Object* object);
#define DECL_GETTER(name, type) type* name();
#define DECL_OPTIONAL_ACCESSORS(name, type) \ #define DECL_OPTIONAL_ACCESSORS(name, type) \
INLINE(bool has_##name()); \ INLINE(bool has_##name()); \
DECL_ACCESSORS(name, type) DECL_ACCESSORS(name, type)
@ -301,34 +296,35 @@ class WasmExportedFunction : public JSFunction {
}; };
// Information shared by all WasmCompiledModule objects for the same module. // Information shared by all WasmCompiledModule objects for the same module.
class WasmSharedModuleData : public FixedArray { class WasmSharedModuleData : public Struct {
public: public:
DECL_OOL_QUERY(WasmSharedModuleData) DECL_ACCESSORS(module_wrapper, Object)
DECL_OOL_CAST(WasmSharedModuleData) wasm::WasmModule* module() const;
DECL_GETTER(module, wasm::WasmModule)
DECL_OPTIONAL_ACCESSORS(module_bytes, SeqOneByteString) DECL_OPTIONAL_ACCESSORS(module_bytes, SeqOneByteString)
DECL_ACCESSORS(script, Script) DECL_ACCESSORS(script, Script)
DECL_OPTIONAL_ACCESSORS(asm_js_offset_table, ByteArray) DECL_OPTIONAL_ACCESSORS(asm_js_offset_table, ByteArray)
DECL_OPTIONAL_ACCESSORS(breakpoint_infos, FixedArray) DECL_OPTIONAL_ACCESSORS(breakpoint_infos, FixedArray)
inline void reset_breakpoint_infos();
enum { // -- DECL_CAST(WasmSharedModuleData)
kModuleWrapperIndex,
kModuleBytesIndex,
kScriptIndex,
kAsmJsOffsetTableIndex,
kBreakPointInfosIndex,
kLazyCompilationOrchestratorIndex,
kFieldCount
};
DEF_SIZE(FixedArray) // Dispatched behavior.
DEF_OFFSET(ModuleWrapper) DECL_PRINTER(WasmSharedModuleData)
DEF_OFFSET(ModuleBytes) DECL_VERIFIER(WasmSharedModuleData)
DEF_OFFSET(Script)
DEF_OFFSET(AsmJsOffsetTable) // Layout description.
DEF_OFFSET(BreakPointInfos) #define WASM_SHARED_MODULE_DATA_FIELDS(V) \
DEF_OFFSET(LazyCompilationOrchestrator) V(kModuleWrapperOffset, kPointerSize) \
V(kModuleBytesOffset, kPointerSize) \
V(kScriptOffset, kPointerSize) \
V(kAsmJsOffsetTableOffset, kPointerSize) \
V(kBreakPointInfosOffset, kPointerSize) \
V(kLazyCompilationOrchestratorOffset, kPointerSize) \
V(kSize, 0)
DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize,
WASM_SHARED_MODULE_DATA_FIELDS)
#undef WASM_SHARED_MODULE_DATA_FIELDS
// Check whether this module was generated from asm.js source. // Check whether this module was generated from asm.js source.
bool is_asm_js(); bool is_asm_js();
@ -487,7 +483,7 @@ class WasmCompiledModule : public FixedArray {
// By default, instance values go to WasmInstanceObject, however, if // By default, instance values go to WasmInstanceObject, however, if
// we embed the generated code with a value, then we track that value here. // we embed the generated code with a value, then we track that value here.
#define CORE_WCM_PROPERTY_TABLE(MACRO) \ #define CORE_WCM_PROPERTY_TABLE(MACRO) \
MACRO(WASM_OBJECT, WasmSharedModuleData, shared) \ MACRO(CONST_OBJECT, WasmSharedModuleData, shared) \
MACRO(WEAK_LINK, Context, native_context) \ MACRO(WEAK_LINK, Context, native_context) \
MACRO(CONST_OBJECT, FixedArray, export_wrappers) \ MACRO(CONST_OBJECT, FixedArray, export_wrappers) \
MACRO(OBJECT, FixedArray, weak_exported_functions) \ MACRO(OBJECT, FixedArray, weak_exported_functions) \
@ -700,9 +696,6 @@ struct WasmFunctionInfo {
}; };
WasmFunctionInfo GetWasmFunctionInfo(Isolate*, Handle<Code>); WasmFunctionInfo GetWasmFunctionInfo(Isolate*, Handle<Code>);
#undef DECL_OOL_QUERY
#undef DECL_OOL_CAST
#undef DECL_GETTER
#undef DECL_OPTIONAL_ACCESSORS #undef DECL_OPTIONAL_ACCESSORS
#undef WCM_CONST_OBJECT #undef WCM_CONST_OBJECT
#undef WCM_LARGE_NUMBER #undef WCM_LARGE_NUMBER

View File

@ -75,28 +75,29 @@ INSTANCE_TYPES = {
171: "TUPLE2_TYPE", 171: "TUPLE2_TYPE",
172: "TUPLE3_TYPE", 172: "TUPLE3_TYPE",
173: "WASM_DEBUG_INFO_TYPE", 173: "WASM_DEBUG_INFO_TYPE",
174: "CALLABLE_TASK_TYPE", 174: "WASM_SHARED_MODULE_DATA_TYPE",
175: "CALLBACK_TASK_TYPE", 175: "CALLABLE_TASK_TYPE",
176: "PROMISE_FULFILL_REACTION_JOB_TASK_TYPE", 176: "CALLBACK_TASK_TYPE",
177: "PROMISE_REJECT_REACTION_JOB_TASK_TYPE", 177: "PROMISE_FULFILL_REACTION_JOB_TASK_TYPE",
178: "PROMISE_RESOLVE_THENABLE_JOB_TASK_TYPE", 178: "PROMISE_REJECT_REACTION_JOB_TASK_TYPE",
179: "FIXED_ARRAY_TYPE", 179: "PROMISE_RESOLVE_THENABLE_JOB_TASK_TYPE",
180: "DESCRIPTOR_ARRAY_TYPE", 180: "FIXED_ARRAY_TYPE",
181: "HASH_TABLE_TYPE", 181: "DESCRIPTOR_ARRAY_TYPE",
182: "SCOPE_INFO_TYPE", 182: "HASH_TABLE_TYPE",
183: "TRANSITION_ARRAY_TYPE", 183: "SCOPE_INFO_TYPE",
184: "CELL_TYPE", 184: "TRANSITION_ARRAY_TYPE",
185: "CODE_DATA_CONTAINER_TYPE", 185: "CELL_TYPE",
186: "FEEDBACK_CELL_TYPE", 186: "CODE_DATA_CONTAINER_TYPE",
187: "FEEDBACK_VECTOR_TYPE", 187: "FEEDBACK_CELL_TYPE",
188: "LOAD_HANDLER_TYPE", 188: "FEEDBACK_VECTOR_TYPE",
189: "PROPERTY_ARRAY_TYPE", 189: "LOAD_HANDLER_TYPE",
190: "PROPERTY_CELL_TYPE", 190: "PROPERTY_ARRAY_TYPE",
191: "SHARED_FUNCTION_INFO_TYPE", 191: "PROPERTY_CELL_TYPE",
192: "SMALL_ORDERED_HASH_MAP_TYPE", 192: "SHARED_FUNCTION_INFO_TYPE",
193: "SMALL_ORDERED_HASH_SET_TYPE", 193: "SMALL_ORDERED_HASH_MAP_TYPE",
194: "STORE_HANDLER_TYPE", 194: "SMALL_ORDERED_HASH_SET_TYPE",
195: "WEAK_CELL_TYPE", 195: "STORE_HANDLER_TYPE",
196: "WEAK_CELL_TYPE",
1024: "JS_PROXY_TYPE", 1024: "JS_PROXY_TYPE",
1025: "JS_GLOBAL_OBJECT_TYPE", 1025: "JS_GLOBAL_OBJECT_TYPE",
1026: "JS_GLOBAL_PROXY_TYPE", 1026: "JS_GLOBAL_PROXY_TYPE",
@ -181,8 +182,8 @@ KNOWN_MAPS = {
0x02201: (138, "FreeSpaceMap"), 0x02201: (138, "FreeSpaceMap"),
0x02259: (132, "MetaMap"), 0x02259: (132, "MetaMap"),
0x022b1: (131, "NullMap"), 0x022b1: (131, "NullMap"),
0x02309: (180, "DescriptorArrayMap"), 0x02309: (181, "DescriptorArrayMap"),
0x02361: (179, "FixedArrayMap"), 0x02361: (180, "FixedArrayMap"),
0x023b9: (151, "OnePointerFillerMap"), 0x023b9: (151, "OnePointerFillerMap"),
0x02411: (151, "TwoPointerFillerMap"), 0x02411: (151, "TwoPointerFillerMap"),
0x02469: (131, "UninitializedMap"), 0x02469: (131, "UninitializedMap"),
@ -192,57 +193,57 @@ KNOWN_MAPS = {
0x025c9: (131, "TheHoleMap"), 0x025c9: (131, "TheHoleMap"),
0x02621: (131, "BooleanMap"), 0x02621: (131, "BooleanMap"),
0x02679: (136, "ByteArrayMap"), 0x02679: (136, "ByteArrayMap"),
0x026d1: (179, "FixedCOWArrayMap"), 0x026d1: (180, "FixedCOWArrayMap"),
0x02729: (181, "HashTableMap"), 0x02729: (182, "HashTableMap"),
0x02781: (128, "SymbolMap"), 0x02781: (128, "SymbolMap"),
0x027d9: (72, "OneByteStringMap"), 0x027d9: (72, "OneByteStringMap"),
0x02831: (182, "ScopeInfoMap"), 0x02831: (183, "ScopeInfoMap"),
0x02889: (191, "SharedFunctionInfoMap"), 0x02889: (192, "SharedFunctionInfoMap"),
0x028e1: (133, "CodeMap"), 0x028e1: (133, "CodeMap"),
0x02939: (179, "FunctionContextMap"), 0x02939: (180, "FunctionContextMap"),
0x02991: (184, "CellMap"), 0x02991: (185, "CellMap"),
0x029e9: (195, "WeakCellMap"), 0x029e9: (196, "WeakCellMap"),
0x02a41: (190, "GlobalPropertyCellMap"), 0x02a41: (191, "GlobalPropertyCellMap"),
0x02a99: (135, "ForeignMap"), 0x02a99: (135, "ForeignMap"),
0x02af1: (183, "TransitionArrayMap"), 0x02af1: (184, "TransitionArrayMap"),
0x02b49: (187, "FeedbackVectorMap"), 0x02b49: (188, "FeedbackVectorMap"),
0x02ba1: (131, "ArgumentsMarkerMap"), 0x02ba1: (131, "ArgumentsMarkerMap"),
0x02bf9: (131, "ExceptionMap"), 0x02bf9: (131, "ExceptionMap"),
0x02c51: (131, "TerminationExceptionMap"), 0x02c51: (131, "TerminationExceptionMap"),
0x02ca9: (131, "OptimizedOutMap"), 0x02ca9: (131, "OptimizedOutMap"),
0x02d01: (131, "StaleRegisterMap"), 0x02d01: (131, "StaleRegisterMap"),
0x02d59: (179, "NativeContextMap"), 0x02d59: (180, "NativeContextMap"),
0x02db1: (179, "ModuleContextMap"), 0x02db1: (180, "ModuleContextMap"),
0x02e09: (179, "EvalContextMap"), 0x02e09: (180, "EvalContextMap"),
0x02e61: (179, "ScriptContextMap"), 0x02e61: (180, "ScriptContextMap"),
0x02eb9: (179, "BlockContextMap"), 0x02eb9: (180, "BlockContextMap"),
0x02f11: (179, "CatchContextMap"), 0x02f11: (180, "CatchContextMap"),
0x02f69: (179, "WithContextMap"), 0x02f69: (180, "WithContextMap"),
0x02fc1: (179, "DebugEvaluateContextMap"), 0x02fc1: (180, "DebugEvaluateContextMap"),
0x03019: (179, "ScriptContextTableMap"), 0x03019: (180, "ScriptContextTableMap"),
0x03071: (179, "ArrayListMap"), 0x03071: (180, "ArrayListMap"),
0x030c9: (150, "FixedDoubleArrayMap"), 0x030c9: (150, "FixedDoubleArrayMap"),
0x03121: (134, "MutableHeapNumberMap"), 0x03121: (134, "MutableHeapNumberMap"),
0x03179: (181, "OrderedHashMapMap"), 0x03179: (182, "OrderedHashMapMap"),
0x031d1: (181, "OrderedHashSetMap"), 0x031d1: (182, "OrderedHashSetMap"),
0x03229: (181, "NameDictionaryMap"), 0x03229: (182, "NameDictionaryMap"),
0x03281: (181, "GlobalDictionaryMap"), 0x03281: (182, "GlobalDictionaryMap"),
0x032d9: (181, "NumberDictionaryMap"), 0x032d9: (182, "NumberDictionaryMap"),
0x03331: (181, "SimpleNumberDictionaryMap"), 0x03331: (182, "SimpleNumberDictionaryMap"),
0x03389: (181, "StringTableMap"), 0x03389: (182, "StringTableMap"),
0x033e1: (181, "WeakHashTableMap"), 0x033e1: (182, "WeakHashTableMap"),
0x03439: (179, "SloppyArgumentsElementsMap"), 0x03439: (180, "SloppyArgumentsElementsMap"),
0x03491: (192, "SmallOrderedHashMapMap"), 0x03491: (193, "SmallOrderedHashMapMap"),
0x034e9: (193, "SmallOrderedHashSetMap"), 0x034e9: (194, "SmallOrderedHashSetMap"),
0x03541: (185, "CodeDataContainerMap"), 0x03541: (186, "CodeDataContainerMap"),
0x03599: (1071, "JSMessageObjectMap"), 0x03599: (1071, "JSMessageObjectMap"),
0x035f1: (1057, "ExternalMap"), 0x035f1: (1057, "ExternalMap"),
0x03649: (137, "BytecodeArrayMap"), 0x03649: (137, "BytecodeArrayMap"),
0x036a1: (179, "ModuleInfoMap"), 0x036a1: (180, "ModuleInfoMap"),
0x036f9: (186, "NoClosuresCellMap"), 0x036f9: (187, "NoClosuresCellMap"),
0x03751: (186, "OneClosureCellMap"), 0x03751: (187, "OneClosureCellMap"),
0x037a9: (186, "ManyClosuresCellMap"), 0x037a9: (187, "ManyClosuresCellMap"),
0x03801: (189, "PropertyArrayMap"), 0x03801: (190, "PropertyArrayMap"),
0x03859: (130, "BigIntMap"), 0x03859: (130, "BigIntMap"),
0x038b1: (106, "NativeSourceStringMap"), 0x038b1: (106, "NativeSourceStringMap"),
0x03909: (64, "StringMap"), 0x03909: (64, "StringMap"),
@ -298,11 +299,12 @@ KNOWN_MAPS = {
0x04a39: (170, "StackFrameInfoMap"), 0x04a39: (170, "StackFrameInfoMap"),
0x04a91: (172, "Tuple3Map"), 0x04a91: (172, "Tuple3Map"),
0x04ae9: (173, "WasmDebugInfoMap"), 0x04ae9: (173, "WasmDebugInfoMap"),
0x04b41: (174, "CallableTaskMap"), 0x04b41: (174, "WasmSharedModuleDataMap"),
0x04b99: (175, "CallbackTaskMap"), 0x04b99: (175, "CallableTaskMap"),
0x04bf1: (176, "PromiseFulfillReactionJobTaskMap"), 0x04bf1: (176, "CallbackTaskMap"),
0x04c49: (177, "PromiseRejectReactionJobTaskMap"), 0x04c49: (177, "PromiseFulfillReactionJobTaskMap"),
0x04ca1: (178, "PromiseResolveThenableJobTaskMap"), 0x04ca1: (178, "PromiseRejectReactionJobTaskMap"),
0x04cf9: (179, "PromiseResolveThenableJobTaskMap"),
} }
# List of known V8 objects. # List of known V8 objects.