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

#include <js-array.h>

Inheritance diagram for v8::internal::JSArray:
Collaboration diagram for v8::internal::JSArray:

Public Member Functions

Tagged< Numberlength (PtrComprCageBase cage_base, AcquireLoadTag tag) const =delete
 
void set_length (Tagged< Number > value, ReleaseStoreTag tag, WriteBarrierMode mode=UPDATE_WRITE_BARRIER)=delete
 
void set_length (Tagged< Smi > length)
 
bool SetLengthWouldNormalize (uint32_t new_length)
 
bool HasArrayPrototype (Isolate *isolate)
 

Static Public Member Functions

static bool MayHaveReadOnlyLength (Tagged< Map > js_array_map)
 
static bool HasReadOnlyLength (DirectHandle< JSArray > array)
 
static bool WouldChangeReadOnlyLength (DirectHandle< JSArray > array, uint32_t index)
 
static V8_EXPORT_PRIVATE void Initialize (DirectHandle< JSArray > array, int capacity, int length=0)
 
static bool SetLengthWouldNormalize (Heap *heap, uint32_t new_length)
 
static V8_EXPORT_PRIVATE Maybe< boolSetLength (DirectHandle< JSArray > array, uint32_t length)
 
static void SetContent (DirectHandle< JSArray > array, DirectHandle< FixedArrayBase > storage)
 
static V8_WARN_UNUSED_RESULT Maybe< boolDefineOwnProperty (Isolate *isolate, DirectHandle< JSArray > o, DirectHandle< Object > name, PropertyDescriptor *desc, Maybe< ShouldThrow > should_throw)
 
static bool AnythingToArrayLength (Isolate *isolate, DirectHandle< Object > length_object, uint32_t *output)
 
static V8_WARN_UNUSED_RESULT Maybe< boolArraySetLength (Isolate *isolate, DirectHandle< JSArray > a, PropertyDescriptor *desc, Maybe< ShouldThrow > should_throw)
 
static Address ArrayJoinConcatToSequentialString (Isolate *isolate, Address raw_fixed_array, intptr_t length, Address raw_separator, Address raw_dest)
 

Static Public Attributes

static const int kPreallocatedArrayElements = 4
 
static const int kLengthDescriptorIndex = 0
 
static const int kMaxCopyElements = 100
 
static constexpr uint32_t kMaxArrayLength = JSObject::kMaxElementCount
 
static constexpr uint32_t kMaxArrayIndex = JSObject::kMaxElementIndex
 
static constexpr uint32_t kMaxFastArrayLength
 
static const uint32_t kMinJoinStackSize = 2
 
static const int kInitialMaxFastElementArray
 

Detailed Description

Definition at line 25 of file js-array.h.

Member Function Documentation

◆ AnythingToArrayLength()

bool v8::internal::JSArray::AnythingToArrayLength ( Isolate * isolate,
DirectHandle< Object > length_object,
uint32_t * output )
static

Definition at line 3188 of file objects.cc.

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

◆ ArrayJoinConcatToSequentialString()

Address v8::internal::JSArray::ArrayJoinConcatToSequentialString ( Isolate * isolate,
Address raw_fixed_array,
intptr_t length,
Address raw_separator,
Address raw_dest )
static

Definition at line 4246 of file objects.cc.

Here is the call graph for this function:

◆ ArraySetLength()

Maybe< bool > v8::internal::JSArray::ArraySetLength ( Isolate * isolate,
DirectHandle< JSArray > a,
PropertyDescriptor * desc,
Maybe< ShouldThrow > should_throw )
static

Definition at line 3224 of file objects.cc.

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

◆ DefineOwnProperty()

Maybe< bool > v8::internal::JSArray::DefineOwnProperty ( Isolate * isolate,
DirectHandle< JSArray > o,
DirectHandle< Object > name,
PropertyDescriptor * desc,
Maybe< ShouldThrow > should_throw )
static

Definition at line 3120 of file objects.cc.

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

◆ HasArrayPrototype()

bool v8::internal::JSArray::HasArrayPrototype ( Isolate * isolate)
inline

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

◆ HasReadOnlyLength()

bool v8::internal::JSArray::HasReadOnlyLength ( DirectHandle< JSArray > array)
static

