Flutter Engine
The Flutter Engine
Public Member Functions | Static Public Member Functions | Protected Member Functions | List of all members
dart::FixedArray< Subclass, Element > Class Template Reference

Public Member Functions

intptr_t length () const
 
Elementoperator[] (intptr_t i)
 
const Elementoperator[] (intptr_t i) const
 
Elementdata ()
 
const Elementdata () const
 
Elementbegin ()
 
const Elementbegin () const
 
Elementend ()
 
const Elementend () const
 

Static Public Member Functions

static Subclass & Allocate (intptr_t length)
 

Protected Member Functions

 FixedArray (intptr_t length)
 

Detailed Description

template<typename Subclass, typename Element>
class dart::FixedArray< Subclass, Element >

Definition at line 11 of file parallel_move_resolver.cc.

Constructor & Destructor Documentation

◆ FixedArray()

template<typename Subclass , typename Element >
dart::FixedArray< Subclass, Element >::FixedArray ( intptr_t  length)
inlineexplicitprotected

Definition at line 43 of file parallel_move_resolver.cc.

43: length_(length) {}
intptr_t length() const

Member Function Documentation

◆ Allocate()

template<typename Subclass , typename Element >
static Subclass & dart::FixedArray< Subclass, Element >::Allocate ( intptr_t  length)
inlinestatic

Definition at line 13 of file parallel_move_resolver.cc.

13 {
14 static_assert(Utils::IsAligned(alignof(Subclass), alignof(Element)));
15 auto result =
16 reinterpret_cast<void*>(Thread::Current()->zone()->AllocUnsafe(
17 sizeof(Subclass) + length * sizeof(Element)));
18 return *new (result) Subclass(length);
19 }
Zone * zone() const
Definition: thread_state.h:37
static Thread * Current()
Definition: thread.h:362
static constexpr bool IsAligned(T x, uintptr_t alignment, uintptr_t offset=0)
Definition: utils.h:92
void * AllocUnsafe(intptr_t size)
GAsyncResult * result
Definition: dart.idl:42

◆ begin() [1/2]

template<typename Subclass , typename Element >
Element * dart::FixedArray< Subclass, Element >::begin ( )
inline

Definition at line 36 of file parallel_move_resolver.cc.

36{ return data(); }

◆ begin() [2/2]

template<typename Subclass , typename Element >
const Element * dart::FixedArray< Subclass, Element >::begin ( ) const
inline

Definition at line 37 of file parallel_move_resolver.cc.

37{ return data(); }

◆ data() [1/2]

template<typename Subclass , typename Element >
Element * dart::FixedArray< Subclass, Element >::data ( )
inline

Definition at line 33 of file parallel_move_resolver.cc.

#define OPEN_ARRAY_START(type, align)
Definition: globals.h:154

◆ data() [2/2]

template<typename Subclass , typename Element >
const Element * dart::FixedArray< Subclass, Element >::data ( ) const
inline

Definition at line 34 of file parallel_move_resolver.cc.

◆ end() [1/2]

template<typename Subclass , typename Element >
Element * dart::FixedArray< Subclass, Element >::end ( )
inline

Definition at line 39 of file parallel_move_resolver.cc.

39{ return data() + length_; }

◆ end() [2/2]

template<typename Subclass , typename Element >
const Element * dart::FixedArray< Subclass, Element >::end ( ) const
inline

Definition at line 40 of file parallel_move_resolver.cc.

40{ return data() + length_; }

◆ length()

template<typename Subclass , typename Element >
intptr_t dart::FixedArray< Subclass, Element >::length ( ) const
inline

Definition at line 21 of file parallel_move_resolver.cc.

21{ return length_; }

◆ operator[]() [1/2]

template<typename Subclass , typename Element >
Element & dart::FixedArray< Subclass, Element >::operator[] ( intptr_t  i)
inline

Definition at line 23 of file parallel_move_resolver.cc.

23 {
24 ASSERT(0 <= i && i < length_);
25 return data()[i];
26 }
#define ASSERT(E)

◆ operator[]() [2/2]

template<typename Subclass , typename Element >
const Element & dart::FixedArray< Subclass, Element >::operator[] ( intptr_t  i) const
inline

Definition at line 28 of file parallel_move_resolver.cc.

28 {
29 ASSERT(0 <= i && i < length_);
30 return data()[i];
31 }

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