v8
V8 is Google’s open source high-performance JavaScript and WebAssembly engine, written in C++.
Loading...
Searching...
No Matches
v8::internal::PrimitiveArrayBase< Derived, ShapeT, Super > Class Template Reference

#include <fixed-array.h>

Inheritance diagram for v8::internal::PrimitiveArrayBase< Derived, ShapeT, Super >:
Collaboration diagram for v8::internal::PrimitiveArrayBase< Derived, ShapeT, Super >:

Public Types

using Shape = ShapeT
 
using Header = detail::ArrayHeaderBase<Super, true>
 

Public Member Functions

ElementMemberT get (int index) const
 
void set (int index, ElementMemberT value)
 
int AllocatedSize () const
 
ElementMemberT * begin ()
 
const ElementMemberT * begin () const
 
ElementMemberT * end ()
 
const ElementMemberT * end () const
 
int DataSize () const
 
template<class IsolateT >
Handle< D > Allocate (IsolateT *isolate, int length, std::optional< DisallowGarbageCollection > *no_gc_out, AllocationType allocation)
 

Static Public Member Functions

static constexpr int SizeFor (int length)
 
static constexpr int OffsetOfElementAt (int index)
 
static Tagged< Derived > FromAddressOfFirstElement (Address address)
 

Static Public Attributes

static constexpr bool kElementsAreMaybeObject = false
 
static constexpr int kElementSize = sizeof(ElementMemberT)
 
static constexpr int kMaxLength = kMaxFixedArrayCapacity
 
static constexpr int kMaxRegularLength
 

Protected Member Functions

bool IsInBounds (int index) const
 
 FLEXIBLE_ARRAY_MEMBER (ElementMemberT, values)
 

Static Protected Member Functions

template<class IsolateT >
static Handle< Derived > Allocate (IsolateT *isolate, int length, std::optional< DisallowGarbageCollection > *no_gc_out, AllocationType allocation=AllocationType::kYoung)
 

Private Types

using ElementT = typename ShapeT::ElementT
 
using ElementMemberT
 

Detailed Description

template<class Derived, class ShapeT, class Super = HeapObjectLayout>
class v8::internal::PrimitiveArrayBase< Derived, ShapeT, Super >

Definition at line 386 of file fixed-array.h.

Member Typedef Documentation

◆ ElementMemberT

template<class Derived , class ShapeT , class Super = HeapObjectLayout>
using v8::internal::PrimitiveArrayBase< Derived, ShapeT, Super >::ElementMemberT
private
Initial value:
std::conditional_t<std::is_same_v<ElementT, double>,
UnalignedDoubleMember, ElementT>
typename ShapeT::ElementT ElementT

Definition at line 393 of file fixed-array.h.

◆ ElementT

template<class Derived , class ShapeT , class Super = HeapObjectLayout>
using v8::internal::PrimitiveArrayBase< Derived, ShapeT, Super >::ElementT = typename ShapeT::ElementT
private

Definition at line 389 of file fixed-array.h.

◆ Header

template<class Derived , class ShapeT , class Super = HeapObjectLayout>
using v8::internal::PrimitiveArrayBase< Derived, ShapeT, Super >::Header = detail::ArrayHeaderBase<Super, true>

Definition at line 401 of file fixed-array.h.

◆ Shape

template<class Derived , class ShapeT , class Super = HeapObjectLayout>
using v8::internal::PrimitiveArrayBase< Derived, ShapeT, Super >::Shape = ShapeT

Definition at line 398 of file fixed-array.h.

Member Function Documentation

◆ Allocate() [1/2]

template<class Derived , class ShapeT , class Super = HeapObjectLayout>
template<class IsolateT >
Handle< D > v8::internal::PrimitiveArrayBase< Derived, ShapeT, Super >::Allocate ( IsolateT * isolate,
int length,
std::optional< DisallowGarbageCollection > * no_gc_out,
AllocationType allocation )

Definition at line 518 of file fixed-array-inl.h.

Here is the call graph for this function:

◆ Allocate() [2/2]

template<class Derived , class ShapeT , class Super = HeapObjectLayout>
template<class IsolateT >
static Handle< Derived > v8::internal::PrimitiveArrayBase< Derived, ShapeT, Super >::Allocate ( IsolateT * isolate,
int length,
std::optional< DisallowGarbageCollection > * no_gc_out,
AllocationType allocation = AllocationType::kYoung )
staticprotected

◆ AllocatedSize()

