v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::BytecodeArray Class Reference

#include <bytecode-array.h>

Inheritance diagram for v8::internal::BytecodeArray:
Collaboration diagram for v8::internal::BytecodeArray:

Classes

class  BodyDescriptor
 

Public Member Functions

int length () const
 
int length (AcquireLoadTag tag) const
 
void set_length (int value)
 
void set_length (int value, ReleaseStoreTag tag)
 
 DECL_RELEASE_ACQUIRE_PROTECTED_POINTER_ACCESSORS (source_position_table, TrustedByteArray) inline int32_t max_frame_size() const
 
uint8_t get (int index) const
 
void set (int index, uint8_t value)
 
Address GetFirstBytecodeAddress ()
 
int register_count () const
 
uint16_t parameter_count () const
 
uint16_t parameter_count_without_receiver () const
 
void set_parameter_count (uint16_t number_of_parameters)
 
uint16_t max_arguments () const
 
void set_max_arguments (uint16_t max_arguments)
 
interpreter::Register incoming_new_target_or_generator_register () const
 
void set_incoming_new_target_or_generator_register (interpreter::Register incoming_new_target_or_generator_register)
 
bool HasSourcePositionTable () const
 
int SourcePosition (int offset) const
 
int SourceStatementPosition (int offset) const
 
void SetSourcePositionsFailedToCollect ()
 
int BytecodeArraySize () const
 
V8_EXPORT_PRIVATE void PrintJson (std::ostream &os)
 
V8_EXPORT_PRIVATE void Disassemble (std::ostream &os)
 
void CopyBytecodesTo (Tagged< BytecodeArray > to)
 
void clear_padding ()
 
 OBJECT_CONSTRUCTORS (BytecodeArray, ExposedTrustedObject)
 
- Public Member Functions inherited from v8::internal::ExposedTrustedObject
void init_self_indirect_pointer (Isolate *isolate)
 
void init_self_indirect_pointer (LocalIsolate *isolate)
 
IndirectPointerHandle self_indirect_pointer_handle () const
 
 OBJECT_CONSTRUCTORS (ExposedTrustedObject, TrustedObject)
 
- Public Member Functions inherited from v8::internal::TrustedObject
Tagged< TrustedObjectReadProtectedPointerField (int offset) const
 
Tagged< TrustedObjectReadProtectedPointerField (int offset, AcquireLoadTag) const
 
void WriteProtectedPointerField (int offset, Tagged< TrustedObject > value)
 
void WriteProtectedPointerField (int offset, Tagged< TrustedObject > value, ReleaseStoreTag)
 
bool IsProtectedPointerFieldEmpty (int offset) const
 
bool IsProtectedPointerFieldEmpty (int offset, AcquireLoadTag) const
 
void ClearProtectedPointerField (int offset)
 
void ClearProtectedPointerField (int offset, ReleaseStoreTag)
 
ProtectedPointerSlot RawProtectedPointerField (int byte_offset) const
 
ProtectedMaybeObjectSlot RawProtectedMaybeObjectField (int byte_offset) const
 
 OBJECT_CONSTRUCTORS (TrustedObject, HeapObject)
 
- Public Member Functions inherited from v8::internal::HeapObject
constexpr HeapObject ()=default
 
void set_map (Isolate *isolate, Tagged< Map > value)
 
template<typename IsolateT >
void set_map_safe_transition (IsolateT *isolate, Tagged< Map > value)
 
ObjectSlot map_slot () const
 
void set_map_no_write_barrier (Isolate *isolate, Tagged< Map > value, RelaxedStoreTag=kRelaxedStore)
 
void set_map_no_write_barrier (Isolate *isolate, Tagged< Map > value, ReleaseStoreTag)
 
void set_map_safe_transition_no_write_barrier (Isolate *isolate, Tagged< Map > value, RelaxedStoreTag=kRelaxedStore)
 
void set_map_safe_transition_no_write_barrier (Isolate *isolate, Tagged< Map > value, ReleaseStoreTag)
 
template<typename IsolateT >
void set_map (IsolateT *isolate, Tagged< Map > value, ReleaseStoreTag)
 
template<typename IsolateT >
void set_map_safe_transition (IsolateT *isolate, Tagged< Map > value, ReleaseStoreTag)
 
bool release_compare_and_swap_map_word_forwarded (MapWord old_map_word, Tagged< HeapObject > new_target_object)
 
