v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
heap-refs.cc File Reference
Include dependency graph for heap-refs.cc:

Go to the source code of this file.

Classes

class  v8::internal::compiler::ObjectData
 
class  v8::internal::compiler::HeapObjectData
 
class  v8::internal::compiler::PropertyCellData
 
class  v8::internal::compiler::JSReceiverData
 
class  v8::internal::compiler::JSObjectData
 
class  v8::internal::compiler::JSTypedArrayData
 
class  v8::internal::compiler::JSDataViewData
 
class  v8::internal::compiler::JSPrimitiveWrapperData
 
class  v8::internal::compiler::JSBoundFunctionData
 
class  v8::internal::compiler::JSFunctionData
 
class  v8::internal::compiler::BigIntData
 
struct  v8::internal::compiler::PropertyDescriptor
 
class  v8::internal::compiler::MapData
 
class  v8::internal::compiler::FixedArrayBaseData
 
class  v8::internal::compiler::FixedArrayData
 
class  v8::internal::compiler::ScriptContextTableData
 
class  v8::internal::compiler::JSArrayData
 
class  v8::internal::compiler::JSGlobalObjectData
 
class  v8::internal::compiler::JSGlobalProxyData
 

Namespaces

namespace  v8
 
namespace  v8::internal
 
namespace  v8::internal::compiler
 

Macros

#define TRACE(broker, x)
 
#define TRACE_MISSING(broker, x)
 
#define DECLARE_IS(Name)
 
#define DECLARE_AS(Name)
 
#define DEFINE_IS(Name)
 
#define DEFINE_AS(Name)
 
#define CREATE_DATA(Name)
 
#define DEFINE_IS_AND_AS(Name)
 
#define DEF_TESTER(Type, ...)
 
#define IF_ACCESS_FROM_HEAP_C(name)
 
#define IF_ACCESS_FROM_HEAP(result, name)
 
#define BIMODAL_ACCESSOR(holder, result, name)
 
#define BIMODAL_ACCESSOR_C(holder, result, name)
 
#define BIMODAL_ACCESSOR_B(holder, field, name, BitField)
 
#define HEAP_ACCESSOR_C(holder, result, name)
 
#define HEAP_ACCESSOR_B(holder, field, name, BitField)
 
#define DEF_SFI_ACCESSOR(type, name)
 
#define DEF_NATIVE_CONTEXT_ACCESSOR(ResultType, Name)
 
#define IF_HOLE_THEN_RETURN(Name, name, Root)
 
#define DEF_OBJECT_GETTER(T)
 
#define JSFUNCTION_BIMODAL_ACCESSOR_WITH_DEP(Result, Name, UsedField)
 
#define JSFUNCTION_BIMODAL_ACCESSOR_WITH_DEP_C(Result, Name, UsedField)
 
#define JSFUNCTION_BIMODAL_ACCESSOR_WITH_DEP_RELEVANT_C( Result, Name, UsedField, RelevantValue)
 

Enumerations

enum  v8::internal::compiler::ObjectDataKind {
  v8::internal::compiler::kSmi , v8::internal::compiler::kBackgroundSerializedHeapObject , v8::internal::compiler::kUnserializedHeapObject , v8::internal::compiler::kNeverSerializedHeapObject ,
  v8::internal::compiler::kUnserializedReadOnlyHeapObject
}
 

