[wasm] Support {WebAssembly.Function} object construction.
This makes the WebAssembly function constructor return a proper function object. Note that the returned object is not yet callable, only the prototype structure is in place. R=jkummerow@chromium.org TEST=mjsunit/wasm/type-reflection BUG=v8:7742 Change-Id: If6a3d0ae7078b5526606eef1b8fd4815353b850b Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1627343 Commit-Queue: Michael Starzinger <mstarzinger@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Cr-Commit-Position: refs/heads/master@{#61792}
This commit is contained in:
parent
be62dcc2c0
commit
32e48cf510
@ -880,6 +880,8 @@ extern class WasmExportedFunctionData extends Struct {
|
||||
function_index: Smi;
|
||||
}
|
||||
|
||||
extern class WasmJSFunctionData extends Struct { wrapper_code: Code; }
|
||||
|
||||
extern class WasmCapiFunctionData extends Struct {
|
||||
call_target: RawPtr;
|
||||
embedder_data: RawPtr;
|
||||
|
@ -13511,6 +13511,7 @@ TNode<Code> CodeStubAssembler::GetSharedFunctionInfoCode(
|
||||
UNCOMPILED_DATA_WITHOUT_PREPARSE_DATA_TYPE,
|
||||
UNCOMPILED_DATA_WITH_PREPARSE_DATA_TYPE,
|
||||
FUNCTION_TEMPLATE_INFO_TYPE,
|
||||
WASM_JS_FUNCTION_DATA_TYPE,
|
||||
WASM_CAPI_FUNCTION_DATA_TYPE};
|
||||
Label check_is_bytecode_array(this);
|
||||
Label check_is_exported_function_data(this);
|
||||
@ -13519,6 +13520,7 @@ TNode<Code> CodeStubAssembler::GetSharedFunctionInfoCode(
|
||||
Label check_is_uncompiled_data_with_preparse_data(this);
|
||||
Label check_is_function_template_info(this);
|
||||
Label check_is_interpreter_data(this);
|
||||
Label check_is_wasm_js_function_data(this);
|
||||
Label check_is_wasm_capi_function_data(this);
|
||||
Label* case_labels[] = {&check_is_bytecode_array,
|
||||
&check_is_exported_function_data,
|
||||
@ -13526,6 +13528,7 @@ TNode<Code> CodeStubAssembler::GetSharedFunctionInfoCode(
|
||||
&check_is_uncompiled_data_without_preparse_data,
|
||||
&check_is_uncompiled_data_with_preparse_data,
|
||||
&check_is_function_template_info,
|
||||
&check_is_wasm_js_function_data,
|
||||
&check_is_wasm_capi_function_data};
|
||||
STATIC_ASSERT(arraysize(case_values) == arraysize(case_labels));
|
||||
Switch(data_type, &check_is_interpreter_data, case_values, case_labels,
|
||||
@ -13569,6 +13572,12 @@ TNode<Code> CodeStubAssembler::GetSharedFunctionInfoCode(
|
||||
CAST(sfi_data), InterpreterData::kInterpreterTrampolineOffset));
|
||||
Goto(&done);
|
||||
|
||||
// IsWasmJSFunctionData: Use the wrapper code.
|
||||
BIND(&check_is_wasm_js_function_data);
|
||||
sfi_code = CAST(
|
||||
LoadObjectField(CAST(sfi_data), WasmJSFunctionData::kWrapperCodeOffset));
|
||||
Goto(&done);
|
||||
|
||||
// IsWasmCapiFunctionData: Use the wrapper code.
|
||||
BIND(&check_is_wasm_capi_function_data);
|
||||
sfi_code = CAST(LoadObjectField(CAST(sfi_data),
|
||||
|
@ -327,6 +327,7 @@ class WasmExceptionObject;
|
||||
class WasmExceptionTag;
|
||||
class WasmExportedFunctionData;
|
||||
class WasmGlobalObject;
|
||||
class WasmJSFunctionData;
|
||||
class WasmMemoryObject;
|
||||
class WasmModuleObject;
|
||||
class WasmTableObject;
|
||||
|
@ -357,6 +357,7 @@ Type::bitset BitsetType::Lub(const MapRefLike& map) {
|
||||
case WASM_DEBUG_INFO_TYPE:
|
||||
case WASM_EXCEPTION_TAG_TYPE:
|
||||
case WASM_EXPORTED_FUNCTION_DATA_TYPE:
|
||||
case WASM_JS_FUNCTION_DATA_TYPE:
|
||||
case LOAD_HANDLER_TYPE:
|
||||
case STORE_HANDLER_TYPE:
|
||||
case ASYNC_GENERATOR_REQUEST_TYPE:
|
||||
|
@ -1047,7 +1047,8 @@ void SharedFunctionInfo::SharedFunctionInfoVerify(Isolate* isolate) {
|
||||
CHECK(HasWasmExportedFunctionData() || IsApiFunction() ||
|
||||
HasBytecodeArray() || HasAsmWasmData() || HasBuiltinId() ||
|
||||
HasUncompiledDataWithPreparseData() ||
|
||||
HasUncompiledDataWithoutPreparseData() || HasWasmCapiFunctionData());
|
||||
HasUncompiledDataWithoutPreparseData() || HasWasmJSFunctionData() ||
|
||||
HasWasmCapiFunctionData());
|
||||
|
||||
CHECK(script_or_debug_info().IsUndefined(isolate) ||
|
||||
script_or_debug_info().IsScript() || HasDebugInfo());
|
||||
@ -1800,6 +1801,8 @@ USE_TORQUE_VERIFIER(FunctionTemplateRareData)
|
||||
|
||||
USE_TORQUE_VERIFIER(WasmCapiFunctionData)
|
||||
|
||||
USE_TORQUE_VERIFIER(WasmJSFunctionData)
|
||||
|
||||
USE_TORQUE_VERIFIER(ObjectTemplateInfo)
|
||||
|
||||
void AllocationSite::AllocationSiteVerify(Isolate* isolate) {
|
||||
|
@ -1866,6 +1866,12 @@ void WasmExportedFunctionData::WasmExportedFunctionDataPrint(
|
||||
os << "\n";
|
||||
}
|
||||
|
||||
void WasmJSFunctionData::WasmJSFunctionDataPrint(std::ostream& os) { // NOLINT
|
||||
PrintHeader(os, "WasmJSFunctionData");
|
||||
os << "\n - wrapper_code: " << Brief(wrapper_code());
|
||||
os << "\n";
|
||||
}
|
||||
|
||||
void WasmModuleObject::WasmModuleObjectPrint(std::ostream& os) { // NOLINT
|
||||
PrintHeader(os, "WasmModuleObject");
|
||||
os << "\n - module: " << module();
|
||||
|
@ -2412,7 +2412,7 @@ Handle<JSFunction> Factory::NewFunction(const NewFunctionArgs& args) {
|
||||
Handle<NativeContext> context(isolate()->native_context());
|
||||
Handle<Map> map = args.GetMap(isolate());
|
||||
Handle<SharedFunctionInfo> info =
|
||||
NewSharedFunctionInfo(args.name_, args.maybe_exported_function_data_,
|
||||
NewSharedFunctionInfo(args.name_, args.maybe_wasm_function_data_,
|
||||
args.maybe_builtin_id_, kNormalFunction);
|
||||
|
||||
// Proper language mode in shared function info will be set later.
|
||||
@ -4224,7 +4224,21 @@ NewFunctionArgs NewFunctionArgs::ForWasm(
|
||||
NewFunctionArgs args;
|
||||
args.name_ = name;
|
||||
args.maybe_map_ = map;
|
||||
args.maybe_exported_function_data_ = exported_function_data;
|
||||
args.maybe_wasm_function_data_ = exported_function_data;
|
||||
args.language_mode_ = LanguageMode::kSloppy;
|
||||
args.prototype_mutability_ = MUTABLE;
|
||||
|
||||
return args;
|
||||
}
|
||||
|
||||
// static
|
||||
NewFunctionArgs NewFunctionArgs::ForWasm(
|
||||
Handle<String> name, Handle<WasmJSFunctionData> js_function_data,
|
||||
Handle<Map> map) {
|
||||
NewFunctionArgs args;
|
||||
args.name_ = name;
|
||||
args.maybe_map_ = map;
|
||||
args.maybe_wasm_function_data_ = js_function_data;
|
||||
args.language_mode_ = LanguageMode::kSloppy;
|
||||
args.prototype_mutability_ = MUTABLE;
|
||||
|
||||
|
@ -67,6 +67,7 @@ class UncompiledDataWithoutPreparseData;
|
||||
class UncompiledDataWithPreparseData;
|
||||
class WasmCapiFunctionData;
|
||||
class WasmExportedFunctionData;
|
||||
class WasmJSFunctionData;
|
||||
class WeakCell;
|
||||
struct SourceRange;
|
||||
template <typename T>
|
||||
@ -1113,6 +1114,9 @@ class NewFunctionArgs final {
|
||||
static NewFunctionArgs ForWasm(
|
||||
Handle<String> name,
|
||||
Handle<WasmExportedFunctionData> exported_function_data, Handle<Map> map);
|
||||
static NewFunctionArgs ForWasm(Handle<String> name,
|
||||
Handle<WasmJSFunctionData> js_function_data,
|
||||
Handle<Map> map);
|
||||
V8_EXPORT_PRIVATE static NewFunctionArgs ForBuiltin(Handle<String> name,
|
||||
Handle<Map> map,
|
||||
int builtin_id);
|
||||
@ -1141,7 +1145,7 @@ class NewFunctionArgs final {
|
||||
|
||||
Handle<String> name_;
|
||||
MaybeHandle<Map> maybe_map_;
|
||||
MaybeHandle<WasmExportedFunctionData> maybe_exported_function_data_;
|
||||
MaybeHandle<Struct> maybe_wasm_function_data_;
|
||||
|
||||
bool should_create_and_set_initial_map_ = false;
|
||||
InstanceType type_;
|
||||
|
@ -179,6 +179,7 @@ enum InstanceType : uint16_t {
|
||||
WASM_DEBUG_INFO_TYPE,
|
||||
WASM_EXCEPTION_TAG_TYPE,
|
||||
WASM_EXPORTED_FUNCTION_DATA_TYPE,
|
||||
WASM_JS_FUNCTION_DATA_TYPE,
|
||||
|
||||
CALLABLE_TASK_TYPE, // FIRST_MICROTASK_TYPE
|
||||
CALLBACK_TASK_TYPE,
|
||||
|
@ -119,6 +119,7 @@ namespace internal {
|
||||
V(WASM_DEBUG_INFO_TYPE) \
|
||||
V(WASM_EXCEPTION_TAG_TYPE) \
|
||||
V(WASM_EXPORTED_FUNCTION_DATA_TYPE) \
|
||||
V(WASM_JS_FUNCTION_DATA_TYPE) \
|
||||
\
|
||||
V(CALLABLE_TASK_TYPE) \
|
||||
V(CALLBACK_TASK_TYPE) \
|
||||
@ -342,6 +343,7 @@ namespace internal {
|
||||
V(_, WASM_EXCEPTION_TAG_TYPE, WasmExceptionTag, wasm_exception_tag) \
|
||||
V(_, WASM_EXPORTED_FUNCTION_DATA_TYPE, WasmExportedFunctionData, \
|
||||
wasm_exported_function_data) \
|
||||
V(_, WASM_JS_FUNCTION_DATA_TYPE, WasmJSFunctionData, wasm_js_function_data) \
|
||||
V(_, CALLABLE_TASK_TYPE, CallableTask, callable_task) \
|
||||
V(_, CALLBACK_TASK_TYPE, CallbackTask, callback_task) \
|
||||
V(_, PROMISE_FULFILL_REACTION_JOB_TASK_TYPE, PromiseFulfillReactionJobTask, \
|
||||
|
@ -4919,6 +4919,8 @@ Code SharedFunctionInfo::GetCode() const {
|
||||
DCHECK(code.IsCode());
|
||||
DCHECK(code.is_interpreter_trampoline_builtin());
|
||||
return code;
|
||||
} else if (data.IsWasmJSFunctionData()) {
|
||||
return wasm_js_function_data().wrapper_code();
|
||||
} else if (data.IsWasmCapiFunctionData()) {
|
||||
return wasm_capi_function_data().wrapper_code();
|
||||
}
|
||||
@ -4931,6 +4933,11 @@ WasmExportedFunctionData SharedFunctionInfo::wasm_exported_function_data()
|
||||
return WasmExportedFunctionData::cast(function_data());
|
||||
}
|
||||
|
||||
WasmJSFunctionData SharedFunctionInfo::wasm_js_function_data() const {
|
||||
DCHECK(HasWasmJSFunctionData());
|
||||
return WasmJSFunctionData::cast(function_data());
|
||||
}
|
||||
|
||||
WasmCapiFunctionData SharedFunctionInfo::wasm_capi_function_data() const {
|
||||
DCHECK(HasWasmCapiFunctionData());
|
||||
return WasmCapiFunctionData::cast(function_data());
|
||||
|
@ -663,6 +663,10 @@ bool SharedFunctionInfo::HasWasmExportedFunctionData() const {
|
||||
return function_data().IsWasmExportedFunctionData();
|
||||
}
|
||||
|
||||
bool SharedFunctionInfo::HasWasmJSFunctionData() const {
|
||||
return function_data().IsWasmJSFunctionData();
|
||||
}
|
||||
|
||||
bool SharedFunctionInfo::HasWasmCapiFunctionData() const {
|
||||
return function_data().IsWasmCapiFunctionData();
|
||||
}
|
||||
|
@ -34,6 +34,7 @@ class DebugInfo;
|
||||
class IsCompiledScope;
|
||||
class WasmCapiFunctionData;
|
||||
class WasmExportedFunctionData;
|
||||
class WasmJSFunctionData;
|
||||
|
||||
// Data collected by the pre-parser storing information about scopes and inner
|
||||
// functions.
|
||||
@ -368,6 +369,8 @@ class SharedFunctionInfo : public HeapObject {
|
||||
inline bool HasUncompiledDataWithoutPreparseData() const;
|
||||
inline bool HasWasmExportedFunctionData() const;
|
||||
WasmExportedFunctionData wasm_exported_function_data() const;
|
||||
inline bool HasWasmJSFunctionData() const;
|
||||
WasmJSFunctionData wasm_js_function_data() const;
|
||||
inline bool HasWasmCapiFunctionData() const;
|
||||
WasmCapiFunctionData wasm_capi_function_data() const;
|
||||
|
||||
|
@ -1466,8 +1466,12 @@ void WebAssemblyFunction(const v8::FunctionCallbackInfo<v8::Value>& args) {
|
||||
return;
|
||||
}
|
||||
|
||||
// TODO(7742): Implement ability to construct.
|
||||
UNIMPLEMENTED();
|
||||
i::wasm::FunctionSig* sig = builder.Build();
|
||||
i::Handle<i::JSReceiver> callable =
|
||||
Utils::OpenHandle(*args[1].As<Function>());
|
||||
i::Handle<i::JSFunction> result =
|
||||
i::WasmJSFunction::New(i_isolate, sig, callable);
|
||||
args.GetReturnValue().Set(Utils::ToLocal(result));
|
||||
}
|
||||
|
||||
constexpr const char* kName_WasmGlobalObject = "WebAssembly.Global";
|
||||
|
@ -308,6 +308,17 @@ SMI_ACCESSORS(WasmExportedFunctionData, jump_table_offset,
|
||||
kJumpTableOffsetOffset)
|
||||
SMI_ACCESSORS(WasmExportedFunctionData, function_index, kFunctionIndexOffset)
|
||||
|
||||
// WasmJSFunction
|
||||
WasmJSFunction::WasmJSFunction(Address ptr) : JSFunction(ptr) {
|
||||
SLOW_DCHECK(IsWasmJSFunction(*this));
|
||||
}
|
||||
CAST_ACCESSOR(WasmJSFunction)
|
||||
|
||||
// WasmJSFunctionData
|
||||
OBJECT_CONSTRUCTORS_IMPL(WasmJSFunctionData, Struct)
|
||||
CAST_ACCESSOR(WasmJSFunctionData)
|
||||
ACCESSORS(WasmJSFunctionData, wrapper_code, Code, kWrapperCodeOffset)
|
||||
|
||||
// WasmCapiFunction
|
||||
WasmCapiFunction::WasmCapiFunction(Address ptr) : JSFunction(ptr) {
|
||||
SLOW_DCHECK(IsWasmCapiFunction(*this));
|
||||
|
@ -2133,6 +2133,33 @@ wasm::FunctionSig* WasmExportedFunction::sig() {
|
||||
return instance().module()->functions[function_index()].sig;
|
||||
}
|
||||
|
||||
// static
|
||||
bool WasmJSFunction::IsWasmJSFunction(Object object) {
|
||||
if (!object.IsJSFunction()) return false;
|
||||
JSFunction js_function = JSFunction::cast(object);
|
||||
return js_function.shared().HasWasmJSFunctionData();
|
||||
}
|
||||
|
||||
Handle<WasmJSFunction> WasmJSFunction::New(Isolate* isolate,
|
||||
wasm::FunctionSig* sig,
|
||||
Handle<JSReceiver> callable) {
|
||||
Handle<WasmJSFunctionData> function_data =
|
||||
Handle<WasmJSFunctionData>::cast(isolate->factory()->NewStruct(
|
||||
WASM_JS_FUNCTION_DATA_TYPE, AllocationType::kOld));
|
||||
// TODO(7742): Make this callable by using a proper wrapper code.
|
||||
function_data->set_wrapper_code(
|
||||
isolate->builtins()->builtin(Builtins::kIllegal));
|
||||
Handle<String> name = isolate->factory()->Function_string();
|
||||
if (callable->IsJSFunction()) {
|
||||
name = JSFunction::GetName(Handle<JSFunction>::cast(callable));
|
||||
}
|
||||
Handle<Map> function_map = isolate->wasm_exported_function_map();
|
||||
NewFunctionArgs args =
|
||||
NewFunctionArgs::ForWasm(name, function_data, function_map);
|
||||
Handle<JSFunction> js_function = isolate->factory()->NewFunction(args);
|
||||
return Handle<WasmJSFunction>::cast(js_function);
|
||||
}
|
||||
|
||||
Address WasmCapiFunction::GetHostCallTarget() const {
|
||||
return shared().wasm_capi_function_data().call_target();
|
||||
}
|
||||
|
@ -652,6 +652,7 @@ class WasmExceptionPackage : public JSReceiver {
|
||||
};
|
||||
|
||||
// A Wasm function that is wrapped and exported to JavaScript.
|
||||
// Representation of WebAssembly.Function JavaScript-level object.
|
||||
class WasmExportedFunction : public JSFunction {
|
||||
public:
|
||||
WasmInstanceObject instance();
|
||||
@ -671,6 +672,19 @@ class WasmExportedFunction : public JSFunction {
|
||||
OBJECT_CONSTRUCTORS(WasmExportedFunction, JSFunction);
|
||||
};
|
||||
|
||||
// A Wasm function that was created by wrapping a JavaScript callable.
|
||||
// Representation of WebAssembly.Function JavaScript-level object.
|
||||
class WasmJSFunction : public JSFunction {
|
||||
public:
|
||||
static bool IsWasmJSFunction(Object object);
|
||||
|
||||
static Handle<WasmJSFunction> New(Isolate* isolate, wasm::FunctionSig* sig,
|
||||
Handle<JSReceiver> callable);
|
||||
|
||||
DECL_CAST(WasmJSFunction)
|
||||
OBJECT_CONSTRUCTORS(WasmJSFunction, JSFunction);
|
||||
};
|
||||
|
||||
// An external function exposed to Wasm via the C/C++ API.
|
||||
class WasmCapiFunction : public JSFunction {
|
||||
public:
|
||||
@ -735,6 +749,26 @@ class WasmExportedFunctionData : public Struct {
|
||||
OBJECT_CONSTRUCTORS(WasmExportedFunctionData, Struct);
|
||||
};
|
||||
|
||||
// Information for a WasmJSFunction which is referenced as the function data of
|
||||
// the SharedFunctionInfo underlying the function. For details please see the
|
||||
// {SharedFunctionInfo::HasWasmJSFunctionData} predicate.
|
||||
class WasmJSFunctionData : public Struct {
|
||||
public:
|
||||
DECL_ACCESSORS(wrapper_code, Code)
|
||||
|
||||
DECL_CAST(WasmJSFunctionData)
|
||||
|
||||
// Dispatched behavior.
|
||||
DECL_PRINTER(WasmJSFunctionData)
|
||||
DECL_VERIFIER(WasmJSFunctionData)
|
||||
|
||||
// Layout description.
|
||||
DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize,
|
||||
TORQUE_GENERATED_WASM_JSFUNCTION_DATA_FIELDS)
|
||||
|
||||
OBJECT_CONSTRUCTORS(WasmJSFunctionData, Struct);
|
||||
};
|
||||
|
||||
class WasmDebugInfo : public Struct {
|
||||
public:
|
||||
NEVER_READ_ONLY_SPACE
|
||||
|
@ -197,9 +197,25 @@ load('test/mjsunit/wasm/wasm-module-builder.js');
|
||||
assertThrows(
|
||||
() => new WebAssembly.Function({parameters:[], results:[]}, {}), TypeError,
|
||||
/Argument 1 must be a function/);
|
||||
assertDoesNotThrow(
|
||||
() => new WebAssembly.Function({parameters:[], results:[]}, _ => 0));
|
||||
})();
|
||||
|
||||
(function TestFunctionExportedFunctions() {
|
||||
(function TestFunctionConstructedFunction() {
|
||||
let fun = new WebAssembly.Function({parameters:[], results:[]}, _ => 0);
|
||||
assertTrue(fun instanceof WebAssembly.Function);
|
||||
assertTrue(fun instanceof Function);
|
||||
assertTrue(fun instanceof Object);
|
||||
assertSame(fun.__proto__, WebAssembly.Function.prototype);
|
||||
assertSame(fun.__proto__.__proto__, Function.prototype);
|
||||
assertSame(fun.__proto__.__proto__.__proto__, Object.prototype);
|
||||
assertSame(fun.constructor, WebAssembly.Function);
|
||||
assertEquals(typeof fun, 'function');
|
||||
// TODO(7742): Enable once it is callable.
|
||||
// assertDoesNotThrow(() => fun());
|
||||
})();
|
||||
|
||||
(function TestFunctionExportedFunction() {
|
||||
let builder = new WasmModuleBuilder();
|
||||
builder.addFunction("fun", kSig_v_v).addBody([]).exportFunc();
|
||||
let instance = builder.instantiate();
|
||||
|
@ -82,60 +82,61 @@ INSTANCE_TYPES = {
|
||||
118: "WASM_DEBUG_INFO_TYPE",
|
||||
119: "WASM_EXCEPTION_TAG_TYPE",
|
||||
120: "WASM_EXPORTED_FUNCTION_DATA_TYPE",
|
||||
121: "CALLABLE_TASK_TYPE",
|
||||
122: "CALLBACK_TASK_TYPE",
|
||||
123: "PROMISE_FULFILL_REACTION_JOB_TASK_TYPE",
|
||||
124: "PROMISE_REJECT_REACTION_JOB_TASK_TYPE",
|
||||
125: "PROMISE_RESOLVE_THENABLE_JOB_TASK_TYPE",
|
||||
126: "FINALIZATION_GROUP_CLEANUP_JOB_TASK_TYPE",
|
||||
127: "ALLOCATION_SITE_TYPE",
|
||||
128: "EMBEDDER_DATA_ARRAY_TYPE",
|
||||
129: "FIXED_ARRAY_TYPE",
|
||||
130: "OBJECT_BOILERPLATE_DESCRIPTION_TYPE",
|
||||
131: "CLOSURE_FEEDBACK_CELL_ARRAY_TYPE",
|
||||
132: "HASH_TABLE_TYPE",
|
||||
133: "ORDERED_HASH_MAP_TYPE",
|
||||
134: "ORDERED_HASH_SET_TYPE",
|
||||
135: "ORDERED_NAME_DICTIONARY_TYPE",
|
||||
136: "NAME_DICTIONARY_TYPE",
|
||||
137: "GLOBAL_DICTIONARY_TYPE",
|
||||
138: "NUMBER_DICTIONARY_TYPE",
|
||||
139: "SIMPLE_NUMBER_DICTIONARY_TYPE",
|
||||
140: "STRING_TABLE_TYPE",
|
||||
141: "EPHEMERON_HASH_TABLE_TYPE",
|
||||
142: "SCOPE_INFO_TYPE",
|
||||
143: "SCRIPT_CONTEXT_TABLE_TYPE",
|
||||
144: "AWAIT_CONTEXT_TYPE",
|
||||
145: "BLOCK_CONTEXT_TYPE",
|
||||
146: "CATCH_CONTEXT_TYPE",
|
||||
147: "DEBUG_EVALUATE_CONTEXT_TYPE",
|
||||
148: "EVAL_CONTEXT_TYPE",
|
||||
149: "FUNCTION_CONTEXT_TYPE",
|
||||
150: "MODULE_CONTEXT_TYPE",
|
||||
151: "NATIVE_CONTEXT_TYPE",
|
||||
152: "SCRIPT_CONTEXT_TYPE",
|
||||
153: "WITH_CONTEXT_TYPE",
|
||||
154: "WEAK_FIXED_ARRAY_TYPE",
|
||||
155: "TRANSITION_ARRAY_TYPE",
|
||||
156: "CALL_HANDLER_INFO_TYPE",
|
||||
157: "CELL_TYPE",
|
||||
158: "CODE_DATA_CONTAINER_TYPE",
|
||||
159: "DESCRIPTOR_ARRAY_TYPE",
|
||||
160: "FEEDBACK_CELL_TYPE",
|
||||
161: "FEEDBACK_VECTOR_TYPE",
|
||||
162: "LOAD_HANDLER_TYPE",
|
||||
163: "PREPARSE_DATA_TYPE",
|
||||
164: "PROPERTY_ARRAY_TYPE",
|
||||
165: "PROPERTY_CELL_TYPE",
|
||||
166: "SHARED_FUNCTION_INFO_TYPE",
|
||||
167: "SMALL_ORDERED_HASH_MAP_TYPE",
|
||||
168: "SMALL_ORDERED_HASH_SET_TYPE",
|
||||
169: "SMALL_ORDERED_NAME_DICTIONARY_TYPE",
|
||||
170: "STORE_HANDLER_TYPE",
|
||||
171: "UNCOMPILED_DATA_WITHOUT_PREPARSE_DATA_TYPE",
|
||||
172: "UNCOMPILED_DATA_WITH_PREPARSE_DATA_TYPE",
|
||||
173: "WEAK_ARRAY_LIST_TYPE",
|
||||
174: "WEAK_CELL_TYPE",
|
||||
121: "WASM_JS_FUNCTION_DATA_TYPE",
|
||||
122: "CALLABLE_TASK_TYPE",
|
||||
123: "CALLBACK_TASK_TYPE",
|
||||
124: "PROMISE_FULFILL_REACTION_JOB_TASK_TYPE",
|
||||
125: "PROMISE_REJECT_REACTION_JOB_TASK_TYPE",
|
||||
126: "PROMISE_RESOLVE_THENABLE_JOB_TASK_TYPE",
|
||||
127: "FINALIZATION_GROUP_CLEANUP_JOB_TASK_TYPE",
|
||||
128: "ALLOCATION_SITE_TYPE",
|
||||
129: "EMBEDDER_DATA_ARRAY_TYPE",
|
||||
130: "FIXED_ARRAY_TYPE",
|
||||
131: "OBJECT_BOILERPLATE_DESCRIPTION_TYPE",
|
||||
132: "CLOSURE_FEEDBACK_CELL_ARRAY_TYPE",
|
||||
133: "HASH_TABLE_TYPE",
|
||||
134: "ORDERED_HASH_MAP_TYPE",
|
||||
135: "ORDERED_HASH_SET_TYPE",
|
||||
136: "ORDERED_NAME_DICTIONARY_TYPE",
|
||||
137: "NAME_DICTIONARY_TYPE",
|
||||
138: "GLOBAL_DICTIONARY_TYPE",
|
||||
139: "NUMBER_DICTIONARY_TYPE",
|
||||
140: "SIMPLE_NUMBER_DICTIONARY_TYPE",
|
||||
141: "STRING_TABLE_TYPE",
|
||||
142: "EPHEMERON_HASH_TABLE_TYPE",
|
||||
143: "SCOPE_INFO_TYPE",
|
||||
144: "SCRIPT_CONTEXT_TABLE_TYPE",
|
||||
145: "AWAIT_CONTEXT_TYPE",
|
||||
146: "BLOCK_CONTEXT_TYPE",
|
||||
147: "CATCH_CONTEXT_TYPE",
|
||||
148: "DEBUG_EVALUATE_CONTEXT_TYPE",
|
||||
149: "EVAL_CONTEXT_TYPE",
|
||||
150: "FUNCTION_CONTEXT_TYPE",
|
||||
151: "MODULE_CONTEXT_TYPE",
|
||||
152: "NATIVE_CONTEXT_TYPE",
|
||||
153: "SCRIPT_CONTEXT_TYPE",
|
||||
154: "WITH_CONTEXT_TYPE",
|
||||
155: "WEAK_FIXED_ARRAY_TYPE",
|
||||
156: "TRANSITION_ARRAY_TYPE",
|
||||
157: "CALL_HANDLER_INFO_TYPE",
|
||||
158: "CELL_TYPE",
|
||||
159: "CODE_DATA_CONTAINER_TYPE",
|
||||
160: "DESCRIPTOR_ARRAY_TYPE",
|
||||
161: "FEEDBACK_CELL_TYPE",
|
||||
162: "FEEDBACK_VECTOR_TYPE",
|
||||
163: "LOAD_HANDLER_TYPE",
|
||||
164: "PREPARSE_DATA_TYPE",
|
||||
165: "PROPERTY_ARRAY_TYPE",
|
||||
166: "PROPERTY_CELL_TYPE",
|
||||
167: "SHARED_FUNCTION_INFO_TYPE",
|
||||
168: "SMALL_ORDERED_HASH_MAP_TYPE",
|
||||
169: "SMALL_ORDERED_HASH_SET_TYPE",
|
||||
170: "SMALL_ORDERED_NAME_DICTIONARY_TYPE",
|
||||
171: "STORE_HANDLER_TYPE",
|
||||
172: "UNCOMPILED_DATA_WITHOUT_PREPARSE_DATA_TYPE",
|
||||
173: "UNCOMPILED_DATA_WITH_PREPARSE_DATA_TYPE",
|
||||
174: "WEAK_ARRAY_LIST_TYPE",
|
||||
175: "WEAK_CELL_TYPE",
|
||||
1024: "JS_PROXY_TYPE",
|
||||
1025: "JS_GLOBAL_OBJECT_TYPE",
|
||||
1026: "JS_GLOBAL_PROXY_TYPE",
|
||||
@ -199,8 +200,8 @@ KNOWN_MAPS = {
|
||||
("read_only_space", 0x00139): (74, "FreeSpaceMap"),
|
||||
("read_only_space", 0x00189): (68, "MetaMap"),
|
||||
("read_only_space", 0x00209): (67, "NullMap"),
|
||||
("read_only_space", 0x00271): (159, "DescriptorArrayMap"),
|
||||
("read_only_space", 0x002d1): (154, "WeakFixedArrayMap"),
|
||||
("read_only_space", 0x00271): (160, "DescriptorArrayMap"),
|
||||
("read_only_space", 0x002d1): (155, "WeakFixedArrayMap"),
|
||||
("read_only_space", 0x00321): (88, "OnePointerFillerMap"),
|
||||
("read_only_space", 0x00371): (88, "TwoPointerFillerMap"),
|
||||
("read_only_space", 0x003f1): (67, "UninitializedMap"),
|
||||
@ -210,71 +211,71 @@ KNOWN_MAPS = {
|
||||
("read_only_space", 0x005e1): (67, "TheHoleMap"),
|
||||
("read_only_space", 0x00689): (67, "BooleanMap"),
|
||||
("read_only_space", 0x00761): (72, "ByteArrayMap"),
|
||||
("read_only_space", 0x007b1): (129, "FixedArrayMap"),
|
||||
("read_only_space", 0x00801): (129, "FixedCOWArrayMap"),
|
||||
("read_only_space", 0x00851): (132, "HashTableMap"),
|
||||
("read_only_space", 0x007b1): (130, "FixedArrayMap"),
|
||||
("read_only_space", 0x00801): (130, "FixedCOWArrayMap"),
|
||||
("read_only_space", 0x00851): (133, "HashTableMap"),
|
||||
("read_only_space", 0x008a1): (64, "SymbolMap"),
|
||||
("read_only_space", 0x008f1): (40, "OneByteStringMap"),
|
||||
("read_only_space", 0x00941): (142, "ScopeInfoMap"),
|
||||
("read_only_space", 0x00991): (166, "SharedFunctionInfoMap"),
|
||||
("read_only_space", 0x00941): (143, "ScopeInfoMap"),
|
||||
("read_only_space", 0x00991): (167, "SharedFunctionInfoMap"),
|
||||
("read_only_space", 0x009e1): (69, "CodeMap"),
|
||||
("read_only_space", 0x00a31): (149, "FunctionContextMap"),
|
||||
("read_only_space", 0x00a81): (157, "CellMap"),
|
||||
("read_only_space", 0x00ad1): (165, "GlobalPropertyCellMap"),
|
||||
("read_only_space", 0x00a31): (150, "FunctionContextMap"),
|
||||
("read_only_space", 0x00a81): (158, "CellMap"),
|
||||
("read_only_space", 0x00ad1): (166, "GlobalPropertyCellMap"),
|
||||
("read_only_space", 0x00b21): (71, "ForeignMap"),
|
||||
("read_only_space", 0x00b71): (155, "TransitionArrayMap"),
|
||||
("read_only_space", 0x00bc1): (161, "FeedbackVectorMap"),
|
||||
("read_only_space", 0x00b71): (156, "TransitionArrayMap"),
|
||||
("read_only_space", 0x00bc1): (162, "FeedbackVectorMap"),
|
||||
("read_only_space", 0x00c61): (67, "ArgumentsMarkerMap"),
|
||||
("read_only_space", 0x00d01): (67, "ExceptionMap"),
|
||||
("read_only_space", 0x00da1): (67, "TerminationExceptionMap"),
|
||||
("read_only_space", 0x00e49): (67, "OptimizedOutMap"),
|
||||
("read_only_space", 0x00ee9): (67, "StaleRegisterMap"),
|
||||
("read_only_space", 0x00f59): (151, "NativeContextMap"),
|
||||
("read_only_space", 0x00fa9): (150, "ModuleContextMap"),
|
||||
("read_only_space", 0x00ff9): (148, "EvalContextMap"),
|
||||
("read_only_space", 0x01049): (152, "ScriptContextMap"),
|
||||
("read_only_space", 0x01099): (144, "AwaitContextMap"),
|
||||
("read_only_space", 0x010e9): (145, "BlockContextMap"),
|
||||
("read_only_space", 0x01139): (146, "CatchContextMap"),
|
||||
("read_only_space", 0x01189): (153, "WithContextMap"),
|
||||
("read_only_space", 0x011d9): (147, "DebugEvaluateContextMap"),
|
||||
("read_only_space", 0x01229): (143, "ScriptContextTableMap"),
|
||||
("read_only_space", 0x01279): (131, "ClosureFeedbackCellArrayMap"),
|
||||
("read_only_space", 0x00f59): (152, "NativeContextMap"),
|
||||
("read_only_space", 0x00fa9): (151, "ModuleContextMap"),
|
||||
("read_only_space", 0x00ff9): (149, "EvalContextMap"),
|
||||
("read_only_space", 0x01049): (153, "ScriptContextMap"),
|
||||
("read_only_space", 0x01099): (145, "AwaitContextMap"),
|
||||
("read_only_space", 0x010e9): (146, "BlockContextMap"),
|
||||
("read_only_space", 0x01139): (147, "CatchContextMap"),
|
||||
("read_only_space", 0x01189): (154, "WithContextMap"),
|
||||
("read_only_space", 0x011d9): (148, "DebugEvaluateContextMap"),
|
||||
("read_only_space", 0x01229): (144, "ScriptContextTableMap"),
|
||||
("read_only_space", 0x01279): (132, "ClosureFeedbackCellArrayMap"),
|
||||
("read_only_space", 0x012c9): (87, "FeedbackMetadataArrayMap"),
|
||||
("read_only_space", 0x01319): (129, "ArrayListMap"),
|
||||
("read_only_space", 0x01319): (130, "ArrayListMap"),
|
||||
("read_only_space", 0x01369): (66, "BigIntMap"),
|
||||
("read_only_space", 0x013b9): (130, "ObjectBoilerplateDescriptionMap"),
|
||||
("read_only_space", 0x013b9): (131, "ObjectBoilerplateDescriptionMap"),
|
||||
("read_only_space", 0x01409): (73, "BytecodeArrayMap"),
|
||||
("read_only_space", 0x01459): (158, "CodeDataContainerMap"),
|
||||
("read_only_space", 0x01459): (159, "CodeDataContainerMap"),
|
||||
("read_only_space", 0x014a9): (86, "FixedDoubleArrayMap"),
|
||||
("read_only_space", 0x014f9): (137, "GlobalDictionaryMap"),
|
||||
("read_only_space", 0x01549): (160, "ManyClosuresCellMap"),
|
||||
("read_only_space", 0x01599): (129, "ModuleInfoMap"),
|
||||
("read_only_space", 0x014f9): (138, "GlobalDictionaryMap"),
|
||||
("read_only_space", 0x01549): (161, "ManyClosuresCellMap"),
|
||||
("read_only_space", 0x01599): (130, "ModuleInfoMap"),
|
||||
("read_only_space", 0x015e9): (70, "MutableHeapNumberMap"),
|
||||
("read_only_space", 0x01639): (136, "NameDictionaryMap"),
|
||||
("read_only_space", 0x01689): (160, "NoClosuresCellMap"),
|
||||
("read_only_space", 0x016d9): (138, "NumberDictionaryMap"),
|
||||
("read_only_space", 0x01729): (160, "OneClosureCellMap"),
|
||||
("read_only_space", 0x01779): (133, "OrderedHashMapMap"),
|
||||
("read_only_space", 0x017c9): (134, "OrderedHashSetMap"),
|
||||
("read_only_space", 0x01819): (135, "OrderedNameDictionaryMap"),
|
||||
("read_only_space", 0x01869): (163, "PreparseDataMap"),
|
||||
("read_only_space", 0x018b9): (164, "PropertyArrayMap"),
|
||||
("read_only_space", 0x01909): (156, "SideEffectCallHandlerInfoMap"),
|
||||
("read_only_space", 0x01959): (156, "SideEffectFreeCallHandlerInfoMap"),
|
||||
("read_only_space", 0x019a9): (156, "NextCallSideEffectFreeCallHandlerInfoMap"),
|
||||
("read_only_space", 0x019f9): (139, "SimpleNumberDictionaryMap"),
|
||||
("read_only_space", 0x01a49): (129, "SloppyArgumentsElementsMap"),
|
||||
("read_only_space", 0x01a99): (167, "SmallOrderedHashMapMap"),
|
||||
("read_only_space", 0x01ae9): (168, "SmallOrderedHashSetMap"),
|
||||
("read_only_space", 0x01b39): (169, "SmallOrderedNameDictionaryMap"),
|
||||
("read_only_space", 0x01b89): (140, "StringTableMap"),
|
||||
("read_only_space", 0x01bd9): (171, "UncompiledDataWithoutPreparseDataMap"),
|
||||
("read_only_space", 0x01c29): (172, "UncompiledDataWithPreparseDataMap"),
|
||||
("read_only_space", 0x01c79): (173, "WeakArrayListMap"),
|
||||
("read_only_space", 0x01cc9): (141, "EphemeronHashTableMap"),
|
||||
("read_only_space", 0x01d19): (128, "EmbedderDataArrayMap"),
|
||||
("read_only_space", 0x01d69): (174, "WeakCellMap"),
|
||||
("read_only_space", 0x01639): (137, "NameDictionaryMap"),
|
||||
("read_only_space", 0x01689): (161, "NoClosuresCellMap"),
|
||||
("read_only_space", 0x016d9): (139, "NumberDictionaryMap"),
|
||||
("read_only_space", 0x01729): (161, "OneClosureCellMap"),
|
||||
("read_only_space", 0x01779): (134, "OrderedHashMapMap"),
|
||||
("read_only_space", 0x017c9): (135, "OrderedHashSetMap"),
|
||||
("read_only_space", 0x01819): (136, "OrderedNameDictionaryMap"),
|
||||
("read_only_space", 0x01869): (164, "PreparseDataMap"),
|
||||
("read_only_space", 0x018b9): (165, "PropertyArrayMap"),
|
||||
("read_only_space", 0x01909): (157, "SideEffectCallHandlerInfoMap"),
|
||||
("read_only_space", 0x01959): (157, "SideEffectFreeCallHandlerInfoMap"),
|
||||
("read_only_space", 0x019a9): (157, "NextCallSideEffectFreeCallHandlerInfoMap"),
|
||||
("read_only_space", 0x019f9): (140, "SimpleNumberDictionaryMap"),
|
||||
("read_only_space", 0x01a49): (130, "SloppyArgumentsElementsMap"),
|
||||
("read_only_space", 0x01a99): (168, "SmallOrderedHashMapMap"),
|
||||
("read_only_space", 0x01ae9): (169, "SmallOrderedHashSetMap"),
|
||||
("read_only_space", 0x01b39): (170, "SmallOrderedNameDictionaryMap"),
|
||||
("read_only_space", 0x01b89): (141, "StringTableMap"),
|
||||
("read_only_space", 0x01bd9): (172, "UncompiledDataWithoutPreparseDataMap"),
|
||||
("read_only_space", 0x01c29): (173, "UncompiledDataWithPreparseDataMap"),
|
||||
("read_only_space", 0x01c79): (174, "WeakArrayListMap"),
|
||||
("read_only_space", 0x01cc9): (142, "EphemeronHashTableMap"),
|
||||
("read_only_space", 0x01d19): (129, "EmbedderDataArrayMap"),
|
||||
("read_only_space", 0x01d69): (175, "WeakCellMap"),
|
||||
("read_only_space", 0x01db9): (58, "NativeSourceStringMap"),
|
||||
("read_only_space", 0x01e09): (32, "StringMap"),
|
||||
("read_only_space", 0x01e59): (41, "ConsOneByteStringMap"),
|
||||
@ -336,21 +337,22 @@ KNOWN_MAPS = {
|
||||
("read_only_space", 0x05a89): (118, "WasmDebugInfoMap"),
|
||||
("read_only_space", 0x05ad9): (119, "WasmExceptionTagMap"),
|
||||
("read_only_space", 0x05b29): (120, "WasmExportedFunctionDataMap"),
|
||||
("read_only_space", 0x05b79): (121, "CallableTaskMap"),
|
||||
("read_only_space", 0x05bc9): (122, "CallbackTaskMap"),
|
||||
("read_only_space", 0x05c19): (123, "PromiseFulfillReactionJobTaskMap"),
|
||||
("read_only_space", 0x05c69): (124, "PromiseRejectReactionJobTaskMap"),
|
||||
("read_only_space", 0x05cb9): (125, "PromiseResolveThenableJobTaskMap"),
|
||||
("read_only_space", 0x05d09): (126, "FinalizationGroupCleanupJobTaskMap"),
|
||||
("read_only_space", 0x05d59): (127, "AllocationSiteWithWeakNextMap"),
|
||||
("read_only_space", 0x05da9): (127, "AllocationSiteWithoutWeakNextMap"),
|
||||
("read_only_space", 0x05df9): (162, "LoadHandler1Map"),
|
||||
("read_only_space", 0x05e49): (162, "LoadHandler2Map"),
|
||||
("read_only_space", 0x05e99): (162, "LoadHandler3Map"),
|
||||
("read_only_space", 0x05ee9): (170, "StoreHandler0Map"),
|
||||
("read_only_space", 0x05f39): (170, "StoreHandler1Map"),
|
||||
("read_only_space", 0x05f89): (170, "StoreHandler2Map"),
|
||||
("read_only_space", 0x05fd9): (170, "StoreHandler3Map"),
|
||||
("read_only_space", 0x05b79): (121, "WasmJSFunctionDataMap"),
|
||||
("read_only_space", 0x05bc9): (122, "CallableTaskMap"),
|
||||
("read_only_space", 0x05c19): (123, "CallbackTaskMap"),
|
||||
("read_only_space", 0x05c69): (124, "PromiseFulfillReactionJobTaskMap"),
|
||||
("read_only_space", 0x05cb9): (125, "PromiseRejectReactionJobTaskMap"),
|
||||
("read_only_space", 0x05d09): (126, "PromiseResolveThenableJobTaskMap"),
|
||||
("read_only_space", 0x05d59): (127, "FinalizationGroupCleanupJobTaskMap"),
|
||||
("read_only_space", 0x05da9): (128, "AllocationSiteWithWeakNextMap"),
|
||||
("read_only_space", 0x05df9): (128, "AllocationSiteWithoutWeakNextMap"),
|
||||
("read_only_space", 0x05e49): (163, "LoadHandler1Map"),
|
||||
("read_only_space", 0x05e99): (163, "LoadHandler2Map"),
|
||||
("read_only_space", 0x05ee9): (163, "LoadHandler3Map"),
|
||||
("read_only_space", 0x05f39): (171, "StoreHandler0Map"),
|
||||
("read_only_space", 0x05f89): (171, "StoreHandler1Map"),
|
||||
("read_only_space", 0x05fd9): (171, "StoreHandler2Map"),
|
||||
("read_only_space", 0x06029): (171, "StoreHandler3Map"),
|
||||
("map_space", 0x00139): (1057, "ExternalMap"),
|
||||
("map_space", 0x00189): (1073, "JSMessageObjectMap"),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user