bool relaxed_compare_and_swap_map_word_forwarded (MapWord old_map_word, Tagged< HeapObject > new_target_object)
 
template<typename IsolateT >
void set_map_after_allocation (IsolateT *isolate, Tagged< Map > value, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)
 
void set_map_word (Tagged< Map > map, RelaxedStoreTag)
 
void set_map_word_forwarded (Tagged< HeapObject > target_object, RelaxedStoreTag)
 
void set_map_word (Tagged< Map > map, ReleaseStoreTag)
 
void set_map_word_forwarded (Tagged< HeapObject > target_object, ReleaseStoreTag)
 
ReadOnlyRoots EarlyGetReadOnlyRoots () const
 
Address address () const
 
V8_EXPORT_PRIVATE int SizeFromMap (Tagged< Map > map) const
 
template<class T >
requires (std::is_arithmetic_v<T> || std::is_enum_v<T> || std::is_pointer_v<T>)
T ReadField (size_t offset) const
 
template<class T >
requires (std::is_arithmetic_v<T> || std::is_enum_v<T> || std::is_pointer_v<T>)
void WriteField (size_t offset, T value) const
 
template<class T >
requires ((std::is_arithmetic_v<T> || std::is_enum_v<T>) && !std::is_floating_point_v<T>)
T Relaxed_ReadField (size_t offset) const
 
template<class T >
requires ((std::is_arithmetic_v<T> || std::is_enum_v<T>) && !std::is_floating_point_v<T>)
void Relaxed_WriteField (size_t offset, T value)
 
template<class T >
requires ((std::is_arithmetic_v<T> || std::is_enum_v<T>) && !std::is_floating_point_v<T>)
T Acquire_ReadField (size_t offset) const
 
Address ReadSandboxedPointerField (size_t offset, PtrComprCageBase cage_base) const
 
void WriteSandboxedPointerField (size_t offset, PtrComprCageBase cage_base, Address value)
 
void WriteSandboxedPointerField (size_t offset, Isolate *isolate, Address value)
 
size_t ReadBoundedSizeField (size_t offset) const
 
void WriteBoundedSizeField (size_t offset, size_t value)
 
template<ExternalPointerTag tag>
void InitExternalPointerField (size_t offset, IsolateForSandbox isolate, Address value, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)
 
template<ExternalPointerTagRange tag_range>
Address ReadExternalPointerField (size_t offset, IsolateForSandbox isolate) const
 
template<CppHeapPointerTag lower_bound, CppHeapPointerTag upper_bound>
Address ReadCppHeapPointerField (size_t offset, IsolateForPointerCompression isolate) const
 
Address ReadCppHeapPointerField (size_t offset, IsolateForPointerCompression isolate, CppHeapPointerTagRange tag_range) const
 
template<ExternalPointerTag tag>
void WriteExternalPointerField (size_t offset, IsolateForSandbox isolate, Address value)
 
void SetupLazilyInitializedExternalPointerField (size_t offset)
 
bool IsLazilyInitializedExternalPointerFieldInitialized (size_t offset) const
 
template<ExternalPointerTag tag>
void WriteLazilyInitializedExternalPointerField (size_t offset, IsolateForSandbox isolate, Address value)
 
void SetupLazilyInitializedCppHeapPointerField (size_t offset)
 
template<CppHeapPointerTag tag>
void WriteLazilyInitializedCppHeapPointerField (size_t offset, IsolateForPointerCompression isolate, Address value)
 
void WriteLazilyInitializedCppHeapPointerField (size_t offset, IsolateForPointerCompression isolate, Address value, CppHeapPointerTag tag)
 
template<IndirectPointerTag tag>
Tagged< ExposedTrustedObjectReadTrustedPointerField (size_t offset, IsolateForSandbox isolate) const
 
template<IndirectPointerTag tag>
Tagged< ExposedTrustedObjectReadTrustedPointerField (size_t offset, IsolateForSandbox isolate, AcquireLoadTag) const
 
template<IndirectPointerTag tag>
Tagged< ObjectReadMaybeEmptyTrustedPointerField (size_t offset, IsolateForSandbox isolate, AcquireLoadTag) const
 
template<IndirectPointerTag tag>
void WriteTrustedPointerField (size_t offset, Tagged< ExposedTrustedObject > value)
 
bool IsTrustedPointerFieldEmpty (size_t offset) const
 
bool IsTrustedPointerFieldUnpublished (size_t offset, IndirectPointerTag tag, IsolateForSandbox isolate) const
 