Functions

 v8::internal::compiler::HEAP_ACCESSOR_B (Map, bit_field3, is_dictionary_map, Map::Bits3::IsDictionaryMapBit) HEAP_ACCESSOR_B(Map
 
Map::Bits3::NumberOfOwnDescriptorsBits v8::internal::compiler::HEAP_ACCESSOR_B (Map, bit_field3, is_migration_target, Map::Bits3::IsMigrationTargetBit) BIMODAL_ACCESSOR_B(Map
 
Map::Bits3::NumberOfOwnDescriptorsBits Map::Bits3::ConstructionCounterBits v8::internal::compiler::HEAP_ACCESSOR_B (Map, bit_field, has_prototype_slot, Map::Bits1::HasPrototypeSlotBit) HEAP_ACCESSOR_B(Map
 
Map::Bits3::NumberOfOwnDescriptorsBits Map::Bits3::ConstructionCounterBits Map::Bits1::IsAccessCheckNeededBit v8::internal::compiler::HEAP_ACCESSOR_B (Map, bit_field, has_indexed_interceptor, Map::Bits1::HasIndexedInterceptorBit) int ObjectBoilerplateDescriptionRef
 
 v8::internal::compiler::JSFUNCTION_BIMODAL_ACCESSOR_WITH_DEP_RELEVANT_C (bool, has_initial_map, JSFunctionData::kHasInitialMap, true) JSFUNCTION_BIMODAL_ACCESSOR_WITH_DEP_RELEVANT_C(bool
 
true v8::internal::compiler::JSFUNCTION_BIMODAL_ACCESSOR_WITH_DEP_RELEVANT_C (bool, PrototypeRequiresRuntimeLookup, JSFunctionData::kPrototypeRequiresRuntimeLookup, false) JSFUNCTION_BIMODAL_ACCESSOR_WITH_DEP(Map
 
true JSFunctionData::kInitialMap v8::internal::compiler::JSFUNCTION_BIMODAL_ACCESSOR_WITH_DEP (HeapObject, instance_prototype, JSFunctionData::kInstancePrototype) JSFUNCTION_BIMODAL_ACCESSOR_WITH_DEP(FeedbackCell
 
std::ostream & v8::internal::compiler::operator<< (std::ostream &os, ObjectRef ref)
 

Variables

 v8::internal::compiler::bit_field3
 
 v8::internal::compiler::NumberOfOwnDescriptors
 
Map::Bits3::NumberOfOwnDescriptorsBits v8::internal::compiler::construction_counter
 
Map::Bits3::NumberOfOwnDescriptorsBits Map::Bits3::ConstructionCounterBits v8::internal::compiler::bit_field
 
Map::Bits3::NumberOfOwnDescriptorsBits Map::Bits3::ConstructionCounterBits v8::internal::compiler::is_access_check_needed
 
 v8::internal::compiler::has_instance_prototype
 
true v8::internal::compiler::initial_map
 
true JSFunctionData::kInitialMap v8::internal::compiler::raw_feedback_cell
 

Macro Definition Documentation

◆ BIMODAL_ACCESSOR

#define BIMODAL_ACCESSOR ( holder,
result,
name )
Value:
result##Ref holder##Ref::name(JSHeapBroker* broker) const { \
IF_ACCESS_FROM_HEAP(result, name); \
return result##Ref(ObjectRef::data()->As##holder()->name()); \
}
const char * name
Definition builtins.cc:39
JSHeapBroker * broker
ZoneVector< RpoNumber > & result

Definition at line 1538 of file heap-refs.cc.

◆ BIMODAL_ACCESSOR_B

#define BIMODAL_ACCESSOR_B ( holder,
field,
name,
BitField )
Value:
typename BitField::FieldType holder##Ref::name() const { \
IF_ACCESS_FROM_HEAP_C(name); \
return BitField::decode(ObjectRef::data()->As##holder()->field()); \
}

Definition at line 1552 of file heap-refs.cc.

◆ BIMODAL_ACCESSOR_C

#define BIMODAL_ACCESSOR_C ( holder,
result,
name )
Value:
result holder##Ref::name() const { \
IF_ACCESS_FROM_HEAP_C(name); \
return ObjectRef::data()->As##holder()->name(); \
}

Definition at line 1545 of file heap-refs.cc.

◆ CREATE_DATA

#define CREATE_DATA ( Name)
Value:
if (i::InstanceTypeChecker::Is##Name(instance_type)) { \
entry = refs_->LookupOrInsert(object.address()); \
object_data = zone()->New<ref_traits<Name>::data_type>( \
this, &entry->value, Cast<Name>(object), \
ObjectDataKindFor(ref_traits<Name>::ref_serialization_kind)); \
/* NOLINTNEXTLINE(readability/braces) */ \
} else

◆ DECLARE_AS

#define DECLARE_AS ( Name)
Value:
Name##Data* As##Name();

Definition at line 120 of file heap-refs.cc.

◆ DECLARE_IS

#define DECLARE_IS ( Name)
Value:
bool Is##Name() const;

Definition at line 116 of file heap-refs.cc.

◆ DEF_NATIVE_CONTEXT_ACCESSOR

#define DEF_NATIVE_CONTEXT_ACCESSOR ( ResultType,
Name )
Value:
ResultType##Ref NativeContextRef::Name(JSHeapBroker* broker) const { \
return MakeRefAssumeMemoryFence( \
broker, Cast<ResultType>(object()->Name(kAcquireLoad))); \
}

Definition at line 1944 of file heap-refs.cc.

◆ DEF_OBJECT_GETTER

#define DEF_OBJECT_GETTER ( T)
Value:
IndirectHandle<T> T##Ref::object() const { \
return IndirectHandle<T>( \
reinterpret_cast<Address*>(data_->object().address())); \
}
uint8_t data_[MAX_STACK_LENGTH]

Definition at line 2342 of file heap-refs.cc.

◆ DEF_SFI_ACCESSOR

#define DEF_SFI_ACCESSOR ( type,
name )
Value:
HEAP_ACCESSOR_C(SharedFunctionInfo, type, name)
#define HEAP_ACCESSOR_C(holder, result, name)

Definition at line 1757 of file heap-refs.cc.

◆ DEF_TESTER

#define DEF_TESTER ( Type,
... )
Value:
bool MapRef::Is##Type##Map() const { \
return InstanceTypeChecker::Is##Type(instance_type()); \
}

Definition at line 1154 of file heap-refs.cc.

◆ DEFINE_AS