Definition at line 4962 of file objects.cc.

Here is the caller graph for this function:

◆ Initialize()

void v8::internal::JSArray::Initialize ( DirectHandle< JSArray > array,
int capacity,
int length = 0 )
static

Definition at line 4804 of file objects.cc.

Here is the caller graph for this function:

◆ length()

Tagged< Number > v8::internal::JSArray::length ( PtrComprCageBase cage_base,
AcquireLoadTag tag ) const
delete

Definition at line 35 of file js-array-inl.h.

Here is the call graph for this function:

◆ MayHaveReadOnlyLength()

bool v8::internal::JSArray::MayHaveReadOnlyLength ( Tagged< Map > js_array_map)
static

Definition at line 4949 of file objects.cc.

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

◆ set_length() [1/2]

void v8::internal::JSArray::set_length ( Tagged< Number > value,
ReleaseStoreTag tag,
WriteBarrierMode mode = UPDATE_WRITE_BARRIER )
delete
Here is the caller graph for this function:

◆ set_length() [2/2]

void v8::internal::JSArray::set_length ( Tagged< Smi > length)
inline

Definition at line 40 of file js-array-inl.h.

Here is the call graph for this function:

◆ SetContent()

void v8::internal::JSArray::SetContent ( DirectHandle< JSArray > array,
DirectHandle< FixedArrayBase > storage )
inlinestatic

Definition at line 49 of file js-array-inl.h.

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

◆ SetLength()

Maybe< bool > v8::internal::JSArray::SetLength ( DirectHandle< JSArray > array,
uint32_t length )
static

Definition at line 4812 of file objects.cc.

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

◆ SetLengthWouldNormalize() [1/2]

bool v8::internal::JSArray::SetLengthWouldNormalize ( Heap * heap,
uint32_t new_length )
inlinestatic

Definition at line 45 of file js-array-inl.h.

◆ SetLengthWouldNormalize() [2/2]

bool v8::internal::JSArray::SetLengthWouldNormalize ( uint32_t new_length)

Definition at line 4891 of file objects.cc.

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

◆ WouldChangeReadOnlyLength()

bool v8::internal::JSArray::WouldChangeReadOnlyLength ( DirectHandle< JSArray > array,
uint32_t index )
static

Definition at line 4976 of file objects.cc.

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

Member Data Documentation

◆ kInitialMaxFastElementArray

const int v8::internal::JSArray::kInitialMaxFastElementArray
static
Initial value:
=
(kMaxRegularHeapObjectSize - sizeof(FixedArray) - kHeaderSize -
sizeof(AllocationMemento)) >>
constexpr int kMaxRegularHeapObjectSize
Definition globals.h:680
constexpr int kDoubleSizeLog2
Definition globals.h:421

Definition at line 144 of file js-array.h.

◆ kLengthDescriptorIndex

const int v8::internal::JSArray::kLengthDescriptorIndex = 0
static

Definition at line 124 of file js-array.h.

◆ kMaxArrayIndex

uint32_t v8::internal::JSArray::kMaxArrayIndex = JSObject::kMaxElementIndex
staticconstexpr

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

◆ kMaxArrayLength

uint32_t v8::internal::JSArray::kMaxArrayLength = JSObject::kMaxElementCount
staticconstexpr

Definition at line 130 of file js-array.h.

◆ kMaxCopyElements

const int v8::internal::JSArray::kMaxCopyElements = 100
static

Definition at line 127 of file js-array.h.

◆ kMaxFastArrayLength

uint32_t v8::internal::JSArray::kMaxFastArrayLength
staticconstexpr
Initial value:
=
V8_LOWER_LIMITS_MODE_BOOL ? (8 * 1024 * 1024) : (32 * 1024 * 1024)
#define V8_LOWER_LIMITS_MODE_BOOL
Definition globals.h:129

Definition at line 136 of file js-array.h.

◆ kMinJoinStackSize

const uint32_t v8::internal::JSArray::kMinJoinStackSize = 2
static

Definition at line 142 of file js-array.h.

◆ kPreallocatedArrayElements

const int v8::internal::JSArray::kPreallocatedArrayElements = 4
static

Definition at line 122 of file js-array.h.


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