void ClearTrustedPointerField (size_t offest)
 
void ClearTrustedPointerField (size_t offest, ReleaseStoreTag)
 
Tagged< CodeReadCodePointerField (size_t offset, IsolateForSandbox isolate) const
 
void WriteCodePointerField (size_t offset, Tagged< Code > value)
 
bool IsCodePointerFieldEmpty (size_t offset) const
 
void ClearCodePointerField (size_t offest)
 
Address ReadCodeEntrypointViaCodePointerField (size_t offset, CodeEntrypointTag tag) const
 
void WriteCodeEntrypointViaCodePointerField (size_t offset, Address value, CodeEntrypointTag tag)
 
ObjectSlot RawField (int byte_offset) const
 
MaybeObjectSlot RawMaybeWeakField (int byte_offset) const
 
InstructionStreamSlot RawInstructionStreamField (int byte_offset) const
 
ExternalPointerSlot RawExternalPointerField (int byte_offset, ExternalPointerTagRange tag_range) const
 
CppHeapPointerSlot RawCppHeapPointerField (int byte_offset) const
 
IndirectPointerSlot RawIndirectPointerField (int byte_offset, IndirectPointerTag tag) const
 
WriteBarrierMode GetWriteBarrierMode (const DisallowGarbageCollection &promise)
 
void HeapObjectShortPrint (std::ostream &os)
 
void Print ()
 
bool CheckRequiredAlignment (PtrComprCageBase cage_base) const
 
bool NeedsRehashing (InstanceType instance_type) const
 
bool NeedsRehashing (PtrComprCageBase cage_base) const
 
bool CanBeRehashed (PtrComprCageBase cage_base) const
 
template<typename IsolateT >
void RehashBasedOnMap (IsolateT *isolate)
 
Address GetFieldAddress (int field_offset) const
 
HeapObjectoperator-> ()
 
const HeapObjectoperator-> () const
 
template<HeapObject::EmitWriteBarrier emit_write_barrier, typename MemoryOrder , typename IsolateT >
void set_map (IsolateT *isolate, Tagged< Map > value, MemoryOrder order, VerificationMode mode)
 
- Public Member Functions inherited from v8::internal::TaggedImpl< HeapObjectReferenceType::STRONG, Address >
V8_INLINE constexpr TaggedImpl ()
 
V8_INLINE constexpr TaggedImpl (Address ptr)
 
 operator bool () const=delete
 
constexpr bool operator== (TaggedImpl< kOtherRefType, U > other) const
 
constexpr bool operator!= (TaggedImpl< kOtherRefType, U > other) const
 
constexpr bool SafeEquals (TaggedImpl< kOtherRefType, Address > other) const
 
constexpr bool operator< (TaggedImpl other) const
 
V8_INLINE constexpr Address ptr () const
 
constexpr bool IsObject () const
 
constexpr bool IsSmi () const
 
bool ToSmi (Tagged< Smi > *value) const
 
Tagged< SmiToSmi () const
 
constexpr bool IsHeapObject () const
 
constexpr bool IsCleared () const
 
constexpr bool IsStrongOrWeak () const
 
constexpr bool IsStrong () const
 
constexpr bool IsStrongOrSmi () const
 
constexpr bool IsWeak () const
 
constexpr bool IsWeakOrCleared () const
 
bool GetHeapObjectIfStrong (Tagged< HeapObject > *result) const
 
bool GetHeapObjectIfStrong (Isolate *isolate, Tagged< HeapObject > *result) const
 
Tagged< HeapObjectGetHeapObjectAssumeStrong () const
 
Tagged< HeapObjectGetHeapObjectAssumeStrong (Isolate *isolate) const
 
bool GetHeapObjectIfWeak (Tagged< HeapObject > *result) const
 
bool GetHeapObjectIfWeak (Isolate *isolate, Tagged< HeapObject > *result) const
 
Tagged< HeapObjectGetHeapObjectAssumeWeak () const
 
Tagged< HeapObjectGetHeapObjectAssumeWeak (Isolate *isolate) const
 
bool GetHeapObject (Tagged< HeapObject > *result) const
 
bool GetHeapObject (Isolate *isolate, Tagged< HeapObject > *result) const
 
bool GetHeapObject (Tagged< HeapObject > *result, HeapObjectReferenceType *reference_type) const
 
bool GetHeapObject (Isolate *isolate, Tagged< HeapObject > *result, HeapObjectReferenceType *reference_type) const
 