#define DEFINE_AS ( Name)
Value:
Name##Data* ObjectData::As##Name() { \
CHECK(Is##Name()); \
CHECK(kind_ == kBackgroundSerializedHeapObject); \
return static_cast<Name##Data*>(this); \
}
const PropertyKind kind_

Definition at line 975 of file heap-refs.cc.

◆ DEFINE_IS

#define DEFINE_IS ( Name)
Value:
bool ObjectData::Is##Name() const { \
if (should_access_heap()) { \
return i::Is##Name(*object()); \
} \
if (is_smi()) return false; \
InstanceType instance_type = \
static_cast<const HeapObjectData*>(this)->GetMapInstanceType(); \
return InstanceTypeChecker::Is##Name(instance_type); \
}
bool Is(IndirectHandle< U > value)
Definition handles-inl.h:51

Definition at line 962 of file heap-refs.cc.

◆ DEFINE_IS_AND_AS

#define DEFINE_IS_AND_AS ( Name)
Value:
bool ObjectRef::Is##Name() const { return data()->Is##Name(); } \
Name##Ref ObjectRef::As##Name() const { \
DCHECK(Is##Name()); \
return Name##Ref(data()); \
}
union v8::internal::@341::BuiltinMetadata::KindSpecificData data

Definition at line 1137 of file heap-refs.cc.

◆ HEAP_ACCESSOR_B

#define HEAP_ACCESSOR_B ( holder,
field,
name,
BitField )
Value:
typename BitField::FieldType holder##Ref::name() const { \
return object()->name(); \
}

Definition at line 1561 of file heap-refs.cc.

◆ HEAP_ACCESSOR_C

#define HEAP_ACCESSOR_C ( holder,
result,
name )
Value:
result holder##Ref::name() const { return object()->name(); }

Definition at line 1558 of file heap-refs.cc.

◆ IF_ACCESS_FROM_HEAP

#define IF_ACCESS_FROM_HEAP ( result,
name )
Value:
if (data_->should_access_heap()) { \
return MakeRef(broker, Cast<result>(object()->name())); \
}

Definition at line 1531 of file heap-refs.cc.

◆ IF_ACCESS_FROM_HEAP_C

#define IF_ACCESS_FROM_HEAP_C ( name)
Value:
if (data_->should_access_heap()) { \
return object()->name(); \
}

Definition at line 1526 of file heap-refs.cc.

◆ IF_HOLE_THEN_RETURN

#define IF_HOLE_THEN_RETURN ( Name,
name,
Root )
Value:
if (i::Is##Name(*object())) { \
return HoleType::k##Name; \
}

◆ JSFUNCTION_BIMODAL_ACCESSOR_WITH_DEP

#define JSFUNCTION_BIMODAL_ACCESSOR_WITH_DEP ( Result,
Name,
UsedField )
Value:
Result##Ref JSFunctionRef::Name(JSHeapBroker* broker) const { \
IF_ACCESS_FROM_HEAP(Result, Name); \
RecordConsistentJSFunctionViewDependencyIfNeeded( \
broker, *this, data()->AsJSFunction(), UsedField); \
return Result##Ref(data()->AsJSFunction()->Name()); \
}

Definition at line 2369 of file heap-refs.cc.

◆ JSFUNCTION_BIMODAL_ACCESSOR_WITH_DEP_C

#define JSFUNCTION_BIMODAL_ACCESSOR_WITH_DEP_C ( Result,
Name,
UsedField )
Value:
Result JSFunctionRef::Name(JSHeapBroker* broker) const { \
IF_ACCESS_FROM_HEAP_C(Name); \
RecordConsistentJSFunctionViewDependencyIfNeeded( \
broker, *this, data()->AsJSFunction(), UsedField); \
return data()->AsJSFunction()->Name(); \
}

Definition at line 2377 of file heap-refs.cc.

◆ JSFUNCTION_BIMODAL_ACCESSOR_WITH_DEP_RELEVANT_C

#define JSFUNCTION_BIMODAL_ACCESSOR_WITH_DEP_RELEVANT_C ( Result,
Name,
UsedField,
RelevantValue )
Value:
Result JSFunctionRef::Name(JSHeapBroker* broker) const { \
IF_ACCESS_FROM_HEAP_C(Name); \
Result const result = data()->AsJSFunction()->Name(); \
if (result == RelevantValue) { \
RecordConsistentJSFunctionViewDependencyIfNeeded( \
broker, *this, data()->AsJSFunction(), UsedField); \
} \
return result; \
}

Definition at line 2390 of file heap-refs.cc.

◆ TRACE

#define TRACE ( broker,
x )
Value:
#define TRACE_BROKER(broker, x)
int x

Definition at line 34 of file heap-refs.cc.

◆ TRACE_MISSING

#define TRACE_MISSING ( broker,
x )
Value:
#define TRACE_BROKER_MISSING(broker, x)

Definition at line 35 of file heap-refs.cc.