[torque][wasm] generate C++ class and BodyDescriptor for WasmCapiFunctionData
Drive-by fixes: - Use constexpr types to determine C++ type names. - Fix factory constructors to not skip write barriers in old generation. Change-Id: I0ebbfd56c06ad41d02836fb48531ae7eded166bf Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2400994 Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Reviewed-by: Clemens Backes <clemensb@chromium.org> Reviewed-by: Nico Hartmann <nicohartmann@chromium.org> Commit-Queue: Tobias Tebbi <tebbi@chromium.org> Cr-Commit-Position: refs/heads/master@{#70921}
This commit is contained in:
parent
8c3f81bebf
commit
e99f0393ad
@ -28,7 +28,7 @@ type never;
|
||||
|
||||
type Tagged generates 'TNode<MaybeObject>' constexpr 'MaybeObject';
|
||||
type StrongTagged extends Tagged
|
||||
generates 'TNode<Object>' constexpr 'ObjectPtr';
|
||||
generates 'TNode<Object>' constexpr 'Object';
|
||||
type Smi extends StrongTagged generates 'TNode<Smi>' constexpr 'Smi';
|
||||
type TaggedIndex extends StrongTagged
|
||||
generates 'TNode<TaggedIndex>' constexpr 'TaggedIndex';
|
||||
@ -150,7 +150,7 @@ type ObjectHashTable extends HashTable
|
||||
generates 'TNode<ObjectHashTable>';
|
||||
extern class NumberDictionary extends HashTable;
|
||||
|
||||
type RawPtr generates 'TNode<RawPtrT>' constexpr 'void*';
|
||||
type RawPtr generates 'TNode<RawPtrT>' constexpr 'Address';
|
||||
type ExternalPointer
|
||||
generates 'TNode<ExternalPointerT>' constexpr 'ExternalPointer_t';
|
||||
extern class Code extends HeapObject;
|
||||
|
@ -242,24 +242,6 @@ using Numeric = UnionT<Number, BigInt>;
|
||||
// A pointer to a builtin function, used by Torque's function pointers.
|
||||
using BuiltinPtr = Smi;
|
||||
|
||||
class int31_t {
|
||||
public:
|
||||
int31_t() : value_(0) {}
|
||||
int31_t(int value) : value_(value) { // NOLINT(runtime/explicit)
|
||||
DCHECK_EQ((value & 0x80000000) != 0, (value & 0x40000000) != 0);
|
||||
}
|
||||
int31_t& operator=(int value) {
|
||||
DCHECK_EQ((value & 0x80000000) != 0, (value & 0x40000000) != 0);
|
||||
value_ = value;
|
||||
return *this;
|
||||
}
|
||||
int32_t value() const { return value_; }
|
||||
operator int32_t() const { return value_; }
|
||||
|
||||
private:
|
||||
int32_t value_;
|
||||
};
|
||||
|
||||
template <class T, class U>
|
||||
struct is_subtype {
|
||||
static const bool value =
|
||||
|
@ -1740,6 +1740,24 @@ class IsolateRoot {
|
||||
};
|
||||
#endif
|
||||
|
||||
class int31_t {
|
||||
public:
|
||||
constexpr int31_t() : value_(0) {}
|
||||
constexpr int31_t(int value) : value_(value) { // NOLINT(runtime/explicit)
|
||||
DCHECK_EQ((value & 0x80000000) != 0, (value & 0x40000000) != 0);
|
||||
}
|
||||
int31_t& operator=(int value) {
|
||||
DCHECK_EQ((value & 0x80000000) != 0, (value & 0x40000000) != 0);
|
||||
value_ = value;
|
||||
return *this;
|
||||
}
|
||||
int32_t value() const { return value_; }
|
||||
operator int32_t() const { return value_; }
|
||||
|
||||
private:
|
||||
int32_t value_;
|
||||
};
|
||||
|
||||
} // namespace internal
|
||||
|
||||
// Tag dispatching support for acquire loads and release stores.
|
||||
|
@ -357,7 +357,6 @@ Type::bitset BitsetType::Lub(const MapRefLike& map) {
|
||||
case WASM_VALUE_TYPE:
|
||||
case CACHED_TEMPLATE_OBJECT_TYPE:
|
||||
case ENUM_CACHE_TYPE:
|
||||
case WASM_CAPI_FUNCTION_DATA_TYPE:
|
||||
case WASM_INDIRECT_FUNCTION_TABLE_TYPE:
|
||||
case WASM_EXCEPTION_TAG_TYPE:
|
||||
case WASM_EXPORTED_FUNCTION_DATA_TYPE:
|
||||
|
@ -1555,8 +1555,6 @@ void CallHandlerInfo::CallHandlerInfoVerify(Isolate* isolate) {
|
||||
.next_call_side_effect_free_call_handler_info_map());
|
||||
}
|
||||
|
||||
USE_TORQUE_VERIFIER(WasmCapiFunctionData)
|
||||
|
||||
USE_TORQUE_VERIFIER(WasmJSFunctionData)
|
||||
|
||||
USE_TORQUE_VERIFIER(WasmIndirectFunctionTable)
|
||||
|
@ -1878,16 +1878,6 @@ void FunctionTemplateInfo::FunctionTemplateInfoPrint(
|
||||
os << "\n";
|
||||
}
|
||||
|
||||
void WasmCapiFunctionData::WasmCapiFunctionDataPrint(
|
||||
std::ostream& os) { // NOLINT
|
||||
PrintHeader(os, "WasmCapiFunctionData");
|
||||
os << "\n - call_target: " << call_target();
|
||||
os << "\n - embedder_data: " << Brief(embedder_data());
|
||||
os << "\n - wrapper_code: " << Brief(wrapper_code());
|
||||
os << "\n - serialized_signature: " << Brief(serialized_signature());
|
||||
os << "\n";
|
||||
}
|
||||
|
||||
void WasmIndirectFunctionTable::WasmIndirectFunctionTablePrint(
|
||||
std::ostream& os) {
|
||||
PrintHeader(os, "WasmIndirectFunctionTable");
|
||||
|
@ -72,6 +72,10 @@ class WasmExportedFunctionData;
|
||||
class WasmJSFunctionData;
|
||||
class WeakCell;
|
||||
|
||||
namespace wasm {
|
||||
class ValueType;
|
||||
} // namespace wasm
|
||||
|
||||
enum class SharedFlag : uint8_t;
|
||||
enum class InitializedFlag : uint8_t;
|
||||
|
||||
|
@ -57,7 +57,6 @@ namespace internal {
|
||||
V(UncompiledDataWithoutPreparseData) \
|
||||
V(UncompiledDataWithPreparseData) \
|
||||
V(WasmArray) \
|
||||
V(WasmCapiFunctionData) \
|
||||
V(WasmIndirectFunctionTable) \
|
||||
V(WasmInstanceObject) \
|
||||
V(WasmStruct) \
|
||||
|
@ -73,7 +73,6 @@ enum InstanceType : uint16_t;
|
||||
V(TransitionArray) \
|
||||
V(UncompiledDataWithoutPreparseData) \
|
||||
V(UncompiledDataWithPreparseData) \
|
||||
V(WasmCapiFunctionData) \
|
||||
V(WasmIndirectFunctionTable) \
|
||||
V(WasmInstanceObject) \
|
||||
V(WasmArray) \
|
||||
|
@ -148,8 +148,6 @@ namespace internal {
|
||||
V(_, TEMPLATE_OBJECT_DESCRIPTION_TYPE, TemplateObjectDescription, \
|
||||
template_object_description) \
|
||||
V(_, TUPLE2_TYPE, Tuple2, tuple2) \
|
||||
V(_, WASM_CAPI_FUNCTION_DATA_TYPE, WasmCapiFunctionData, \
|
||||
wasm_capi_function_data) \
|
||||
V(_, WASM_EXCEPTION_TAG_TYPE, WasmExceptionTag, wasm_exception_tag) \
|
||||
V(_, WASM_EXPORTED_FUNCTION_DATA_TYPE, WasmExportedFunctionData, \
|
||||
wasm_exported_function_data) \
|
||||
|
@ -4077,7 +4077,7 @@ void CppClassGenerator::GenerateFieldAccessorForTagged(const Field& f) {
|
||||
std::string offset = "k" + CamelifyString(name) + "Offset";
|
||||
bool strong_pointer = field_type->IsSubtypeOf(TypeOracle::GetObjectType());
|
||||
|
||||
std::string type = field_type->GetRuntimeType();
|
||||
std::string type = field_type->UnhandlifiedCppTypeName();
|
||||
// Generate declarations in header.
|
||||
if (!field_type->IsClassType() && field_type != TypeOracle::GetObjectType()) {
|
||||
hdr_ << " // Torque type: " << field_type->ToString() << "\n";
|
||||
@ -4264,9 +4264,12 @@ void ImplementationVisitor::GenerateClassDefinitions(
|
||||
factory_impl << " "
|
||||
"isolate()->heap()->AllocateRawWith<Heap::kRetryOrFail>"
|
||||
"(size, allocation_type);\n";
|
||||
factory_impl << " WriteBarrierMode write_barrier_mode =\n"
|
||||
<< " allocation_type == AllocationType::kYoung\n"
|
||||
<< " ? SKIP_WRITE_BARRIER : UPDATE_WRITE_BARRIER;\n";
|
||||
factory_impl << " result.set_map_after_allocation(roots."
|
||||
<< SnakeifyString(type->name())
|
||||
<< "_map(), SKIP_WRITE_BARRIER);\n";
|
||||
<< "_map(), write_barrier_mode);\n";
|
||||
factory_impl << " " << type->HandlifiedCppTypeName()
|
||||
<< " result_handle(" << type->name()
|
||||
<< "::cast(result), isolate());\n";
|
||||
@ -4280,7 +4283,7 @@ void ImplementationVisitor::GenerateClassDefinitions(
|
||||
TypeOracle::GetTaggedType()) &&
|
||||
!f.name_and_type.type->IsSubtypeOf(TypeOracle::GetSmiType())) {
|
||||
factory_impl << "*" << f.name_and_type.name
|
||||
<< ", SKIP_WRITE_BARRIER";
|
||||
<< ", write_barrier_mode";
|
||||
} else {
|
||||
factory_impl << f.name_and_type.name;
|
||||
}
|
||||
@ -4318,7 +4321,7 @@ void GeneratePrintDefinitionsForClass(std::ostream& impl, const ClassType* type,
|
||||
impl << template_params << "\n";
|
||||
impl << "void " << gen_name_T << "::" << type->name()
|
||||
<< "Print(std::ostream& os) {\n";
|
||||
impl << " this->PrintHeader(os, \"" << gen_name << "\");\n";
|
||||
impl << " this->PrintHeader(os, \"" << type->name() << "\");\n";
|
||||
auto hierarchy = type->GetHierarchy();
|
||||
std::map<std::string, const AggregateType*> field_names;
|
||||
for (const AggregateType* aggregate_type : hierarchy) {
|
||||
|
@ -75,12 +75,18 @@ std::string Type::SimpleName() const {
|
||||
std::string Type::HandlifiedCppTypeName() const {
|
||||
if (IsSubtypeOf(TypeOracle::GetSmiType())) return "int";
|
||||
if (IsSubtypeOf(TypeOracle::GetTaggedType())) {
|
||||
return "Handle<" + ConstexprVersion()->GetGeneratedTypeName() + ">";
|
||||
return "Handle<" + UnhandlifiedCppTypeName() + ">";
|
||||
} else {
|
||||
return ConstexprVersion()->GetGeneratedTypeName();
|
||||
return UnhandlifiedCppTypeName();
|
||||
}
|
||||
}
|
||||
|
||||
std::string Type::UnhandlifiedCppTypeName() const {
|
||||
if (IsSubtypeOf(TypeOracle::GetSmiType())) return "int";
|
||||
if (this == TypeOracle::GetObjectType()) return "Object";
|
||||
return GetConstexprGeneratedTypeName();
|
||||
}
|
||||
|
||||
bool Type::IsSubtypeOf(const Type* supertype) const {
|
||||
if (supertype->IsTopType()) return true;
|
||||
if (IsNever()) return true;
|
||||
|
@ -117,6 +117,7 @@ class V8_EXPORT_PRIVATE Type : public TypeBase {
|
||||
// Used for naming generated code.
|
||||
virtual std::string SimpleName() const;
|
||||
|
||||
std::string UnhandlifiedCppTypeName() const;
|
||||
std::string HandlifiedCppTypeName() const;
|
||||
|
||||
const Type* parent() const { return parent_; }
|
||||
@ -159,6 +160,7 @@ class V8_EXPORT_PRIVATE Type : public TypeBase {
|
||||
virtual const Type* ConstexprVersion() const {
|
||||
if (constexpr_version_) return constexpr_version_;
|
||||
if (IsConstexpr()) return this;
|
||||
if (parent()) return parent()->ConstexprVersion();
|
||||
return nullptr;
|
||||
}
|
||||
|
||||
|
@ -365,16 +365,6 @@ WasmCapiFunction::WasmCapiFunction(Address ptr) : JSFunction(ptr) {
|
||||
}
|
||||
CAST_ACCESSOR(WasmCapiFunction)
|
||||
|
||||
// WasmCapiFunctionData
|
||||
OBJECT_CONSTRUCTORS_IMPL(WasmCapiFunctionData, Struct)
|
||||
CAST_ACCESSOR(WasmCapiFunctionData)
|
||||
PRIMITIVE_ACCESSORS(WasmCapiFunctionData, call_target, Address,
|
||||
kCallTargetOffset)
|
||||
ACCESSORS(WasmCapiFunctionData, embedder_data, Foreign, kEmbedderDataOffset)
|
||||
ACCESSORS(WasmCapiFunctionData, wrapper_code, Code, kWrapperCodeOffset)
|
||||
ACCESSORS(WasmCapiFunctionData, serialized_signature, PodArray<wasm::ValueType>,
|
||||
kSerializedSignatureOffset)
|
||||
|
||||
// WasmExternalFunction
|
||||
WasmExternalFunction::WasmExternalFunction(Address ptr) : JSFunction(ptr) {
|
||||
SLOW_DCHECK(IsWasmExternalFunction(*this));
|
||||
|
@ -1840,16 +1840,14 @@ bool WasmCapiFunction::IsWasmCapiFunction(Object object) {
|
||||
Handle<WasmCapiFunction> WasmCapiFunction::New(
|
||||
Isolate* isolate, Address call_target, Handle<Foreign> embedder_data,
|
||||
Handle<PodArray<wasm::ValueType>> serialized_signature) {
|
||||
Handle<WasmCapiFunctionData> fun_data =
|
||||
Handle<WasmCapiFunctionData>::cast(isolate->factory()->NewStruct(
|
||||
WASM_CAPI_FUNCTION_DATA_TYPE, AllocationType::kOld));
|
||||
fun_data->set_call_target(call_target);
|
||||
fun_data->set_embedder_data(*embedder_data);
|
||||
fun_data->set_serialized_signature(*serialized_signature);
|
||||
// TODO(jkummerow): Install a JavaScript wrapper. For now, calling
|
||||
// these functions directly is unsupported; they can only be called
|
||||
// from Wasm code.
|
||||
fun_data->set_wrapper_code(isolate->builtins()->builtin(Builtins::kIllegal));
|
||||
Handle<WasmCapiFunctionData> fun_data =
|
||||
isolate->factory()->NewWasmCapiFunctionData(
|
||||
call_target, embedder_data,
|
||||
isolate->builtins()->builtin_handle(Builtins::kIllegal),
|
||||
serialized_signature, AllocationType::kOld);
|
||||
Handle<SharedFunctionInfo> shared =
|
||||
isolate->factory()->NewSharedFunctionInfoForWasmCapiFunction(fun_data);
|
||||
return Handle<WasmCapiFunction>::cast(
|
||||
|
@ -753,27 +753,6 @@ class WasmIndirectFunctionTable : public Struct {
|
||||
OBJECT_CONSTRUCTORS(WasmIndirectFunctionTable, Struct);
|
||||
};
|
||||
|
||||
class WasmCapiFunctionData : public Struct {
|
||||
public:
|
||||
DECL_PRIMITIVE_ACCESSORS(call_target, Address)
|
||||
DECL_ACCESSORS(embedder_data, Foreign)
|
||||
DECL_ACCESSORS(wrapper_code, Code)
|
||||
DECL_ACCESSORS(serialized_signature, PodArray<wasm::ValueType>)
|
||||
|
||||
DECL_CAST(WasmCapiFunctionData)
|
||||
|
||||
DECL_PRINTER(WasmCapiFunctionData)
|
||||
DECL_VERIFIER(WasmCapiFunctionData)
|
||||
|
||||
DEFINE_FIELD_OFFSET_CONSTANTS(HeapObject::kHeaderSize,
|
||||
TORQUE_GENERATED_WASM_CAPI_FUNCTION_DATA_FIELDS)
|
||||
|
||||
STATIC_ASSERT(kStartOfStrongFieldsOffset == kEmbedderDataOffset);
|
||||
using BodyDescriptor = FlexibleBodyDescriptor<kStartOfStrongFieldsOffset>;
|
||||
|
||||
OBJECT_CONSTRUCTORS(WasmCapiFunctionData, Struct);
|
||||
};
|
||||
|
||||
// Information for a WasmExportedFunction which is referenced as the function
|
||||
// data of the SharedFunctionInfo underlying the function. For details please
|
||||
// see the {SharedFunctionInfo::HasWasmExportedFunctionData} predicate.
|
||||
|
@ -35,7 +35,8 @@ extern class WasmJSFunctionData extends Struct {
|
||||
serialized_signature: PodArrayOfWasmValueType;
|
||||
}
|
||||
|
||||
extern class WasmCapiFunctionData extends Struct {
|
||||
@export
|
||||
class WasmCapiFunctionData extends HeapObject {
|
||||
call_target: RawPtr;
|
||||
embedder_data: Foreign; // Managed<wasm::FuncData>
|
||||
wrapper_code: Code;
|
||||
|
@ -72,76 +72,76 @@ INSTANCE_TYPES = {
|
||||
108: "STACK_TRACE_FRAME_TYPE",
|
||||
109: "TEMPLATE_OBJECT_DESCRIPTION_TYPE",
|
||||
110: "TUPLE2_TYPE",
|
||||
111: "WASM_CAPI_FUNCTION_DATA_TYPE",
|
||||
112: "WASM_EXCEPTION_TAG_TYPE",
|
||||
113: "WASM_EXPORTED_FUNCTION_DATA_TYPE",
|
||||
114: "WASM_INDIRECT_FUNCTION_TABLE_TYPE",
|
||||
115: "WASM_JS_FUNCTION_DATA_TYPE",
|
||||
116: "WASM_VALUE_TYPE",
|
||||
117: "FIXED_ARRAY_TYPE",
|
||||
118: "HASH_TABLE_TYPE",
|
||||
119: "EPHEMERON_HASH_TABLE_TYPE",
|
||||
120: "GLOBAL_DICTIONARY_TYPE",
|
||||
121: "NAME_DICTIONARY_TYPE",
|
||||
122: "NUMBER_DICTIONARY_TYPE",
|
||||
123: "ORDERED_HASH_MAP_TYPE",
|
||||
124: "ORDERED_HASH_SET_TYPE",
|
||||
125: "ORDERED_NAME_DICTIONARY_TYPE",
|
||||
126: "SIMPLE_NUMBER_DICTIONARY_TYPE",
|
||||
127: "CLOSURE_FEEDBACK_CELL_ARRAY_TYPE",
|
||||
128: "OBJECT_BOILERPLATE_DESCRIPTION_TYPE",
|
||||
129: "SCOPE_INFO_TYPE",
|
||||
130: "SCRIPT_CONTEXT_TABLE_TYPE",
|
||||
131: "BYTE_ARRAY_TYPE",
|
||||
132: "BYTECODE_ARRAY_TYPE",
|
||||
133: "FIXED_DOUBLE_ARRAY_TYPE",
|
||||
134: "INTERNAL_CLASS_WITH_SMI_ELEMENTS_TYPE",
|
||||
135: "SLOPPY_ARGUMENTS_ELEMENTS_TYPE",
|
||||
136: "AWAIT_CONTEXT_TYPE",
|
||||
137: "BLOCK_CONTEXT_TYPE",
|
||||
138: "CATCH_CONTEXT_TYPE",
|
||||
139: "DEBUG_EVALUATE_CONTEXT_TYPE",
|
||||
140: "EVAL_CONTEXT_TYPE",
|
||||
141: "FUNCTION_CONTEXT_TYPE",
|
||||
142: "MODULE_CONTEXT_TYPE",
|
||||
143: "NATIVE_CONTEXT_TYPE",
|
||||
144: "SCRIPT_CONTEXT_TYPE",
|
||||
145: "WITH_CONTEXT_TYPE",
|
||||
146: "EXPORTED_SUB_CLASS_BASE_TYPE",
|
||||
147: "EXPORTED_SUB_CLASS_TYPE",
|
||||
148: "EXPORTED_SUB_CLASS2_TYPE",
|
||||
149: "SMALL_ORDERED_HASH_MAP_TYPE",
|
||||
150: "SMALL_ORDERED_HASH_SET_TYPE",
|
||||
151: "SMALL_ORDERED_NAME_DICTIONARY_TYPE",
|
||||
152: "DESCRIPTOR_ARRAY_TYPE",
|
||||
153: "STRONG_DESCRIPTOR_ARRAY_TYPE",
|
||||
154: "SOURCE_TEXT_MODULE_TYPE",
|
||||
155: "SYNTHETIC_MODULE_TYPE",
|
||||
156: "UNCOMPILED_DATA_WITH_PREPARSE_DATA_TYPE",
|
||||
157: "UNCOMPILED_DATA_WITHOUT_PREPARSE_DATA_TYPE",
|
||||
158: "WEAK_FIXED_ARRAY_TYPE",
|
||||
159: "TRANSITION_ARRAY_TYPE",
|
||||
160: "CELL_TYPE",
|
||||
161: "CODE_TYPE",
|
||||
162: "CODE_DATA_CONTAINER_TYPE",
|
||||
163: "COVERAGE_INFO_TYPE",
|
||||
164: "EMBEDDER_DATA_ARRAY_TYPE",
|
||||
165: "FEEDBACK_METADATA_TYPE",
|
||||
166: "FEEDBACK_VECTOR_TYPE",
|
||||
167: "FILLER_TYPE",
|
||||
168: "FREE_SPACE_TYPE",
|
||||
169: "INTERNAL_CLASS_TYPE",
|
||||
170: "INTERNAL_CLASS_WITH_STRUCT_ELEMENTS_TYPE",
|
||||
171: "MAP_TYPE",
|
||||
172: "ON_HEAP_BASIC_BLOCK_PROFILER_DATA_TYPE",
|
||||
173: "PREPARSE_DATA_TYPE",
|
||||
174: "PROPERTY_ARRAY_TYPE",
|
||||
175: "PROPERTY_CELL_TYPE",
|
||||
176: "SHARED_FUNCTION_INFO_TYPE",
|
||||
177: "SMI_BOX_TYPE",
|
||||
178: "SMI_PAIR_TYPE",
|
||||
179: "SORT_STATE_TYPE",
|
||||
180: "WASM_ARRAY_TYPE",
|
||||
111: "WASM_EXCEPTION_TAG_TYPE",
|
||||
112: "WASM_EXPORTED_FUNCTION_DATA_TYPE",
|
||||
113: "WASM_INDIRECT_FUNCTION_TABLE_TYPE",
|
||||
114: "WASM_JS_FUNCTION_DATA_TYPE",
|
||||
115: "WASM_VALUE_TYPE",
|
||||
116: "FIXED_ARRAY_TYPE",
|
||||
117: "HASH_TABLE_TYPE",
|
||||
118: "EPHEMERON_HASH_TABLE_TYPE",
|
||||
119: "GLOBAL_DICTIONARY_TYPE",
|
||||
120: "NAME_DICTIONARY_TYPE",
|
||||
121: "NUMBER_DICTIONARY_TYPE",
|
||||
122: "ORDERED_HASH_MAP_TYPE",
|
||||
123: "ORDERED_HASH_SET_TYPE",
|
||||
124: "ORDERED_NAME_DICTIONARY_TYPE",
|
||||
125: "SIMPLE_NUMBER_DICTIONARY_TYPE",
|
||||
126: "CLOSURE_FEEDBACK_CELL_ARRAY_TYPE",
|
||||
127: "OBJECT_BOILERPLATE_DESCRIPTION_TYPE",
|
||||
128: "SCOPE_INFO_TYPE",
|
||||
129: "SCRIPT_CONTEXT_TABLE_TYPE",
|
||||
130: "BYTE_ARRAY_TYPE",
|
||||
131: "BYTECODE_ARRAY_TYPE",
|
||||
132: "FIXED_DOUBLE_ARRAY_TYPE",
|
||||
133: "INTERNAL_CLASS_WITH_SMI_ELEMENTS_TYPE",
|
||||
134: "SLOPPY_ARGUMENTS_ELEMENTS_TYPE",
|
||||
135: "AWAIT_CONTEXT_TYPE",
|
||||
136: "BLOCK_CONTEXT_TYPE",
|
||||
137: "CATCH_CONTEXT_TYPE",
|
||||
138: "DEBUG_EVALUATE_CONTEXT_TYPE",
|
||||
139: "EVAL_CONTEXT_TYPE",
|
||||
140: "FUNCTION_CONTEXT_TYPE",
|
||||
141: "MODULE_CONTEXT_TYPE",
|
||||
142: "NATIVE_CONTEXT_TYPE",
|
||||
143: "SCRIPT_CONTEXT_TYPE",
|
||||
144: "WITH_CONTEXT_TYPE",
|
||||
145: "EXPORTED_SUB_CLASS_BASE_TYPE",
|
||||
146: "EXPORTED_SUB_CLASS_TYPE",
|
||||
147: "EXPORTED_SUB_CLASS2_TYPE",
|
||||
148: "SMALL_ORDERED_HASH_MAP_TYPE",
|
||||
149: "SMALL_ORDERED_HASH_SET_TYPE",
|
||||
150: "SMALL_ORDERED_NAME_DICTIONARY_TYPE",
|
||||
151: "DESCRIPTOR_ARRAY_TYPE",
|
||||
152: "STRONG_DESCRIPTOR_ARRAY_TYPE",
|
||||
153: "SOURCE_TEXT_MODULE_TYPE",
|
||||
154: "SYNTHETIC_MODULE_TYPE",
|
||||
155: "UNCOMPILED_DATA_WITH_PREPARSE_DATA_TYPE",
|
||||
156: "UNCOMPILED_DATA_WITHOUT_PREPARSE_DATA_TYPE",
|
||||
157: "WEAK_FIXED_ARRAY_TYPE",
|
||||
158: "TRANSITION_ARRAY_TYPE",
|
||||
159: "CELL_TYPE",
|
||||
160: "CODE_TYPE",
|
||||
161: "CODE_DATA_CONTAINER_TYPE",
|
||||
162: "COVERAGE_INFO_TYPE",
|
||||
163: "EMBEDDER_DATA_ARRAY_TYPE",
|
||||
164: "FEEDBACK_METADATA_TYPE",
|
||||
165: "FEEDBACK_VECTOR_TYPE",
|
||||
166: "FILLER_TYPE",
|
||||
167: "FREE_SPACE_TYPE",
|
||||
168: "INTERNAL_CLASS_TYPE",
|
||||
169: "INTERNAL_CLASS_WITH_STRUCT_ELEMENTS_TYPE",
|
||||
170: "MAP_TYPE",
|
||||
171: "ON_HEAP_BASIC_BLOCK_PROFILER_DATA_TYPE",
|
||||
172: "PREPARSE_DATA_TYPE",
|
||||
173: "PROPERTY_ARRAY_TYPE",
|
||||
174: "PROPERTY_CELL_TYPE",
|
||||
175: "SHARED_FUNCTION_INFO_TYPE",
|
||||
176: "SMI_BOX_TYPE",
|
||||
177: "SMI_PAIR_TYPE",
|
||||
178: "SORT_STATE_TYPE",
|
||||
179: "WASM_ARRAY_TYPE",
|
||||
180: "WASM_CAPI_FUNCTION_DATA_TYPE",
|
||||
181: "WASM_STRUCT_TYPE",
|
||||
182: "WEAK_ARRAY_LIST_TYPE",
|
||||
183: "WEAK_CELL_TYPE",
|
||||
@ -206,78 +206,78 @@ INSTANCE_TYPES = {
|
||||
|
||||
# List of known V8 maps.
|
||||
KNOWN_MAPS = {
|
||||
("read_only_space", 0x02115): (171, "MetaMap"),
|
||||
("read_only_space", 0x02115): (170, "MetaMap"),
|
||||
("read_only_space", 0x0213d): (67, "NullMap"),
|
||||
("read_only_space", 0x02165): (153, "StrongDescriptorArrayMap"),
|
||||
("read_only_space", 0x0218d): (158, "WeakFixedArrayMap"),
|
||||
("read_only_space", 0x02165): (152, "StrongDescriptorArrayMap"),
|
||||
("read_only_space", 0x0218d): (157, "WeakFixedArrayMap"),
|
||||
("read_only_space", 0x021cd): (96, "EnumCacheMap"),
|
||||
("read_only_space", 0x02201): (117, "FixedArrayMap"),
|
||||
("read_only_space", 0x02201): (116, "FixedArrayMap"),
|
||||
("read_only_space", 0x0224d): (8, "OneByteInternalizedStringMap"),
|
||||
("read_only_space", 0x02299): (168, "FreeSpaceMap"),
|
||||
("read_only_space", 0x022c1): (167, "OnePointerFillerMap"),
|
||||
("read_only_space", 0x022e9): (167, "TwoPointerFillerMap"),
|
||||
("read_only_space", 0x02299): (167, "FreeSpaceMap"),
|
||||
("read_only_space", 0x022c1): (166, "OnePointerFillerMap"),
|
||||
("read_only_space", 0x022e9): (166, "TwoPointerFillerMap"),
|
||||
("read_only_space", 0x02311): (67, "UninitializedMap"),
|
||||
("read_only_space", 0x02389): (67, "UndefinedMap"),
|
||||
("read_only_space", 0x023cd): (66, "HeapNumberMap"),
|
||||
("read_only_space", 0x02401): (67, "TheHoleMap"),
|
||||
("read_only_space", 0x02461): (67, "BooleanMap"),
|
||||
("read_only_space", 0x02505): (131, "ByteArrayMap"),
|
||||
("read_only_space", 0x0252d): (117, "FixedCOWArrayMap"),
|
||||
("read_only_space", 0x02555): (118, "HashTableMap"),
|
||||
("read_only_space", 0x02505): (130, "ByteArrayMap"),
|
||||
("read_only_space", 0x0252d): (116, "FixedCOWArrayMap"),
|
||||
("read_only_space", 0x02555): (117, "HashTableMap"),
|
||||
("read_only_space", 0x0257d): (64, "SymbolMap"),
|
||||
("read_only_space", 0x025a5): (40, "OneByteStringMap"),
|
||||
("read_only_space", 0x025cd): (129, "ScopeInfoMap"),
|
||||
("read_only_space", 0x025f5): (176, "SharedFunctionInfoMap"),
|
||||
("read_only_space", 0x0261d): (161, "CodeMap"),
|
||||
("read_only_space", 0x02645): (160, "CellMap"),
|
||||
("read_only_space", 0x0266d): (175, "GlobalPropertyCellMap"),
|
||||
("read_only_space", 0x025cd): (128, "ScopeInfoMap"),
|
||||
("read_only_space", 0x025f5): (175, "SharedFunctionInfoMap"),
|
||||
("read_only_space", 0x0261d): (160, "CodeMap"),
|
||||
("read_only_space", 0x02645): (159, "CellMap"),
|
||||
("read_only_space", 0x0266d): (174, "GlobalPropertyCellMap"),
|
||||
("read_only_space", 0x02695): (70, "ForeignMap"),
|
||||
("read_only_space", 0x026bd): (159, "TransitionArrayMap"),
|
||||
("read_only_space", 0x026bd): (158, "TransitionArrayMap"),
|
||||
("read_only_space", 0x026e5): (45, "ThinOneByteStringMap"),
|
||||
("read_only_space", 0x0270d): (166, "FeedbackVectorMap"),
|
||||
("read_only_space", 0x0270d): (165, "FeedbackVectorMap"),
|
||||
("read_only_space", 0x0273d): (67, "ArgumentsMarkerMap"),
|
||||
("read_only_space", 0x0279d): (67, "ExceptionMap"),
|
||||
("read_only_space", 0x027f9): (67, "TerminationExceptionMap"),
|
||||
("read_only_space", 0x02861): (67, "OptimizedOutMap"),
|
||||
("read_only_space", 0x028c1): (67, "StaleRegisterMap"),
|
||||
("read_only_space", 0x02921): (130, "ScriptContextTableMap"),
|
||||
("read_only_space", 0x02949): (127, "ClosureFeedbackCellArrayMap"),
|
||||
("read_only_space", 0x02971): (165, "FeedbackMetadataArrayMap"),
|
||||
("read_only_space", 0x02999): (117, "ArrayListMap"),
|
||||
("read_only_space", 0x02921): (129, "ScriptContextTableMap"),
|
||||
("read_only_space", 0x02949): (126, "ClosureFeedbackCellArrayMap"),
|
||||
("read_only_space", 0x02971): (164, "FeedbackMetadataArrayMap"),
|
||||
("read_only_space", 0x02999): (116, "ArrayListMap"),
|
||||
("read_only_space", 0x029c1): (65, "BigIntMap"),
|
||||
("read_only_space", 0x029e9): (128, "ObjectBoilerplateDescriptionMap"),
|
||||
("read_only_space", 0x02a11): (132, "BytecodeArrayMap"),
|
||||
("read_only_space", 0x02a39): (162, "CodeDataContainerMap"),
|
||||
("read_only_space", 0x02a61): (163, "CoverageInfoMap"),
|
||||
("read_only_space", 0x02a89): (152, "DescriptorArrayMap"),
|
||||
("read_only_space", 0x02ab1): (133, "FixedDoubleArrayMap"),
|
||||
("read_only_space", 0x02ad9): (120, "GlobalDictionaryMap"),
|
||||
("read_only_space", 0x029e9): (127, "ObjectBoilerplateDescriptionMap"),
|
||||
("read_only_space", 0x02a11): (131, "BytecodeArrayMap"),
|
||||
("read_only_space", 0x02a39): (161, "CodeDataContainerMap"),
|
||||
("read_only_space", 0x02a61): (162, "CoverageInfoMap"),
|
||||
("read_only_space", 0x02a89): (151, "DescriptorArrayMap"),
|
||||
("read_only_space", 0x02ab1): (132, "FixedDoubleArrayMap"),
|
||||
("read_only_space", 0x02ad9): (119, "GlobalDictionaryMap"),
|
||||
("read_only_space", 0x02b01): (97, "ManyClosuresCellMap"),
|
||||
("read_only_space", 0x02b29): (117, "ModuleInfoMap"),
|
||||
("read_only_space", 0x02b51): (121, "NameDictionaryMap"),
|
||||
("read_only_space", 0x02b29): (116, "ModuleInfoMap"),
|
||||
("read_only_space", 0x02b51): (120, "NameDictionaryMap"),
|
||||
("read_only_space", 0x02b79): (97, "NoClosuresCellMap"),
|
||||
("read_only_space", 0x02ba1): (122, "NumberDictionaryMap"),
|
||||
("read_only_space", 0x02ba1): (121, "NumberDictionaryMap"),
|
||||
("read_only_space", 0x02bc9): (97, "OneClosureCellMap"),
|
||||
("read_only_space", 0x02bf1): (123, "OrderedHashMapMap"),
|
||||
("read_only_space", 0x02c19): (124, "OrderedHashSetMap"),
|
||||
("read_only_space", 0x02c41): (125, "OrderedNameDictionaryMap"),
|
||||
("read_only_space", 0x02c69): (173, "PreparseDataMap"),
|
||||
("read_only_space", 0x02c91): (174, "PropertyArrayMap"),
|
||||
("read_only_space", 0x02bf1): (122, "OrderedHashMapMap"),
|
||||
("read_only_space", 0x02c19): (123, "OrderedHashSetMap"),
|
||||
("read_only_space", 0x02c41): (124, "OrderedNameDictionaryMap"),
|
||||
("read_only_space", 0x02c69): (172, "PreparseDataMap"),
|
||||
("read_only_space", 0x02c91): (173, "PropertyArrayMap"),
|
||||
("read_only_space", 0x02cb9): (93, "SideEffectCallHandlerInfoMap"),
|
||||
("read_only_space", 0x02ce1): (93, "SideEffectFreeCallHandlerInfoMap"),
|
||||
("read_only_space", 0x02d09): (93, "NextCallSideEffectFreeCallHandlerInfoMap"),
|
||||
("read_only_space", 0x02d31): (126, "SimpleNumberDictionaryMap"),
|
||||
("read_only_space", 0x02d59): (149, "SmallOrderedHashMapMap"),
|
||||
("read_only_space", 0x02d81): (150, "SmallOrderedHashSetMap"),
|
||||
("read_only_space", 0x02da9): (151, "SmallOrderedNameDictionaryMap"),
|
||||
("read_only_space", 0x02dd1): (154, "SourceTextModuleMap"),
|
||||
("read_only_space", 0x02df9): (155, "SyntheticModuleMap"),
|
||||
("read_only_space", 0x02e21): (157, "UncompiledDataWithoutPreparseDataMap"),
|
||||
("read_only_space", 0x02e49): (156, "UncompiledDataWithPreparseDataMap"),
|
||||
("read_only_space", 0x02d31): (125, "SimpleNumberDictionaryMap"),
|
||||
("read_only_space", 0x02d59): (148, "SmallOrderedHashMapMap"),
|
||||
("read_only_space", 0x02d81): (149, "SmallOrderedHashSetMap"),
|
||||
("read_only_space", 0x02da9): (150, "SmallOrderedNameDictionaryMap"),
|
||||
("read_only_space", 0x02dd1): (153, "SourceTextModuleMap"),
|
||||
("read_only_space", 0x02df9): (154, "SyntheticModuleMap"),
|
||||
("read_only_space", 0x02e21): (156, "UncompiledDataWithoutPreparseDataMap"),
|
||||
("read_only_space", 0x02e49): (155, "UncompiledDataWithPreparseDataMap"),
|
||||
("read_only_space", 0x02e71): (71, "WasmTypeInfoMap"),
|
||||
("read_only_space", 0x02e99): (182, "WeakArrayListMap"),
|
||||
("read_only_space", 0x02ec1): (119, "EphemeronHashTableMap"),
|
||||
("read_only_space", 0x02ee9): (164, "EmbedderDataArrayMap"),
|
||||
("read_only_space", 0x02ec1): (118, "EphemeronHashTableMap"),
|
||||
("read_only_space", 0x02ee9): (163, "EmbedderDataArrayMap"),
|
||||
("read_only_space", 0x02f11): (183, "WeakCellMap"),
|
||||
("read_only_space", 0x02f39): (32, "StringMap"),
|
||||
("read_only_space", 0x02f61): (41, "ConsOneByteStringMap"),
|
||||
@ -329,25 +329,25 @@ KNOWN_MAPS = {
|
||||
("read_only_space", 0x05851): (108, "StackTraceFrameMap"),
|
||||
("read_only_space", 0x05879): (109, "TemplateObjectDescriptionMap"),
|
||||
("read_only_space", 0x058a1): (110, "Tuple2Map"),
|
||||
("read_only_space", 0x058c9): (111, "WasmCapiFunctionDataMap"),
|
||||
("read_only_space", 0x058f1): (112, "WasmExceptionTagMap"),
|
||||
("read_only_space", 0x05919): (113, "WasmExportedFunctionDataMap"),
|
||||
("read_only_space", 0x05941): (114, "WasmIndirectFunctionTableMap"),
|
||||
("read_only_space", 0x05969): (115, "WasmJSFunctionDataMap"),
|
||||
("read_only_space", 0x05991): (116, "WasmValueMap"),
|
||||
("read_only_space", 0x059b9): (135, "SloppyArgumentsElementsMap"),
|
||||
("read_only_space", 0x059e1): (172, "OnHeapBasicBlockProfilerDataMap"),
|
||||
("read_only_space", 0x05a09): (169, "InternalClassMap"),
|
||||
("read_only_space", 0x05a31): (178, "SmiPairMap"),
|
||||
("read_only_space", 0x05a59): (177, "SmiBoxMap"),
|
||||
("read_only_space", 0x05a81): (146, "ExportedSubClassBaseMap"),
|
||||
("read_only_space", 0x05aa9): (147, "ExportedSubClassMap"),
|
||||
("read_only_space", 0x058c9): (111, "WasmExceptionTagMap"),
|
||||
("read_only_space", 0x058f1): (112, "WasmExportedFunctionDataMap"),
|
||||
("read_only_space", 0x05919): (113, "WasmIndirectFunctionTableMap"),
|
||||
("read_only_space", 0x05941): (114, "WasmJSFunctionDataMap"),
|
||||
("read_only_space", 0x05969): (115, "WasmValueMap"),
|
||||
("read_only_space", 0x05991): (134, "SloppyArgumentsElementsMap"),
|
||||
("read_only_space", 0x059b9): (171, "OnHeapBasicBlockProfilerDataMap"),
|
||||
("read_only_space", 0x059e1): (180, "WasmCapiFunctionDataMap"),
|
||||
("read_only_space", 0x05a09): (168, "InternalClassMap"),
|
||||
("read_only_space", 0x05a31): (177, "SmiPairMap"),
|
||||
("read_only_space", 0x05a59): (176, "SmiBoxMap"),
|
||||
("read_only_space", 0x05a81): (145, "ExportedSubClassBaseMap"),
|
||||
("read_only_space", 0x05aa9): (146, "ExportedSubClassMap"),
|
||||
("read_only_space", 0x05ad1): (68, "AbstractInternalClassSubclass1Map"),
|
||||
("read_only_space", 0x05af9): (69, "AbstractInternalClassSubclass2Map"),
|
||||
("read_only_space", 0x05b21): (134, "InternalClassWithSmiElementsMap"),
|
||||
("read_only_space", 0x05b49): (170, "InternalClassWithStructElementsMap"),
|
||||
("read_only_space", 0x05b71): (148, "ExportedSubClass2Map"),
|
||||
("read_only_space", 0x05b99): (179, "SortStateMap"),
|
||||
("read_only_space", 0x05b21): (133, "InternalClassWithSmiElementsMap"),
|
||||
("read_only_space", 0x05b49): (169, "InternalClassWithStructElementsMap"),
|
||||
("read_only_space", 0x05b71): (147, "ExportedSubClass2Map"),
|
||||
("read_only_space", 0x05b99): (178, "SortStateMap"),
|
||||
("read_only_space", 0x05bc1): (86, "AllocationSiteWithWeakNextMap"),
|
||||
("read_only_space", 0x05be9): (86, "AllocationSiteWithoutWeakNextMap"),
|
||||
("read_only_space", 0x05c11): (77, "LoadHandler1Map"),
|
||||
|
Loading…
Reference in New Issue
Block a user