Tagged< HeapObjectGetHeapObject () const
 
Tagged< HeapObjectGetHeapObject (Isolate *isolate) const
 
Tagged< ObjectGetHeapObjectOrSmi () const
 
Tagged< ObjectGetHeapObjectOrSmi (Isolate *isolate) const
 
Tagged< Tcast () const
 

Static Public Member Functions

static constexpr int SizeFor (int length)
 
static V8_EXPORT_PRIVATE void Disassemble (Handle< BytecodeArray > handle, std::ostream &os)
 
- Static Public Member Functions inherited from v8::internal::HeapObject
static void SetFillerMap (const WritableFreeSpace &writable_page, Tagged< Map > value)
 
static Tagged< HeapObjectFromAddress (Address address)
 
template<typename CompareAndSwapImpl >
static Tagged< ObjectSeqCst_CompareAndSwapField (Tagged< Object > expected_value, Tagged< Object > new_value, CompareAndSwapImpl compare_and_swap_impl)
 
template<typename ObjectType >
static JSDispatchHandle AllocateAndInstallJSDispatchHandle (ObjectType host, size_t offset, Isolate *isolate, uint16_t parameter_count, DirectHandle< Code > code, WriteBarrierMode mode=WriteBarrierMode::UPDATE_WRITE_BARRIER)
 
static void Print (Tagged< Object > obj)
 
static void Print (Tagged< Object > obj, std::ostream &os)
 
static AllocationAlignment RequiredAlignment (Tagged< Map > map)
 

Static Public Attributes

static const int kMaxSize = 512 * MB
 
static const int kMaxLength = kMaxSize - kHeaderSize
 
- Static Public Attributes inherited from v8::internal::ExposedTrustedObject
static constexpr int kHeaderSize = TrustedObject::kHeaderSize
 
- Static Public Attributes inherited from v8::internal::TrustedObject
static constexpr int kHeaderSize = HeapObject::kHeaderSize
 
- Static Public Attributes inherited from v8::internal::HeapObject
static constexpr int kMapOffset = offsetof(HeapObjectLayout, map_)
 
static constexpr int kHeaderSize = sizeof(HeapObjectLayout)
 
- Static Public Attributes inherited from v8::internal::TaggedImpl< HeapObjectReferenceType::STRONG, Address >
static const bool kIsFull
 
static const bool kCanBeWeak
 

Additional Inherited Members

- Public Types inherited from v8::internal::HeapObject
using MapField = TaggedField<MapWord, HeapObject::kMapOffset>
 
- Protected Member Functions inherited from v8::internal::HeapObject
V8_INLINE constexpr HeapObject (Address ptr, HeapObject::SkipTypeCheckTag)
 
 HeapObject (Address ptr)
 
Address field_address (size_t offset) const
 
- Protected Member Functions inherited from v8::internal::TaggedImpl< HeapObjectReferenceType::STRONG, Address >
Addressptr_location ()
 
const Addressptr_location () const
 
- Static Protected Member Functions inherited from v8::internal::HeapObject
template<typename T >
static bool IsSmi (T obj)
 
template<typename T >
static bool IsHeapObject (T obj)
 

Detailed Description

Definition at line 28 of file bytecode-array.h.

Member Function Documentation

◆ BytecodeArraySize()

int v8::internal::BytecodeArray::BytecodeArraySize ( ) const
inline

Definition at line 162 of file bytecode-array-inl.h.

Here is the call graph for this function:

◆ clear_padding()

void v8::internal::BytecodeArray::clear_padding ( )
inline

Definition at line 108 of file bytecode-array-inl.h.

Here is the call graph for this function:

◆ CopyBytecodesTo()

void v8::internal::BytecodeArray::CopyBytecodesTo ( Tagged< BytecodeArray > to)

Definition at line 186 of file bytecode-array.cc.

Here is the call graph for this function:

◆ DECL_RELEASE_ACQUIRE_PROTECTED_POINTER_ACCESSORS()

v8::internal::BytecodeArray::DECL_RELEASE_ACQUIRE_PROTECTED_POINTER_ACCESSORS ( source_position_table ,
TrustedByteArray  ) const

◆ Disassemble() [1/2]

void v8::internal::BytecodeArray::Disassemble ( Handle< BytecodeArray > handle,
std::ostream & os )
static

Definition at line 111 of file bytecode-array.cc.

Here is the call graph for this function:

◆ Disassemble() [2/2]

void v8::internal::BytecodeArray::Disassemble ( std::ostream & os)

