Remove 'length' field from ScopeInfo

ScopeInfo has a vestigial 'length' field from when it used to be a
FixedArray. This change removes that field, which saves some memory.

More specifically:

- Make ScopeInfo inherit from HeapObject, not FixedArrayBase which
  supplied the 'length' field.
- Privatize the FixedArray-style functions that provide access to
  ScopeInfo fields by index, and move them from scope-info-inl.h to
  scope-info.cc. Those functions are still used pretty heavily during
  initialization (ScopeInfo::Create, etc.), but at least we can avoid
  presenting them to the rest of the world.
- Change FactoryBase::NewScopeInfo to allocate the updated object shape.
  It maintains the existing behavior of filling the newly-allocated
  object with undefined, even though that's not a valid ScopeInfo and
  further initialization is required.
- Move part of AccessorAssembler::ScriptContextTableLookup into a new
  Torque macro, because it used to rely on casting ScopeInfo to
  FixedArrayBase.
- In V8HeapExplorer::AddEntry, don't claim that ScopeInfo objects are
  arrays. I think it makes more sense to list them under "(system)" in
  the dev tools, like most other V8 internal types.

Bug: v8:8952
Change-Id: I8278e3a90027d4409f0d268da0fe7080754c6b8c
Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/2601880
Reviewed-by: Toon Verwaest <verwaest@chromium.org>
Reviewed-by: Peter Marshall <petermarshall@chromium.org>
Reviewed-by: Dominik Inführ <dinfuehr@chromium.org>
Reviewed-by: Nico Hartmann <nicohartmann@chromium.org>
Reviewed-by: Mythri Alle <mythria@chromium.org>
Commit-Queue: Seth Brenith <seth.brenith@microsoft.com>
Cr-Commit-Position: refs/heads/master@{#72830}
This commit is contained in:
Seth Brenith 2021-02-16 09:59:26 -08:00 committed by Commit Bot
parent 1ff071c1e2
commit f731e13f00
15 changed files with 384 additions and 376 deletions

View File

@ -2013,11 +2013,6 @@ TNode<IntPtrT> CodeStubAssembler::LoadArrayLength(
return LoadAndUntagWeakFixedArrayLength(array);
}
template <>
TNode<IntPtrT> CodeStubAssembler::LoadArrayLength(TNode<ScopeInfo> array) {
return LoadAndUntagFixedArrayBaseLength(array);
}
template <typename Array, typename TIndex, typename TValue>
TNode<TValue> CodeStubAssembler::LoadArrayElement(
TNode<Array> array, int array_header_size, TNode<TIndex> index_node,
@ -2048,10 +2043,6 @@ TNode<TValue> CodeStubAssembler::LoadArrayElement(
template V8_EXPORT_PRIVATE TNode<MaybeObject>
CodeStubAssembler::LoadArrayElement<TransitionArray, IntPtrT>(
TNode<TransitionArray>, int, TNode<IntPtrT>, int, LoadSensitivity);
template V8_EXPORT_PRIVATE TNode<MaybeObject>
CodeStubAssembler::LoadArrayElement<ScopeInfo, IntPtrT>(TNode<ScopeInfo>, int,
TNode<IntPtrT>, int,
LoadSensitivity);
template <typename TIndex>
TNode<Object> CodeStubAssembler::LoadFixedArrayElement(

View File

@ -740,8 +740,7 @@ void ScopeIterator::VisitModuleScope(const Visitor& visitor) const {
if (VisitContextLocals(visitor, scope_info, context_, ScopeTypeModule))
return;
int count_index = scope_info->ModuleVariableCountIndex();
int module_variable_count = Smi::cast(scope_info->get(count_index)).value();
int module_variable_count = scope_info->ModuleVariableCount();
Handle<SourceTextModule> module(context_->module(), isolate_);

View File

@ -578,20 +578,6 @@ void Context::ContextVerify(Isolate* isolate) {
}
}
void ScopeInfo::ScopeInfoVerify(Isolate* isolate) {
TorqueGeneratedClassVerifiers::ScopeInfoVerify(*this, isolate);
// Make sure that the FixedArray-style length matches the length that we would
// compute based on the Torque indexed fields.
CHECK_EQ(FixedArray::SizeFor(length()), AllocatedSize());
// Code that treats ScopeInfo like a FixedArray expects all values to be
// tagged.
for (int i = 0; i < length(); ++i) {
Object::VerifyPointer(isolate, get(isolate, i));
}
}
void NativeContext::NativeContextVerify(Isolate* isolate) {
ContextVerify(isolate);
CHECK_EQ(length(), NativeContext::NATIVE_CONTEXT_SLOTS);

View File

@ -2204,18 +2204,13 @@ void JSSegments::JSSegmentsPrint(std::ostream& os) { // NOLINT
namespace {
void PrintScopeInfoList(ScopeInfo scope_info, std::ostream& os,
const char* list_name, int nof_internal_slots,
int start, int length) {
const char* list_name, int length) {
if (length <= 0) return;
int end = start + length;
os << "\n - " << list_name;
if (nof_internal_slots > 0) {
os << " " << start << "-" << end << " [internal slots]";
}
os << " {\n";
for (int i = nof_internal_slots; start < end; ++i, ++start) {
for (int i = 0; i < length; ++i) {
os << " - " << i << ": ";
String::cast(scope_info.get(start)).ShortPrint(os);
scope_info.context_local_names(i).ShortPrint(os);
os << "\n";
}
os << " }";
@ -2272,8 +2267,7 @@ void ScopeInfo::ScopeInfoPrint(std::ostream& os) { // NOLINT
}
os << "\n - length: " << length();
if (length() > 0) {
PrintScopeInfoList(*this, os, "context slots", Context::MIN_CONTEXT_SLOTS,
ContextLocalNamesIndex(), ContextLocalCount());
PrintScopeInfoList(*this, os, "context slots", ContextLocalCount());
// TODO(neis): Print module stuff if present.
}
os << "\n";

View File

@ -690,11 +690,13 @@ template <typename Impl>
Handle<ScopeInfo> FactoryBase<Impl>::NewScopeInfo(int length,
AllocationType type) {
DCHECK(type == AllocationType::kOld || type == AllocationType::kReadOnly);
Handle<HeapObject> result =
Handle<HeapObject>::cast(NewFixedArray(length, type));
result->set_map_after_allocation(*read_only_roots().scope_info_map_handle(),
SKIP_WRITE_BARRIER);
return Handle<ScopeInfo>::cast(result);
int size = ScopeInfo::SizeFor(length);
HeapObject obj = AllocateRawWithImmortalMap(
size, type, read_only_roots().scope_info_map());
ScopeInfo scope_info = ScopeInfo::cast(obj);
MemsetTagged(scope_info.data_start(), read_only_roots().undefined_value(),
length);
return handle(scope_info, isolate());
}
template <typename Impl>

View File

@ -510,11 +510,10 @@ bool Heap::CreateInitialMaps() {
{
AllocationResult alloc =
AllocateRaw(FixedArray::SizeFor(ScopeInfo::kVariablePartIndex),
AllocateRaw(ScopeInfo::SizeFor(ScopeInfo::kVariablePartIndex),
AllocationType::kReadOnly);
if (!alloc.To(&obj)) return false;
obj.set_map_after_allocation(roots.scope_info_map(), SKIP_WRITE_BARRIER);
ScopeInfo::cast(obj).set_length(ScopeInfo::kVariablePartIndex);
int flags = ScopeInfo::IsEmptyBit::encode(true);
DCHECK_EQ(ScopeInfo::LanguageModeBit::decode(flags), LanguageMode::kSloppy);
DCHECK_EQ(ScopeInfo::ReceiverVariableBits::decode(flags),

View File

@ -3074,34 +3074,14 @@ void AccessorAssembler::ScriptContextTableLookup(
TNode<ScopeInfo> scope_info =
CAST(LoadContextElement(script_context, Context::SCOPE_INFO_INDEX));
TVARIABLE(IntPtrT, scope_var_index,
IntPtrConstant(ScopeInfo::kVariablePartIndex - 1));
TNode<IntPtrT> num_scope_vars = SmiUntag(
CAST(LoadObjectField(scope_info, ScopeInfo::kContextLocalCountOffset)));
TNode<IntPtrT> end_index = IntPtrAdd(
num_scope_vars, IntPtrConstant(ScopeInfo::kVariablePartIndex));
Label loop_scope_info(this, &scope_var_index);
Goto(&loop_scope_info);
TNode<IntPtrT> context_local_index =
IndexOfLocalName(scope_info, name, &loop);
BIND(&loop_scope_info);
{
scope_var_index = IntPtrAdd(scope_var_index.value(), IntPtrConstant(1));
GotoIf(IntPtrGreaterThanOrEqual(scope_var_index.value(), end_index),
&loop);
FixedArrayBoundsCheck(scope_info, scope_var_index.value(), 0);
TNode<Object> var_name = CAST(LoadArrayElement(
scope_info, FixedArray::kHeaderSize, scope_var_index.value()));
GotoIf(TaggedNotEqual(var_name, name), &loop_scope_info);
TNode<IntPtrT> var_index =
IntPtrAdd(IntPtrConstant(Context::MIN_CONTEXT_SLOTS),
IntPtrSub(scope_var_index.value(),
IntPtrConstant(ScopeInfo::kVariablePartIndex)));
TNode<Object> result = LoadContextElement(script_context, var_index);
GotoIf(IsTheHole(result), found_hole);
Return(result);
}
TNode<IntPtrT> var_index = IntPtrAdd(
IntPtrConstant(Context::MIN_CONTEXT_SLOTS), context_local_index);
TNode<Object> result = LoadContextElement(script_context, var_index);
GotoIf(IsTheHole(result), found_hole);
Return(result);
}
}

View File

@ -30,49 +30,7 @@ int ScopeInfo::Flags() const { return flags(); }
int ScopeInfo::ParameterCount() const { return parameter_count(); }
int ScopeInfo::ContextLocalCount() const { return context_local_count(); }
Object ScopeInfo::get(int index) const {
IsolateRoot isolate = GetIsolateForPtrCompr(*this);
return get(isolate, index);
}
Object ScopeInfo::get(IsolateRoot isolate, int index) const {
DCHECK_LT(static_cast<unsigned>(index), static_cast<unsigned>(length()));
return TaggedField<Object>::Relaxed_Load(
isolate, *this, FixedArray::OffsetOfElementAt(index));
}
void ScopeInfo::set(int index, Smi value) {
DCHECK_NE(map(), GetReadOnlyRoots().fixed_cow_array_map());
DCHECK_LT(static_cast<unsigned>(index), static_cast<unsigned>(length()));
DCHECK(Object(value).IsSmi());
int offset = FixedArray::OffsetOfElementAt(index);
RELAXED_WRITE_FIELD(*this, offset, value);
}
void ScopeInfo::set(int index, Object value, WriteBarrierMode mode) {
DCHECK_NE(map(), GetReadOnlyRoots().fixed_cow_array_map());
DCHECK(IsScopeInfo());
DCHECK_LT(static_cast<unsigned>(index), static_cast<unsigned>(length()));
int offset = FixedArray::OffsetOfElementAt(index);
RELAXED_WRITE_FIELD(*this, offset, value);
CONDITIONAL_WRITE_BARRIER(*this, offset, value, mode);
}
void ScopeInfo::CopyElements(Isolate* isolate, int dst_index, ScopeInfo src,
int src_index, int len, WriteBarrierMode mode) {
if (len == 0) return;
DCHECK_LE(dst_index + len, length());
DCHECK_LE(src_index + len, src.length());
DisallowGarbageCollection no_gc;
ObjectSlot dst_slot(RawFieldOfElementAt(dst_index));
ObjectSlot src_slot(src.RawFieldOfElementAt(src_index));
isolate->heap()->CopyRange(*this, dst_slot, src_slot, len, mode);
}
ObjectSlot ScopeInfo::RawFieldOfElementAt(int index) {
return RawField(FixedArray::OffsetOfElementAt(index));
}
ObjectSlot ScopeInfo::data_start() { return RawField(OffsetOfElementAt(0)); }
} // namespace internal
} // namespace v8

View File

@ -15,17 +15,12 @@
#include "src/objects/string-set-inl.h"
#include "src/roots/roots.h"
// Has to be the last include (doesn't have include guards):
#include "src/objects/object-macros.h"
namespace v8 {
namespace internal {
// An entry in ModuleVariableEntries consists of several slots:
enum ModuleVariableEntryOffset {
kModuleVariableNameOffset,
kModuleVariableIndexOffset,
kModuleVariablePropertiesOffset,
kModuleVariableEntryLength // Sentinel value.
};
#ifdef DEBUG
bool ScopeInfo::Equals(ScopeInfo other) const {
if (length() != other.length()) return false;
@ -164,6 +159,12 @@ Handle<ScopeInfo> ScopeInfo::Create(LocalIsolate* isolate, Zone* zone,
scope->AsModuleScope()->module());
}
// Make sure the Fields enum agrees with Torque-generated offsets.
#define ASSERT_MATCHED_FIELD(name) \
STATIC_ASSERT(OffsetOfElementAt(k##name) == k##name##Offset);
FOR_EACH_SCOPE_INFO_NUMERIC_FIELD(ASSERT_MATCHED_FIELD)
#undef ASSERT_MATCHED_FIELD
const int length = kVariablePartIndex + 2 * context_local_count +
(should_save_class_variable_index ? 1 : 0) +
(has_receiver ? 1 : 0) +
@ -228,6 +229,12 @@ Handle<ScopeInfo> ScopeInfo::Create(LocalIsolate* isolate, Zone* zone,
scope_info.set_parameter_count(parameter_count);
scope_info.set_context_local_count(context_local_count);
// Jump ahead to set the number of module variables so that we can use range
// DCHECKs in future steps.
if (scope->is_module_scope()) {
scope_info.set_module_variable_count(0, module_vars_count);
}
// Add context locals' names and info, module variables' names and info.
// Context locals are added using their index.
int context_local_base = index;
@ -255,18 +262,26 @@ Handle<ScopeInfo> ScopeInfo::Create(LocalIsolate* isolate, Zone* zone,
break;
}
case VariableLocation::MODULE: {
scope_info.set(module_var_entry + kModuleVariableNameOffset,
scope_info.set(module_var_entry +
TorqueGeneratedModuleVariableOffsets::kNameOffset /
kTaggedSize,
*var->name(), mode);
scope_info.set(module_var_entry + kModuleVariableIndexOffset,
Smi::FromInt(var->index()));
scope_info.set(
module_var_entry +
TorqueGeneratedModuleVariableOffsets::kIndexOffset /
kTaggedSize,
Smi::FromInt(var->index()));
uint32_t properties =
VariableModeBits::encode(var->mode()) |
InitFlagBit::encode(var->initialization_flag()) |
MaybeAssignedFlagBit::encode(var->maybe_assigned()) |
ParameterNumberBits::encode(ParameterNumberBits::kMax) |
IsStaticFlagBit::encode(var->is_static_flag());
scope_info.set(module_var_entry + kModuleVariablePropertiesOffset,
Smi::FromInt(properties));
scope_info.set(
module_var_entry +
TorqueGeneratedModuleVariableOffsets::kPropertiesOffset /
kTaggedSize,
Smi::FromInt(properties));
module_var_entry += kModuleVariableEntryLength;
break;
}
@ -371,7 +386,8 @@ Handle<ScopeInfo> ScopeInfo::Create(LocalIsolate* isolate, Zone* zone,
DCHECK_EQ(index, scope_info.ModuleInfoIndex());
scope_info.set(index++, *module_info);
DCHECK_EQ(index, scope_info.ModuleVariableCountIndex());
scope_info.set(index++, Smi::FromInt(module_vars_count));
// Module variable count was already written above.
index++;
DCHECK_EQ(index, scope_info.ModuleVariablesIndex());
// The variable entries themselves have already been written above.
index += kModuleVariableEntryLength * module_vars_count;
@ -556,6 +572,53 @@ Handle<ScopeInfo> ScopeInfo::CreateForBootstrapping(Isolate* isolate,
return scope_info;
}
Object ScopeInfo::get(int index) const {
IsolateRoot isolate = GetIsolateForPtrCompr(*this);
return get(isolate, index);
}
Object ScopeInfo::get(IsolateRoot isolate, int index) const {
DCHECK_LT(static_cast<unsigned>(index), static_cast<unsigned>(length()));
return TaggedField<Object>::Relaxed_Load(isolate, *this,
OffsetOfElementAt(index));
}
void ScopeInfo::set(int index, Smi value) {
DCHECK_LT(static_cast<unsigned>(index), static_cast<unsigned>(length()));
DCHECK(Object(value).IsSmi());
int offset = OffsetOfElementAt(index);
RELAXED_WRITE_FIELD(*this, offset, value);
}
void ScopeInfo::set(int index, Object value, WriteBarrierMode mode) {
DCHECK_LT(static_cast<unsigned>(index), static_cast<unsigned>(length()));
int offset = OffsetOfElementAt(index);
RELAXED_WRITE_FIELD(*this, offset, value);
CONDITIONAL_WRITE_BARRIER(*this, offset, value, mode);
}
void ScopeInfo::CopyElements(Isolate* isolate, int dst_index, ScopeInfo src,
int src_index, int len, WriteBarrierMode mode) {
if (len == 0) return;
DCHECK_LE(src_index + len, src.length());
DisallowGarbageCollection no_gc;
ObjectSlot dst_slot(RawFieldOfElementAt(dst_index));
ObjectSlot src_slot(src.RawFieldOfElementAt(src_index));
isolate->heap()->CopyRange(*this, dst_slot, src_slot, len, mode);
}
ObjectSlot ScopeInfo::RawFieldOfElementAt(int index) {
return RawField(OffsetOfElementAt(index));
}
int ScopeInfo::length() const {
// AllocatedSize() is generated by Torque and represents the size in bytes of
// the object, as computed from flags, context_local_count, and possibly
// module_variable_count. Convert that size into a number of slots.
return (AllocatedSize() - HeapObject::kHeaderSize) / kTaggedSize;
}
// static
Handle<ScopeInfo> ScopeInfo::RecreateWithBlockList(
Isolate* isolate, Handle<ScopeInfo> original, Handle<StringSet> blocklist) {
@ -836,6 +899,11 @@ bool ScopeInfo::VariableIsSynthetic(String name) {
name.Equals(name.GetReadOnlyRoots().this_string());
}
int ScopeInfo::ModuleVariableCount() const {
DCHECK_EQ(scope_type(), MODULE_SCOPE);
return module_variable_count(0);
}
int ScopeInfo::ModuleIndex(String name, VariableMode* mode,
InitializationFlag* init_flag,
MaybeAssignedFlag* maybe_assigned_flag) {
@ -847,15 +915,13 @@ int ScopeInfo::ModuleIndex(String name, VariableMode* mode,
DCHECK_NOT_NULL(maybe_assigned_flag);
int module_vars_count = module_variable_count(0);
int entry = ModuleVariablesIndex();
for (int i = 0; i < module_vars_count; ++i) {
String var_name = String::cast(get(entry + kModuleVariableNameOffset));
String var_name = module_variables_name(i);
if (name.Equals(var_name)) {
int index;
ModuleVariable(i, nullptr, &index, mode, init_flag, maybe_assigned_flag);
return index;
}
entry += kModuleVariableEntryLength;
}
return 0;
@ -875,11 +941,11 @@ int ScopeInfo::ContextSlotIndex(ScopeInfo scope_info, String name,
if (scope_info.IsEmpty()) return -1;
int start = scope_info.ContextLocalNamesIndex();
int end = start + scope_info.context_local_count();
for (int i = start; i < end; ++i) {
if (name != scope_info.get(i)) continue;
int var = i - start;
int context_local_count = scope_info.context_local_count();
for (int var = 0; var < context_local_count; ++var) {
if (name != scope_info.context_local_names(var)) {
continue;
}
*mode = scope_info.ContextLocalMode(var);
*is_static_flag = scope_info.ContextLocalIsStaticFlag(var);
*init_flag = scope_info.ContextLocalInitFlag(var);
@ -1147,3 +1213,5 @@ FixedArray SourceTextModuleInfo::RegularExportExportNames(int i) const {
} // namespace internal
} // namespace v8
#include "src/objects/object-macros-undef.h"

View File

@ -38,25 +38,11 @@ class Zone;
// This object provides quick access to scope info details for runtime
// routines.
class ScopeInfo : public TorqueGeneratedScopeInfo<ScopeInfo, FixedArrayBase> {
class ScopeInfo : public TorqueGeneratedScopeInfo<ScopeInfo, HeapObject> {
public:
DEFINE_TORQUE_GENERATED_SCOPE_FLAGS()
DECL_PRINTER(ScopeInfo)
DECL_VERIFIER(ScopeInfo)
// For refactoring, clone some FixedArray member functions. Eventually this
// class will stop pretending to be a FixedArray, but we're not quite there.
inline Object get(int index) const;
inline Object get(IsolateRoot isolate, int index) const;
// Setter that doesn't need write barrier.
inline void set(int index, Smi value);
// Setter with explicit barrier mode.
inline void set(int index, Object value,
WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
inline void CopyElements(Isolate* isolate, int dst_index, ScopeInfo src,
int src_index, int len, WriteBarrierMode mode);
inline ObjectSlot RawFieldOfElementAt(int index);
class BodyDescriptor;
@ -180,6 +166,8 @@ class ScopeInfo : public TorqueGeneratedScopeInfo<ScopeInfo, FixedArrayBase> {
InitializationFlag* init_flag,
MaybeAssignedFlag* maybe_assigned_flag);
int ModuleVariableCount() const;
// Lookup support for serialized scope info. Returns the function context
// slot index if the function name is present and context-allocated (named
// function expressions, only), otherwise returns a value < 0. The name
@ -272,17 +260,17 @@ class ScopeInfo : public TorqueGeneratedScopeInfo<ScopeInfo, FixedArrayBase> {
kVariablePartIndex
};
// Make sure the Fields enum agrees with Torque-generated offsets.
#define ASSERT_MATCHED_FIELD(name) \
STATIC_ASSERT(FixedArray::OffsetOfElementAt(k##name) == k##name##Offset);
FOR_EACH_SCOPE_INFO_NUMERIC_FIELD(ASSERT_MATCHED_FIELD)
#undef ASSERT_MATCHED_FIELD
STATIC_ASSERT(LanguageModeSize == 1 << LanguageModeBit::kSize);
STATIC_ASSERT(kLastFunctionKind <= FunctionKindBits::kMax);
bool IsEmpty() const;
// Returns the size in bytes for a ScopeInfo with |length| slots.
static constexpr int SizeFor(int length) { return OffsetOfElementAt(length); }
// Gives access to raw memory which stores the ScopeInfo's data.
inline ObjectSlot data_start();
private:
int ContextLocalNamesIndex() const;
int ContextLocalInfosIndex() const;
@ -299,10 +287,33 @@ class ScopeInfo : public TorqueGeneratedScopeInfo<ScopeInfo, FixedArrayBase> {
static bool NeedsPositionInfo(ScopeType type);
// Converts byte offsets within the object to FixedArray-style indices.
// Raw access by slot index. These functions rely on the fact that everything
// in ScopeInfo is tagged. Each slot is tagged-pointer sized. Slot 0 is
// 'flags', the first field defined by ScopeInfo after the standard-size
// HeapObject header.
V8_EXPORT_PRIVATE Object get(int index) const;
Object get(IsolateRoot isolate, int index) const;
// Setter that doesn't need write barrier.
void set(int index, Smi value);
// Setter with explicit barrier mode.
void set(int index, Object value,
WriteBarrierMode mode = UPDATE_WRITE_BARRIER);
void CopyElements(Isolate* isolate, int dst_index, ScopeInfo src,
int src_index, int len, WriteBarrierMode mode);
ObjectSlot RawFieldOfElementAt(int index);
// The number of tagged-pointer-sized slots in the ScopeInfo after its
// standard HeapObject header.
V8_EXPORT_PRIVATE int length() const;
// Conversions between offset (bytes from the beginning of the object) and
// index (number of tagged-pointer-sized slots starting after the standard
// HeapObject header).
static constexpr int OffsetOfElementAt(int index) {
return HeapObject::kHeaderSize + index * kTaggedSize;
}
static constexpr int ConvertOffsetToIndex(int offset) {
int index = (offset - FixedArray::kHeaderSize) / kTaggedSize;
CONSTEXPR_DCHECK(FixedArray::OffsetOfElementAt(index) == offset);
int index = (offset - HeapObject::kHeaderSize) / kTaggedSize;
CONSTEXPR_DCHECK(OffsetOfElementAt(index) == offset);
return index;
}
@ -322,8 +333,12 @@ class ScopeInfo : public TorqueGeneratedScopeInfo<ScopeInfo, FixedArrayBase> {
InitializationFlag* init_flag = nullptr,
MaybeAssignedFlag* maybe_assigned_flag = nullptr);
static const int kFunctionNameEntries = 2;
static const int kPositionInfoEntries = 2;
static const int kFunctionNameEntries =
TorqueGeneratedFunctionVariableInfoOffsets::kSize / kTaggedSize;
static const int kPositionInfoEntries =
TorqueGeneratedPositionInfoOffsets::kSize / kTaggedSize;
static const int kModuleVariableEntryLength =
TorqueGeneratedModuleVariableOffsets::kSize / kTaggedSize;
// Properties of variables.
DEFINE_TORQUE_GENERATED_VARIABLE_PROPERTIES()

View File

@ -99,7 +99,7 @@ struct ModuleVariable {
@generateCppClass
@generateBodyDescriptor
extern class ScopeInfo extends FixedArrayBase {
extern class ScopeInfo extends HeapObject {
const flags: SmiTagged<ScopeFlags>;
// The number of parameters. For non-function scopes this is 0.
@ -167,3 +167,17 @@ extern class ScopeInfo extends FixedArrayBase {
module_variables[flags.scope_type == ScopeType::MODULE_SCOPE ? module_variable_count[0] : 0]:
ModuleVariable;
}
// Returns the index of the named local in a ScopeInfo.
// Assumes that the given name is internalized; uses pointer comparisons.
@export
macro IndexOfLocalName(scopeInfo: ScopeInfo, name: Name):
intptr labels NotFound {
const count: intptr = Convert<intptr>(scopeInfo.context_local_count);
for (let i: intptr = 0; i < count; ++i) {
if (TaggedEqual(name, scopeInfo.context_local_names[i])) {
return i;
}
}
goto NotFound;
}

View File

@ -635,7 +635,7 @@ HeapEntry* V8HeapExplorer::AddEntry(HeapObject object) {
} else if (object.IsContext()) {
return AddEntry(object, HeapEntry::kObject, "system / Context");
} else if (object.IsFixedArray() || object.IsFixedDoubleArray() ||
object.IsByteArray() || object.IsScopeInfo()) {
object.IsByteArray()) {
return AddEntry(object, HeapEntry::kArray, "");
} else if (object.IsHeapNumber()) {
return AddEntry(object, HeapEntry::kHeapNumber, "number");

View File

@ -3912,9 +3912,9 @@ void CppClassGenerator::GenerateClass() {
const Field& last_field = type_->LastField();
std::string last_field_item_size =
std::get<1>(*SizeOf(last_field.name_and_type.type));
hdr_ << " inline int AllocatedSize();\n\n";
hdr_ << " inline int AllocatedSize() const;\n\n";
inl_ << "template <class D, class P>\n";
inl_ << "int " << gen_name_T_ << "::AllocatedSize() {\n";
inl_ << "int " << gen_name_T_ << "::AllocatedSize() const {\n";
inl_ << " auto slice = "
<< Callable::PrefixNameForCCOutput(
type_->GetSliceMacroName(last_field))
@ -3954,7 +3954,7 @@ void CppClassGenerator::GenerateClass() {
}
hdr_ << " return size;\n";
hdr_ << " }\n\n";
hdr_ << " V8_INLINE int32_t AllocatedSize() {\n";
hdr_ << " V8_INLINE int32_t AllocatedSize() const {\n";
hdr_ << " return SizeFor(";
first = true;
for (auto field : *index_fields) {

View File

@ -459,12 +459,13 @@ TEST(HeapSnapshotCodeObjects) {
// Verify that non-compiled function doesn't contain references to "x"
// literal, while compiled function does. The scope info is stored in
// FixedArray objects attached to the SharedFunctionInfo.
// ScopeInfo objects attached to the SharedFunctionInfo.
bool compiled_references_x = false, lazy_references_x = false;
for (int i = 0, count = compiled_sfi->GetChildrenCount(); i < count; ++i) {
const v8::HeapGraphEdge* prop = compiled_sfi->GetChild(i);
const v8::HeapGraphNode* node = prop->GetToNode();
if (node->GetType() == v8::HeapGraphNode::kArray) {
if (node->GetType() == v8::HeapGraphNode::kHidden &&
!strcmp("system / ScopeInfo", GetName(node))) {
if (HasString(env->GetIsolate(), node, "x")) {
compiled_references_x = true;
break;
@ -474,7 +475,8 @@ TEST(HeapSnapshotCodeObjects) {
for (int i = 0, count = lazy_sfi->GetChildrenCount(); i < count; ++i) {
const v8::HeapGraphEdge* prop = lazy_sfi->GetChild(i);
const v8::HeapGraphNode* node = prop->GetToNode();
if (node->GetType() == v8::HeapGraphNode::kArray) {
if (node->GetType() == v8::HeapGraphNode::kHidden &&
!strcmp("system / ScopeInfo", GetName(node))) {
if (HasString(env->GetIsolate(), node, "x")) {
lazy_references_x = true;
break;

View File

@ -95,48 +95,48 @@ INSTANCE_TYPES = {
131: "BYTECODE_ARRAY_TYPE",
132: "FIXED_DOUBLE_ARRAY_TYPE",
133: "INTERNAL_CLASS_WITH_SMI_ELEMENTS_TYPE",
134: "SCOPE_INFO_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",
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: "SCOPE_INFO_TYPE",
176: "SHARED_FUNCTION_INFO_TYPE",
177: "SMI_BOX_TYPE",
178: "SMI_PAIR_TYPE",
@ -233,16 +233,16 @@ INSTANCE_TYPES = {
# List of known V8 maps.
KNOWN_MAPS = {
("read_only_space", 0x02119): (171, "MetaMap"),
("read_only_space", 0x02119): (170, "MetaMap"),
("read_only_space", 0x02141): (67, "NullMap"),
("read_only_space", 0x02169): (153, "StrongDescriptorArrayMap"),
("read_only_space", 0x02191): (158, "WeakFixedArrayMap"),
("read_only_space", 0x02169): (152, "StrongDescriptorArrayMap"),
("read_only_space", 0x02191): (157, "WeakFixedArrayMap"),
("read_only_space", 0x021d1): (97, "EnumCacheMap"),
("read_only_space", 0x02205): (117, "FixedArrayMap"),
("read_only_space", 0x02251): (8, "OneByteInternalizedStringMap"),
("read_only_space", 0x0229d): (168, "FreeSpaceMap"),
("read_only_space", 0x022c5): (167, "OnePointerFillerMap"),
("read_only_space", 0x022ed): (167, "TwoPointerFillerMap"),
("read_only_space", 0x0229d): (167, "FreeSpaceMap"),
("read_only_space", 0x022c5): (166, "OnePointerFillerMap"),
("read_only_space", 0x022ed): (166, "TwoPointerFillerMap"),
("read_only_space", 0x02315): (67, "UninitializedMap"),
("read_only_space", 0x0238d): (67, "UndefinedMap"),
("read_only_space", 0x023d1): (66, "HeapNumberMap"),
@ -253,139 +253,139 @@ KNOWN_MAPS = {
("read_only_space", 0x02559): (118, "HashTableMap"),
("read_only_space", 0x02581): (64, "SymbolMap"),
("read_only_space", 0x025a9): (40, "OneByteStringMap"),
("read_only_space", 0x025d1): (134, "ScopeInfoMap"),
("read_only_space", 0x025d1): (175, "ScopeInfoMap"),
("read_only_space", 0x025f9): (176, "SharedFunctionInfoMap"),
("read_only_space", 0x02621): (161, "CodeMap"),
("read_only_space", 0x02649): (160, "CellMap"),
("read_only_space", 0x02671): (175, "GlobalPropertyCellMap"),
("read_only_space", 0x02621): (160, "CodeMap"),
("read_only_space", 0x02649): (159, "CellMap"),
("read_only_space", 0x02671): (174, "GlobalPropertyCellMap"),
("read_only_space", 0x02699): (70, "ForeignMap"),
("read_only_space", 0x026c1): (159, "TransitionArrayMap"),
("read_only_space", 0x026c1): (158, "TransitionArrayMap"),
("read_only_space", 0x026e9): (45, "ThinOneByteStringMap"),
("read_only_space", 0x02711): (166, "FeedbackVectorMap"),
("read_only_space", 0x0274d): (67, "ArgumentsMarkerMap"),
("read_only_space", 0x027ad): (67, "ExceptionMap"),
("read_only_space", 0x02809): (67, "TerminationExceptionMap"),
("read_only_space", 0x02871): (67, "OptimizedOutMap"),
("read_only_space", 0x028d1): (67, "StaleRegisterMap"),
("read_only_space", 0x02931): (129, "ScriptContextTableMap"),
("read_only_space", 0x02959): (127, "ClosureFeedbackCellArrayMap"),
("read_only_space", 0x02981): (165, "FeedbackMetadataArrayMap"),
("read_only_space", 0x029a9): (117, "ArrayListMap"),
("read_only_space", 0x029d1): (65, "BigIntMap"),
("read_only_space", 0x029f9): (128, "ObjectBoilerplateDescriptionMap"),
("read_only_space", 0x02a21): (131, "BytecodeArrayMap"),
("read_only_space", 0x02a49): (162, "CodeDataContainerMap"),
("read_only_space", 0x02a71): (163, "CoverageInfoMap"),
("read_only_space", 0x02a99): (132, "FixedDoubleArrayMap"),
("read_only_space", 0x02ac1): (120, "GlobalDictionaryMap"),
("read_only_space", 0x02ae9): (98, "ManyClosuresCellMap"),
("read_only_space", 0x02b11): (117, "ModuleInfoMap"),
("read_only_space", 0x02b39): (121, "NameDictionaryMap"),
("read_only_space", 0x02b61): (98, "NoClosuresCellMap"),
("read_only_space", 0x02b89): (122, "NumberDictionaryMap"),
("read_only_space", 0x02bb1): (98, "OneClosureCellMap"),
("read_only_space", 0x02bd9): (123, "OrderedHashMapMap"),
("read_only_space", 0x02c01): (124, "OrderedHashSetMap"),
("read_only_space", 0x02c29): (125, "OrderedNameDictionaryMap"),
("read_only_space", 0x02c51): (173, "PreparseDataMap"),
("read_only_space", 0x02c79): (174, "PropertyArrayMap"),
("read_only_space", 0x02ca1): (94, "SideEffectCallHandlerInfoMap"),
("read_only_space", 0x02cc9): (94, "SideEffectFreeCallHandlerInfoMap"),
("read_only_space", 0x02cf1): (94, "NextCallSideEffectFreeCallHandlerInfoMap"),
("read_only_space", 0x02d19): (126, "SimpleNumberDictionaryMap"),
("read_only_space", 0x02d41): (149, "SmallOrderedHashMapMap"),
("read_only_space", 0x02d69): (150, "SmallOrderedHashSetMap"),
("read_only_space", 0x02d91): (151, "SmallOrderedNameDictionaryMap"),
("read_only_space", 0x02db9): (154, "SourceTextModuleMap"),
("read_only_space", 0x02de1): (180, "SwissNameDictionaryMap"),
("read_only_space", 0x02e09): (155, "SyntheticModuleMap"),
("read_only_space", 0x02e31): (71, "WasmTypeInfoMap"),
("read_only_space", 0x02e59): (184, "WeakArrayListMap"),
("read_only_space", 0x02e81): (119, "EphemeronHashTableMap"),
("read_only_space", 0x02ea9): (164, "EmbedderDataArrayMap"),
("read_only_space", 0x02ed1): (185, "WeakCellMap"),
("read_only_space", 0x02ef9): (32, "StringMap"),
("read_only_space", 0x02f21): (41, "ConsOneByteStringMap"),
("read_only_space", 0x02f49): (33, "ConsStringMap"),
("read_only_space", 0x02f71): (37, "ThinStringMap"),
("read_only_space", 0x02f99): (35, "SlicedStringMap"),
("read_only_space", 0x02fc1): (43, "SlicedOneByteStringMap"),
("read_only_space", 0x02fe9): (34, "ExternalStringMap"),
("read_only_space", 0x03011): (42, "ExternalOneByteStringMap"),
("read_only_space", 0x03039): (50, "UncachedExternalStringMap"),
("read_only_space", 0x03061): (0, "InternalizedStringMap"),
("read_only_space", 0x03089): (2, "ExternalInternalizedStringMap"),
("read_only_space", 0x030b1): (10, "ExternalOneByteInternalizedStringMap"),
("read_only_space", 0x030d9): (18, "UncachedExternalInternalizedStringMap"),
("read_only_space", 0x03101): (26, "UncachedExternalOneByteInternalizedStringMap"),
("read_only_space", 0x03129): (58, "UncachedExternalOneByteStringMap"),
("read_only_space", 0x03151): (67, "SelfReferenceMarkerMap"),
("read_only_space", 0x03179): (67, "BasicBlockCountersMarkerMap"),
("read_only_space", 0x031bd): (87, "ArrayBoilerplateDescriptionMap"),
("read_only_space", 0x03291): (100, "InterceptorInfoMap"),
("read_only_space", 0x053e5): (72, "PromiseFulfillReactionJobTaskMap"),
("read_only_space", 0x0540d): (73, "PromiseRejectReactionJobTaskMap"),
("read_only_space", 0x05435): (74, "CallableTaskMap"),
("read_only_space", 0x0545d): (75, "CallbackTaskMap"),
("read_only_space", 0x05485): (76, "PromiseResolveThenableJobTaskMap"),
("read_only_space", 0x054ad): (79, "FunctionTemplateInfoMap"),
("read_only_space", 0x054d5): (80, "ObjectTemplateInfoMap"),
("read_only_space", 0x054fd): (81, "AccessCheckInfoMap"),
("read_only_space", 0x05525): (82, "AccessorInfoMap"),
("read_only_space", 0x0554d): (83, "AccessorPairMap"),
("read_only_space", 0x05575): (84, "AliasedArgumentsEntryMap"),
("read_only_space", 0x0559d): (85, "AllocationMementoMap"),
("read_only_space", 0x055c5): (88, "AsmWasmDataMap"),
("read_only_space", 0x055ed): (89, "AsyncGeneratorRequestMap"),
("read_only_space", 0x05615): (90, "BaselineDataMap"),
("read_only_space", 0x0563d): (91, "BreakPointMap"),
("read_only_space", 0x05665): (92, "BreakPointInfoMap"),
("read_only_space", 0x0568d): (93, "CachedTemplateObjectMap"),
("read_only_space", 0x056b5): (95, "ClassPositionsMap"),
("read_only_space", 0x056dd): (96, "DebugInfoMap"),
("read_only_space", 0x05705): (99, "FunctionTemplateRareDataMap"),
("read_only_space", 0x0572d): (101, "InterpreterDataMap"),
("read_only_space", 0x05755): (102, "ModuleRequestMap"),
("read_only_space", 0x0577d): (103, "PromiseCapabilityMap"),
("read_only_space", 0x057a5): (104, "PromiseReactionMap"),
("read_only_space", 0x057cd): (105, "PropertyDescriptorObjectMap"),
("read_only_space", 0x057f5): (106, "PrototypeInfoMap"),
("read_only_space", 0x0581d): (107, "RegExpBoilerplateDescriptionMap"),
("read_only_space", 0x05845): (108, "ScriptMap"),
("read_only_space", 0x0586d): (109, "SourceTextModuleInfoEntryMap"),
("read_only_space", 0x05895): (110, "StackFrameInfoMap"),
("read_only_space", 0x058bd): (111, "TemplateObjectDescriptionMap"),
("read_only_space", 0x058e5): (112, "Tuple2Map"),
("read_only_space", 0x0590d): (113, "WasmExceptionTagMap"),
("read_only_space", 0x05935): (114, "WasmExportedFunctionDataMap"),
("read_only_space", 0x0595d): (115, "WasmIndirectFunctionTableMap"),
("read_only_space", 0x05985): (116, "WasmJSFunctionDataMap"),
("read_only_space", 0x059ad): (135, "SloppyArgumentsElementsMap"),
("read_only_space", 0x059d5): (152, "DescriptorArrayMap"),
("read_only_space", 0x059fd): (157, "UncompiledDataWithoutPreparseDataMap"),
("read_only_space", 0x05a25): (156, "UncompiledDataWithPreparseDataMap"),
("read_only_space", 0x05a4d): (172, "OnHeapBasicBlockProfilerDataMap"),
("read_only_space", 0x05a75): (182, "WasmCapiFunctionDataMap"),
("read_only_space", 0x05a9d): (169, "InternalClassMap"),
("read_only_space", 0x05ac5): (178, "SmiPairMap"),
("read_only_space", 0x05aed): (177, "SmiBoxMap"),
("read_only_space", 0x05b15): (146, "ExportedSubClassBaseMap"),
("read_only_space", 0x05b3d): (147, "ExportedSubClassMap"),
("read_only_space", 0x05b65): (68, "AbstractInternalClassSubclass1Map"),
("read_only_space", 0x05b8d): (69, "AbstractInternalClassSubclass2Map"),
("read_only_space", 0x05bb5): (133, "InternalClassWithSmiElementsMap"),
("read_only_space", 0x05bdd): (170, "InternalClassWithStructElementsMap"),
("read_only_space", 0x05c05): (148, "ExportedSubClass2Map"),
("read_only_space", 0x05c2d): (179, "SortStateMap"),
("read_only_space", 0x05c55): (86, "AllocationSiteWithWeakNextMap"),
("read_only_space", 0x05c7d): (86, "AllocationSiteWithoutWeakNextMap"),
("read_only_space", 0x05ca5): (77, "LoadHandler1Map"),
("read_only_space", 0x05ccd): (77, "LoadHandler2Map"),
("read_only_space", 0x05cf5): (77, "LoadHandler3Map"),
("read_only_space", 0x05d1d): (78, "StoreHandler0Map"),
("read_only_space", 0x05d45): (78, "StoreHandler1Map"),
("read_only_space", 0x05d6d): (78, "StoreHandler2Map"),
("read_only_space", 0x05d95): (78, "StoreHandler3Map"),
("read_only_space", 0x02711): (165, "FeedbackVectorMap"),
("read_only_space", 0x02749): (67, "ArgumentsMarkerMap"),
("read_only_space", 0x027a9): (67, "ExceptionMap"),
("read_only_space", 0x02805): (67, "TerminationExceptionMap"),
("read_only_space", 0x0286d): (67, "OptimizedOutMap"),
("read_only_space", 0x028cd): (67, "StaleRegisterMap"),
("read_only_space", 0x0292d): (129, "ScriptContextTableMap"),
("read_only_space", 0x02955): (127, "ClosureFeedbackCellArrayMap"),
("read_only_space", 0x0297d): (164, "FeedbackMetadataArrayMap"),
("read_only_space", 0x029a5): (117, "ArrayListMap"),
("read_only_space", 0x029cd): (65, "BigIntMap"),
("read_only_space", 0x029f5): (128, "ObjectBoilerplateDescriptionMap"),
("read_only_space", 0x02a1d): (131, "BytecodeArrayMap"),
("read_only_space", 0x02a45): (161, "CodeDataContainerMap"),
("read_only_space", 0x02a6d): (162, "CoverageInfoMap"),
("read_only_space", 0x02a95): (132, "FixedDoubleArrayMap"),
("read_only_space", 0x02abd): (120, "GlobalDictionaryMap"),
("read_only_space", 0x02ae5): (98, "ManyClosuresCellMap"),
("read_only_space", 0x02b0d): (117, "ModuleInfoMap"),
("read_only_space", 0x02b35): (121, "NameDictionaryMap"),
("read_only_space", 0x02b5d): (98, "NoClosuresCellMap"),
("read_only_space", 0x02b85): (122, "NumberDictionaryMap"),
("read_only_space", 0x02bad): (98, "OneClosureCellMap"),
("read_only_space", 0x02bd5): (123, "OrderedHashMapMap"),
("read_only_space", 0x02bfd): (124, "OrderedHashSetMap"),
("read_only_space", 0x02c25): (125, "OrderedNameDictionaryMap"),
("read_only_space", 0x02c4d): (172, "PreparseDataMap"),
("read_only_space", 0x02c75): (173, "PropertyArrayMap"),
("read_only_space", 0x02c9d): (94, "SideEffectCallHandlerInfoMap"),
("read_only_space", 0x02cc5): (94, "SideEffectFreeCallHandlerInfoMap"),
("read_only_space", 0x02ced): (94, "NextCallSideEffectFreeCallHandlerInfoMap"),
("read_only_space", 0x02d15): (126, "SimpleNumberDictionaryMap"),
("read_only_space", 0x02d3d): (148, "SmallOrderedHashMapMap"),
("read_only_space", 0x02d65): (149, "SmallOrderedHashSetMap"),
("read_only_space", 0x02d8d): (150, "SmallOrderedNameDictionaryMap"),
("read_only_space", 0x02db5): (153, "SourceTextModuleMap"),
("read_only_space", 0x02ddd): (180, "SwissNameDictionaryMap"),
("read_only_space", 0x02e05): (154, "SyntheticModuleMap"),
("read_only_space", 0x02e2d): (71, "WasmTypeInfoMap"),
("read_only_space", 0x02e55): (184, "WeakArrayListMap"),
("read_only_space", 0x02e7d): (119, "EphemeronHashTableMap"),
("read_only_space", 0x02ea5): (163, "EmbedderDataArrayMap"),
("read_only_space", 0x02ecd): (185, "WeakCellMap"),
("read_only_space", 0x02ef5): (32, "StringMap"),
("read_only_space", 0x02f1d): (41, "ConsOneByteStringMap"),
("read_only_space", 0x02f45): (33, "ConsStringMap"),
("read_only_space", 0x02f6d): (37, "ThinStringMap"),
("read_only_space", 0x02f95): (35, "SlicedStringMap"),
("read_only_space", 0x02fbd): (43, "SlicedOneByteStringMap"),
("read_only_space", 0x02fe5): (34, "ExternalStringMap"),
("read_only_space", 0x0300d): (42, "ExternalOneByteStringMap"),
("read_only_space", 0x03035): (50, "UncachedExternalStringMap"),
("read_only_space", 0x0305d): (0, "InternalizedStringMap"),
("read_only_space", 0x03085): (2, "ExternalInternalizedStringMap"),
("read_only_space", 0x030ad): (10, "ExternalOneByteInternalizedStringMap"),
("read_only_space", 0x030d5): (18, "UncachedExternalInternalizedStringMap"),
("read_only_space", 0x030fd): (26, "UncachedExternalOneByteInternalizedStringMap"),
("read_only_space", 0x03125): (58, "UncachedExternalOneByteStringMap"),
("read_only_space", 0x0314d): (67, "SelfReferenceMarkerMap"),
("read_only_space", 0x03175): (67, "BasicBlockCountersMarkerMap"),
("read_only_space", 0x031b9): (87, "ArrayBoilerplateDescriptionMap"),
("read_only_space", 0x0328d): (100, "InterceptorInfoMap"),
("read_only_space", 0x053d5): (72, "PromiseFulfillReactionJobTaskMap"),
("read_only_space", 0x053fd): (73, "PromiseRejectReactionJobTaskMap"),
("read_only_space", 0x05425): (74, "CallableTaskMap"),
("read_only_space", 0x0544d): (75, "CallbackTaskMap"),
("read_only_space", 0x05475): (76, "PromiseResolveThenableJobTaskMap"),
("read_only_space", 0x0549d): (79, "FunctionTemplateInfoMap"),
("read_only_space", 0x054c5): (80, "ObjectTemplateInfoMap"),
("read_only_space", 0x054ed): (81, "AccessCheckInfoMap"),
("read_only_space", 0x05515): (82, "AccessorInfoMap"),
("read_only_space", 0x0553d): (83, "AccessorPairMap"),
("read_only_space", 0x05565): (84, "AliasedArgumentsEntryMap"),
("read_only_space", 0x0558d): (85, "AllocationMementoMap"),
("read_only_space", 0x055b5): (88, "AsmWasmDataMap"),
("read_only_space", 0x055dd): (89, "AsyncGeneratorRequestMap"),
("read_only_space", 0x05605): (90, "BaselineDataMap"),
("read_only_space", 0x0562d): (91, "BreakPointMap"),
("read_only_space", 0x05655): (92, "BreakPointInfoMap"),
("read_only_space", 0x0567d): (93, "CachedTemplateObjectMap"),
("read_only_space", 0x056a5): (95, "ClassPositionsMap"),
("read_only_space", 0x056cd): (96, "DebugInfoMap"),
("read_only_space", 0x056f5): (99, "FunctionTemplateRareDataMap"),
("read_only_space", 0x0571d): (101, "InterpreterDataMap"),
("read_only_space", 0x05745): (102, "ModuleRequestMap"),
("read_only_space", 0x0576d): (103, "PromiseCapabilityMap"),
("read_only_space", 0x05795): (104, "PromiseReactionMap"),
("read_only_space", 0x057bd): (105, "PropertyDescriptorObjectMap"),
("read_only_space", 0x057e5): (106, "PrototypeInfoMap"),
("read_only_space", 0x0580d): (107, "RegExpBoilerplateDescriptionMap"),
("read_only_space", 0x05835): (108, "ScriptMap"),
("read_only_space", 0x0585d): (109, "SourceTextModuleInfoEntryMap"),
("read_only_space", 0x05885): (110, "StackFrameInfoMap"),
("read_only_space", 0x058ad): (111, "TemplateObjectDescriptionMap"),
("read_only_space", 0x058d5): (112, "Tuple2Map"),
("read_only_space", 0x058fd): (113, "WasmExceptionTagMap"),
("read_only_space", 0x05925): (114, "WasmExportedFunctionDataMap"),
("read_only_space", 0x0594d): (115, "WasmIndirectFunctionTableMap"),
("read_only_space", 0x05975): (116, "WasmJSFunctionDataMap"),
("read_only_space", 0x0599d): (134, "SloppyArgumentsElementsMap"),
("read_only_space", 0x059c5): (151, "DescriptorArrayMap"),
("read_only_space", 0x059ed): (156, "UncompiledDataWithoutPreparseDataMap"),
("read_only_space", 0x05a15): (155, "UncompiledDataWithPreparseDataMap"),
("read_only_space", 0x05a3d): (171, "OnHeapBasicBlockProfilerDataMap"),
("read_only_space", 0x05a65): (182, "WasmCapiFunctionDataMap"),
("read_only_space", 0x05a8d): (168, "InternalClassMap"),
("read_only_space", 0x05ab5): (178, "SmiPairMap"),
("read_only_space", 0x05add): (177, "SmiBoxMap"),
("read_only_space", 0x05b05): (145, "ExportedSubClassBaseMap"),
("read_only_space", 0x05b2d): (146, "ExportedSubClassMap"),
("read_only_space", 0x05b55): (68, "AbstractInternalClassSubclass1Map"),
("read_only_space", 0x05b7d): (69, "AbstractInternalClassSubclass2Map"),
("read_only_space", 0x05ba5): (133, "InternalClassWithSmiElementsMap"),
("read_only_space", 0x05bcd): (169, "InternalClassWithStructElementsMap"),
("read_only_space", 0x05bf5): (147, "ExportedSubClass2Map"),
("read_only_space", 0x05c1d): (179, "SortStateMap"),
("read_only_space", 0x05c45): (86, "AllocationSiteWithWeakNextMap"),
("read_only_space", 0x05c6d): (86, "AllocationSiteWithoutWeakNextMap"),
("read_only_space", 0x05c95): (77, "LoadHandler1Map"),
("read_only_space", 0x05cbd): (77, "LoadHandler2Map"),
("read_only_space", 0x05ce5): (77, "LoadHandler3Map"),
("read_only_space", 0x05d0d): (78, "StoreHandler0Map"),
("read_only_space", 0x05d35): (78, "StoreHandler1Map"),
("read_only_space", 0x05d5d): (78, "StoreHandler2Map"),
("read_only_space", 0x05d85): (78, "StoreHandler3Map"),
("map_space", 0x02119): (1057, "ExternalMap"),
("map_space", 0x02141): (1098, "JSMessageObjectMap"),
}
@ -406,36 +406,36 @@ KNOWN_OBJECTS = {
("read_only_space", 0x024cd): "FalseValue",
("read_only_space", 0x024fd): "empty_string",
("read_only_space", 0x02739): "EmptyScopeInfo",
("read_only_space", 0x02775): "ArgumentsMarker",
("read_only_space", 0x027d5): "Exception",
("read_only_space", 0x02831): "TerminationException",
("read_only_space", 0x02899): "OptimizedOut",
("read_only_space", 0x028f9): "StaleRegister",
("read_only_space", 0x031a1): "EmptyPropertyArray",
("read_only_space", 0x031a9): "EmptyByteArray",
("read_only_space", 0x031b1): "EmptyObjectBoilerplateDescription",
("read_only_space", 0x031e5): "EmptyArrayBoilerplateDescription",
("read_only_space", 0x031f1): "EmptyClosureFeedbackCellArray",
("read_only_space", 0x031f9): "EmptySlowElementDictionary",
("read_only_space", 0x0321d): "EmptyOrderedHashMap",
("read_only_space", 0x03231): "EmptyOrderedHashSet",
("read_only_space", 0x03245): "EmptyFeedbackMetadata",
("read_only_space", 0x03251): "EmptyPropertyDictionary",
("read_only_space", 0x03279): "EmptyOrderedPropertyDictionary",
("read_only_space", 0x032b9): "NoOpInterceptorInfo",
("read_only_space", 0x032e1): "EmptyWeakArrayList",
("read_only_space", 0x032ed): "InfinityValue",
("read_only_space", 0x032f9): "MinusZeroValue",
("read_only_space", 0x03305): "MinusInfinityValue",
("read_only_space", 0x03311): "SelfReferenceMarker",
("read_only_space", 0x03351): "BasicBlockCountersMarker",
("read_only_space", 0x03395): "OffHeapTrampolineRelocationInfo",
("read_only_space", 0x033a1): "TrampolineTrivialCodeDataContainer",
("read_only_space", 0x033ad): "TrampolinePromiseRejectionCodeDataContainer",
("read_only_space", 0x033b9): "GlobalThisBindingScopeInfo",
("read_only_space", 0x033f1): "EmptyFunctionScopeInfo",
("read_only_space", 0x03419): "NativeScopeInfo",
("read_only_space", 0x03435): "HashSeed",
("read_only_space", 0x02771): "ArgumentsMarker",
("read_only_space", 0x027d1): "Exception",
("read_only_space", 0x0282d): "TerminationException",
("read_only_space", 0x02895): "OptimizedOut",
("read_only_space", 0x028f5): "StaleRegister",
("read_only_space", 0x0319d): "EmptyPropertyArray",
("read_only_space", 0x031a5): "EmptyByteArray",
("read_only_space", 0x031ad): "EmptyObjectBoilerplateDescription",
("read_only_space", 0x031e1): "EmptyArrayBoilerplateDescription",
("read_only_space", 0x031ed): "EmptyClosureFeedbackCellArray",
("read_only_space", 0x031f5): "EmptySlowElementDictionary",
("read_only_space", 0x03219): "EmptyOrderedHashMap",
("read_only_space", 0x0322d): "EmptyOrderedHashSet",
("read_only_space", 0x03241): "EmptyFeedbackMetadata",
("read_only_space", 0x0324d): "EmptyPropertyDictionary",
("read_only_space", 0x03275): "EmptyOrderedPropertyDictionary",
("read_only_space", 0x032b5): "NoOpInterceptorInfo",
("read_only_space", 0x032dd): "EmptyWeakArrayList",
("read_only_space", 0x032e9): "InfinityValue",
("read_only_space", 0x032f5): "MinusZeroValue",
("read_only_space", 0x03301): "MinusInfinityValue",
("read_only_space", 0x0330d): "SelfReferenceMarker",
("read_only_space", 0x0334d): "BasicBlockCountersMarker",
("read_only_space", 0x03391): "OffHeapTrampolineRelocationInfo",
("read_only_space", 0x0339d): "TrampolineTrivialCodeDataContainer",
("read_only_space", 0x033a9): "TrampolinePromiseRejectionCodeDataContainer",
("read_only_space", 0x033b5): "GlobalThisBindingScopeInfo",
("read_only_space", 0x033e9): "EmptyFunctionScopeInfo",
("read_only_space", 0x0340d): "NativeScopeInfo",
("read_only_space", 0x03425): "HashSeed",
("old_space", 0x02119): "ArgumentsIteratorAccessor",
("old_space", 0x0215d): "ArrayLengthAccessor",
("old_space", 0x021a1): "BoundFunctionLengthAccessor",