[torque] Use generated instance types, part 1
This change begins making use of the fact that Torque now knows about the relationship between classes and instance types, to replace a few repetitive lists: - Instance type checkers (single and range), defined in src/objects/instance-type.h - Verification dispatch in src/diagnostics/objects-debug.cc - Printer dispatch in src/diagnostics/objects-printer.cc - Postmortem object type detection in tools/debug_helper/get-object-properties.cc Torque is updated to generate four macro lists for the instance types, representing all of the classes separated in two dimensions: classes that correspond to a single instance type versus those that have a range, and classes that are fully defined in Torque (with fields and methods inside '{}') versus those that are only declared. The latter distinction is useful because fully-defined classes are guaranteed to correspond to real C++ classes, whereas only-declared classes are not. A few other changes were required to make the lists above work: - Renamed IsFiller to IsFreeSpaceOrFiller to better reflect what it does and avoid conflicts with the new macro-generated IsFiller method. This is the part I'm most worried about: I think the new name is an improvement for clarity and consistency, but I could imagine someone typing IsFiller out of habit and introducing a bug. If we'd prefer to keep the name IsFiller, my other idea is to rename FreeSpace to VariableSizeFiller and Filler to FixedSizeFiller. - Made Tuple3 extend from Struct, not Tuple2, because IsTuple2 is expected to check for only TUPLE2_TYPE and not include TUPLE3_TYPE. - Normalized the dispatched behavior for BigIntBase and HeapNumber. - Added a few new object printers. Bug: v8:7793 Change-Id: I5462bb105f8a314baa59bd6ab6ab6215df6f313c Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1860314 Commit-Queue: Seth Brenith <seth.brenith@microsoft.com> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Jakob Kummerow <jkummerow@chromium.org> Reviewed-by: Tobias Tebbi <tebbi@chromium.org> Reviewed-by: Dan Elphick <delphick@chromium.org> Reviewed-by: Ulan Degenbaev <ulan@chromium.org> Cr-Commit-Position: refs/heads/master@{#64597}
This commit is contained in:
parent
65fcf0df77
commit
91e6421ccb
@ -237,7 +237,9 @@ extern class Tuple2 extends Struct {
|
||||
@dirtyInstantiatedAbstractClass
|
||||
@generatePrint
|
||||
@generateCppClass
|
||||
extern class Tuple3 extends Tuple2 {
|
||||
extern class Tuple3 extends Struct {
|
||||
value1: Object;
|
||||
value2: Object;
|
||||
value3: Object;
|
||||
}
|
||||
|
||||
|
@ -6,10 +6,8 @@
|
||||
|
||||
// TODO(nicohartmann): Discuss whether types used by multiple builtins should be
|
||||
// in global namespace
|
||||
@noVerifier
|
||||
extern class BigIntBase extends PrimitiveHeapObject
|
||||
generates 'TNode<BigInt>' {
|
||||
}
|
||||
generates 'TNode<BigInt>' {}
|
||||
|
||||
type BigInt extends BigIntBase;
|
||||
|
||||
|
@ -106,6 +106,7 @@ inline bool NeedsBoundsCheck(CheckBounds check_bounds) {
|
||||
enum class StoreToObjectWriteBarrier { kNone, kMap, kFull };
|
||||
|
||||
class AccessCheckNeeded;
|
||||
class BigIntBase;
|
||||
class BigIntWrapper;
|
||||
class ClassBoilerplate;
|
||||
class BooleanWrapper;
|
||||
|
@ -156,28 +156,10 @@ void HeapObject::HeapObjectVerify(Isolate* isolate) {
|
||||
String::cast(*this).StringVerify(isolate);
|
||||
}
|
||||
break;
|
||||
case SYMBOL_TYPE:
|
||||
Symbol::cast(*this).SymbolVerify(isolate);
|
||||
break;
|
||||
case MAP_TYPE:
|
||||
Map::cast(*this).MapVerify(isolate);
|
||||
break;
|
||||
case HEAP_NUMBER_TYPE:
|
||||
CHECK(IsHeapNumber());
|
||||
break;
|
||||
case BIGINT_TYPE:
|
||||
BigInt::cast(*this).BigIntVerify(isolate);
|
||||
break;
|
||||
case CALL_HANDLER_INFO_TYPE:
|
||||
CallHandlerInfo::cast(*this).CallHandlerInfoVerify(isolate);
|
||||
break;
|
||||
case OBJECT_BOILERPLATE_DESCRIPTION_TYPE:
|
||||
ObjectBoilerplateDescription::cast(*this)
|
||||
.ObjectBoilerplateDescriptionVerify(isolate);
|
||||
break;
|
||||
case EMBEDDER_DATA_ARRAY_TYPE:
|
||||
EmbedderDataArray::cast(*this).EmbedderDataArrayVerify(isolate);
|
||||
break;
|
||||
// FixedArray types
|
||||
case CLOSURE_FEEDBACK_CELL_ARRAY_TYPE:
|
||||
case HASH_TABLE_TYPE:
|
||||
@ -212,46 +194,16 @@ void HeapObject::HeapObjectVerify(Isolate* isolate) {
|
||||
case WEAK_FIXED_ARRAY_TYPE:
|
||||
WeakFixedArray::cast(*this).WeakFixedArrayVerify(isolate);
|
||||
break;
|
||||
case WEAK_ARRAY_LIST_TYPE:
|
||||
WeakArrayList::cast(*this).WeakArrayListVerify(isolate);
|
||||
break;
|
||||
case FIXED_DOUBLE_ARRAY_TYPE:
|
||||
FixedDoubleArray::cast(*this).FixedDoubleArrayVerify(isolate);
|
||||
break;
|
||||
case FEEDBACK_METADATA_TYPE:
|
||||
FeedbackMetadata::cast(*this).FeedbackMetadataVerify(isolate);
|
||||
break;
|
||||
case BYTE_ARRAY_TYPE:
|
||||
ByteArray::cast(*this).ByteArrayVerify(isolate);
|
||||
break;
|
||||
case BYTECODE_ARRAY_TYPE:
|
||||
BytecodeArray::cast(*this).BytecodeArrayVerify(isolate);
|
||||
break;
|
||||
case DESCRIPTOR_ARRAY_TYPE:
|
||||
DescriptorArray::cast(*this).DescriptorArrayVerify(isolate);
|
||||
break;
|
||||
case TRANSITION_ARRAY_TYPE:
|
||||
TransitionArray::cast(*this).TransitionArrayVerify(isolate);
|
||||
break;
|
||||
case PROPERTY_ARRAY_TYPE:
|
||||
PropertyArray::cast(*this).PropertyArrayVerify(isolate);
|
||||
break;
|
||||
case FREE_SPACE_TYPE:
|
||||
FreeSpace::cast(*this).FreeSpaceVerify(isolate);
|
||||
break;
|
||||
case FEEDBACK_CELL_TYPE:
|
||||
FeedbackCell::cast(*this).FeedbackCellVerify(isolate);
|
||||
break;
|
||||
case FEEDBACK_VECTOR_TYPE:
|
||||
FeedbackVector::cast(*this).FeedbackVectorVerify(isolate);
|
||||
break;
|
||||
|
||||
case CODE_TYPE:
|
||||
Code::cast(*this).CodeVerify(isolate);
|
||||
break;
|
||||
case ODDBALL_TYPE:
|
||||
Oddball::cast(*this).OddballVerify(isolate);
|
||||
break;
|
||||
case JS_OBJECT_TYPE:
|
||||
case JS_ERROR_TYPE:
|
||||
case JS_API_OBJECT_TYPE:
|
||||
@ -259,72 +211,12 @@ void HeapObject::HeapObjectVerify(Isolate* isolate) {
|
||||
case JS_CONTEXT_EXTENSION_OBJECT_TYPE:
|
||||
JSObject::cast(*this).JSObjectVerify(isolate);
|
||||
break;
|
||||
case WASM_MODULE_OBJECT_TYPE:
|
||||
WasmModuleObject::cast(*this).WasmModuleObjectVerify(isolate);
|
||||
break;
|
||||
case WASM_TABLE_OBJECT_TYPE:
|
||||
WasmTableObject::cast(*this).WasmTableObjectVerify(isolate);
|
||||
break;
|
||||
case WASM_MEMORY_OBJECT_TYPE:
|
||||
WasmMemoryObject::cast(*this).WasmMemoryObjectVerify(isolate);
|
||||
break;
|
||||
case WASM_GLOBAL_OBJECT_TYPE:
|
||||
WasmGlobalObject::cast(*this).WasmGlobalObjectVerify(isolate);
|
||||
break;
|
||||
case WASM_EXCEPTION_OBJECT_TYPE:
|
||||
WasmExceptionObject::cast(*this).WasmExceptionObjectVerify(isolate);
|
||||
break;
|
||||
case WASM_INSTANCE_OBJECT_TYPE:
|
||||
WasmInstanceObject::cast(*this).WasmInstanceObjectVerify(isolate);
|
||||
break;
|
||||
case JS_ARGUMENTS_OBJECT_TYPE:
|
||||
JSArgumentsObject::cast(*this).JSArgumentsObjectVerify(isolate);
|
||||
break;
|
||||
case JS_GENERATOR_OBJECT_TYPE:
|
||||
JSGeneratorObject::cast(*this).JSGeneratorObjectVerify(isolate);
|
||||
break;
|
||||
case JS_ASYNC_FUNCTION_OBJECT_TYPE:
|
||||
JSAsyncFunctionObject::cast(*this).JSAsyncFunctionObjectVerify(isolate);
|
||||
break;
|
||||
case JS_ASYNC_GENERATOR_OBJECT_TYPE:
|
||||
JSAsyncGeneratorObject::cast(*this).JSAsyncGeneratorObjectVerify(isolate);
|
||||
break;
|
||||
case JS_PRIMITIVE_WRAPPER_TYPE:
|
||||
JSPrimitiveWrapper::cast(*this).JSPrimitiveWrapperVerify(isolate);
|
||||
break;
|
||||
case JS_DATE_TYPE:
|
||||
JSDate::cast(*this).JSDateVerify(isolate);
|
||||
break;
|
||||
case JS_BOUND_FUNCTION_TYPE:
|
||||
JSBoundFunction::cast(*this).JSBoundFunctionVerify(isolate);
|
||||
break;
|
||||
case JS_FUNCTION_TYPE:
|
||||
JSFunction::cast(*this).JSFunctionVerify(isolate);
|
||||
break;
|
||||
case JS_GLOBAL_PROXY_TYPE:
|
||||
JSGlobalProxy::cast(*this).JSGlobalProxyVerify(isolate);
|
||||
break;
|
||||
case JS_GLOBAL_OBJECT_TYPE:
|
||||
JSGlobalObject::cast(*this).JSGlobalObjectVerify(isolate);
|
||||
break;
|
||||
case CELL_TYPE:
|
||||
Cell::cast(*this).CellVerify(isolate);
|
||||
break;
|
||||
case PROPERTY_CELL_TYPE:
|
||||
PropertyCell::cast(*this).PropertyCellVerify(isolate);
|
||||
break;
|
||||
case JS_ARRAY_TYPE:
|
||||
JSArray::cast(*this).JSArrayVerify(isolate);
|
||||
break;
|
||||
case JS_MODULE_NAMESPACE_TYPE:
|
||||
JSModuleNamespace::cast(*this).JSModuleNamespaceVerify(isolate);
|
||||
break;
|
||||
case JS_SET_TYPE:
|
||||
JSSet::cast(*this).JSSetVerify(isolate);
|
||||
break;
|
||||
case JS_MAP_TYPE:
|
||||
JSMap::cast(*this).JSMapVerify(isolate);
|
||||
break;
|
||||
case JS_SET_KEY_VALUE_ITERATOR_TYPE:
|
||||
case JS_SET_VALUE_ITERATOR_TYPE:
|
||||
JSSetIterator::cast(*this).JSSetIteratorVerify(isolate);
|
||||
@ -334,78 +226,8 @@ void HeapObject::HeapObjectVerify(Isolate* isolate) {
|
||||
case JS_MAP_VALUE_ITERATOR_TYPE:
|
||||
JSMapIterator::cast(*this).JSMapIteratorVerify(isolate);
|
||||
break;
|
||||
case JS_ARRAY_ITERATOR_TYPE:
|
||||
JSArrayIterator::cast(*this).JSArrayIteratorVerify(isolate);
|
||||
break;
|
||||
case JS_STRING_ITERATOR_TYPE:
|
||||
JSStringIterator::cast(*this).JSStringIteratorVerify(isolate);
|
||||
break;
|
||||
case JS_ASYNC_FROM_SYNC_ITERATOR_TYPE:
|
||||
JSAsyncFromSyncIterator::cast(*this).JSAsyncFromSyncIteratorVerify(
|
||||
isolate);
|
||||
break;
|
||||
case WEAK_CELL_TYPE:
|
||||
WeakCell::cast(*this).WeakCellVerify(isolate);
|
||||
break;
|
||||
case JS_WEAK_REF_TYPE:
|
||||
JSWeakRef::cast(*this).JSWeakRefVerify(isolate);
|
||||
break;
|
||||
case JS_FINALIZATION_GROUP_TYPE:
|
||||
JSFinalizationGroup::cast(*this).JSFinalizationGroupVerify(isolate);
|
||||
break;
|
||||
case JS_FINALIZATION_GROUP_CLEANUP_ITERATOR_TYPE:
|
||||
JSFinalizationGroupCleanupIterator::cast(*this)
|
||||
.JSFinalizationGroupCleanupIteratorVerify(isolate);
|
||||
break;
|
||||
case JS_WEAK_MAP_TYPE:
|
||||
JSWeakMap::cast(*this).JSWeakMapVerify(isolate);
|
||||
break;
|
||||
case JS_WEAK_SET_TYPE:
|
||||
JSWeakSet::cast(*this).JSWeakSetVerify(isolate);
|
||||
break;
|
||||
case JS_PROMISE_TYPE:
|
||||
JSPromise::cast(*this).JSPromiseVerify(isolate);
|
||||
break;
|
||||
case JS_REG_EXP_TYPE:
|
||||
JSRegExp::cast(*this).JSRegExpVerify(isolate);
|
||||
break;
|
||||
case JS_REG_EXP_STRING_ITERATOR_TYPE:
|
||||
JSRegExpStringIterator::cast(*this).JSRegExpStringIteratorVerify(isolate);
|
||||
break;
|
||||
case FILLER_TYPE:
|
||||
break;
|
||||
case JS_PROXY_TYPE:
|
||||
JSProxy::cast(*this).JSProxyVerify(isolate);
|
||||
break;
|
||||
case FOREIGN_TYPE:
|
||||
Foreign::cast(*this).ForeignVerify(isolate);
|
||||
break;
|
||||
case PREPARSE_DATA_TYPE:
|
||||
PreparseData::cast(*this).PreparseDataVerify(isolate);
|
||||
break;
|
||||
case UNCOMPILED_DATA_WITHOUT_PREPARSE_DATA_TYPE:
|
||||
UncompiledDataWithoutPreparseData::cast(*this)
|
||||
.UncompiledDataWithoutPreparseDataVerify(isolate);
|
||||
break;
|
||||
case UNCOMPILED_DATA_WITH_PREPARSE_DATA_TYPE:
|
||||
UncompiledDataWithPreparseData::cast(*this)
|
||||
.UncompiledDataWithPreparseDataVerify(isolate);
|
||||
break;
|
||||
case SHARED_FUNCTION_INFO_TYPE:
|
||||
SharedFunctionInfo::cast(*this).SharedFunctionInfoVerify(isolate);
|
||||
break;
|
||||
case JS_MESSAGE_OBJECT_TYPE:
|
||||
JSMessageObject::cast(*this).JSMessageObjectVerify(isolate);
|
||||
break;
|
||||
case JS_ARRAY_BUFFER_TYPE:
|
||||
JSArrayBuffer::cast(*this).JSArrayBufferVerify(isolate);
|
||||
break;
|
||||
case JS_TYPED_ARRAY_TYPE:
|
||||
JSTypedArray::cast(*this).JSTypedArrayVerify(isolate);
|
||||
break;
|
||||
case JS_DATA_VIEW_TYPE:
|
||||
JSDataView::cast(*this).JSDataViewVerify(isolate);
|
||||
break;
|
||||
case SMALL_ORDERED_HASH_SET_TYPE:
|
||||
SmallOrderedHashSet::cast(*this).SmallOrderedHashSetVerify(isolate);
|
||||
break;
|
||||
@ -416,54 +238,18 @@ void HeapObject::HeapObjectVerify(Isolate* isolate) {
|
||||
SmallOrderedNameDictionary::cast(*this).SmallOrderedNameDictionaryVerify(
|
||||
isolate);
|
||||
break;
|
||||
case SOURCE_TEXT_MODULE_TYPE:
|
||||
SourceTextModule::cast(*this).SourceTextModuleVerify(isolate);
|
||||
break;
|
||||
case SYNTHETIC_MODULE_TYPE:
|
||||
SyntheticModule::cast(*this).SyntheticModuleVerify(isolate);
|
||||
break;
|
||||
case CODE_DATA_CONTAINER_TYPE:
|
||||
CodeDataContainer::cast(*this).CodeDataContainerVerify(isolate);
|
||||
break;
|
||||
#ifdef V8_INTL_SUPPORT
|
||||
case JS_V8_BREAK_ITERATOR_TYPE:
|
||||
JSV8BreakIterator::cast(*this).JSV8BreakIteratorVerify(isolate);
|
||||
break;
|
||||
case JS_COLLATOR_TYPE:
|
||||
JSCollator::cast(*this).JSCollatorVerify(isolate);
|
||||
break;
|
||||
case JS_DATE_TIME_FORMAT_TYPE:
|
||||
JSDateTimeFormat::cast(*this).JSDateTimeFormatVerify(isolate);
|
||||
break;
|
||||
case JS_LIST_FORMAT_TYPE:
|
||||
JSListFormat::cast(*this).JSListFormatVerify(isolate);
|
||||
break;
|
||||
case JS_LOCALE_TYPE:
|
||||
JSLocale::cast(*this).JSLocaleVerify(isolate);
|
||||
break;
|
||||
case JS_NUMBER_FORMAT_TYPE:
|
||||
JSNumberFormat::cast(*this).JSNumberFormatVerify(isolate);
|
||||
break;
|
||||
case JS_PLURAL_RULES_TYPE:
|
||||
JSPluralRules::cast(*this).JSPluralRulesVerify(isolate);
|
||||
break;
|
||||
case JS_RELATIVE_TIME_FORMAT_TYPE:
|
||||
JSRelativeTimeFormat::cast(*this).JSRelativeTimeFormatVerify(isolate);
|
||||
break;
|
||||
case JS_SEGMENT_ITERATOR_TYPE:
|
||||
JSSegmentIterator::cast(*this).JSSegmentIteratorVerify(isolate);
|
||||
break;
|
||||
case JS_SEGMENTER_TYPE:
|
||||
JSSegmenter::cast(*this).JSSegmenterVerify(isolate);
|
||||
break;
|
||||
#endif // V8_INTL_SUPPORT
|
||||
|
||||
#define MAKE_STRUCT_CASE(TYPE, Name, name) \
|
||||
#define MAKE_TORQUE_CASE(Name, TYPE) \
|
||||
case TYPE: \
|
||||
Name::cast(*this).Name##Verify(isolate); \
|
||||
break;
|
||||
STRUCT_LIST(MAKE_STRUCT_CASE)
|
||||
#undef MAKE_STRUCT_CASE
|
||||
// Every class that has its fields defined in a .tq file and corresponds
|
||||
// to exactly one InstanceType value is included in the following list.
|
||||
TORQUE_INSTANCE_CHECKERS_SINGLE_FULLY_DEFINED(MAKE_TORQUE_CASE)
|
||||
#undef MAKE_TORQUE_CASE
|
||||
|
||||
case ALLOCATION_SITE_TYPE:
|
||||
AllocationSite::cast(*this).AllocationSiteVerify(isolate);
|
||||
@ -513,6 +299,8 @@ void BytecodeArray::BytecodeArrayVerify(Isolate* isolate) {
|
||||
|
||||
USE_TORQUE_VERIFIER(FreeSpace)
|
||||
|
||||
USE_TORQUE_VERIFIER(HeapNumber)
|
||||
|
||||
void FeedbackVector::FeedbackVectorVerify(Isolate* isolate) {
|
||||
TorqueGeneratedClassVerifiers::FeedbackVectorVerify(*this, isolate);
|
||||
MaybeObject code = optimized_code_weak_or_smi();
|
||||
@ -1514,8 +1302,8 @@ void AsyncGeneratorRequest::AsyncGeneratorRequestVerify(Isolate* isolate) {
|
||||
next().ObjectVerify(isolate);
|
||||
}
|
||||
|
||||
void BigInt::BigIntVerify(Isolate* isolate) {
|
||||
CHECK(IsBigInt());
|
||||
void BigIntBase::BigIntBaseVerify(Isolate* isolate) {
|
||||
TorqueGeneratedClassVerifiers::BigIntBaseVerify(*this, isolate);
|
||||
CHECK_GE(length(), 0);
|
||||
CHECK_IMPLIES(is_zero(), !sign()); // There is no -0n.
|
||||
}
|
||||
|
@ -120,26 +120,6 @@ void HeapObject::HeapObjectPrint(std::ostream& os) { // NOLINT
|
||||
}
|
||||
|
||||
switch (instance_type) {
|
||||
case SYMBOL_TYPE:
|
||||
Symbol::cast(*this).SymbolPrint(os);
|
||||
break;
|
||||
case MAP_TYPE:
|
||||
Map::cast(*this).MapPrint(os);
|
||||
break;
|
||||
case HEAP_NUMBER_TYPE:
|
||||
HeapNumber::cast(*this).HeapNumberPrint(os);
|
||||
os << "\n";
|
||||
break;
|
||||
case BIGINT_TYPE:
|
||||
BigInt::cast(*this).BigIntPrint(os);
|
||||
os << "\n";
|
||||
break;
|
||||
case EMBEDDER_DATA_ARRAY_TYPE:
|
||||
EmbedderDataArray::cast(*this).EmbedderDataArrayPrint(os);
|
||||
break;
|
||||
case FIXED_DOUBLE_ARRAY_TYPE:
|
||||
FixedDoubleArray::cast(*this).FixedDoubleArrayPrint(os);
|
||||
break;
|
||||
case FIXED_ARRAY_TYPE:
|
||||
FixedArray::cast(*this).FixedArrayPrint(os);
|
||||
break;
|
||||
@ -180,33 +160,12 @@ void HeapObject::HeapObjectPrint(std::ostream& os) { // NOLINT
|
||||
ObjectBoilerplateDescription::cast(*this)
|
||||
.ObjectBoilerplateDescriptionPrint(os);
|
||||
break;
|
||||
case PROPERTY_ARRAY_TYPE:
|
||||
PropertyArray::cast(*this).PropertyArrayPrint(os);
|
||||
break;
|
||||
case BYTE_ARRAY_TYPE:
|
||||
ByteArray::cast(*this).ByteArrayPrint(os);
|
||||
break;
|
||||
case BYTECODE_ARRAY_TYPE:
|
||||
BytecodeArray::cast(*this).BytecodeArrayPrint(os);
|
||||
break;
|
||||
case DESCRIPTOR_ARRAY_TYPE:
|
||||
DescriptorArray::cast(*this).DescriptorArrayPrint(os);
|
||||
break;
|
||||
case TRANSITION_ARRAY_TYPE:
|
||||
TransitionArray::cast(*this).TransitionArrayPrint(os);
|
||||
break;
|
||||
case FEEDBACK_CELL_TYPE:
|
||||
FeedbackCell::cast(*this).FeedbackCellPrint(os);
|
||||
break;
|
||||
case CLOSURE_FEEDBACK_CELL_ARRAY_TYPE:
|
||||
ClosureFeedbackCellArray::cast(*this).ClosureFeedbackCellArrayPrint(os);
|
||||
break;
|
||||
case FEEDBACK_VECTOR_TYPE:
|
||||
FeedbackVector::cast(*this).FeedbackVectorPrint(os);
|
||||
break;
|
||||
case FREE_SPACE_TYPE:
|
||||
FreeSpace::cast(*this).FreeSpacePrint(os);
|
||||
break;
|
||||
|
||||
case FILLER_TYPE:
|
||||
os << "filler";
|
||||
@ -215,80 +174,21 @@ void HeapObject::HeapObjectPrint(std::ostream& os) { // NOLINT
|
||||
case JS_API_OBJECT_TYPE:
|
||||
case JS_SPECIAL_API_OBJECT_TYPE:
|
||||
case JS_CONTEXT_EXTENSION_OBJECT_TYPE:
|
||||
case JS_ARGUMENTS_OBJECT_TYPE:
|
||||
case JS_ERROR_TYPE:
|
||||
// TODO(titzer): debug printing for more wasm objects
|
||||
case WASM_EXCEPTION_OBJECT_TYPE:
|
||||
JSObject::cast(*this).JSObjectPrint(os);
|
||||
break;
|
||||
case WASM_MODULE_OBJECT_TYPE:
|
||||
WasmModuleObject::cast(*this).WasmModuleObjectPrint(os);
|
||||
break;
|
||||
case WASM_MEMORY_OBJECT_TYPE:
|
||||
WasmMemoryObject::cast(*this).WasmMemoryObjectPrint(os);
|
||||
break;
|
||||
case WASM_TABLE_OBJECT_TYPE:
|
||||
WasmTableObject::cast(*this).WasmTableObjectPrint(os);
|
||||
break;
|
||||
case WASM_GLOBAL_OBJECT_TYPE:
|
||||
WasmGlobalObject::cast(*this).WasmGlobalObjectPrint(os);
|
||||
break;
|
||||
case WASM_INSTANCE_OBJECT_TYPE:
|
||||
WasmInstanceObject::cast(*this).WasmInstanceObjectPrint(os);
|
||||
break;
|
||||
case JS_ASYNC_FUNCTION_OBJECT_TYPE:
|
||||
case JS_ASYNC_GENERATOR_OBJECT_TYPE:
|
||||
case JS_GENERATOR_OBJECT_TYPE:
|
||||
JSGeneratorObject::cast(*this).JSGeneratorObjectPrint(os);
|
||||
break;
|
||||
case JS_PROMISE_TYPE:
|
||||
JSPromise::cast(*this).JSPromisePrint(os);
|
||||
break;
|
||||
case JS_ARRAY_TYPE:
|
||||
JSArray::cast(*this).JSArrayPrint(os);
|
||||
break;
|
||||
case JS_REG_EXP_TYPE:
|
||||
JSRegExp::cast(*this).JSRegExpPrint(os);
|
||||
break;
|
||||
case JS_REG_EXP_STRING_ITERATOR_TYPE:
|
||||
JSRegExpStringIterator::cast(*this).JSRegExpStringIteratorPrint(os);
|
||||
break;
|
||||
case ODDBALL_TYPE:
|
||||
Oddball::cast(*this).to_string().Print(os);
|
||||
break;
|
||||
case JS_BOUND_FUNCTION_TYPE:
|
||||
JSBoundFunction::cast(*this).JSBoundFunctionPrint(os);
|
||||
break;
|
||||
case JS_FUNCTION_TYPE:
|
||||
JSFunction::cast(*this).JSFunctionPrint(os);
|
||||
break;
|
||||
case JS_GLOBAL_PROXY_TYPE:
|
||||
JSGlobalProxy::cast(*this).JSGlobalProxyPrint(os);
|
||||
break;
|
||||
case JS_GLOBAL_OBJECT_TYPE:
|
||||
JSGlobalObject::cast(*this).JSGlobalObjectPrint(os);
|
||||
break;
|
||||
case JS_PRIMITIVE_WRAPPER_TYPE:
|
||||
JSPrimitiveWrapper::cast(*this).JSPrimitiveWrapperPrint(os);
|
||||
break;
|
||||
case JS_DATE_TYPE:
|
||||
JSDate::cast(*this).JSDatePrint(os);
|
||||
break;
|
||||
case CODE_TYPE:
|
||||
Code::cast(*this).CodePrint(os);
|
||||
break;
|
||||
case CODE_DATA_CONTAINER_TYPE:
|
||||
CodeDataContainer::cast(*this).CodeDataContainerPrint(os);
|
||||
break;
|
||||
case JS_PROXY_TYPE:
|
||||
JSProxy::cast(*this).JSProxyPrint(os);
|
||||
break;
|
||||
case JS_SET_TYPE:
|
||||
JSSet::cast(*this).JSSetPrint(os);
|
||||
break;
|
||||
case JS_MAP_TYPE:
|
||||
JSMap::cast(*this).JSMapPrint(os);
|
||||
break;
|
||||
case JS_SET_KEY_VALUE_ITERATOR_TYPE:
|
||||
case JS_SET_VALUE_ITERATOR_TYPE:
|
||||
JSSetIterator::cast(*this).JSSetIteratorPrint(os);
|
||||
@ -298,107 +198,14 @@ void HeapObject::HeapObjectPrint(std::ostream& os) { // NOLINT
|
||||
case JS_MAP_VALUE_ITERATOR_TYPE:
|
||||
JSMapIterator::cast(*this).JSMapIteratorPrint(os);
|
||||
break;
|
||||
case WEAK_CELL_TYPE:
|
||||
WeakCell::cast(*this).WeakCellPrint(os);
|
||||
break;
|
||||
case JS_WEAK_REF_TYPE:
|
||||
JSWeakRef::cast(*this).JSWeakRefPrint(os);
|
||||
break;
|
||||
case JS_FINALIZATION_GROUP_TYPE:
|
||||
JSFinalizationGroup::cast(*this).JSFinalizationGroupPrint(os);
|
||||
break;
|
||||
case JS_FINALIZATION_GROUP_CLEANUP_ITERATOR_TYPE:
|
||||
JSFinalizationGroupCleanupIterator::cast(*this)
|
||||
.JSFinalizationGroupCleanupIteratorPrint(os);
|
||||
break;
|
||||
case JS_WEAK_MAP_TYPE:
|
||||
JSWeakMap::cast(*this).JSWeakMapPrint(os);
|
||||
break;
|
||||
case JS_WEAK_SET_TYPE:
|
||||
JSWeakSet::cast(*this).JSWeakSetPrint(os);
|
||||
break;
|
||||
case JS_MODULE_NAMESPACE_TYPE:
|
||||
JSModuleNamespace::cast(*this).JSModuleNamespacePrint(os);
|
||||
break;
|
||||
case FOREIGN_TYPE:
|
||||
Foreign::cast(*this).ForeignPrint(os);
|
||||
break;
|
||||
case CALL_HANDLER_INFO_TYPE:
|
||||
CallHandlerInfo::cast(*this).CallHandlerInfoPrint(os);
|
||||
break;
|
||||
case PREPARSE_DATA_TYPE:
|
||||
PreparseData::cast(*this).PreparseDataPrint(os);
|
||||
break;
|
||||
case UNCOMPILED_DATA_WITHOUT_PREPARSE_DATA_TYPE:
|
||||
UncompiledDataWithoutPreparseData::cast(*this)
|
||||
.UncompiledDataWithoutPreparseDataPrint(os);
|
||||
break;
|
||||
case UNCOMPILED_DATA_WITH_PREPARSE_DATA_TYPE:
|
||||
UncompiledDataWithPreparseData::cast(*this)
|
||||
.UncompiledDataWithPreparseDataPrint(os);
|
||||
break;
|
||||
case SHARED_FUNCTION_INFO_TYPE:
|
||||
SharedFunctionInfo::cast(*this).SharedFunctionInfoPrint(os);
|
||||
break;
|
||||
case JS_MESSAGE_OBJECT_TYPE:
|
||||
JSMessageObject::cast(*this).JSMessageObjectPrint(os);
|
||||
break;
|
||||
case CELL_TYPE:
|
||||
Cell::cast(*this).CellPrint(os);
|
||||
break;
|
||||
case PROPERTY_CELL_TYPE:
|
||||
PropertyCell::cast(*this).PropertyCellPrint(os);
|
||||
break;
|
||||
case JS_ARRAY_BUFFER_TYPE:
|
||||
JSArrayBuffer::cast(*this).JSArrayBufferPrint(os);
|
||||
break;
|
||||
case JS_ARRAY_ITERATOR_TYPE:
|
||||
JSArrayIterator::cast(*this).JSArrayIteratorPrint(os);
|
||||
break;
|
||||
case JS_TYPED_ARRAY_TYPE:
|
||||
JSTypedArray::cast(*this).JSTypedArrayPrint(os);
|
||||
break;
|
||||
case JS_DATA_VIEW_TYPE:
|
||||
JSDataView::cast(*this).JSDataViewPrint(os);
|
||||
break;
|
||||
#ifdef V8_INTL_SUPPORT
|
||||
case JS_V8_BREAK_ITERATOR_TYPE:
|
||||
JSV8BreakIterator::cast(*this).JSV8BreakIteratorPrint(os);
|
||||
break;
|
||||
case JS_COLLATOR_TYPE:
|
||||
JSCollator::cast(*this).JSCollatorPrint(os);
|
||||
break;
|
||||
case JS_DATE_TIME_FORMAT_TYPE:
|
||||
JSDateTimeFormat::cast(*this).JSDateTimeFormatPrint(os);
|
||||
break;
|
||||
case JS_LIST_FORMAT_TYPE:
|
||||
JSListFormat::cast(*this).JSListFormatPrint(os);
|
||||
break;
|
||||
case JS_LOCALE_TYPE:
|
||||
JSLocale::cast(*this).JSLocalePrint(os);
|
||||
break;
|
||||
case JS_NUMBER_FORMAT_TYPE:
|
||||
JSNumberFormat::cast(*this).JSNumberFormatPrint(os);
|
||||
break;
|
||||
case JS_PLURAL_RULES_TYPE:
|
||||
JSPluralRules::cast(*this).JSPluralRulesPrint(os);
|
||||
break;
|
||||
case JS_RELATIVE_TIME_FORMAT_TYPE:
|
||||
JSRelativeTimeFormat::cast(*this).JSRelativeTimeFormatPrint(os);
|
||||
break;
|
||||
case JS_SEGMENT_ITERATOR_TYPE:
|
||||
JSSegmentIterator::cast(*this).JSSegmentIteratorPrint(os);
|
||||
break;
|
||||
case JS_SEGMENTER_TYPE:
|
||||
JSSegmenter::cast(*this).JSSegmenterPrint(os);
|
||||
break;
|
||||
#endif // V8_INTL_SUPPORT
|
||||
#define MAKE_STRUCT_CASE(TYPE, Name, name) \
|
||||
case TYPE: \
|
||||
Name::cast(*this).Name##Print(os); \
|
||||
#define MAKE_TORQUE_CASE(Name, TYPE) \
|
||||
case TYPE: \
|
||||
Name::cast(*this).Name##Print(os); \
|
||||
break;
|
||||
STRUCT_LIST(MAKE_STRUCT_CASE)
|
||||
#undef MAKE_STRUCT_CASE
|
||||
// Every class that has its fields defined in a .tq file and corresponds
|
||||
// to exactly one InstanceType value is included in the following list.
|
||||
TORQUE_INSTANCE_CHECKERS_SINGLE_FULLY_DEFINED(MAKE_TORQUE_CASE)
|
||||
#undef MAKE_TORQUE_CASE
|
||||
|
||||
case ALLOCATION_SITE_TYPE:
|
||||
AllocationSite::cast(*this).AllocationSitePrint(os);
|
||||
@ -412,21 +219,12 @@ void HeapObject::HeapObjectPrint(std::ostream& os) { // NOLINT
|
||||
case SCOPE_INFO_TYPE:
|
||||
ScopeInfo::cast(*this).ScopeInfoPrint(os);
|
||||
break;
|
||||
case SOURCE_TEXT_MODULE_TYPE:
|
||||
SourceTextModule::cast(*this).SourceTextModulePrint(os);
|
||||
break;
|
||||
case SYNTHETIC_MODULE_TYPE:
|
||||
SyntheticModule::cast(*this).SyntheticModulePrint(os);
|
||||
break;
|
||||
case FEEDBACK_METADATA_TYPE:
|
||||
FeedbackMetadata::cast(*this).FeedbackMetadataPrint(os);
|
||||
break;
|
||||
case WEAK_FIXED_ARRAY_TYPE:
|
||||
WeakFixedArray::cast(*this).WeakFixedArrayPrint(os);
|
||||
break;
|
||||
case WEAK_ARRAY_LIST_TYPE:
|
||||
WeakArrayList::cast(*this).WeakArrayListPrint(os);
|
||||
break;
|
||||
case INTERNALIZED_STRING_TYPE:
|
||||
case EXTERNAL_INTERNALIZED_STRING_TYPE:
|
||||
case ONE_BYTE_INTERNALIZED_STRING_TYPE:
|
||||
@ -448,8 +246,6 @@ void HeapObject::HeapObjectPrint(std::ostream& os) { // NOLINT
|
||||
case SMALL_ORDERED_HASH_MAP_TYPE:
|
||||
case SMALL_ORDERED_HASH_SET_TYPE:
|
||||
case SMALL_ORDERED_NAME_DICTIONARY_TYPE:
|
||||
case JS_ASYNC_FROM_SYNC_ITERATOR_TYPE:
|
||||
case JS_STRING_ITERATOR_TYPE:
|
||||
// TODO(all): Handle these types too.
|
||||
os << "UNKNOWN TYPE " << map().instance_type();
|
||||
UNREACHABLE();
|
||||
@ -1195,6 +991,39 @@ void FeedbackNexus::Print(std::ostream& os) { // NOLINT
|
||||
}
|
||||
}
|
||||
|
||||
void Oddball::OddballPrint(std::ostream& os) { // NOLINT
|
||||
to_string().Print(os);
|
||||
}
|
||||
|
||||
void JSAsyncFunctionObject::JSAsyncFunctionObjectPrint(
|
||||
std::ostream& os) { // NOLINT
|
||||
JSGeneratorObjectPrint(os);
|
||||
}
|
||||
|
||||
void JSAsyncGeneratorObject::JSAsyncGeneratorObjectPrint(
|
||||
std::ostream& os) { // NOLINT
|
||||
JSGeneratorObjectPrint(os);
|
||||
}
|
||||
|
||||
void JSArgumentsObject::JSArgumentsObjectPrint(std::ostream& os) { // NOLINT
|
||||
JSObjectPrint(os);
|
||||
}
|
||||
|
||||
void JSStringIterator::JSStringIteratorPrint(std::ostream& os) { // NOLINT
|
||||
JSObjectPrintHeader(os, *this, "JSStringIterator");
|
||||
os << "\n - string: " << Brief(string());
|
||||
os << "\n - index: " << index();
|
||||
JSObjectPrintBody(os, *this);
|
||||
}
|
||||
|
||||
void JSAsyncFromSyncIterator::JSAsyncFromSyncIteratorPrint(
|
||||
std::ostream& os) { // NOLINT
|
||||
JSObjectPrintHeader(os, *this, "JSAsyncFromSyncIterator");
|
||||
os << "\n - sync_iterator: " << Brief(sync_iterator());
|
||||
os << "\n - next: " << Brief(next());
|
||||
JSObjectPrintBody(os, *this);
|
||||
}
|
||||
|
||||
void JSPrimitiveWrapper::JSPrimitiveWrapperPrint(std::ostream& os) { // NOLINT
|
||||
JSObjectPrintHeader(os, *this, "JSPrimitiveWrapper");
|
||||
os << "\n - value: " << Brief(value());
|
||||
@ -2464,9 +2293,14 @@ void TaggedImpl<kRefType, StorageType>::Print(std::ostream& os) {
|
||||
}
|
||||
}
|
||||
|
||||
void HeapNumber::HeapNumberPrint(std::ostream& os) {
|
||||
HeapNumberShortPrint(os);
|
||||
os << "\n";
|
||||
}
|
||||
|
||||
#endif // OBJECT_PRINT
|
||||
|
||||
void HeapNumber::HeapNumberPrint(std::ostream& os) { os << value(); }
|
||||
void HeapNumber::HeapNumberShortPrint(std::ostream& os) { os << value(); }
|
||||
|
||||
// TODO(cbruni): remove once the new maptracer is in place.
|
||||
void Name::NameShortPrint() {
|
||||
|
@ -4261,10 +4261,10 @@ class FixStaleLeftTrimmedHandlesVisitor : public RootVisitor {
|
||||
if (!(*p).IsHeapObject()) return;
|
||||
HeapObject current = HeapObject::cast(*p);
|
||||
const MapWord map_word = current.map_word();
|
||||
if (!map_word.IsForwardingAddress() && current.IsFiller()) {
|
||||
if (!map_word.IsForwardingAddress() && current.IsFreeSpaceOrFiller()) {
|
||||
#ifdef DEBUG
|
||||
// We need to find a FixedArrayBase map after walking the fillers.
|
||||
while (current.IsFiller()) {
|
||||
while (current.IsFreeSpaceOrFiller()) {
|
||||
Address next = current.ptr();
|
||||
if (current.map() == ReadOnlyRoots(heap_).one_pointer_filler_map()) {
|
||||
next += kTaggedSize;
|
||||
@ -5618,7 +5618,7 @@ class UnreachableObjectsFilter : public HeapObjectsFilter {
|
||||
}
|
||||
|
||||
bool SkipObject(HeapObject object) override {
|
||||
if (object.IsFiller()) return true;
|
||||
if (object.IsFreeSpaceOrFiller()) return true;
|
||||
MemoryChunk* chunk = MemoryChunk::FromHeapObject(object);
|
||||
if (reachable_.count(chunk) == 0) return true;
|
||||
return reachable_[chunk]->count(object) == 0;
|
||||
|
@ -551,7 +551,7 @@ void IncrementalMarking::UpdateMarkingWorklistAfterScavenge() {
|
||||
return false;
|
||||
}
|
||||
HeapObject dest = map_word.ToForwardingAddress();
|
||||
DCHECK_IMPLIES(marking_state()->IsWhite(obj), obj.IsFiller());
|
||||
DCHECK_IMPLIES(marking_state()->IsWhite(obj), obj.IsFreeSpaceOrFiller());
|
||||
*out = dest;
|
||||
return true;
|
||||
} else if (Heap::InToPage(obj)) {
|
||||
@ -579,7 +579,7 @@ void IncrementalMarking::UpdateMarkingWorklistAfterScavenge() {
|
||||
*out = obj;
|
||||
return true;
|
||||
}
|
||||
DCHECK_IMPLIES(marking_state()->IsWhite(obj), obj.IsFiller());
|
||||
DCHECK_IMPLIES(marking_state()->IsWhite(obj), obj.IsFreeSpaceOrFiller());
|
||||
// Skip one word filler objects that appear on the
|
||||
// stack when we perform in place array shift.
|
||||
if (obj.map() != filler_map) {
|
||||
@ -742,7 +742,7 @@ intptr_t IncrementalMarking::ProcessMarkingWorklist(
|
||||
if (obj.is_null()) break;
|
||||
// Left trimming may result in grey or black filler objects on the marking
|
||||
// worklist. Ignore these objects.
|
||||
if (obj.IsFiller()) {
|
||||
if (obj.IsFreeSpaceOrFiller()) {
|
||||
// Due to copying mark bits and the fact that grey and black have their
|
||||
// first bit set, one word fillers are always black.
|
||||
DCHECK_IMPLIES(
|
||||
|
@ -617,9 +617,9 @@ void LiveObjectRange<mode>::iterator::AdvanceToNextValidObject() {
|
||||
|
||||
// We found a live object.
|
||||
if (!object.is_null()) {
|
||||
// Do not use IsFiller() here. This may cause a data race for reading
|
||||
// out the instance type when a new map concurrently is written into
|
||||
// this object while iterating over the object.
|
||||
// Do not use IsFreeSpaceOrFiller() here. This may cause a data race for
|
||||
// reading out the instance type when a new map concurrently is written
|
||||
// into this object while iterating over the object.
|
||||
if (map == one_word_filler_map_ || map == two_word_filler_map_ ||
|
||||
map == free_space_map_) {
|
||||
// There are two reasons why we can get black or grey fillers:
|
||||
|
@ -284,7 +284,7 @@ void EvacuationVerifier::VerifyEvacuationOnPage(Address start, Address end) {
|
||||
Address current = start;
|
||||
while (current < end) {
|
||||
HeapObject object = HeapObject::FromAddress(current);
|
||||
if (!object.IsFiller()) object.Iterate(this);
|
||||
if (!object.IsFreeSpaceOrFiller()) object.Iterate(this);
|
||||
current += object.Size();
|
||||
}
|
||||
}
|
||||
@ -1744,7 +1744,7 @@ void MarkCompactCollector::ProcessMarkingWorklistInternal() {
|
||||
while (!(object = marking_worklist()->Pop()).is_null()) {
|
||||
// Left trimming may result in grey or black filler objects on the marking
|
||||
// worklist. Ignore these objects.
|
||||
if (object.IsFiller()) {
|
||||
if (object.IsFreeSpaceOrFiller()) {
|
||||
// Due to copying mark bits and the fact that grey and black have their
|
||||
// first bit set, one word fillers are always black.
|
||||
DCHECK_IMPLIES(
|
||||
@ -4856,7 +4856,7 @@ void MinorMarkCompactCollector::ProcessMarkingWorklist() {
|
||||
MarkingWorklist::View marking_worklist(worklist(), kMainMarker);
|
||||
HeapObject object;
|
||||
while (marking_worklist.Pop(&object)) {
|
||||
DCHECK(!object.IsFiller());
|
||||
DCHECK(!object.IsFreeSpaceOrFiller());
|
||||
DCHECK(object.IsHeapObject());
|
||||
DCHECK(heap()->Contains(object));
|
||||
DCHECK(non_atomic_marking_state()->IsGrey(object));
|
||||
|
@ -182,7 +182,7 @@ HeapObject ReadOnlyHeapObjectIterator::Next() {
|
||||
const int object_size = object.Size();
|
||||
current_addr_ += object_size;
|
||||
|
||||
if (object.IsFiller()) {
|
||||
if (object.IsFreeSpaceOrFiller()) {
|
||||
continue;
|
||||
}
|
||||
|
||||
|
@ -55,7 +55,7 @@ HeapObject SemiSpaceObjectIterator::Next() {
|
||||
}
|
||||
HeapObject object = HeapObject::FromAddress(current_);
|
||||
current_ += object.Size();
|
||||
if (!object.IsFiller()) {
|
||||
if (!object.IsFreeSpaceOrFiller()) {
|
||||
return object;
|
||||
}
|
||||
}
|
||||
@ -83,7 +83,7 @@ HeapObject PagedSpaceObjectIterator::FromCurrentPage() {
|
||||
const int obj_size = obj.Size();
|
||||
cur_addr_ += obj_size;
|
||||
DCHECK_LE(cur_addr_, cur_end_);
|
||||
if (!obj.IsFiller()) {
|
||||
if (!obj.IsFreeSpaceOrFiller()) {
|
||||
if (obj.IsCode()) {
|
||||
DCHECK_EQ(space_, space_->heap()->code_space());
|
||||
DCHECK_CODEOBJECT_SIZE(obj_size, space_);
|
||||
|
@ -1066,7 +1066,7 @@ Address SkipFillers(HeapObject filler, Address end) {
|
||||
Address addr = filler.address();
|
||||
while (addr < end) {
|
||||
filler = HeapObject::FromAddress(addr);
|
||||
CHECK(filler.IsFiller());
|
||||
CHECK(filler.IsFreeSpaceOrFiller());
|
||||
addr = filler.address() + filler.Size();
|
||||
}
|
||||
return addr;
|
||||
@ -1084,7 +1084,7 @@ size_t Page::ShrinkToHighWaterMark() {
|
||||
// or the area_end.
|
||||
HeapObject filler = HeapObject::FromAddress(HighWaterMark());
|
||||
if (filler.address() == area_end()) return 0;
|
||||
CHECK(filler.IsFiller());
|
||||
CHECK(filler.IsFreeSpaceOrFiller());
|
||||
// Ensure that no objects were allocated in [filler, area_end) region.
|
||||
DCHECK_EQ(area_end(), SkipFillers(filler, area_end()));
|
||||
// Ensure that no objects will be allocated on this page.
|
||||
@ -1107,7 +1107,7 @@ size_t Page::ShrinkToHighWaterMark() {
|
||||
heap()->memory_allocator()->PartialFreeMemory(
|
||||
this, address() + size() - unused, unused, area_end() - unused);
|
||||
if (filler.address() != area_end()) {
|
||||
CHECK(filler.IsFiller());
|
||||
CHECK(filler.IsFreeSpaceOrFiller());
|
||||
CHECK_EQ(filler.address() + filler.Size(), area_end());
|
||||
}
|
||||
}
|
||||
@ -2197,7 +2197,7 @@ void PagedSpace::VerifyCountersAfterSweeping() {
|
||||
PagedSpaceObjectIterator it(page);
|
||||
size_t real_allocated = 0;
|
||||
for (HeapObject object = it.Next(); !object.is_null(); object = it.Next()) {
|
||||
if (!object.IsFiller()) {
|
||||
if (!object.IsFreeSpaceOrFiller()) {
|
||||
real_allocated += object.Size();
|
||||
}
|
||||
}
|
||||
@ -3916,7 +3916,7 @@ void ReadOnlySpace::RepairFreeListsAfterDeserialization() {
|
||||
if (start < end - size) {
|
||||
// A region at the high watermark is already in free list.
|
||||
HeapObject filler = HeapObject::FromAddress(start);
|
||||
CHECK(filler.IsFiller());
|
||||
CHECK(filler.IsFreeSpaceOrFiller());
|
||||
start += filler.Size();
|
||||
}
|
||||
CHECK_EQ(size, static_cast<int>(end - start));
|
||||
|
@ -21,6 +21,7 @@ class JSArgumentsObject
|
||||
: public TorqueGeneratedJSArgumentsObject<JSArgumentsObject, JSObject> {
|
||||
public:
|
||||
DECL_VERIFIER(JSArgumentsObject)
|
||||
DECL_PRINTER(JSArgumentsObject)
|
||||
TQ_OBJECT_CONSTRUCTORS(JSArgumentsObject)
|
||||
};
|
||||
|
||||
|
@ -2695,7 +2695,7 @@ void MutableBigInt::set_64_bits(uint64_t bits) {
|
||||
}
|
||||
|
||||
#ifdef OBJECT_PRINT
|
||||
void BigInt::BigIntPrint(std::ostream& os) {
|
||||
void BigIntBase::BigIntBasePrint(std::ostream& os) {
|
||||
DisallowHeapAllocation no_gc;
|
||||
PrintHeader(os, "BigInt");
|
||||
int len = length();
|
||||
|
@ -41,10 +41,6 @@ class BigIntBase : public PrimitiveHeapObject {
|
||||
return LengthBits::decode(static_cast<uint32_t>(bitfield));
|
||||
}
|
||||
|
||||
static inline BigIntBase unchecked_cast(Object o) {
|
||||
return bit_cast<BigIntBase>(o);
|
||||
}
|
||||
|
||||
// The maximum kMaxLengthBits that the current implementation supports
|
||||
// would be kMaxInt - kSystemPointerSize * kBitsPerByte - 1.
|
||||
// Since we want a platform independent limit, choose a nice round number
|
||||
@ -76,6 +72,10 @@ class BigIntBase : public PrimitiveHeapObject {
|
||||
return FIELD_SIZE(kOptionalPaddingOffset) > 0;
|
||||
}
|
||||
|
||||
DECL_CAST(BigIntBase)
|
||||
DECL_VERIFIER(BigIntBase)
|
||||
DECL_PRINTER(BigIntBase)
|
||||
|
||||
private:
|
||||
friend class ::v8::internal::BigInt; // MSVC wants full namespace.
|
||||
friend class MutableBigInt;
|
||||
@ -102,9 +102,6 @@ class BigIntBase : public PrimitiveHeapObject {
|
||||
|
||||
bool is_zero() const { return length() == 0; }
|
||||
|
||||
// Only serves to make macros happy; other code should use IsBigInt.
|
||||
bool IsBigIntBase() const { return true; }
|
||||
|
||||
OBJECT_CONSTRUCTORS(BigIntBase, PrimitiveHeapObject);
|
||||
};
|
||||
|
||||
@ -217,8 +214,6 @@ class BigInt : public BigIntBase {
|
||||
void ToWordsArray64(int* sign_bit, int* words64_count, uint64_t* words);
|
||||
|
||||
DECL_CAST(BigInt)
|
||||
DECL_VERIFIER(BigInt)
|
||||
DECL_PRINTER(BigInt)
|
||||
void BigIntShortPrint(std::ostream& os);
|
||||
|
||||
inline static int SizeFor(int length) {
|
||||
|
@ -550,7 +550,7 @@ class ElementsAccessorBase : public InternalElementsAccessor {
|
||||
FixedArrayBase fixed_array_base = holder.elements();
|
||||
if (!fixed_array_base.IsHeapObject()) return;
|
||||
// Arrays that have been shifted in place can't be verified.
|
||||
if (fixed_array_base.IsFiller()) return;
|
||||
if (fixed_array_base.IsFreeSpaceOrFiller()) return;
|
||||
int length = 0;
|
||||
if (holder.IsJSArray()) {
|
||||
Object length_obj = JSArray::cast(holder).length();
|
||||
|
@ -57,7 +57,9 @@ class HeapNumber : public PrimitiveHeapObject {
|
||||
static const int kNonMantissaBitsInTopWord = 12;
|
||||
|
||||
DECL_CAST(HeapNumber)
|
||||
V8_EXPORT_PRIVATE void HeapNumberPrint(std::ostream& os);
|
||||
DECL_VERIFIER(HeapNumber)
|
||||
DECL_PRINTER(HeapNumber)
|
||||
V8_EXPORT_PRIVATE void HeapNumberShortPrint(std::ostream& os);
|
||||
|
||||
OBJECT_CONSTRUCTORS(HeapNumber, PrimitiveHeapObject);
|
||||
};
|
||||
|
@ -19,25 +19,43 @@ namespace InstanceTypeChecker {
|
||||
// Define type checkers for classes with single instance type.
|
||||
INSTANCE_TYPE_CHECKERS_SINGLE(INSTANCE_TYPE_CHECKER)
|
||||
|
||||
#define STRUCT_INSTANCE_TYPE_CHECKER(TYPE, Name, name) \
|
||||
INSTANCE_TYPE_CHECKER(Name, TYPE)
|
||||
STRUCT_LIST(STRUCT_INSTANCE_TYPE_CHECKER)
|
||||
#undef STRUCT_INSTANCE_TYPE_CHECKER
|
||||
// Checks if value is in range [lower_limit, higher_limit] using a single
|
||||
// branch. Assumes that the input instance type is valid.
|
||||
template <InstanceType lower_limit, InstanceType upper_limit>
|
||||
struct InstanceRangeChecker {
|
||||
static constexpr bool Check(InstanceType value) {
|
||||
return IsInRange(value, lower_limit, upper_limit);
|
||||
}
|
||||
};
|
||||
template <InstanceType upper_limit>
|
||||
struct InstanceRangeChecker<FIRST_TYPE, upper_limit> {
|
||||
static constexpr bool Check(InstanceType value) {
|
||||
#if V8_HAS_CXX14_CONSTEXPR
|
||||
DCHECK(value >= FIRST_TYPE);
|
||||
#endif
|
||||
return value <= upper_limit;
|
||||
}
|
||||
};
|
||||
template <InstanceType lower_limit>
|
||||
struct InstanceRangeChecker<lower_limit, LAST_TYPE> {
|
||||
static constexpr bool Check(InstanceType value) {
|
||||
#if V8_HAS_CXX14_CONSTEXPR
|
||||
DCHECK(value <= LAST_TYPE);
|
||||
#endif
|
||||
return value >= lower_limit;
|
||||
}
|
||||
};
|
||||
|
||||
// Define type checkers for classes with ranges of instance types.
|
||||
#define INSTANCE_TYPE_CHECKER_RANGE(type, first_instance_type, \
|
||||
last_instance_type) \
|
||||
V8_INLINE bool Is##type(InstanceType instance_type) { \
|
||||
return IsInRange(instance_type, first_instance_type, last_instance_type); \
|
||||
#define INSTANCE_TYPE_CHECKER_RANGE(type, first_instance_type, \
|
||||
last_instance_type) \
|
||||
V8_INLINE bool Is##type(InstanceType instance_type) { \
|
||||
return InstanceRangeChecker<first_instance_type, \
|
||||
last_instance_type>::Check(instance_type); \
|
||||
}
|
||||
INSTANCE_TYPE_CHECKERS_RANGE(INSTANCE_TYPE_CHECKER_RANGE)
|
||||
#undef INSTANCE_TYPE_CHECKER_RANGE
|
||||
|
||||
V8_INLINE bool IsFixedArrayBase(InstanceType instance_type) {
|
||||
return IsFixedArray(instance_type) || IsFixedDoubleArray(instance_type) ||
|
||||
IsByteArray(instance_type) || IsBytecodeArray(instance_type);
|
||||
}
|
||||
|
||||
V8_INLINE bool IsHeapObject(InstanceType instance_type) { return true; }
|
||||
|
||||
V8_INLINE bool IsInternalizedString(InstanceType instance_type) {
|
||||
@ -46,16 +64,6 @@ V8_INLINE bool IsInternalizedString(InstanceType instance_type) {
|
||||
(kStringTag | kInternalizedTag);
|
||||
}
|
||||
|
||||
V8_INLINE bool IsJSObject(InstanceType instance_type) {
|
||||
STATIC_ASSERT(LAST_TYPE == LAST_JS_OBJECT_TYPE);
|
||||
return instance_type >= FIRST_JS_OBJECT_TYPE;
|
||||
}
|
||||
|
||||
V8_INLINE bool IsJSReceiver(InstanceType instance_type) {
|
||||
STATIC_ASSERT(LAST_TYPE == LAST_JS_RECEIVER_TYPE);
|
||||
return instance_type >= FIRST_JS_RECEIVER_TYPE;
|
||||
}
|
||||
|
||||
} // namespace InstanceTypeChecker
|
||||
|
||||
// TODO(v8:7786): For instance types that have a single map instance on the
|
||||
|
@ -210,150 +210,25 @@ V8_EXPORT_PRIVATE std::ostream& operator<<(std::ostream& os,
|
||||
InstanceType instance_type);
|
||||
|
||||
// List of object types that have a single unique instance type.
|
||||
#define INSTANCE_TYPE_CHECKERS_SINGLE_BASE(V) \
|
||||
V(AllocationSite, ALLOCATION_SITE_TYPE) \
|
||||
V(BigInt, BIGINT_TYPE) \
|
||||
V(ObjectBoilerplateDescription, OBJECT_BOILERPLATE_DESCRIPTION_TYPE) \
|
||||
V(BreakPoint, TUPLE2_TYPE) \
|
||||
V(BreakPointInfo, TUPLE2_TYPE) \
|
||||
V(ByteArray, BYTE_ARRAY_TYPE) \
|
||||
V(BytecodeArray, BYTECODE_ARRAY_TYPE) \
|
||||
V(CallHandlerInfo, CALL_HANDLER_INFO_TYPE) \
|
||||
V(Cell, CELL_TYPE) \
|
||||
V(Code, CODE_TYPE) \
|
||||
V(CachedTemplateObject, TUPLE3_TYPE) \
|
||||
V(CodeDataContainer, CODE_DATA_CONTAINER_TYPE) \
|
||||
V(CoverageInfo, FIXED_ARRAY_TYPE) \
|
||||
V(ClosureFeedbackCellArray, CLOSURE_FEEDBACK_CELL_ARRAY_TYPE) \
|
||||
V(DescriptorArray, DESCRIPTOR_ARRAY_TYPE) \
|
||||
V(EmbedderDataArray, EMBEDDER_DATA_ARRAY_TYPE) \
|
||||
V(EphemeronHashTable, EPHEMERON_HASH_TABLE_TYPE) \
|
||||
V(FeedbackCell, FEEDBACK_CELL_TYPE) \
|
||||
V(FeedbackMetadata, FEEDBACK_METADATA_TYPE) \
|
||||
V(FeedbackVector, FEEDBACK_VECTOR_TYPE) \
|
||||
V(FixedArrayExact, FIXED_ARRAY_TYPE) \
|
||||
V(FixedDoubleArray, FIXED_DOUBLE_ARRAY_TYPE) \
|
||||
V(Foreign, FOREIGN_TYPE) \
|
||||
V(FreeSpace, FREE_SPACE_TYPE) \
|
||||
V(GlobalDictionary, GLOBAL_DICTIONARY_TYPE) \
|
||||
V(HeapNumber, HEAP_NUMBER_TYPE) \
|
||||
V(JSArgumentsObject, JS_ARGUMENTS_OBJECT_TYPE) \
|
||||
V(JSArgumentsObjectWithLength, JS_ARGUMENTS_OBJECT_TYPE) \
|
||||
V(JSArray, JS_ARRAY_TYPE) \
|
||||
V(JSArrayBuffer, JS_ARRAY_BUFFER_TYPE) \
|
||||
V(JSArrayIterator, JS_ARRAY_ITERATOR_TYPE) \
|
||||
V(JSAsyncFromSyncIterator, JS_ASYNC_FROM_SYNC_ITERATOR_TYPE) \
|
||||
V(JSAsyncFunctionObject, JS_ASYNC_FUNCTION_OBJECT_TYPE) \
|
||||
V(JSAsyncGeneratorObject, JS_ASYNC_GENERATOR_OBJECT_TYPE) \
|
||||
V(JSBoundFunction, JS_BOUND_FUNCTION_TYPE) \
|
||||
V(JSContextExtensionObject, JS_CONTEXT_EXTENSION_OBJECT_TYPE) \
|
||||
V(JSDataView, JS_DATA_VIEW_TYPE) \
|
||||
V(JSDate, JS_DATE_TYPE) \
|
||||
V(JSError, JS_ERROR_TYPE) \
|
||||
V(JSFinalizationGroup, JS_FINALIZATION_GROUP_TYPE) \
|
||||
V(JSFinalizationGroupCleanupIterator, \
|
||||
JS_FINALIZATION_GROUP_CLEANUP_ITERATOR_TYPE) \
|
||||
V(JSFunction, JS_FUNCTION_TYPE) \
|
||||
V(JSGlobalObject, JS_GLOBAL_OBJECT_TYPE) \
|
||||
V(JSGlobalProxy, JS_GLOBAL_PROXY_TYPE) \
|
||||
V(JSMap, JS_MAP_TYPE) \
|
||||
V(JSMessageObject, JS_MESSAGE_OBJECT_TYPE) \
|
||||
V(JSModuleNamespace, JS_MODULE_NAMESPACE_TYPE) \
|
||||
V(JSPrimitiveWrapper, JS_PRIMITIVE_WRAPPER_TYPE) \
|
||||
V(JSPromise, JS_PROMISE_TYPE) \
|
||||
V(JSProxy, JS_PROXY_TYPE) \
|
||||
V(JSRegExp, JS_REG_EXP_TYPE) \
|
||||
V(JSRegExpResult, JS_ARRAY_TYPE) \
|
||||
V(JSRegExpResultIndices, JS_ARRAY_TYPE) \
|
||||
V(JSRegExpStringIterator, JS_REG_EXP_STRING_ITERATOR_TYPE) \
|
||||
V(JSSet, JS_SET_TYPE) \
|
||||
V(JSStringIterator, JS_STRING_ITERATOR_TYPE) \
|
||||
V(JSTypedArray, JS_TYPED_ARRAY_TYPE) \
|
||||
V(JSWeakMap, JS_WEAK_MAP_TYPE) \
|
||||
V(JSWeakRef, JS_WEAK_REF_TYPE) \
|
||||
V(JSWeakSet, JS_WEAK_SET_TYPE) \
|
||||
V(LoadHandler, LOAD_HANDLER_TYPE) \
|
||||
V(Map, MAP_TYPE) \
|
||||
V(NameDictionary, NAME_DICTIONARY_TYPE) \
|
||||
V(NativeContext, NATIVE_CONTEXT_TYPE) \
|
||||
V(NumberDictionary, NUMBER_DICTIONARY_TYPE) \
|
||||
V(Oddball, ODDBALL_TYPE) \
|
||||
V(OrderedHashMap, ORDERED_HASH_MAP_TYPE) \
|
||||
V(OrderedHashSet, ORDERED_HASH_SET_TYPE) \
|
||||
V(OrderedNameDictionary, ORDERED_NAME_DICTIONARY_TYPE) \
|
||||
V(PreparseData, PREPARSE_DATA_TYPE) \
|
||||
V(PropertyArray, PROPERTY_ARRAY_TYPE) \
|
||||
V(PropertyCell, PROPERTY_CELL_TYPE) \
|
||||
V(PropertyDescriptorObject, FIXED_ARRAY_TYPE) \
|
||||
V(ScopeInfo, SCOPE_INFO_TYPE) \
|
||||
V(ScriptContextTable, SCRIPT_CONTEXT_TABLE_TYPE) \
|
||||
V(SharedFunctionInfo, SHARED_FUNCTION_INFO_TYPE) \
|
||||
V(SimpleNumberDictionary, SIMPLE_NUMBER_DICTIONARY_TYPE) \
|
||||
V(SmallOrderedHashMap, SMALL_ORDERED_HASH_MAP_TYPE) \
|
||||
V(SmallOrderedHashSet, SMALL_ORDERED_HASH_SET_TYPE) \
|
||||
V(SmallOrderedNameDictionary, SMALL_ORDERED_NAME_DICTIONARY_TYPE) \
|
||||
V(SourceTextModule, SOURCE_TEXT_MODULE_TYPE) \
|
||||
V(StoreHandler, STORE_HANDLER_TYPE) \
|
||||
V(StringTable, STRING_TABLE_TYPE) \
|
||||
V(Symbol, SYMBOL_TYPE) \
|
||||
V(SyntheticModule, SYNTHETIC_MODULE_TYPE) \
|
||||
V(TransitionArray, TRANSITION_ARRAY_TYPE) \
|
||||
V(UncompiledDataWithoutPreparseData, \
|
||||
UNCOMPILED_DATA_WITHOUT_PREPARSE_DATA_TYPE) \
|
||||
V(UncompiledDataWithPreparseData, UNCOMPILED_DATA_WITH_PREPARSE_DATA_TYPE) \
|
||||
V(WasmExceptionObject, WASM_EXCEPTION_OBJECT_TYPE) \
|
||||
V(WasmGlobalObject, WASM_GLOBAL_OBJECT_TYPE) \
|
||||
V(WasmInstanceObject, WASM_INSTANCE_OBJECT_TYPE) \
|
||||
V(WasmMemoryObject, WASM_MEMORY_OBJECT_TYPE) \
|
||||
V(WasmModuleObject, WASM_MODULE_OBJECT_TYPE) \
|
||||
V(WasmTableObject, WASM_TABLE_OBJECT_TYPE) \
|
||||
V(WeakArrayList, WEAK_ARRAY_LIST_TYPE) \
|
||||
V(WeakCell, WEAK_CELL_TYPE)
|
||||
#ifdef V8_INTL_SUPPORT
|
||||
#define INSTANCE_TYPE_CHECKERS_SINGLE(V) \
|
||||
TORQUE_INSTANCE_CHECKERS_SINGLE_FULLY_DEFINED(V) \
|
||||
TORQUE_INSTANCE_CHECKERS_SINGLE_ONLY_DECLARED(V) \
|
||||
V(BigInt, BIGINT_TYPE) \
|
||||
V(BreakPoint, TUPLE2_TYPE) \
|
||||
V(BreakPointInfo, TUPLE2_TYPE) \
|
||||
V(CachedTemplateObject, TUPLE3_TYPE) \
|
||||
V(CoverageInfo, FIXED_ARRAY_TYPE) \
|
||||
V(FixedArrayExact, FIXED_ARRAY_TYPE) \
|
||||
V(JSArgumentsObjectWithLength, JS_ARGUMENTS_OBJECT_TYPE) \
|
||||
V(JSRegExpResult, JS_ARRAY_TYPE) \
|
||||
V(JSRegExpResultIndices, JS_ARRAY_TYPE) \
|
||||
V(PropertyDescriptorObject, FIXED_ARRAY_TYPE)
|
||||
|
||||
#define INSTANCE_TYPE_CHECKERS_SINGLE(V) \
|
||||
INSTANCE_TYPE_CHECKERS_SINGLE_BASE(V) \
|
||||
V(JSV8BreakIterator, JS_V8_BREAK_ITERATOR_TYPE) \
|
||||
V(JSCollator, JS_COLLATOR_TYPE) \
|
||||
V(JSDateTimeFormat, JS_DATE_TIME_FORMAT_TYPE) \
|
||||
V(JSListFormat, JS_LIST_FORMAT_TYPE) \
|
||||
V(JSLocale, JS_LOCALE_TYPE) \
|
||||
V(JSNumberFormat, JS_NUMBER_FORMAT_TYPE) \
|
||||
V(JSPluralRules, JS_PLURAL_RULES_TYPE) \
|
||||
V(JSRelativeTimeFormat, JS_RELATIVE_TIME_FORMAT_TYPE) \
|
||||
V(JSSegmentIterator, JS_SEGMENT_ITERATOR_TYPE) \
|
||||
V(JSSegmenter, JS_SEGMENTER_TYPE)
|
||||
#define INSTANCE_TYPE_CHECKERS_RANGE(V) \
|
||||
TORQUE_INSTANCE_CHECKERS_RANGE_FULLY_DEFINED(V) \
|
||||
TORQUE_INSTANCE_CHECKERS_RANGE_ONLY_DECLARED(V)
|
||||
|
||||
#else
|
||||
|
||||
#define INSTANCE_TYPE_CHECKERS_SINGLE(V) INSTANCE_TYPE_CHECKERS_SINGLE_BASE(V)
|
||||
|
||||
#endif // V8_INTL_SUPPORT
|
||||
|
||||
#define INSTANCE_TYPE_CHECKERS_RANGE(V) \
|
||||
V(Context, FIRST_CONTEXT_TYPE, LAST_CONTEXT_TYPE) \
|
||||
V(FixedArray, FIRST_FIXED_ARRAY_TYPE, LAST_FIXED_ARRAY_TYPE) \
|
||||
V(HashTable, FIRST_HASH_TABLE_TYPE, LAST_HASH_TABLE_TYPE) \
|
||||
V(JSCustomElementsObject, FIRST_JS_CUSTOM_ELEMENTS_OBJECT_TYPE, \
|
||||
LAST_JS_CUSTOM_ELEMENTS_OBJECT_TYPE) \
|
||||
V(JSFunctionOrBoundFunction, FIRST_FUNCTION_TYPE, LAST_FUNCTION_TYPE) \
|
||||
V(JSMapIterator, FIRST_JS_MAP_ITERATOR_TYPE, LAST_JS_MAP_ITERATOR_TYPE) \
|
||||
V(JSSetIterator, FIRST_JS_SET_ITERATOR_TYPE, LAST_JS_SET_ITERATOR_TYPE) \
|
||||
V(JSSpecialObject, FIRST_JS_SPECIAL_OBJECT_TYPE, \
|
||||
LAST_JS_SPECIAL_OBJECT_TYPE) \
|
||||
V(Microtask, FIRST_MICROTASK_TYPE, LAST_MICROTASK_TYPE) \
|
||||
V(Module, FIRST_MODULE_TYPE, LAST_MODULE_TYPE) \
|
||||
V(Name, FIRST_NAME_TYPE, LAST_NAME_TYPE) \
|
||||
V(PrimitiveHeapObject, FIRST_PRIMITIVE_HEAP_OBJECT_TYPE, \
|
||||
LAST_PRIMITIVE_HEAP_OBJECT_TYPE) \
|
||||
V(String, FIRST_STRING_TYPE, LAST_STRING_TYPE) \
|
||||
V(WeakFixedArray, FIRST_WEAK_FIXED_ARRAY_TYPE, LAST_WEAK_FIXED_ARRAY_TYPE)
|
||||
|
||||
#define INSTANCE_TYPE_CHECKERS_CUSTOM(V) \
|
||||
V(FixedArrayBase) \
|
||||
V(InternalizedString) \
|
||||
V(JSObject) \
|
||||
V(JSReceiver)
|
||||
#define INSTANCE_TYPE_CHECKERS_CUSTOM(V) V(InternalizedString)
|
||||
|
||||
#define INSTANCE_TYPE_CHECKERS(V) \
|
||||
INSTANCE_TYPE_CHECKERS_SINGLE(V) \
|
||||
@ -371,11 +246,6 @@ INSTANCE_TYPE_CHECKERS(IS_TYPE_FUNCTION_DECL)
|
||||
TYPED_ARRAYS(TYPED_ARRAY_IS_TYPE_FUNCTION_DECL)
|
||||
#undef TYPED_ARRAY_IS_TYPE_FUNCTION_DECL
|
||||
|
||||
#define STRUCT_IS_TYPE_FUNCTION_DECL(NAME, Name, name) \
|
||||
IS_TYPE_FUNCTION_DECL(Name)
|
||||
STRUCT_LIST(STRUCT_IS_TYPE_FUNCTION_DECL)
|
||||
#undef STRUCT_IS_TYPE_FUNCTION_DECL
|
||||
|
||||
#undef IS_TYPE_FUNCTION_DECL
|
||||
} // namespace InstanceTypeChecker
|
||||
|
||||
|
@ -40,7 +40,7 @@ class InternalIndex {
|
||||
return static_cast<uint32_t>(entry_);
|
||||
}
|
||||
constexpr int as_int() const {
|
||||
#if V8_CAN_HAVE_DCHECK_IN_CONSTEXPR
|
||||
#if V8_HAS_CXX14_CONSTEXPR
|
||||
// TODO(clemensb): DCHECK_LE is not constexpr.
|
||||
DCHECK(entry_ <= std::numeric_limits<int>::max());
|
||||
#endif
|
||||
|
@ -55,6 +55,7 @@ class JSAsyncFunctionObject
|
||||
public:
|
||||
// Dispatched behavior.
|
||||
DECL_VERIFIER(JSAsyncFunctionObject)
|
||||
DECL_PRINTER(JSAsyncFunctionObject)
|
||||
|
||||
TQ_OBJECT_CONSTRUCTORS(JSAsyncFunctionObject)
|
||||
};
|
||||
@ -65,6 +66,7 @@ class JSAsyncGeneratorObject
|
||||
public:
|
||||
// Dispatched behavior.
|
||||
DECL_VERIFIER(JSAsyncGeneratorObject)
|
||||
DECL_PRINTER(JSAsyncGeneratorObject)
|
||||
|
||||
// [is_awaiting]
|
||||
// Whether or not the generator is currently awaiting.
|
||||
|
@ -80,6 +80,7 @@ class ZoneForwardList;
|
||||
V(AllocationSite) \
|
||||
V(ArrayList) \
|
||||
V(BigInt) \
|
||||
V(BigIntBase) \
|
||||
V(BigIntWrapper) \
|
||||
V(ObjectBoilerplateDescription) \
|
||||
V(Boolean) \
|
||||
@ -264,9 +265,26 @@ class ZoneForwardList;
|
||||
// Logical sub-types of heap objects that don't correspond to a C++ class but
|
||||
// represent some specialization in terms of additional constraints.
|
||||
#define HEAP_OBJECT_SPECIALIZED_TYPE_LIST(V) \
|
||||
V(AwaitContext) \
|
||||
V(BlockContext) \
|
||||
V(CallableApiObject) \
|
||||
V(CallableJSProxy) \
|
||||
V(NonNullForeign)
|
||||
V(CatchContext) \
|
||||
V(DebugEvaluateContext) \
|
||||
V(EvalContext) \
|
||||
V(FreeSpaceOrFiller) \
|
||||
V(FunctionContext) \
|
||||
V(JSApiObject) \
|
||||
V(JSMapKeyIterator) \
|
||||
V(JSMapKeyValueIterator) \
|
||||
V(JSMapValueIterator) \
|
||||
V(JSSetKeyValueIterator) \
|
||||
V(JSSetValueIterator) \
|
||||
V(JSSpecialApiObject) \
|
||||
V(ModuleContext) \
|
||||
V(NonNullForeign) \
|
||||
V(ScriptContext) \
|
||||
V(WithContext)
|
||||
|
||||
#define HEAP_OBJECT_TYPE_LIST(V) \
|
||||
HEAP_OBJECT_ORDINARY_TYPE_LIST(V) \
|
||||
|
@ -114,8 +114,6 @@ namespace internal {
|
||||
V(_, FUNCTION_TEMPLATE_INFO_TYPE, FunctionTemplateInfo, \
|
||||
function_template_info) \
|
||||
V(_, OBJECT_TEMPLATE_INFO_TYPE, ObjectTemplateInfo, object_template_info) \
|
||||
V(_, TUPLE2_TYPE, Tuple2, tuple2) \
|
||||
V(_, TUPLE3_TYPE, Tuple3, tuple3) \
|
||||
V(_, ACCESS_CHECK_INFO_TYPE, AccessCheckInfo, access_check_info) \
|
||||
V(_, ACCESSOR_INFO_TYPE, AccessorInfo, accessor_info) \
|
||||
V(_, ACCESSOR_PAIR_TYPE, AccessorPair, accessor_pair) \
|
||||
@ -146,6 +144,8 @@ namespace internal {
|
||||
V(_, STACK_TRACE_FRAME_TYPE, StackTraceFrame, stack_trace_frame) \
|
||||
V(_, TEMPLATE_OBJECT_DESCRIPTION_TYPE, TemplateObjectDescription, \
|
||||
template_object_description) \
|
||||
V(_, TUPLE2_TYPE, Tuple2, tuple2) \
|
||||
V(_, TUPLE3_TYPE, Tuple3, tuple3) \
|
||||
V(_, WASM_CAPI_FUNCTION_DATA_TYPE, WasmCapiFunctionData, \
|
||||
wasm_capi_function_data) \
|
||||
V(_, WASM_DEBUG_INFO_TYPE, WasmDebugInfo, wasm_debug_info) \
|
||||
|
@ -74,15 +74,6 @@ DEF_GETTER(HeapObject, IsJSSloppyArgumentsObject, bool) {
|
||||
return IsJSArgumentsObject(isolate);
|
||||
}
|
||||
|
||||
DEF_GETTER(HeapObject, IsJSGeneratorObject, bool) {
|
||||
return map(isolate).instance_type() == JS_GENERATOR_OBJECT_TYPE ||
|
||||
IsJSAsyncFunctionObject(isolate) || IsJSAsyncGeneratorObject(isolate);
|
||||
}
|
||||
|
||||
DEF_GETTER(HeapObject, IsDataHandler, bool) {
|
||||
return IsLoadHandler(isolate) || IsStoreHandler(isolate);
|
||||
}
|
||||
|
||||
DEF_GETTER(HeapObject, IsClassBoilerplate, bool) {
|
||||
return IsFixedArrayExact(isolate);
|
||||
}
|
||||
@ -192,10 +183,6 @@ DEF_GETTER(HeapObject, IsSourceTextModuleInfo, bool) {
|
||||
return map(isolate) == GetReadOnlyRoots(isolate).module_info_map();
|
||||
}
|
||||
|
||||
DEF_GETTER(HeapObject, IsTemplateInfo, bool) {
|
||||
return IsObjectTemplateInfo(isolate) || IsFunctionTemplateInfo(isolate);
|
||||
}
|
||||
|
||||
DEF_GETTER(HeapObject, IsConsString, bool) {
|
||||
if (!IsString(isolate)) return false;
|
||||
return StringShape(String::cast(*this).map(isolate)).IsCons();
|
||||
@ -268,24 +255,11 @@ bool Object::IsNumeric(Isolate* isolate) const {
|
||||
return IsNumber(isolate) || IsBigInt(isolate);
|
||||
}
|
||||
|
||||
DEF_GETTER(HeapObject, IsFiller, bool) {
|
||||
DEF_GETTER(HeapObject, IsFreeSpaceOrFiller, bool) {
|
||||
InstanceType instance_type = map(isolate).instance_type();
|
||||
return instance_type == FREE_SPACE_TYPE || instance_type == FILLER_TYPE;
|
||||
}
|
||||
|
||||
DEF_GETTER(HeapObject, IsJSWeakCollection, bool) {
|
||||
return IsJSWeakMap(isolate) || IsJSWeakSet(isolate);
|
||||
}
|
||||
|
||||
DEF_GETTER(HeapObject, IsJSCollection, bool) {
|
||||
return IsJSMap(isolate) || IsJSSet(isolate);
|
||||
}
|
||||
|
||||
DEF_GETTER(HeapObject, IsPromiseReactionJobTask, bool) {
|
||||
return IsPromiseFulfillReactionJobTask(isolate) ||
|
||||
IsPromiseRejectReactionJobTask(isolate);
|
||||
}
|
||||
|
||||
DEF_GETTER(HeapObject, IsFrameArray, bool) {
|
||||
return IsFixedArrayExact(isolate);
|
||||
}
|
||||
@ -391,14 +365,6 @@ DEF_GETTER(HeapObject, IsSymbolWrapper, bool) {
|
||||
JSPrimitiveWrapper::cast(*this).value().IsSymbol(isolate);
|
||||
}
|
||||
|
||||
DEF_GETTER(HeapObject, IsJSArrayBufferView, bool) {
|
||||
return IsJSDataView(isolate) || IsJSTypedArray(isolate);
|
||||
}
|
||||
|
||||
DEF_GETTER(HeapObject, IsJSCollectionIterator, bool) {
|
||||
return IsJSMapIterator(isolate) || IsJSSetIterator(isolate);
|
||||
}
|
||||
|
||||
DEF_GETTER(HeapObject, IsStringSet, bool) { return IsHashTable(isolate); }
|
||||
|
||||
DEF_GETTER(HeapObject, IsObjectHashSet, bool) { return IsHashTable(isolate); }
|
||||
@ -413,11 +379,6 @@ DEF_GETTER(HeapObject, IsObjectHashTable, bool) { return IsHashTable(isolate); }
|
||||
|
||||
DEF_GETTER(HeapObject, IsHashTableBase, bool) { return IsHashTable(isolate); }
|
||||
|
||||
DEF_GETTER(HeapObject, IsSmallOrderedHashTable, bool) {
|
||||
return IsSmallOrderedHashSet(isolate) || IsSmallOrderedHashMap(isolate) ||
|
||||
IsSmallOrderedNameDictionary(isolate);
|
||||
}
|
||||
|
||||
DEF_GETTER(HeapObject, IsWasmExceptionPackage, bool) {
|
||||
// It is not possible to check for the existence of certain properties on the
|
||||
// underlying {JSReceiver} here because that requires calling handlified code.
|
||||
@ -457,38 +418,13 @@ DEF_GETTER(HeapObject, IsAccessCheckNeeded, bool) {
|
||||
return map(isolate).is_access_check_needed();
|
||||
}
|
||||
|
||||
DEF_GETTER(HeapObject, IsStruct, bool) {
|
||||
switch (map(isolate).instance_type()) {
|
||||
#define MAKE_STRUCT_CASE(TYPE, Name, name) \
|
||||
case TYPE: \
|
||||
return true;
|
||||
STRUCT_LIST(MAKE_STRUCT_CASE)
|
||||
#undef MAKE_STRUCT_CASE
|
||||
// It is hard to include ALLOCATION_SITE_TYPE in STRUCT_LIST because
|
||||
// that macro is used for many things and AllocationSite needs a few
|
||||
// special cases.
|
||||
case ALLOCATION_SITE_TYPE:
|
||||
return true;
|
||||
case LOAD_HANDLER_TYPE:
|
||||
case STORE_HANDLER_TYPE:
|
||||
return true;
|
||||
case FEEDBACK_CELL_TYPE:
|
||||
return true;
|
||||
case CALL_HANDLER_INFO_TYPE:
|
||||
return true;
|
||||
default:
|
||||
return false;
|
||||
}
|
||||
}
|
||||
|
||||
#define MAKE_STRUCT_PREDICATE(NAME, Name, name) \
|
||||
bool Object::Is##Name() const { \
|
||||
return IsHeapObject() && HeapObject::cast(*this).Is##Name(); \
|
||||
} \
|
||||
bool Object::Is##Name(Isolate* isolate) const { \
|
||||
return IsHeapObject() && HeapObject::cast(*this).Is##Name(isolate); \
|
||||
} \
|
||||
TYPE_CHECKER(Name)
|
||||
}
|
||||
STRUCT_LIST(MAKE_STRUCT_PREDICATE)
|
||||
#undef MAKE_STRUCT_PREDICATE
|
||||
|
||||
@ -526,6 +462,7 @@ OBJECT_CONSTRUCTORS_IMPL(FreshlyAllocatedBigInt, BigIntBase)
|
||||
// ------------------------------------
|
||||
// Cast operations
|
||||
|
||||
CAST_ACCESSOR(BigIntBase)
|
||||
CAST_ACCESSOR(BigInt)
|
||||
CAST_ACCESSOR(RegExpMatchInfo)
|
||||
CAST_ACCESSOR(ScopeInfo)
|
||||
|
@ -2109,7 +2109,7 @@ void HeapObject::HeapObjectShortPrint(std::ostream& os) { // NOLINT
|
||||
}
|
||||
case HEAP_NUMBER_TYPE: {
|
||||
os << "<HeapNumber ";
|
||||
HeapNumber::cast(*this).HeapNumberPrint(os);
|
||||
HeapNumber::cast(*this).HeapNumberShortPrint(os);
|
||||
os << ">";
|
||||
break;
|
||||
}
|
||||
|
@ -57,6 +57,8 @@ class Oddball : public TorqueGeneratedOddball<Oddball, PrimitiveHeapObject> {
|
||||
STATIC_ASSERT(kNull == Internals::kNullOddballKind);
|
||||
STATIC_ASSERT(kUndefined == Internals::kUndefinedOddballKind);
|
||||
|
||||
DECL_PRINTER(Oddball)
|
||||
|
||||
TQ_OBJECT_CONSTRUCTORS(Oddball)
|
||||
};
|
||||
|
||||
|
@ -84,11 +84,6 @@ TQ_OBJECT_CONSTRUCTORS_IMPL(UncompiledData)
|
||||
TQ_OBJECT_CONSTRUCTORS_IMPL(UncompiledDataWithoutPreparseData)
|
||||
TQ_OBJECT_CONSTRUCTORS_IMPL(UncompiledDataWithPreparseData)
|
||||
|
||||
DEF_GETTER(HeapObject, IsUncompiledData, bool) {
|
||||
return IsUncompiledDataWithoutPreparseData(isolate) ||
|
||||
IsUncompiledDataWithPreparseData(isolate);
|
||||
}
|
||||
|
||||
OBJECT_CONSTRUCTORS_IMPL(InterpreterData, Struct)
|
||||
|
||||
CAST_ACCESSOR(InterpreterData)
|
||||
|
@ -34,7 +34,7 @@ class Tuple2 : public TorqueGeneratedTuple2<Tuple2, Struct> {
|
||||
TQ_OBJECT_CONSTRUCTORS(Tuple2)
|
||||
};
|
||||
|
||||
class Tuple3 : public TorqueGeneratedTuple3<Tuple3, Tuple2> {
|
||||
class Tuple3 : public TorqueGeneratedTuple3<Tuple3, Struct> {
|
||||
public:
|
||||
void BriefPrintDetails(std::ostream& os);
|
||||
|
||||
|
@ -110,7 +110,8 @@ HeapObject DeserializerAllocator::GetObject(SnapshotSpace space,
|
||||
if (next_alignment_ != kWordAligned) {
|
||||
int padding = Heap::GetFillToAlign(address, next_alignment_);
|
||||
next_alignment_ = kWordAligned;
|
||||
DCHECK(padding == 0 || HeapObject::FromAddress(address).IsFiller());
|
||||
DCHECK(padding == 0 ||
|
||||
HeapObject::FromAddress(address).IsFreeSpaceOrFiller());
|
||||
address += padding;
|
||||
}
|
||||
return HeapObject::FromAddress(address);
|
||||
|
@ -543,7 +543,7 @@ void Serializer::ObjectSerializer::Serialize() {
|
||||
}
|
||||
|
||||
// We don't expect fillers.
|
||||
DCHECK(!object_.IsFiller());
|
||||
DCHECK(!object_.IsFreeSpaceOrFiller());
|
||||
|
||||
if (object_.IsScript()) {
|
||||
// Clear cached line ends.
|
||||
|
@ -16,14 +16,12 @@ namespace {
|
||||
struct InstanceTypeTree {
|
||||
explicit InstanceTypeTree(const ClassType* type)
|
||||
: type(type),
|
||||
parent(nullptr),
|
||||
start(INT_MAX),
|
||||
end(INT_MIN),
|
||||
value(-1),
|
||||
num_values(0),
|
||||
num_own_values(0) {}
|
||||
const ClassType* type;
|
||||
InstanceTypeTree* parent;
|
||||
std::vector<std::unique_ptr<InstanceTypeTree>> children;
|
||||
int start; // Start of range for this and subclasses, or INT_MAX.
|
||||
int end; // End of range for this and subclasses, or INT_MIN.
|
||||
@ -290,8 +288,26 @@ std::unique_ptr<InstanceTypeTree> AssignInstanceTypes() {
|
||||
// ranges are indented for readability.
|
||||
// - values: This list is just instance type names, like V(ODDBALL_TYPE). It
|
||||
// does not include any FIRST_* and LAST_* range markers.
|
||||
// - fully_defined_single_instance_types: This list is pairs of class name and
|
||||
// instance type, for classes which have defined layouts and a single
|
||||
// corresponding instance type.
|
||||
// - only_declared_single_instance_types: This list is pairs of class name and
|
||||
// instance type, for classes which have a single corresponding instance type
|
||||
// and do not have layout definitions in Torque.
|
||||
// - fully_defined_range_instance_types: This list is triples of class name,
|
||||
// first instance type, and last instance type, for classes which have defined
|
||||
// layouts and multiple corresponding instance types.
|
||||
// - only_declared_range_instance_types: This list is triples of class name,
|
||||
// first instance type, and last instance type, for classes which have
|
||||
// multiple corresponding instance types and do not have layout definitions in
|
||||
// Torque.
|
||||
void PrintInstanceTypes(InstanceTypeTree* root, std::ostream& definitions,
|
||||
std::ostream& values, const std::string& indent) {
|
||||
std::ostream& values,
|
||||
std::ostream& fully_defined_single_instance_types,
|
||||
std::ostream& only_declared_single_instance_types,
|
||||
std::ostream& fully_defined_range_instance_types,
|
||||
std::ostream& only_declared_range_instance_types,
|
||||
const std::string& indent) {
|
||||
std::string type_name =
|
||||
CapifyStringWithUnderscores(root->type->name()) + "_TYPE";
|
||||
std::string inner_indent = indent;
|
||||
@ -305,16 +321,39 @@ void PrintInstanceTypes(InstanceTypeTree* root, std::ostream& definitions,
|
||||
definitions << inner_indent << "V(" << type_name << ", " << root->value
|
||||
<< ") \\\n";
|
||||
values << " V(" << type_name << ") \\\n";
|
||||
if (root->num_values == 1) {
|
||||
std::ostream& single_instance_types =
|
||||
root->type->HasUndefinedLayout()
|
||||
? only_declared_single_instance_types
|
||||
: fully_defined_single_instance_types;
|
||||
single_instance_types << " V(" << root->type->name() << ", " << type_name
|
||||
<< ") \\\n";
|
||||
}
|
||||
}
|
||||
for (auto& child : root->children) {
|
||||
PrintInstanceTypes(child.get(), definitions, values, inner_indent);
|
||||
PrintInstanceTypes(
|
||||
child.get(), definitions, values, fully_defined_single_instance_types,
|
||||
only_declared_single_instance_types, fully_defined_range_instance_types,
|
||||
only_declared_range_instance_types, inner_indent);
|
||||
}
|
||||
// We can't emit LAST_STRING_TYPE because it's not a valid flags combination.
|
||||
// So if the class type has multiple own values, which only happens when using
|
||||
// ANNOTATION_RESERVE_BITS_IN_INSTANCE_TYPE, then omit the end marker.
|
||||
if (root->num_values > 1 && root->num_own_values <= 1) {
|
||||
definitions << indent << "V(LAST_" << type_name << ", " << root->end
|
||||
<< ") \\\n";
|
||||
if (root->num_values > 1) {
|
||||
// We can't emit LAST_STRING_TYPE because it's not a valid flags
|
||||
// combination. So if the class type has multiple own values, which only
|
||||
// happens when using ANNOTATION_RESERVE_BITS_IN_INSTANCE_TYPE, then omit
|
||||
// the end marker.
|
||||
if (root->num_own_values <= 1) {
|
||||
definitions << indent << "V(LAST_" << type_name << ", " << root->end
|
||||
<< ") \\\n";
|
||||
}
|
||||
|
||||
// Only output the instance type range for things other than the root type.
|
||||
if (root->type->GetSuperClass() != nullptr) {
|
||||
std::ostream& range_instance_types =
|
||||
root->type->HasUndefinedLayout() ? only_declared_range_instance_types
|
||||
: fully_defined_range_instance_types;
|
||||
range_instance_types << " V(" << root->type->name() << ", FIRST_"
|
||||
<< type_name << ", LAST_" << type_name << ") \\\n";
|
||||
}
|
||||
}
|
||||
}
|
||||
|
||||
@ -332,16 +371,52 @@ void ImplementationVisitor::GenerateInstanceTypes(
|
||||
header << "#define TORQUE_ASSIGNED_INSTANCE_TYPES(V) \\\n";
|
||||
std::unique_ptr<InstanceTypeTree> instance_types = AssignInstanceTypes();
|
||||
std::stringstream values_list;
|
||||
std::stringstream fully_defined_single_instance_types;
|
||||
std::stringstream only_declared_single_instance_types;
|
||||
std::stringstream fully_defined_range_instance_types;
|
||||
std::stringstream only_declared_range_instance_types;
|
||||
if (instance_types != nullptr) {
|
||||
PrintInstanceTypes(instance_types.get(), header, values_list, " ");
|
||||
PrintInstanceTypes(instance_types.get(), header, values_list,
|
||||
fully_defined_single_instance_types,
|
||||
only_declared_single_instance_types,
|
||||
fully_defined_range_instance_types,
|
||||
only_declared_range_instance_types, " ");
|
||||
}
|
||||
header << "\n\n";
|
||||
header << "\n";
|
||||
|
||||
header << "// Instance types for all classes except for those that use "
|
||||
"InstanceType as flags.\n";
|
||||
header << "// Instance types for all classes except for those that use\n";
|
||||
header << "// InstanceType as flags.\n";
|
||||
header << "#define TORQUE_ASSIGNED_INSTANCE_TYPE_LIST(V) \\\n";
|
||||
header << values_list.str();
|
||||
header << "\n\n";
|
||||
header << "\n";
|
||||
|
||||
header << "// Pairs of (ClassName, INSTANCE_TYPE) for classes that have\n";
|
||||
header << "// full Torque definitions.\n";
|
||||
header << "#define TORQUE_INSTANCE_CHECKERS_SINGLE_FULLY_DEFINED(V) \\\n";
|
||||
header << fully_defined_single_instance_types.str();
|
||||
header << "\n";
|
||||
|
||||
header << "// Pairs of (ClassName, INSTANCE_TYPE) for classes that are\n";
|
||||
header << "// declared but not defined in Torque. These classes may\n";
|
||||
header << "// correspond with actual C++ classes, but they are not\n";
|
||||
header << "// guaranteed to.\n";
|
||||
header << "#define TORQUE_INSTANCE_CHECKERS_SINGLE_ONLY_DECLARED(V) \\\n";
|
||||
header << only_declared_single_instance_types.str();
|
||||
header << "\n";
|
||||
|
||||
header << "// Triples of (ClassName, FIRST_TYPE, LAST_TYPE) for classes\n";
|
||||
header << "// that have full Torque definitions.\n";
|
||||
header << "#define TORQUE_INSTANCE_CHECKERS_RANGE_FULLY_DEFINED(V) \\\n";
|
||||
header << fully_defined_range_instance_types.str();
|
||||
header << "\n";
|
||||
|
||||
header << "// Triples of (ClassName, FIRST_TYPE, LAST_TYPE) for classes\n";
|
||||
header << "// that are declared but not defined in Torque. These classes\n";
|
||||
header << "// may correspond with actual C++ classes, but they are not\n";
|
||||
header << "// guaranteed to.\n";
|
||||
header << "#define TORQUE_INSTANCE_CHECKERS_RANGE_ONLY_DECLARED(V) \\\n";
|
||||
header << only_declared_range_instance_types.str();
|
||||
header << "\n";
|
||||
|
||||
header << "// Instance types for Torque-internal classes.\n";
|
||||
header << "#define TORQUE_INTERNAL_INSTANCE_TYPES(V) \\\n";
|
||||
@ -352,7 +427,7 @@ void ImplementationVisitor::GenerateInstanceTypes(
|
||||
CapifyStringWithUnderscores(type->name()) + "_TYPE";
|
||||
header << " V(" << type_name << ") \\\n";
|
||||
}
|
||||
header << "\n\n";
|
||||
header << "\n";
|
||||
|
||||
header << "// Struct list entries for Torque-internal classes.\n";
|
||||
header << "#define TORQUE_STRUCT_LIST_GENERATOR(V, _) \\\n";
|
||||
|
@ -1677,7 +1677,8 @@ TEST(TestAlignedAllocation) {
|
||||
CHECK(IsAligned(obj.address(), kDoubleAlignment));
|
||||
// There is a filler object before the object.
|
||||
filler = HeapObject::FromAddress(start);
|
||||
CHECK(obj != filler && filler.IsFiller() && filler.Size() == kTaggedSize);
|
||||
CHECK(obj != filler && filler.IsFreeSpaceOrFiller() &&
|
||||
filler.Size() == kTaggedSize);
|
||||
CHECK_EQ(kTaggedSize + double_misalignment, *top_addr - start);
|
||||
|
||||
// Similarly for kDoubleUnaligned.
|
||||
@ -1690,7 +1691,8 @@ TEST(TestAlignedAllocation) {
|
||||
CHECK(IsAligned(obj.address() + kTaggedSize, kDoubleAlignment));
|
||||
// There is a filler object before the object.
|
||||
filler = HeapObject::FromAddress(start);
|
||||
CHECK(obj != filler && filler.IsFiller() && filler.Size() == kTaggedSize);
|
||||
CHECK(obj != filler && filler.IsFreeSpaceOrFiller() &&
|
||||
filler.Size() == kTaggedSize);
|
||||
CHECK_EQ(kTaggedSize + double_misalignment, *top_addr - start);
|
||||
}
|
||||
}
|
||||
@ -1751,9 +1753,10 @@ TEST(TestAlignedOverAllocation) {
|
||||
CHECK(IsAligned(obj.address(), kDoubleAlignment));
|
||||
filler = HeapObject::FromAddress(start);
|
||||
CHECK(obj != filler);
|
||||
CHECK(filler.IsFiller());
|
||||
CHECK(filler.IsFreeSpaceOrFiller());
|
||||
CHECK_EQ(kTaggedSize, filler.Size());
|
||||
CHECK(obj != filler && filler.IsFiller() && filler.Size() == kTaggedSize);
|
||||
CHECK(obj != filler && filler.IsFreeSpaceOrFiller() &&
|
||||
filler.Size() == kTaggedSize);
|
||||
|
||||
// Similarly for kDoubleUnaligned.
|
||||
start = AlignOldSpace(kDoubleUnaligned, 0);
|
||||
@ -1765,7 +1768,8 @@ TEST(TestAlignedOverAllocation) {
|
||||
obj = OldSpaceAllocateAligned(kTaggedSize, kDoubleUnaligned);
|
||||
CHECK(IsAligned(obj.address() + kTaggedSize, kDoubleAlignment));
|
||||
filler = HeapObject::FromAddress(start);
|
||||
CHECK(obj != filler && filler.IsFiller() && filler.Size() == kTaggedSize);
|
||||
CHECK(obj != filler && filler.IsFreeSpaceOrFiller() &&
|
||||
filler.Size() == kTaggedSize);
|
||||
}
|
||||
}
|
||||
|
||||
@ -5818,7 +5822,7 @@ TEST(ContinuousLeftTrimFixedArrayInBlackArea) {
|
||||
for (int i = 0; i < 10; i++) {
|
||||
trimmed = heap->LeftTrimFixedArray(previous, 1);
|
||||
HeapObject filler = HeapObject::FromAddress(previous.address());
|
||||
CHECK(filler.IsFiller());
|
||||
CHECK(filler.IsFreeSpaceOrFiller());
|
||||
CHECK(marking_state->IsBlack(trimmed));
|
||||
CHECK(marking_state->IsBlack(previous));
|
||||
previous = trimmed;
|
||||
@ -5829,7 +5833,7 @@ TEST(ContinuousLeftTrimFixedArrayInBlackArea) {
|
||||
for (int j = 0; j < 10; j++) {
|
||||
trimmed = heap->LeftTrimFixedArray(previous, i);
|
||||
HeapObject filler = HeapObject::FromAddress(previous.address());
|
||||
CHECK(filler.IsFiller());
|
||||
CHECK(filler.IsFreeSpaceOrFiller());
|
||||
CHECK(marking_state->IsBlack(trimmed));
|
||||
CHECK(marking_state->IsBlack(previous));
|
||||
previous = trimmed;
|
||||
@ -5885,7 +5889,7 @@ TEST(ContinuousRightTrimFixedArrayInBlackArea) {
|
||||
isolate->heap()->RightTrimFixedArray(*array, 1);
|
||||
|
||||
HeapObject filler = HeapObject::FromAddress(previous);
|
||||
CHECK(filler.IsFiller());
|
||||
CHECK(filler.IsFreeSpaceOrFiller());
|
||||
CHECK(marking_state->IsImpossible(filler));
|
||||
|
||||
// Trim 10 times by one, two, and three word.
|
||||
@ -5894,7 +5898,7 @@ TEST(ContinuousRightTrimFixedArrayInBlackArea) {
|
||||
previous -= kTaggedSize * i;
|
||||
isolate->heap()->RightTrimFixedArray(*array, i);
|
||||
HeapObject filler = HeapObject::FromAddress(previous);
|
||||
CHECK(filler.IsFiller());
|
||||
CHECK(filler.IsFreeSpaceOrFiller());
|
||||
CHECK(marking_state->IsWhite(filler));
|
||||
}
|
||||
}
|
||||
|
@ -30,7 +30,7 @@ static void VerifyIterable(v8::internal::Address base,
|
||||
size_t counter = 0;
|
||||
while (base < limit) {
|
||||
object = HeapObject::FromAddress(base);
|
||||
CHECK(object.IsFiller());
|
||||
CHECK(object.IsFreeSpaceOrFiller());
|
||||
CHECK_LT(counter, expected_size.size());
|
||||
CHECK_EQ(expected_size[counter], object.Size());
|
||||
base += object.Size();
|
||||
|
@ -371,7 +371,7 @@ TEST(Regress5829) {
|
||||
IncrementalMarking::MarkingState* marking_state = marking->marking_state();
|
||||
for (auto object_and_size :
|
||||
LiveObjectRange<kGreyObjects>(page, marking_state->bitmap(page))) {
|
||||
CHECK(!object_and_size.first.IsFiller());
|
||||
CHECK(!object_and_size.first.IsFreeSpaceOrFiller());
|
||||
}
|
||||
}
|
||||
|
||||
|
@ -295,7 +295,7 @@ void BytecodeExpectationsPrinter::PrintConstant(
|
||||
*stream << i::HeapObject::cast(*constant).map().instance_type();
|
||||
if (constant->IsHeapNumber()) {
|
||||
*stream << " [";
|
||||
i::HeapNumber::cast(*constant).HeapNumberPrint(*stream);
|
||||
i::HeapNumber::cast(*constant).HeapNumberShortPrint(*stream);
|
||||
*stream << "]";
|
||||
} else if (constant->IsString()) {
|
||||
*stream << " [";
|
||||
|
@ -16,130 +16,6 @@ namespace i = v8::internal;
|
||||
|
||||
namespace v8_debug_helper_internal {
|
||||
|
||||
// INSTANCE_TYPE_CHECKERS_SINGLE_BASE, trimmed down to only classes that have
|
||||
// layouts defined in .tq files (this subset relationship is asserted below).
|
||||
// For now, this is a hand-maintained list.
|
||||
// TODO(v8:7793): Torque should know enough about instance types to generate
|
||||
// this list.
|
||||
#define TQ_INSTANCE_TYPES_SINGLE_BASE(V) \
|
||||
V(ByteArray, BYTE_ARRAY_TYPE) \
|
||||
V(BytecodeArray, BYTECODE_ARRAY_TYPE) \
|
||||
V(CallHandlerInfo, CALL_HANDLER_INFO_TYPE) \
|
||||
V(Cell, CELL_TYPE) \
|
||||
V(DescriptorArray, DESCRIPTOR_ARRAY_TYPE) \
|
||||
V(EmbedderDataArray, EMBEDDER_DATA_ARRAY_TYPE) \
|
||||
V(FeedbackCell, FEEDBACK_CELL_TYPE) \
|
||||
V(FeedbackVector, FEEDBACK_VECTOR_TYPE) \
|
||||
V(FixedDoubleArray, FIXED_DOUBLE_ARRAY_TYPE) \
|
||||
V(Foreign, FOREIGN_TYPE) \
|
||||
V(FreeSpace, FREE_SPACE_TYPE) \
|
||||
V(HeapNumber, HEAP_NUMBER_TYPE) \
|
||||
V(JSArgumentsObject, JS_ARGUMENTS_OBJECT_TYPE) \
|
||||
V(JSArray, JS_ARRAY_TYPE) \
|
||||
V(JSArrayBuffer, JS_ARRAY_BUFFER_TYPE) \
|
||||
V(JSArrayIterator, JS_ARRAY_ITERATOR_TYPE) \
|
||||
V(JSAsyncFromSyncIterator, JS_ASYNC_FROM_SYNC_ITERATOR_TYPE) \
|
||||
V(JSAsyncFunctionObject, JS_ASYNC_FUNCTION_OBJECT_TYPE) \
|
||||
V(JSAsyncGeneratorObject, JS_ASYNC_GENERATOR_OBJECT_TYPE) \
|
||||
V(JSBoundFunction, JS_BOUND_FUNCTION_TYPE) \
|
||||
V(JSDataView, JS_DATA_VIEW_TYPE) \
|
||||
V(JSDate, JS_DATE_TYPE) \
|
||||
V(JSFunction, JS_FUNCTION_TYPE) \
|
||||
V(JSGlobalObject, JS_GLOBAL_OBJECT_TYPE) \
|
||||
V(JSGlobalProxy, JS_GLOBAL_PROXY_TYPE) \
|
||||
V(JSMap, JS_MAP_TYPE) \
|
||||
V(JSMessageObject, JS_MESSAGE_OBJECT_TYPE) \
|
||||
V(JSModuleNamespace, JS_MODULE_NAMESPACE_TYPE) \
|
||||
V(JSPromise, JS_PROMISE_TYPE) \
|
||||
V(JSProxy, JS_PROXY_TYPE) \
|
||||
V(JSRegExp, JS_REG_EXP_TYPE) \
|
||||
V(JSRegExpStringIterator, JS_REG_EXP_STRING_ITERATOR_TYPE) \
|
||||
V(JSSet, JS_SET_TYPE) \
|
||||
V(JSStringIterator, JS_STRING_ITERATOR_TYPE) \
|
||||
V(JSTypedArray, JS_TYPED_ARRAY_TYPE) \
|
||||
V(JSPrimitiveWrapper, JS_PRIMITIVE_WRAPPER_TYPE) \
|
||||
V(JSFinalizationGroup, JS_FINALIZATION_GROUP_TYPE) \
|
||||
V(JSFinalizationGroupCleanupIterator, \
|
||||
JS_FINALIZATION_GROUP_CLEANUP_ITERATOR_TYPE) \
|
||||
V(JSWeakMap, JS_WEAK_MAP_TYPE) \
|
||||
V(JSWeakRef, JS_WEAK_REF_TYPE) \
|
||||
V(JSWeakSet, JS_WEAK_SET_TYPE) \
|
||||
V(Map, MAP_TYPE) \
|
||||
V(Oddball, ODDBALL_TYPE) \
|
||||
V(PreparseData, PREPARSE_DATA_TYPE) \
|
||||
V(PropertyArray, PROPERTY_ARRAY_TYPE) \
|
||||
V(PropertyCell, PROPERTY_CELL_TYPE) \
|
||||
V(SharedFunctionInfo, SHARED_FUNCTION_INFO_TYPE) \
|
||||
V(Symbol, SYMBOL_TYPE) \
|
||||
V(WasmExceptionObject, WASM_EXCEPTION_OBJECT_TYPE) \
|
||||
V(WasmGlobalObject, WASM_GLOBAL_OBJECT_TYPE) \
|
||||
V(WasmMemoryObject, WASM_MEMORY_OBJECT_TYPE) \
|
||||
V(WasmModuleObject, WASM_MODULE_OBJECT_TYPE) \
|
||||
V(WasmTableObject, WASM_TABLE_OBJECT_TYPE) \
|
||||
V(WeakArrayList, WEAK_ARRAY_LIST_TYPE) \
|
||||
V(WeakCell, WEAK_CELL_TYPE)
|
||||
#ifdef V8_INTL_SUPPORT
|
||||
|
||||
#define TQ_INSTANCE_TYPES_SINGLE_NOSTRUCTS(V) \
|
||||
TQ_INSTANCE_TYPES_SINGLE_BASE(V) \
|
||||
V(JSV8BreakIterator, JS_V8_BREAK_ITERATOR_TYPE) \
|
||||
V(JSCollator, JS_COLLATOR_TYPE) \
|
||||
V(JSDateTimeFormat, JS_DATE_TIME_FORMAT_TYPE) \
|
||||
V(JSListFormat, JS_LIST_FORMAT_TYPE) \
|
||||
V(JSLocale, JS_LOCALE_TYPE) \
|
||||
V(JSNumberFormat, JS_NUMBER_FORMAT_TYPE) \
|
||||
V(JSPluralRules, JS_PLURAL_RULES_TYPE) \
|
||||
V(JSRelativeTimeFormat, JS_RELATIVE_TIME_FORMAT_TYPE) \
|
||||
V(JSSegmentIterator, JS_SEGMENT_ITERATOR_TYPE) \
|
||||
V(JSSegmenter, JS_SEGMENTER_TYPE)
|
||||
|
||||
#else
|
||||
|
||||
#define TQ_INSTANCE_TYPES_SINGLE_NOSTRUCTS(V) TQ_INSTANCE_TYPES_SINGLE_BASE(V)
|
||||
|
||||
#endif // V8_INTL_SUPPORT
|
||||
|
||||
// Used in the static assertion below.
|
||||
enum class InstanceTypeCheckersSingle {
|
||||
#define ENUM_VALUE(ClassName, INSTANCE_TYPE) k##ClassName = i::INSTANCE_TYPE,
|
||||
INSTANCE_TYPE_CHECKERS_SINGLE(ENUM_VALUE)
|
||||
#undef ENUM_VALUE
|
||||
};
|
||||
|
||||
// Verify that the instance type list above stays in sync with the truth.
|
||||
#define CHECK_VALUE(ClassName, INSTANCE_TYPE) \
|
||||
static_assert( \
|
||||
static_cast<i::InstanceType>( \
|
||||
InstanceTypeCheckersSingle::k##ClassName) == i::INSTANCE_TYPE, \
|
||||
"TQ_INSTANCE_TYPES_SINGLE_NOSTRUCTS must be subset of " \
|
||||
"INSTANCE_TYPE_CHECKERS_SINGLE. Invalid class: " #ClassName);
|
||||
TQ_INSTANCE_TYPES_SINGLE_NOSTRUCTS(CHECK_VALUE)
|
||||
#undef CHECK_VALUE
|
||||
|
||||
// Adapts one STRUCT_LIST_GENERATOR entry to (Name, NAME) format.
|
||||
#define STRUCT_INSTANCE_TYPE_ADAPTER(V, NAME, Name, name) V(Name, NAME)
|
||||
|
||||
// Pairs of (ClassName, CLASS_NAME_TYPE) for every instance type that
|
||||
// corresponds to a single Torque-defined class. Note that all Struct-derived
|
||||
// classes are defined in Torque.
|
||||
#define TQ_INSTANCE_TYPES_SINGLE(V) \
|
||||
TQ_INSTANCE_TYPES_SINGLE_NOSTRUCTS(V) \
|
||||
STRUCT_LIST_GENERATOR(STRUCT_INSTANCE_TYPE_ADAPTER, V)
|
||||
|
||||
// Likewise, these are the subset of INSTANCE_TYPE_CHECKERS_RANGE that have
|
||||
// definitions in .tq files, rearranged with more specific things first. Also
|
||||
// includes JSObject and JSReceiver, which in the runtime are optimized to use
|
||||
// a one-sided check.
|
||||
#define TQ_INSTANCE_TYPES_RANGE(V) \
|
||||
V(Context, FIRST_CONTEXT_TYPE, LAST_CONTEXT_TYPE) \
|
||||
V(FixedArray, FIRST_FIXED_ARRAY_TYPE, LAST_FIXED_ARRAY_TYPE) \
|
||||
V(Microtask, FIRST_MICROTASK_TYPE, LAST_MICROTASK_TYPE) \
|
||||
V(String, FIRST_STRING_TYPE, LAST_STRING_TYPE) \
|
||||
V(Name, FIRST_NAME_TYPE, LAST_NAME_TYPE) \
|
||||
V(WeakFixedArray, FIRST_WEAK_FIXED_ARRAY_TYPE, LAST_WEAK_FIXED_ARRAY_TYPE) \
|
||||
V(JSObject, FIRST_JS_OBJECT_TYPE, LAST_JS_OBJECT_TYPE) \
|
||||
V(JSReceiver, FIRST_JS_RECEIVER_TYPE, LAST_JS_RECEIVER_TYPE)
|
||||
|
||||
std::string AppendAddressAndType(const std::string& brief, uintptr_t address,
|
||||
const char* type) {
|
||||
std::stringstream brief_stream;
|
||||
@ -173,8 +49,8 @@ TypedObject GetTypedObjectByHint(uintptr_t address,
|
||||
std::make_unique<Tq##ClassName>(address)}; \
|
||||
}
|
||||
|
||||
TQ_INSTANCE_TYPES_SINGLE(TYPE_NAME_CASE)
|
||||
TQ_INSTANCE_TYPES_RANGE(TYPE_NAME_CASE)
|
||||
TORQUE_INSTANCE_CHECKERS_SINGLE_FULLY_DEFINED(TYPE_NAME_CASE)
|
||||
TORQUE_INSTANCE_CHECKERS_RANGE_FULLY_DEFINED(TYPE_NAME_CASE)
|
||||
STRING_CLASS_TYPES(TYPE_NAME_CASE)
|
||||
|
||||
#undef TYPE_NAME_CASE
|
||||
@ -213,7 +89,7 @@ TypedObject GetTypedObjectByInstanceType(uintptr_t address,
|
||||
#define INSTANCE_TYPE_CASE(ClassName, INSTANCE_TYPE) \
|
||||
case i::INSTANCE_TYPE: \
|
||||
return {type_source, std::make_unique<Tq##ClassName>(address)};
|
||||
TQ_INSTANCE_TYPES_SINGLE(INSTANCE_TYPE_CASE)
|
||||
TORQUE_INSTANCE_CHECKERS_SINGLE_FULLY_DEFINED(INSTANCE_TYPE_CASE)
|
||||
#undef INSTANCE_TYPE_CASE
|
||||
|
||||
default:
|
||||
@ -229,7 +105,7 @@ TypedObject GetTypedObjectByInstanceType(uintptr_t address,
|
||||
if (type >= i::FIRST_TYPE && type <= i::LAST_TYPE) { \
|
||||
return {type_source, std::make_unique<Tq##ClassName>(address)}; \
|
||||
}
|
||||
TQ_INSTANCE_TYPES_RANGE(INSTANCE_RANGE_CASE)
|
||||
TORQUE_INSTANCE_CHECKERS_RANGE_FULLY_DEFINED(INSTANCE_RANGE_CASE)
|
||||
#undef INSTANCE_RANGE_CASE
|
||||
|
||||
return {d::TypeCheckResult::kUnknownInstanceType,
|
||||
@ -302,12 +178,6 @@ TypedObject GetTypedHeapObject(uintptr_t address, d::MemoryAccessor accessor,
|
||||
return result;
|
||||
}
|
||||
|
||||
#undef STRUCT_INSTANCE_TYPE_ADAPTER
|
||||
#undef TQ_INSTANCE_TYPES_SINGLE_BASE
|
||||
#undef TQ_INSTANCE_TYPES_SINGLE
|
||||
#undef TQ_INSTANCE_TYPES_SINGLE_NOSTRUCTS
|
||||
#undef TQ_INSTANCE_TYPES_RANGE
|
||||
|
||||
// An object visitor that accumulates the first few characters of a string.
|
||||
class ReadStringVisitor : public TqObjectVisitor {
|
||||
public:
|
||||
|
@ -41,38 +41,38 @@ INSTANCE_TYPES = {
|
||||
77: "STORE_HANDLER_TYPE",
|
||||
78: "FUNCTION_TEMPLATE_INFO_TYPE",
|
||||
79: "OBJECT_TEMPLATE_INFO_TYPE",
|
||||
80: "TUPLE2_TYPE",
|
||||
81: "TUPLE3_TYPE",
|
||||
82: "ACCESS_CHECK_INFO_TYPE",
|
||||
83: "ACCESSOR_INFO_TYPE",
|
||||
84: "ACCESSOR_PAIR_TYPE",
|
||||
85: "ALIASED_ARGUMENTS_ENTRY_TYPE",
|
||||
86: "ALLOCATION_MEMENTO_TYPE",
|
||||
87: "ALLOCATION_SITE_TYPE",
|
||||
88: "ARRAY_BOILERPLATE_DESCRIPTION_TYPE",
|
||||
89: "ASM_WASM_DATA_TYPE",
|
||||
90: "ASYNC_GENERATOR_REQUEST_TYPE",
|
||||
91: "CALL_HANDLER_INFO_TYPE",
|
||||
92: "CLASS_POSITIONS_TYPE",
|
||||
93: "DEBUG_INFO_TYPE",
|
||||
94: "ENUM_CACHE_TYPE",
|
||||
95: "FEEDBACK_CELL_TYPE",
|
||||
96: "FUNCTION_TEMPLATE_RARE_DATA_TYPE",
|
||||
97: "INTERCEPTOR_INFO_TYPE",
|
||||
98: "INTERNAL_CLASS_TYPE",
|
||||
99: "INTERPRETER_DATA_TYPE",
|
||||
100: "PROMISE_CAPABILITY_TYPE",
|
||||
101: "PROMISE_REACTION_TYPE",
|
||||
102: "PROTOTYPE_INFO_TYPE",
|
||||
103: "SCRIPT_TYPE",
|
||||
104: "SMI_BOX_TYPE",
|
||||
105: "SMI_PAIR_TYPE",
|
||||
106: "SORT_STATE_TYPE",
|
||||
107: "SOURCE_POSITION_TABLE_WITH_FRAME_CACHE_TYPE",
|
||||
108: "SOURCE_TEXT_MODULE_INFO_ENTRY_TYPE",
|
||||
109: "STACK_FRAME_INFO_TYPE",
|
||||
110: "STACK_TRACE_FRAME_TYPE",
|
||||
111: "TEMPLATE_OBJECT_DESCRIPTION_TYPE",
|
||||
80: "ACCESS_CHECK_INFO_TYPE",
|
||||
81: "ACCESSOR_INFO_TYPE",
|
||||
82: "ACCESSOR_PAIR_TYPE",
|
||||
83: "ALIASED_ARGUMENTS_ENTRY_TYPE",
|
||||
84: "ALLOCATION_MEMENTO_TYPE",
|
||||
85: "ALLOCATION_SITE_TYPE",
|
||||
86: "ARRAY_BOILERPLATE_DESCRIPTION_TYPE",
|
||||
87: "ASM_WASM_DATA_TYPE",
|
||||
88: "ASYNC_GENERATOR_REQUEST_TYPE",
|
||||
89: "CALL_HANDLER_INFO_TYPE",
|
||||
90: "CLASS_POSITIONS_TYPE",
|
||||
91: "DEBUG_INFO_TYPE",
|
||||
92: "ENUM_CACHE_TYPE",
|
||||
93: "FEEDBACK_CELL_TYPE",
|
||||
94: "FUNCTION_TEMPLATE_RARE_DATA_TYPE",
|
||||
95: "INTERCEPTOR_INFO_TYPE",
|
||||
96: "INTERNAL_CLASS_TYPE",
|
||||
97: "INTERPRETER_DATA_TYPE",
|
||||
98: "PROMISE_CAPABILITY_TYPE",
|
||||
99: "PROMISE_REACTION_TYPE",
|
||||
100: "PROTOTYPE_INFO_TYPE",
|
||||
101: "SCRIPT_TYPE",
|
||||
102: "SMI_BOX_TYPE",
|
||||
103: "SMI_PAIR_TYPE",
|
||||
104: "SORT_STATE_TYPE",
|
||||
105: "SOURCE_POSITION_TABLE_WITH_FRAME_CACHE_TYPE",
|
||||
106: "SOURCE_TEXT_MODULE_INFO_ENTRY_TYPE",
|
||||
107: "STACK_FRAME_INFO_TYPE",
|
||||
108: "STACK_TRACE_FRAME_TYPE",
|
||||
109: "TEMPLATE_OBJECT_DESCRIPTION_TYPE",
|
||||
110: "TUPLE2_TYPE",
|
||||
111: "TUPLE3_TYPE",
|
||||
112: "WASM_CAPI_FUNCTION_DATA_TYPE",
|
||||
113: "WASM_DEBUG_INFO_TYPE",
|
||||
114: "WASM_EXCEPTION_TAG_TYPE",
|
||||
@ -233,20 +233,20 @@ KNOWN_MAPS = {
|
||||
("read_only_space", 0x01169): (155, "CodeDataContainerMap"),
|
||||
("read_only_space", 0x011b9): (135, "FixedDoubleArrayMap"),
|
||||
("read_only_space", 0x01209): (121, "GlobalDictionaryMap"),
|
||||
("read_only_space", 0x01259): (95, "ManyClosuresCellMap"),
|
||||
("read_only_space", 0x01259): (93, "ManyClosuresCellMap"),
|
||||
("read_only_space", 0x012a9): (118, "ModuleInfoMap"),
|
||||
("read_only_space", 0x012f9): (122, "NameDictionaryMap"),
|
||||
("read_only_space", 0x01349): (95, "NoClosuresCellMap"),
|
||||
("read_only_space", 0x01349): (93, "NoClosuresCellMap"),
|
||||
("read_only_space", 0x01399): (123, "NumberDictionaryMap"),
|
||||
("read_only_space", 0x013e9): (95, "OneClosureCellMap"),
|
||||
("read_only_space", 0x013e9): (93, "OneClosureCellMap"),
|
||||
("read_only_space", 0x01439): (124, "OrderedHashMapMap"),
|
||||
("read_only_space", 0x01489): (125, "OrderedHashSetMap"),
|
||||
("read_only_space", 0x014d9): (126, "OrderedNameDictionaryMap"),
|
||||
("read_only_space", 0x01529): (163, "PreparseDataMap"),
|
||||
("read_only_space", 0x01579): (164, "PropertyArrayMap"),
|
||||
("read_only_space", 0x015c9): (91, "SideEffectCallHandlerInfoMap"),
|
||||
("read_only_space", 0x01619): (91, "SideEffectFreeCallHandlerInfoMap"),
|
||||
("read_only_space", 0x01669): (91, "NextCallSideEffectFreeCallHandlerInfoMap"),
|
||||
("read_only_space", 0x015c9): (89, "SideEffectCallHandlerInfoMap"),
|
||||
("read_only_space", 0x01619): (89, "SideEffectFreeCallHandlerInfoMap"),
|
||||
("read_only_space", 0x01669): (89, "NextCallSideEffectFreeCallHandlerInfoMap"),
|
||||
("read_only_space", 0x016b9): (127, "SimpleNumberDictionaryMap"),
|
||||
("read_only_space", 0x01709): (118, "SloppyArgumentsElementsMap"),
|
||||
("read_only_space", 0x01759): (146, "SmallOrderedHashMapMap"),
|
||||
@ -277,9 +277,9 @@ KNOWN_MAPS = {
|
||||
("read_only_space", 0x01f29): (26, "UncachedExternalOneByteInternalizedStringMap"),
|
||||
("read_only_space", 0x01f79): (58, "UncachedExternalOneByteStringMap"),
|
||||
("read_only_space", 0x01fc9): (67, "SelfReferenceMarkerMap"),
|
||||
("read_only_space", 0x02031): (94, "EnumCacheMap"),
|
||||
("read_only_space", 0x020d1): (88, "ArrayBoilerplateDescriptionMap"),
|
||||
("read_only_space", 0x022c1): (97, "InterceptorInfoMap"),
|
||||
("read_only_space", 0x02031): (92, "EnumCacheMap"),
|
||||
("read_only_space", 0x020d1): (86, "ArrayBoilerplateDescriptionMap"),
|
||||
("read_only_space", 0x022c1): (95, "InterceptorInfoMap"),
|
||||
("read_only_space", 0x04c39): (71, "PromiseFulfillReactionJobTaskMap"),
|
||||
("read_only_space", 0x04c89): (72, "PromiseRejectReactionJobTaskMap"),
|
||||
("read_only_space", 0x04cd9): (73, "CallableTaskMap"),
|
||||
@ -287,40 +287,40 @@ KNOWN_MAPS = {
|
||||
("read_only_space", 0x04d79): (75, "PromiseResolveThenableJobTaskMap"),
|
||||
("read_only_space", 0x04dc9): (78, "FunctionTemplateInfoMap"),
|
||||
("read_only_space", 0x04e19): (79, "ObjectTemplateInfoMap"),
|
||||
("read_only_space", 0x04e69): (80, "Tuple2Map"),
|
||||
("read_only_space", 0x04eb9): (81, "Tuple3Map"),
|
||||
("read_only_space", 0x04f09): (82, "AccessCheckInfoMap"),
|
||||
("read_only_space", 0x04f59): (83, "AccessorInfoMap"),
|
||||
("read_only_space", 0x04fa9): (84, "AccessorPairMap"),
|
||||
("read_only_space", 0x04ff9): (85, "AliasedArgumentsEntryMap"),
|
||||
("read_only_space", 0x05049): (86, "AllocationMementoMap"),
|
||||
("read_only_space", 0x05099): (89, "AsmWasmDataMap"),
|
||||
("read_only_space", 0x050e9): (90, "AsyncGeneratorRequestMap"),
|
||||
("read_only_space", 0x05139): (92, "ClassPositionsMap"),
|
||||
("read_only_space", 0x05189): (93, "DebugInfoMap"),
|
||||
("read_only_space", 0x051d9): (96, "FunctionTemplateRareDataMap"),
|
||||
("read_only_space", 0x05229): (99, "InterpreterDataMap"),
|
||||
("read_only_space", 0x05279): (100, "PromiseCapabilityMap"),
|
||||
("read_only_space", 0x052c9): (101, "PromiseReactionMap"),
|
||||
("read_only_space", 0x05319): (102, "PrototypeInfoMap"),
|
||||
("read_only_space", 0x05369): (103, "ScriptMap"),
|
||||
("read_only_space", 0x053b9): (107, "SourcePositionTableWithFrameCacheMap"),
|
||||
("read_only_space", 0x05409): (108, "SourceTextModuleInfoEntryMap"),
|
||||
("read_only_space", 0x05459): (109, "StackFrameInfoMap"),
|
||||
("read_only_space", 0x054a9): (110, "StackTraceFrameMap"),
|
||||
("read_only_space", 0x054f9): (111, "TemplateObjectDescriptionMap"),
|
||||
("read_only_space", 0x04e69): (80, "AccessCheckInfoMap"),
|
||||
("read_only_space", 0x04eb9): (81, "AccessorInfoMap"),
|
||||
("read_only_space", 0x04f09): (82, "AccessorPairMap"),
|
||||
("read_only_space", 0x04f59): (83, "AliasedArgumentsEntryMap"),
|
||||
("read_only_space", 0x04fa9): (84, "AllocationMementoMap"),
|
||||
("read_only_space", 0x04ff9): (87, "AsmWasmDataMap"),
|
||||
("read_only_space", 0x05049): (88, "AsyncGeneratorRequestMap"),
|
||||
("read_only_space", 0x05099): (90, "ClassPositionsMap"),
|
||||
("read_only_space", 0x050e9): (91, "DebugInfoMap"),
|
||||
("read_only_space", 0x05139): (94, "FunctionTemplateRareDataMap"),
|
||||
("read_only_space", 0x05189): (97, "InterpreterDataMap"),
|
||||
("read_only_space", 0x051d9): (98, "PromiseCapabilityMap"),
|
||||
("read_only_space", 0x05229): (99, "PromiseReactionMap"),
|
||||
("read_only_space", 0x05279): (100, "PrototypeInfoMap"),
|
||||
("read_only_space", 0x052c9): (101, "ScriptMap"),
|
||||
("read_only_space", 0x05319): (105, "SourcePositionTableWithFrameCacheMap"),
|
||||
("read_only_space", 0x05369): (106, "SourceTextModuleInfoEntryMap"),
|
||||
("read_only_space", 0x053b9): (107, "StackFrameInfoMap"),
|
||||
("read_only_space", 0x05409): (108, "StackTraceFrameMap"),
|
||||
("read_only_space", 0x05459): (109, "TemplateObjectDescriptionMap"),
|
||||
("read_only_space", 0x054a9): (110, "Tuple2Map"),
|
||||
("read_only_space", 0x054f9): (111, "Tuple3Map"),
|
||||
("read_only_space", 0x05549): (112, "WasmCapiFunctionDataMap"),
|
||||
("read_only_space", 0x05599): (113, "WasmDebugInfoMap"),
|
||||
("read_only_space", 0x055e9): (114, "WasmExceptionTagMap"),
|
||||
("read_only_space", 0x05639): (115, "WasmExportedFunctionDataMap"),
|
||||
("read_only_space", 0x05689): (116, "WasmIndirectFunctionTableMap"),
|
||||
("read_only_space", 0x056d9): (117, "WasmJSFunctionDataMap"),
|
||||
("read_only_space", 0x05729): (98, "InternalClassMap"),
|
||||
("read_only_space", 0x05779): (105, "SmiPairMap"),
|
||||
("read_only_space", 0x057c9): (104, "SmiBoxMap"),
|
||||
("read_only_space", 0x05819): (106, "SortStateMap"),
|
||||
("read_only_space", 0x05869): (87, "AllocationSiteWithWeakNextMap"),
|
||||
("read_only_space", 0x058b9): (87, "AllocationSiteWithoutWeakNextMap"),
|
||||
("read_only_space", 0x05729): (96, "InternalClassMap"),
|
||||
("read_only_space", 0x05779): (103, "SmiPairMap"),
|
||||
("read_only_space", 0x057c9): (102, "SmiBoxMap"),
|
||||
("read_only_space", 0x05819): (104, "SortStateMap"),
|
||||
("read_only_space", 0x05869): (85, "AllocationSiteWithWeakNextMap"),
|
||||
("read_only_space", 0x058b9): (85, "AllocationSiteWithoutWeakNextMap"),
|
||||
("read_only_space", 0x05909): (76, "LoadHandler1Map"),
|
||||
("read_only_space", 0x05959): (76, "LoadHandler2Map"),
|
||||
("read_only_space", 0x059a9): (76, "LoadHandler3Map"),
|
||||
|
Loading…
Reference in New Issue
Block a user