Definition at line 101 of file bytecode-array.cc.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ get()

uint8_t v8::internal::BytecodeArray::get ( int index) const
inline

◆ GetFirstBytecodeAddress()

Address v8::internal::BytecodeArray::GetFirstBytecodeAddress ( )
inline

Definition at line 114 of file bytecode-array-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ HasSourcePositionTable()

bool v8::internal::BytecodeArray::HasSourcePositionTable ( ) const
inline

Definition at line 118 of file bytecode-array-inl.h.

Here is the caller graph for this function:

◆ incoming_new_target_or_generator_register()

interpreter::Register v8::internal::BytecodeArray::incoming_new_target_or_generator_register ( ) const
inline

Definition at line 84 of file bytecode-array-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ length() [1/2]

int v8::internal::BytecodeArray::length ( ) const
inline
Here is the caller graph for this function:

◆ length() [2/2]

int v8::internal::BytecodeArray::length ( AcquireLoadTag tag) const
inline

◆ max_arguments()

uint16_t v8::internal::BytecodeArray::max_arguments ( ) const
inline

Definition at line 72 of file bytecode-array-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ OBJECT_CONSTRUCTORS()

v8::internal::BytecodeArray::OBJECT_CONSTRUCTORS ( BytecodeArray ,
ExposedTrustedObject  )

◆ parameter_count()

uint16_t v8::internal::BytecodeArray::parameter_count ( ) const
inline

Definition at line 60 of file bytecode-array-inl.h.

Here is the call graph for this function:
Here is the caller graph for this function:

◆ parameter_count_without_receiver()

uint16_t v8::internal::BytecodeArray::parameter_count_without_receiver ( ) const
inline

Definition at line 64 of file bytecode-array-inl.h.

Here is the call graph for this function:

◆ PrintJson()

void v8::internal::BytecodeArray::PrintJson ( std::ostream & os)

Definition at line 45 of file bytecode-array.cc.

Here is the call graph for this function:

◆ register_count()

int v8::internal::BytecodeArray::register_count ( ) const
inline

Definition at line 56 of file bytecode-array-inl.h.

Here is the caller graph for this function:

◆ set()

void v8::internal::BytecodeArray::set ( int index,
uint8_t value )
inline

◆ set_incoming_new_target_or_generator_register()

void v8::internal::BytecodeArray::set_incoming_new_target_or_generator_register ( interpreter::Register incoming_new_target_or_generator_register)
inline

Definition at line 95 of file bytecode-array-inl.h.

Here is the call graph for this function:

◆ set_length() [1/2]

void v8::internal::BytecodeArray::set_length ( int value)
inline

◆ set_length() [2/2]

void v8::internal::BytecodeArray::set_length ( int value,
ReleaseStoreTag tag )
inline

◆ set_max_arguments()

void v8::internal::BytecodeArray::set_max_arguments ( uint16_t max_arguments)
inline

Definition at line 76 of file bytecode-array-inl.h.

Here is the call graph for this function:

◆ set_parameter_count()

void v8::internal::BytecodeArray::set_parameter_count ( uint16_t number_of_parameters)
inline

Definition at line 68 of file bytecode-array-inl.h.

Here is the call graph for this function:

◆ SetSourcePositionsFailedToCollect()

void v8::internal::BytecodeArray::SetSourcePositionsFailedToCollect ( )
inline

Definition at line 134 of file bytecode-array-inl.h.

Here is the call graph for this function:

◆ SizeFor()

static constexpr int v8::internal::BytecodeArray::SizeFor ( int length)
inlinestaticconstexpr

Definition at line 62 of file bytecode-array.h.

Here is the caller graph for this function:

◆ SourcePosition()

int v8::internal::BytecodeArray::SourcePosition ( int offset) const

Definition at line 20 of file bytecode-array.cc.

Here is the call graph for this function:

◆ SourceStatementPosition()

int v8::internal::BytecodeArray::SourceStatementPosition ( int offset) const

Definition at line 33 of file bytecode-array.cc.

Here is the call graph for this function:

Member Data Documentation

◆ kMaxLength

const int v8::internal::BytecodeArray::kMaxLength = kMaxSize - kHeaderSize
static

Definition at line 131 of file bytecode-array.h.

◆ kMaxSize

const int v8::internal::BytecodeArray::kMaxSize = 512 * MB
static

Definition at line 129 of file bytecode-array.h.


The documentation for this class was generated from the following files: