[runtime] Add BOILERPLATE_DESCRIPTION_TYPE InstanceType

Bug: v8:7266
Change-Id: I2835ec79aaa2821aca288685a3f230a7f8029186
Reviewed-on: https://chromium-review.googlesource.com/941948
Commit-Queue: Camillo Bruni <cbruni@chromium.org>
Reviewed-by: Ross McIlroy <rmcilroy@chromium.org>
Reviewed-by: Michael Stanton <mvstanton@chromium.org>
Reviewed-by: Michael Lippautz <mlippautz@chromium.org>
Cr-Commit-Position: refs/heads/master@{#51696}
This commit is contained in:
Camillo Bruni 2018-03-02 13:50:56 +01:00 committed by Commit Bot
parent bb862bbc50
commit 1f307ba52f
29 changed files with 281 additions and 216 deletions

View File

@ -271,6 +271,7 @@ Type::bitset BitsetType::Lub(i::Map* map) {
case FIXED_DOUBLE_ARRAY_TYPE:
case BYTE_ARRAY_TYPE:
case BYTECODE_ARRAY_TYPE:
case BOILERPLATE_DESCRIPTION_TYPE:
case DESCRIPTOR_ARRAY_TYPE:
case TRANSITION_ARRAY_TYPE:
case FEEDBACK_CELL_TYPE:

View File

@ -3375,6 +3375,7 @@ void TranslatedState::InitializeCapturedObjectAt(
return;
case FIXED_ARRAY_TYPE:
case BOILERPLATE_DESCRIPTION_TYPE:
case HASH_TABLE_TYPE:
case PROPERTY_ARRAY_TYPE:
case CONTEXT_EXTENSION_TYPE:

View File

@ -266,13 +266,22 @@ Handle<BoilerplateDescription> Factory::NewBoilerplateDescription(
size++;
}
if (size == 0) {
return isolate()->factory()->empty_boilerplate_description();
}
/* Handle<FixedArray> array = NewFixedArray(size, TENURED); */
/* array->set_map_no_write_barrier(*boilerplate_description_map()); */
Handle<BoilerplateDescription> description =
Handle<BoilerplateDescription>::cast(NewFixedArray(size, TENURED));
Handle<BoilerplateDescription>::cast(NewFixedArrayWithMap(
Heap::kBoilerplateDescriptionMapRootIndex, size, TENURED));
if (has_different_size_backing_store) {
DCHECK((boilerplate != (all_properties - index_keys)) || has_seen_proto);
DCHECK_IMPLIES((boilerplate == (all_properties - index_keys)),
has_seen_proto);
description->set_backing_store_size(isolate(), backing_store_size);
}
return description;
}

View File

@ -23,6 +23,7 @@
#include "src/log.h"
#include "src/msan.h"
#include "src/objects-inl.h"
#include "src/objects/literal-objects.h"
#include "src/objects/scope-info.h"
#include "src/objects/script-inl.h"
#include "src/profiler/heap-profiler.h"

View File

@ -3740,6 +3740,20 @@ AllocationResult Heap::AllocateEmptyScopeInfo() {
return result;
}
AllocationResult Heap::AllocateEmptyBoilerplateDescription() {
int size = FixedArray::SizeFor(0);
HeapObject* result = nullptr;
{
AllocationResult allocation = AllocateRaw(size, OLD_SPACE);
if (!allocation.To(&result)) return allocation;
}
// Initialize the object.
result->set_map_after_allocation(boilerplate_description_map(),
SKIP_WRITE_BARRIER);
FixedArray::cast(result)->set_length(0);
return result;
}
AllocationResult Heap::CopyAndTenureFixedCOWArray(FixedArray* src) {
if (!InNewSpace(src)) {
return src;

View File

@ -38,6 +38,7 @@ class HeapTester;
class TestMemoryAllocatorScope;
} // namespace heap
class BoilerplateDescription;
class BytecodeArray;
class CodeDataContainer;
class DeoptimizationData;
@ -87,7 +88,7 @@ using v8::MemoryPressureLevel;
/* Entries beyond the first 32 */ \
/* The roots above this line should be boring from a GC point of view. */ \
/* This means they are never in new space and never on a page that is */ \
/* being compacted. */ \
/* being compacted.*/ \
/* Oddballs */ \
V(Oddball, arguments_marker, ArgumentsMarker) \
V(Oddball, exception, Exception) \
@ -105,31 +106,32 @@ using v8::MemoryPressureLevel;
V(Map, debug_evaluate_context_map, DebugEvaluateContextMap) \
V(Map, script_context_table_map, ScriptContextTableMap) \
/* Maps */ \
V(Map, descriptor_array_map, DescriptorArrayMap) \
V(Map, array_list_map, ArrayListMap) \
V(Map, bigint_map, BigIntMap) \
V(Map, boilerplate_description_map, BoilerplateDescriptionMap) \
V(Map, bytecode_array_map, BytecodeArrayMap) \
V(Map, code_data_container_map, CodeDataContainerMap) \
V(Map, descriptor_array_map, DescriptorArrayMap) \
V(Map, external_map, ExternalMap) \
V(Map, fixed_double_array_map, FixedDoubleArrayMap) \
V(Map, global_dictionary_map, GlobalDictionaryMap) \
V(Map, many_closures_cell_map, ManyClosuresCellMap) \
V(Map, message_object_map, JSMessageObjectMap) \
V(Map, module_info_map, ModuleInfoMap) \
V(Map, mutable_heap_number_map, MutableHeapNumberMap) \
V(Map, name_dictionary_map, NameDictionaryMap) \
V(Map, no_closures_cell_map, NoClosuresCellMap) \
V(Map, number_dictionary_map, NumberDictionaryMap) \
V(Map, one_closure_cell_map, OneClosureCellMap) \
V(Map, ordered_hash_map_map, OrderedHashMapMap) \
V(Map, ordered_hash_set_map, OrderedHashSetMap) \
V(Map, name_dictionary_map, NameDictionaryMap) \
V(Map, global_dictionary_map, GlobalDictionaryMap) \
V(Map, number_dictionary_map, NumberDictionaryMap) \
V(Map, property_array_map, PropertyArrayMap) \
V(Map, simple_number_dictionary_map, SimpleNumberDictionaryMap) \
V(Map, string_table_map, StringTableMap) \
V(Map, weak_hash_table_map, WeakHashTableMap) \
V(Map, sloppy_arguments_elements_map, SloppyArgumentsElementsMap) \
V(Map, small_ordered_hash_map_map, SmallOrderedHashMapMap) \
V(Map, small_ordered_hash_set_map, SmallOrderedHashSetMap) \
V(Map, code_data_container_map, CodeDataContainerMap) \
V(Map, message_object_map, JSMessageObjectMap) \
V(Map, external_map, ExternalMap) \
V(Map, bytecode_array_map, BytecodeArrayMap) \
V(Map, module_info_map, ModuleInfoMap) \
V(Map, no_closures_cell_map, NoClosuresCellMap) \
V(Map, one_closure_cell_map, OneClosureCellMap) \
V(Map, many_closures_cell_map, ManyClosuresCellMap) \
V(Map, property_array_map, PropertyArrayMap) \
V(Map, bigint_map, BigIntMap) \
V(Map, string_table_map, StringTableMap) \
V(Map, weak_hash_table_map, WeakHashTableMap) \
/* String maps */ \
V(Map, native_source_string_map, NativeSourceStringMap) \
V(Map, string_map, StringMap) \
@ -186,6 +188,8 @@ using v8::MemoryPressureLevel;
V(EnumCache, empty_enum_cache, EmptyEnumCache) \
V(PropertyArray, empty_property_array, EmptyPropertyArray) \
V(ByteArray, empty_byte_array, EmptyByteArray) \
V(BoilerplateDescription, empty_boilerplate_description, \
EmptyBoilerplateDescription) \
V(FixedTypedArrayBase, empty_fixed_uint8_array, EmptyFixedUint8Array) \
V(FixedTypedArrayBase, empty_fixed_int8_array, EmptyFixedInt8Array) \
V(FixedTypedArrayBase, empty_fixed_uint16_array, EmptyFixedUint16Array) \
@ -301,6 +305,7 @@ using v8::MemoryPressureLevel;
V(ArrayIteratorProtector) \
V(BigIntMap) \
V(BlockContextMap) \
V(BoilerplateDescriptionMap) \
V(BooleanMap) \
V(ByteArrayMap) \
V(BytecodeArrayMap) \
@ -2275,11 +2280,10 @@ class Heap {
MUST_USE_RESULT AllocationResult AllocateUninitializedFixedDoubleArray(
int length, PretenureFlag pretenure = NOT_TENURED);
// Allocate empty fixed array.
// Allocate empty fixed array like objects.
MUST_USE_RESULT AllocationResult AllocateEmptyFixedArray();
// Allocate empty scope info.
MUST_USE_RESULT AllocationResult AllocateEmptyScopeInfo();
MUST_USE_RESULT AllocationResult AllocateEmptyBoilerplateDescription();
// Allocate empty fixed typed array of given type.
MUST_USE_RESULT AllocationResult

View File

@ -325,6 +325,8 @@ bool Heap::CreateInitialMaps() {
ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, script_context)
ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, script_context_table)
ALLOCATE_VARSIZE_MAP(BOILERPLATE_DESCRIPTION_TYPE, boilerplate_description)
ALLOCATE_VARSIZE_MAP(FIXED_ARRAY_TYPE, native_context)
native_context_map()->set_visitor_id(kVisitNativeContext);
@ -346,8 +348,14 @@ bool Heap::CreateInitialMaps() {
AllocationResult allocation = AllocateEmptyScopeInfo();
if (!allocation.To(&obj)) return false;
}
set_empty_scope_info(ScopeInfo::cast(obj));
{
AllocationResult allocation = AllocateEmptyBoilerplateDescription();
if (!allocation.To(&obj)) return false;
}
set_empty_boilerplate_description(BoilerplateDescription::cast(obj));
{
AllocationResult allocation = Allocate(boolean_map(), OLD_SPACE);
if (!allocation.To(&obj)) return false;

View File

@ -2095,7 +2095,7 @@ void BytecodeGenerator::VisitObjectLiteral(ObjectLiteral* expr) {
// If constant properties is an empty fixed array, use a cached empty fixed
// array to ensure it's only added to the constant pool once.
if (expr->properties_count() == 0) {
entry = builder()->EmptyFixedArrayConstantPoolEntry();
entry = builder()->EmptyBoilerplateDescriptionConstantPoolEntry();
} else {
entry = builder()->AllocateDeferredConstantPoolEntry();
object_literals_.push_back(std::make_pair(expr, entry));

View File

@ -21,13 +21,14 @@ class AstValue;
namespace interpreter {
// Constant array entries that represent singletons.
#define SINGLETON_CONSTANT_ENTRY_TYPES(V) \
V(NaN, nan_value) \
V(IteratorSymbol, iterator_symbol) \
V(AsyncIteratorSymbol, async_iterator_symbol) \
V(HomeObjectSymbol, home_object_symbol) \
V(EmptyFixedArray, empty_fixed_array) \
V(ClassFieldsSymbol, class_fields_symbol)
#define SINGLETON_CONSTANT_ENTRY_TYPES(V) \
V(AsyncIteratorSymbol, async_iterator_symbol) \
V(ClassFieldsSymbol, class_fields_symbol) \
V(EmptyBoilerplateDescription, empty_boilerplate_description) \
V(EmptyFixedArray, empty_fixed_array) \
V(HomeObjectSymbol, home_object_symbol) \
V(IteratorSymbol, iterator_symbol) \
V(NaN, nan_value)
// A helper class for constructing constant arrays for the
// interpreter. Each instance of this class is intended to be used to

View File

@ -447,8 +447,9 @@ ReturnType BodyDescriptorApply(InstanceType type, T1 p1, T2 p2, T3 p3) {
}
switch (type) {
case HASH_TABLE_TYPE:
case FIXED_ARRAY_TYPE:
case BOILERPLATE_DESCRIPTION_TYPE:
case HASH_TABLE_TYPE:
case SCOPE_INFO_TYPE:
return Op::template apply<FixedArray::BodyDescriptor>(p1, p2, p3);
case FIXED_DOUBLE_ARRAY_TYPE:

View File

@ -111,6 +111,7 @@ void HeapObject::HeapObjectVerify() {
BigInt::cast(this)->BigIntVerify();
break;
case HASH_TABLE_TYPE:
case BOILERPLATE_DESCRIPTION_TYPE:
case FIXED_ARRAY_TYPE:
case SCOPE_INFO_TYPE:
FixedArray::cast(this)->FixedArrayVerify();

View File

@ -79,8 +79,9 @@ int PropertyDetails::field_width_in_words() const {
}
TYPE_CHECKER(BigInt, BIGINT_TYPE)
TYPE_CHECKER(BreakPointInfo, TUPLE2_TYPE)
TYPE_CHECKER(BoilerplateDescription, BOILERPLATE_DESCRIPTION_TYPE)
TYPE_CHECKER(BreakPoint, TUPLE2_TYPE)
TYPE_CHECKER(BreakPointInfo, TUPLE2_TYPE)
TYPE_CHECKER(CallHandlerInfo, TUPLE3_TYPE)
TYPE_CHECKER(Cell, CELL_TYPE)
TYPE_CHECKER(ConstantElementsPair, TUPLE2_TYPE)
@ -151,10 +152,6 @@ bool HeapObject::IsJSGeneratorObject() const {
IsJSAsyncGeneratorObject();
}
bool HeapObject::IsBoilerplateDescription() const {
return IsFixedArrayExact();
}
bool HeapObject::IsClassBoilerplate() const { return IsFixedArrayExact(); }
bool HeapObject::IsExternal() const {

View File

@ -93,6 +93,9 @@ void HeapObject::HeapObjectPrint(std::ostream& os) { // NOLINT
case FIXED_ARRAY_TYPE:
FixedArray::cast(this)->FixedArrayPrint(os);
break;
case BOILERPLATE_DESCRIPTION_TYPE:
BoilerplateDescription::cast(this)->BoilerplateDescriptionPrint(os);
break;
case PROPERTY_ARRAY_TYPE:
PropertyArray::cast(this)->PropertyArrayPrint(os);
break;
@ -658,12 +661,23 @@ void AliasedArgumentsEntry::AliasedArgumentsEntryPrint(
os << "\n - aliased_context_slot: " << aliased_context_slot();
}
namespace {
void PrintFixedArrayWithHeader(std::ostream& os, FixedArray* array,
const char* type) {
array->PrintHeader(os, type);
os << "\n - length: " << array->length();
PrintFixedArrayElements(os, array);
os << "\n";
}
} // namespace
void FixedArray::FixedArrayPrint(std::ostream& os) { // NOLINT
HeapObject::PrintHeader(os, IsHashTable() ? "HashTable" : "FixedArray");
os << "\n - length: " << length();
PrintFixedArrayElements(os, this);
os << "\n";
PrintFixedArrayWithHeader(os, this,
IsHashTable() ? "HashTable" : "FixedArray");
}
void BoilerplateDescription::BoilerplateDescriptionPrint(std::ostream& os) {
PrintFixedArrayWithHeader(os, this, "BoilerplateDescription");
}
void PropertyArray::PropertyArrayPrint(std::ostream& os) { // NOLINT
@ -1669,7 +1683,7 @@ void PrintScopeInfoList(ScopeInfo* scope_info, std::ostream& os,
void ScopeInfo::ScopeInfoPrint(std::ostream& os) { // NOLINT
HeapObject::PrintHeader(os, "ScopeInfo");
if (length() == 0) {
os << "\n - length = 0";
os << "\n - length = 0\n";
return;
}

View File

@ -2978,8 +2978,9 @@ VisitorId Map::GetVisitorId(Map* map) {
case FREE_SPACE_TYPE:
return kVisitFreeSpace;
case HASH_TABLE_TYPE:
case FIXED_ARRAY_TYPE:
case BOILERPLATE_DESCRIPTION_TYPE:
case HASH_TABLE_TYPE:
case DESCRIPTOR_ARRAY_TYPE:
case SCOPE_INFO_TYPE:
return kVisitFixedArray;
@ -3261,6 +3262,10 @@ void HeapObject::HeapObjectShortPrint(std::ostream& os) { // NOLINT
case FIXED_ARRAY_TYPE:
os << "<FixedArray[" << FixedArray::cast(this)->length() << "]>";
break;
case BOILERPLATE_DESCRIPTION_TYPE:
os << "<BoilerplateDescription[" << FixedArray::cast(this)->length()
<< "]>";
break;
case FIXED_DOUBLE_ARRAY_TYPE:
os << "<FixedDoubleArray[" << FixedDoubleArray::cast(this)->length()
<< "]>";
@ -12783,6 +12788,7 @@ bool CanSubclassHaveInobjectProperties(InstanceType instance_type) {
return true;
case BIGINT_TYPE:
case BOILERPLATE_DESCRIPTION_TYPE:
case BYTECODE_ARRAY_TYPE:
case BYTE_ARRAY_TYPE:
case CELL_TYPE:

View File

@ -393,6 +393,7 @@ const int kStubMinorKeyBits = kSmiValueSize - kStubMajorKeyBits - 1;
V(PROMISE_RESOLVE_THENABLE_JOB_TASK_TYPE) \
\
V(FIXED_ARRAY_TYPE) \
V(BOILERPLATE_DESCRIPTION_TYPE) \
V(DESCRIPTOR_ARRAY_TYPE) \
V(HASH_TABLE_TYPE) \
V(SCOPE_INFO_TYPE) \
@ -788,6 +789,7 @@ enum InstanceType : uint16_t {
// FixedArrays.
FIXED_ARRAY_TYPE, // FIRST_FIXED_ARRAY_TYPE
BOILERPLATE_DESCRIPTION_TYPE,
DESCRIPTOR_ARRAY_TYPE,
HASH_TABLE_TYPE,
SCOPE_INFO_TYPE,

View File

@ -35,6 +35,7 @@ class BoilerplateDescription : public FixedArray {
void set_backing_store_size(Isolate* isolate, int backing_store_size);
DECL_CAST(BoilerplateDescription)
DECL_PRINTER(BoilerplateDescription)
private:
bool has_number_of_properties() const;

View File

@ -65,7 +65,7 @@ bytecodes: [
/* 67 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["name"],
]
handlers: [
@ -91,7 +91,7 @@ bytecodes: [
/* 63 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
]
handlers: [
]

View File

@ -112,7 +112,7 @@ bytecodes: [
/* 69 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["val"],
]
handlers: [
@ -137,7 +137,7 @@ bytecodes: [
/* 69 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["val"],
]
handlers: [
@ -168,7 +168,7 @@ bytecodes: [
]
constant pool: [
ONE_BYTE_INTERNALIZED_STRING_TYPE ["var"],
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
]
handlers: [
]
@ -196,7 +196,7 @@ bytecodes: [
]
constant pool: [
ONE_BYTE_INTERNALIZED_STRING_TYPE ["var"],
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
]
handlers: [
]

View File

@ -21,7 +21,7 @@ bytecodes: [
/* 74 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"],
]
handlers: [
@ -43,7 +43,7 @@ bytecodes: [
/* 88 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"],
]
handlers: [
@ -65,7 +65,7 @@ bytecodes: [
/* 75 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
]
handlers: [
]
@ -114,7 +114,7 @@ bytecodes: [
/* 112 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
SHARED_FUNCTION_INFO_TYPE,
]
handlers: [

View File

@ -977,7 +977,7 @@ bytecodes: [
/* 96 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
TUPLE2_TYPE,
SYMBOL_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],

View File

@ -188,7 +188,7 @@ bytecodes: [
/* 152 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
TUPLE2_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["a"],
]

View File

@ -538,7 +538,7 @@ bytecodes: [
/* 105 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
TUPLE2_TYPE,
SYMBOL_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["next"],

View File

@ -30,7 +30,7 @@ bytecodes: [
/* 106 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
]
handlers: [
]
@ -60,7 +60,7 @@ bytecodes: [
/* 111 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
]
handlers: [
]
@ -90,7 +90,7 @@ bytecodes: [
/* 106 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
]
handlers: [
]
@ -120,7 +120,7 @@ bytecodes: [
/* 111 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
]
handlers: [
]
@ -149,7 +149,7 @@ bytecodes: [
/* 107 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
]
handlers: [
]
@ -178,7 +178,7 @@ bytecodes: [
/* 112 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
]
handlers: [
]
@ -207,7 +207,7 @@ bytecodes: [
/* 107 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
]
handlers: [
]
@ -236,7 +236,7 @@ bytecodes: [
/* 112 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
]
handlers: [
]

View File

@ -36,7 +36,7 @@ bytecodes: [
/* 70 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
]
handlers: [
]
@ -58,7 +58,7 @@ bytecodes: [
/* 79 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["val"],
]
handlers: [
@ -82,7 +82,7 @@ bytecodes: [
/* 75 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["val"],
]
handlers: [
@ -104,7 +104,7 @@ bytecodes: [
/* 66 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
SHARED_FUNCTION_INFO_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["func"],
]
@ -127,7 +127,7 @@ bytecodes: [
/* 67 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
SHARED_FUNCTION_INFO_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["func"],
]
@ -158,7 +158,7 @@ bytecodes: [
/* 67 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["a"],
SHARED_FUNCTION_INFO_TYPE,
]
@ -189,7 +189,7 @@ bytecodes: [
/* 101 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["a"],
SHARED_FUNCTION_INFO_TYPE,
SHARED_FUNCTION_INFO_TYPE,
@ -221,7 +221,7 @@ bytecodes: [
/* 73 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["b"],
SHARED_FUNCTION_INFO_TYPE,
]
@ -251,7 +251,7 @@ bytecodes: [
/* 61 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
]
handlers: [
]
@ -270,7 +270,7 @@ bytecodes: [
/* 61 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
]
handlers: [
]
@ -295,7 +295,7 @@ bytecodes: [
]
constant pool: [
ONE_BYTE_INTERNALIZED_STRING_TYPE ["test"],
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
]
handlers: [
]
@ -322,7 +322,7 @@ bytecodes: [
]
constant pool: [
ONE_BYTE_INTERNALIZED_STRING_TYPE ["test"],
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["val"],
]
handlers: [
@ -352,7 +352,7 @@ bytecodes: [
]
constant pool: [
ONE_BYTE_INTERNALIZED_STRING_TYPE ["test"],
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
]
handlers: [
]
@ -392,7 +392,7 @@ bytecodes: [
]
constant pool: [
ONE_BYTE_INTERNALIZED_STRING_TYPE ["name"],
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["val"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["a"],
SHARED_FUNCTION_INFO_TYPE,

View File

@ -256,7 +256,7 @@ bytecodes: [
/* 84 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["y"],
]

View File

@ -31,7 +31,7 @@ bytecodes: [
]
constant pool: [
FIXED_ARRAY_TYPE,
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
SHARED_FUNCTION_INFO_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["func"],
ONE_BYTE_INTERNALIZED_STRING_TYPE ["a"],

View File

@ -24,7 +24,7 @@ bytecodes: [
/* 59 S> */ B(Return),
]
constant pool: [
FIXED_ARRAY_TYPE,
BOILERPLATE_DESCRIPTION_TYPE,
SCOPE_INFO_TYPE,
ONE_BYTE_INTERNALIZED_STRING_TYPE ["x"],
]

View File

@ -1732,6 +1732,8 @@ class V8Heap(object):
"ODDBALL_TYPE": Oddball,
"FIXED_ARRAY_TYPE": FixedArray,
"HASH_TABLE_TYPE": FixedArray,
"BOILERPLATE_DESCRIPTION_TYPE": FixedArray,
"SCOPE_INFO_TYPE": FixedArray,
"JS_FUNCTION_TYPE": JSFunction,
"SHARED_FUNCTION_INFO_TYPE": SharedFunctionInfo,
"SCRIPT_TYPE": Script,

View File

@ -82,22 +82,23 @@ INSTANCE_TYPES = {
178: "PROMISE_REJECT_REACTION_JOB_TASK_TYPE",
179: "PROMISE_RESOLVE_THENABLE_JOB_TASK_TYPE",
180: "FIXED_ARRAY_TYPE",
181: "DESCRIPTOR_ARRAY_TYPE",
182: "HASH_TABLE_TYPE",
183: "SCOPE_INFO_TYPE",
184: "TRANSITION_ARRAY_TYPE",
185: "CELL_TYPE",
186: "CODE_DATA_CONTAINER_TYPE",
187: "FEEDBACK_CELL_TYPE",
188: "FEEDBACK_VECTOR_TYPE",
189: "LOAD_HANDLER_TYPE",
190: "PROPERTY_ARRAY_TYPE",
191: "PROPERTY_CELL_TYPE",
192: "SHARED_FUNCTION_INFO_TYPE",
193: "SMALL_ORDERED_HASH_MAP_TYPE",
194: "SMALL_ORDERED_HASH_SET_TYPE",
195: "STORE_HANDLER_TYPE",
196: "WEAK_CELL_TYPE",
181: "BOILERPLATE_DESCRIPTION_TYPE",
182: "DESCRIPTOR_ARRAY_TYPE",
183: "HASH_TABLE_TYPE",
184: "SCOPE_INFO_TYPE",
185: "TRANSITION_ARRAY_TYPE",
186: "CELL_TYPE",
187: "CODE_DATA_CONTAINER_TYPE",
188: "FEEDBACK_CELL_TYPE",
189: "FEEDBACK_VECTOR_TYPE",
190: "LOAD_HANDLER_TYPE",
191: "PROPERTY_ARRAY_TYPE",
192: "PROPERTY_CELL_TYPE",
193: "SHARED_FUNCTION_INFO_TYPE",
194: "SMALL_ORDERED_HASH_MAP_TYPE",
195: "SMALL_ORDERED_HASH_SET_TYPE",
196: "STORE_HANDLER_TYPE",
197: "WEAK_CELL_TYPE",
1024: "JS_PROXY_TYPE",
1025: "JS_GLOBAL_OBJECT_TYPE",
1026: "JS_GLOBAL_PROXY_TYPE",
@ -182,7 +183,7 @@ KNOWN_MAPS = {
0x02201: (138, "FreeSpaceMap"),
0x02259: (132, "MetaMap"),
0x022b1: (131, "NullMap"),
0x02309: (181, "DescriptorArrayMap"),
0x02309: (182, "DescriptorArrayMap"),
0x02361: (180, "FixedArrayMap"),
0x023b9: (151, "OnePointerFillerMap"),
0x02411: (151, "TwoPointerFillerMap"),
@ -194,19 +195,19 @@ KNOWN_MAPS = {
0x02621: (131, "BooleanMap"),
0x02679: (136, "ByteArrayMap"),
0x026d1: (180, "FixedCOWArrayMap"),
0x02729: (182, "HashTableMap"),
0x02729: (183, "HashTableMap"),
0x02781: (128, "SymbolMap"),
0x027d9: (72, "OneByteStringMap"),
0x02831: (183, "ScopeInfoMap"),
0x02889: (192, "SharedFunctionInfoMap"),
0x02831: (184, "ScopeInfoMap"),
0x02889: (193, "SharedFunctionInfoMap"),
0x028e1: (133, "CodeMap"),
0x02939: (180, "FunctionContextMap"),
0x02991: (185, "CellMap"),
0x029e9: (196, "WeakCellMap"),
0x02a41: (191, "GlobalPropertyCellMap"),
0x02991: (186, "CellMap"),
0x029e9: (197, "WeakCellMap"),
0x02a41: (192, "GlobalPropertyCellMap"),
0x02a99: (135, "ForeignMap"),
0x02af1: (184, "TransitionArrayMap"),
0x02b49: (188, "FeedbackVectorMap"),
0x02af1: (185, "TransitionArrayMap"),
0x02b49: (189, "FeedbackVectorMap"),
0x02ba1: (131, "ArgumentsMarkerMap"),
0x02bf9: (131, "ExceptionMap"),
0x02c51: (131, "TerminationExceptionMap"),
@ -222,89 +223,90 @@ KNOWN_MAPS = {
0x02fc1: (180, "DebugEvaluateContextMap"),
0x03019: (180, "ScriptContextTableMap"),
0x03071: (180, "ArrayListMap"),
0x030c9: (150, "FixedDoubleArrayMap"),
0x03121: (134, "MutableHeapNumberMap"),
0x03179: (182, "OrderedHashMapMap"),
0x031d1: (182, "OrderedHashSetMap"),
0x03229: (182, "NameDictionaryMap"),
0x03281: (182, "GlobalDictionaryMap"),
0x032d9: (182, "NumberDictionaryMap"),
0x03331: (182, "SimpleNumberDictionaryMap"),
0x03389: (182, "StringTableMap"),
0x033e1: (182, "WeakHashTableMap"),
0x03439: (180, "SloppyArgumentsElementsMap"),
0x03491: (193, "SmallOrderedHashMapMap"),
0x034e9: (194, "SmallOrderedHashSetMap"),
0x03541: (186, "CodeDataContainerMap"),
0x03599: (1071, "JSMessageObjectMap"),
0x035f1: (1057, "ExternalMap"),
0x03649: (137, "BytecodeArrayMap"),
0x036a1: (180, "ModuleInfoMap"),
0x036f9: (187, "NoClosuresCellMap"),
0x03751: (187, "OneClosureCellMap"),
0x037a9: (187, "ManyClosuresCellMap"),
0x03801: (190, "PropertyArrayMap"),
0x03859: (130, "BigIntMap"),
0x038b1: (106, "NativeSourceStringMap"),
0x03909: (64, "StringMap"),
0x03961: (73, "ConsOneByteStringMap"),
0x039b9: (65, "ConsStringMap"),
0x03a11: (77, "ThinOneByteStringMap"),
0x03a69: (69, "ThinStringMap"),
0x03ac1: (67, "SlicedStringMap"),
0x03b19: (75, "SlicedOneByteStringMap"),
0x03b71: (66, "ExternalStringMap"),
0x03bc9: (82, "ExternalStringWithOneByteDataMap"),
0x03c21: (74, "ExternalOneByteStringMap"),
0x03c79: (98, "ShortExternalStringMap"),
0x03cd1: (114, "ShortExternalStringWithOneByteDataMap"),
0x03d29: (0, "InternalizedStringMap"),
0x03d81: (2, "ExternalInternalizedStringMap"),
0x03dd9: (18, "ExternalInternalizedStringWithOneByteDataMap"),
0x03e31: (10, "ExternalOneByteInternalizedStringMap"),
0x03e89: (34, "ShortExternalInternalizedStringMap"),
0x03ee1: (50, "ShortExternalInternalizedStringWithOneByteDataMap"),
0x03f39: (42, "ShortExternalOneByteInternalizedStringMap"),
0x03f91: (106, "ShortExternalOneByteStringMap"),
0x03fe9: (140, "FixedUint8ArrayMap"),
0x04041: (139, "FixedInt8ArrayMap"),
0x04099: (142, "FixedUint16ArrayMap"),
0x040f1: (141, "FixedInt16ArrayMap"),
0x04149: (144, "FixedUint32ArrayMap"),
0x041a1: (143, "FixedInt32ArrayMap"),
0x041f9: (145, "FixedFloat32ArrayMap"),
0x04251: (146, "FixedFloat64ArrayMap"),
0x042a9: (147, "FixedUint8ClampedArrayMap"),
0x04301: (149, "FixedBigUint64ArrayMap"),
0x04359: (148, "FixedBigInt64ArrayMap"),
0x043b1: (171, "Tuple2Map"),
0x04409: (169, "ScriptMap"),
0x04461: (162, "InterceptorInfoMap"),
0x044b9: (153, "AccessorInfoMap"),
0x04511: (152, "AccessCheckInfoMap"),
0x04569: (154, "AccessorPairMap"),
0x045c1: (155, "AliasedArgumentsEntryMap"),
0x04619: (156, "AllocationMementoMap"),
0x04671: (157, "AllocationSiteMap"),
0x046c9: (158, "AsyncGeneratorRequestMap"),
0x04721: (159, "ContextExtensionMap"),
0x04779: (160, "DebugInfoMap"),
0x047d1: (161, "FunctionTemplateInfoMap"),
0x04829: (163, "ModuleInfoEntryMap"),
0x04881: (164, "ModuleMap"),
0x048d9: (165, "ObjectTemplateInfoMap"),
0x04931: (166, "PromiseCapabilityMap"),
0x04989: (167, "PromiseReactionMap"),
0x049e1: (168, "PrototypeInfoMap"),
0x04a39: (170, "StackFrameInfoMap"),
0x04a91: (172, "Tuple3Map"),
0x04ae9: (173, "WasmDebugInfoMap"),
0x04b41: (174, "WasmSharedModuleDataMap"),
0x04b99: (175, "CallableTaskMap"),
0x04bf1: (176, "CallbackTaskMap"),
0x04c49: (177, "PromiseFulfillReactionJobTaskMap"),
0x04ca1: (178, "PromiseRejectReactionJobTaskMap"),
0x04cf9: (179, "PromiseResolveThenableJobTaskMap"),
0x030c9: (130, "BigIntMap"),
0x03121: (181, "BoilerplateDescriptionMap"),
0x03179: (137, "BytecodeArrayMap"),
0x031d1: (187, "CodeDataContainerMap"),
0x03229: (1057, "ExternalMap"),
0x03281: (150, "FixedDoubleArrayMap"),
0x032d9: (183, "GlobalDictionaryMap"),
0x03331: (188, "ManyClosuresCellMap"),
0x03389: (1071, "JSMessageObjectMap"),
0x033e1: (180, "ModuleInfoMap"),
0x03439: (134, "MutableHeapNumberMap"),
0x03491: (183, "NameDictionaryMap"),
0x034e9: (188, "NoClosuresCellMap"),
0x03541: (183, "NumberDictionaryMap"),
0x03599: (188, "OneClosureCellMap"),
0x035f1: (183, "OrderedHashMapMap"),
0x03649: (183, "OrderedHashSetMap"),
0x036a1: (191, "PropertyArrayMap"),
0x036f9: (183, "SimpleNumberDictionaryMap"),
0x03751: (180, "SloppyArgumentsElementsMap"),
0x037a9: (194, "SmallOrderedHashMapMap"),
0x03801: (195, "SmallOrderedHashSetMap"),
0x03859: (183, "StringTableMap"),
0x038b1: (183, "WeakHashTableMap"),
0x03909: (106, "NativeSourceStringMap"),
0x03961: (64, "StringMap"),
0x039b9: (73, "ConsOneByteStringMap"),
0x03a11: (65, "ConsStringMap"),
0x03a69: (77, "ThinOneByteStringMap"),
0x03ac1: (69, "ThinStringMap"),
0x03b19: (67, "SlicedStringMap"),
0x03b71: (75, "SlicedOneByteStringMap"),
0x03bc9: (66, "ExternalStringMap"),
0x03c21: (82, "ExternalStringWithOneByteDataMap"),
0x03c79: (74, "ExternalOneByteStringMap"),
0x03cd1: (98, "ShortExternalStringMap"),
0x03d29: (114, "ShortExternalStringWithOneByteDataMap"),
0x03d81: (0, "InternalizedStringMap"),
0x03dd9: (2, "ExternalInternalizedStringMap"),
0x03e31: (18, "ExternalInternalizedStringWithOneByteDataMap"),
0x03e89: (10, "ExternalOneByteInternalizedStringMap"),
0x03ee1: (34, "ShortExternalInternalizedStringMap"),
0x03f39: (50, "ShortExternalInternalizedStringWithOneByteDataMap"),
0x03f91: (42, "ShortExternalOneByteInternalizedStringMap"),
0x03fe9: (106, "ShortExternalOneByteStringMap"),
0x04041: (140, "FixedUint8ArrayMap"),
0x04099: (139, "FixedInt8ArrayMap"),
0x040f1: (142, "FixedUint16ArrayMap"),
0x04149: (141, "FixedInt16ArrayMap"),
0x041a1: (144, "FixedUint32ArrayMap"),
0x041f9: (143, "FixedInt32ArrayMap"),
0x04251: (145, "FixedFloat32ArrayMap"),
0x042a9: (146, "FixedFloat64ArrayMap"),
0x04301: (147, "FixedUint8ClampedArrayMap"),
0x04359: (149, "FixedBigUint64ArrayMap"),
0x043b1: (148, "FixedBigInt64ArrayMap"),
0x04409: (171, "Tuple2Map"),
0x04461: (169, "ScriptMap"),
0x044b9: (162, "InterceptorInfoMap"),
0x04511: (153, "AccessorInfoMap"),
0x04569: (152, "AccessCheckInfoMap"),
0x045c1: (154, "AccessorPairMap"),
0x04619: (155, "AliasedArgumentsEntryMap"),
0x04671: (156, "AllocationMementoMap"),
0x046c9: (157, "AllocationSiteMap"),
0x04721: (158, "AsyncGeneratorRequestMap"),
0x04779: (159, "ContextExtensionMap"),
0x047d1: (160, "DebugInfoMap"),
0x04829: (161, "FunctionTemplateInfoMap"),
0x04881: (163, "ModuleInfoEntryMap"),
0x048d9: (164, "ModuleMap"),
0x04931: (165, "ObjectTemplateInfoMap"),
0x04989: (166, "PromiseCapabilityMap"),
0x049e1: (167, "PromiseReactionMap"),
0x04a39: (168, "PrototypeInfoMap"),
0x04a91: (170, "StackFrameInfoMap"),
0x04ae9: (172, "Tuple3Map"),
0x04b41: (173, "WasmDebugInfoMap"),
0x04b99: (174, "WasmSharedModuleDataMap"),
0x04bf1: (175, "CallableTaskMap"),
0x04c49: (176, "CallbackTaskMap"),
0x04ca1: (177, "PromiseFulfillReactionJobTaskMap"),
0x04cf9: (178, "PromiseRejectReactionJobTaskMap"),
0x04d51: (179, "PromiseResolveThenableJobTaskMap"),
}
# List of known V8 objects.
@ -327,33 +329,33 @@ KNOWN_OBJECTS = {
("OLD_SPACE", 0x02579): "OptimizedOut",
("OLD_SPACE", 0x025d1): "StaleRegister",
("OLD_SPACE", 0x02651): "EmptyByteArray",
("OLD_SPACE", 0x02661): "EmptyFixedUint8Array",
("OLD_SPACE", 0x02681): "EmptyFixedInt8Array",
("OLD_SPACE", 0x026a1): "EmptyFixedUint16Array",
("OLD_SPACE", 0x026c1): "EmptyFixedInt16Array",
("OLD_SPACE", 0x026e1): "EmptyFixedUint32Array",
("OLD_SPACE", 0x02701): "EmptyFixedInt32Array",
("OLD_SPACE", 0x02721): "EmptyFixedFloat32Array",
("OLD_SPACE", 0x02741): "EmptyFixedFloat64Array",
("OLD_SPACE", 0x02761): "EmptyFixedUint8ClampedArray",
("OLD_SPACE", 0x027c1): "EmptyScript",
("OLD_SPACE", 0x02849): "ManyClosuresCell",
("OLD_SPACE", 0x02859): "EmptySloppyArgumentsElements",
("OLD_SPACE", 0x02879): "EmptySlowElementDictionary",
("OLD_SPACE", 0x028c1): "EmptyOrderedHashMap",
("OLD_SPACE", 0x028e9): "EmptyOrderedHashSet",
("OLD_SPACE", 0x02911): "EmptyPropertyCell",
("OLD_SPACE", 0x02939): "EmptyWeakCell",
("OLD_SPACE", 0x029a9): "NoElementsProtector",
("OLD_SPACE", 0x029d1): "IsConcatSpreadableProtector",
("OLD_SPACE", 0x029e1): "SpeciesProtector",
("OLD_SPACE", 0x02a09): "StringLengthProtector",
("OLD_SPACE", 0x02a19): "FastArrayIterationProtector",
("OLD_SPACE", 0x02a29): "ArrayIteratorProtector",
("OLD_SPACE", 0x02a51): "ArrayBufferNeuteringProtector",
("OLD_SPACE", 0x02ac9): "InfinityValue",
("OLD_SPACE", 0x02ad9): "MinusZeroValue",
("OLD_SPACE", 0x02ae9): "MinusInfinityValue",
("OLD_SPACE", 0x02671): "EmptyFixedUint8Array",
("OLD_SPACE", 0x02691): "EmptyFixedInt8Array",
("OLD_SPACE", 0x026b1): "EmptyFixedUint16Array",
("OLD_SPACE", 0x026d1): "EmptyFixedInt16Array",
("OLD_SPACE", 0x026f1): "EmptyFixedUint32Array",
("OLD_SPACE", 0x02711): "EmptyFixedInt32Array",
("OLD_SPACE", 0x02731): "EmptyFixedFloat32Array",
("OLD_SPACE", 0x02751): "EmptyFixedFloat64Array",
("OLD_SPACE", 0x02771): "EmptyFixedUint8ClampedArray",
("OLD_SPACE", 0x027d1): "EmptyScript",
("OLD_SPACE", 0x02859): "ManyClosuresCell",
("OLD_SPACE", 0x02869): "EmptySloppyArgumentsElements",
("OLD_SPACE", 0x02889): "EmptySlowElementDictionary",
("OLD_SPACE", 0x028d1): "EmptyOrderedHashMap",
("OLD_SPACE", 0x028f9): "EmptyOrderedHashSet",
("OLD_SPACE", 0x02921): "EmptyPropertyCell",
("OLD_SPACE", 0x02949): "EmptyWeakCell",
("OLD_SPACE", 0x029b9): "NoElementsProtector",
("OLD_SPACE", 0x029e1): "IsConcatSpreadableProtector",
("OLD_SPACE", 0x029f1): "SpeciesProtector",
("OLD_SPACE", 0x02a19): "StringLengthProtector",
("OLD_SPACE", 0x02a29): "FastArrayIterationProtector",
("OLD_SPACE", 0x02a39): "ArrayIteratorProtector",
("OLD_SPACE", 0x02a61): "ArrayBufferNeuteringProtector",
("OLD_SPACE", 0x02ad9): "InfinityValue",
("OLD_SPACE", 0x02ae9): "MinusZeroValue",
("OLD_SPACE", 0x02af9): "MinusInfinityValue",
}
# List of known V8 Frame Markers.