template<class D , class S , class P >
int v8::internal::PrimitiveArrayBase< D, S, P >::AllocatedSize ( ) const
inline

Definition at line 461 of file fixed-array-inl.h.

◆ begin() [1/2]

template<class D , class S , class P >
auto v8::internal::PrimitiveArrayBase< D, S, P >::begin ( )
inline

Definition at line 466 of file fixed-array-inl.h.

◆ begin() [2/2]

template<class D , class S , class P >
auto v8::internal::PrimitiveArrayBase< D, S, P >::begin ( ) const
inline

Definition at line 471 of file fixed-array-inl.h.

◆ DataSize()

template<class D , class S , class P >
int v8::internal::PrimitiveArrayBase< D, S, P >::DataSize ( ) const
inline

Definition at line 486 of file fixed-array-inl.h.

◆ end() [1/2]

template<class D , class S , class P >
auto v8::internal::PrimitiveArrayBase< D, S, P >::end ( )
inline

Definition at line 476 of file fixed-array-inl.h.

◆ end() [2/2]

template<class D , class S , class P >
auto v8::internal::PrimitiveArrayBase< D, S, P >::end ( ) const
inline

Definition at line 481 of file fixed-array-inl.h.

◆ FLEXIBLE_ARRAY_MEMBER()

template<class Derived , class ShapeT , class Super = HeapObjectLayout>
v8::internal::PrimitiveArrayBase< Derived, ShapeT, Super >::FLEXIBLE_ARRAY_MEMBER ( ElementMemberT ,
values  )
protected

◆ FromAddressOfFirstElement()

template<class D , class S , class P >
Tagged< D > v8::internal::PrimitiveArrayBase< D, S, P >::FromAddressOfFirstElement ( Address address)
inlinestatic

Definition at line 494 of file fixed-array-inl.h.

Here is the call graph for this function:

◆ get()

template<class D , class S , class P >
auto v8::internal::PrimitiveArrayBase< D, S, P >::get ( int index) const
inline

Definition at line 446 of file fixed-array-inl.h.

◆ IsInBounds()

template<class D , class S , class P >
bool v8::internal::PrimitiveArrayBase< D, S, P >::IsInBounds ( int index) const
inlineprotected

Definition at line 441 of file fixed-array-inl.h.

◆ OffsetOfElementAt()

template<class Derived , class ShapeT , class Super = HeapObjectLayout>
static constexpr int v8::internal::PrimitiveArrayBase< Derived, ShapeT, Super >::OffsetOfElementAt ( int index)
inlinestaticconstexpr

Definition at line 410 of file fixed-array.h.

Here is the caller graph for this function:

◆ set()

template<class D , class S , class P >
void v8::internal::PrimitiveArrayBase< D, S, P >::set ( int index,
ElementMemberT value )
inline

Definition at line 452 of file fixed-array-inl.h.

◆ SizeFor()

template<class Derived , class ShapeT , class Super = HeapObjectLayout>
static constexpr int v8::internal::PrimitiveArrayBase< Derived, ShapeT, Super >::SizeFor ( int length)
inlinestaticconstexpr

Definition at line 407 of file fixed-array.h.

Here is the call graph for this function:

Member Data Documentation

◆ kElementsAreMaybeObject

template<class Derived , class ShapeT , class Super = HeapObjectLayout>
bool v8::internal::PrimitiveArrayBase< Derived, ShapeT, Super >::kElementsAreMaybeObject = false
staticconstexpr

Definition at line 399 of file fixed-array.h.

◆ kElementSize

template<class Derived , class ShapeT , class Super = HeapObjectLayout>
int v8::internal::PrimitiveArrayBase< Derived, ShapeT, Super >::kElementSize = sizeof(ElementMemberT)
staticconstexpr

Definition at line 400 of file fixed-array.h.

◆ kMaxLength

template<class Derived , class ShapeT , class Super = HeapObjectLayout>
int v8::internal::PrimitiveArrayBase< Derived, ShapeT, Super >::kMaxLength = kMaxFixedArrayCapacity
staticconstexpr

Definition at line 431 of file fixed-array.h.

◆ kMaxRegularLength

template<class Derived , class ShapeT , class Super = HeapObjectLayout>
int v8::internal::PrimitiveArrayBase< Derived, ShapeT, Super >::kMaxRegularLength
staticconstexpr
Initial value:
=
static constexpr int kElementSize
detail::ArrayHeaderBase< Super, true > Header
constexpr int kMaxRegularHeapObjectSize
Definition globals.h:680

Definition at line 435 of file fixed-array.h.


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