Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Types | Static Public Attributes | Protected Member Functions | Protected Attributes | Friends | List of all members
dart::UntaggedAbstractType Class Reference

#include <raw_object.h>

Inheritance diagram for dart::UntaggedAbstractType:
dart::UntaggedInstance dart::UntaggedObject dart::UntaggedFunctionType dart::UntaggedRecordType dart::UntaggedType dart::UntaggedTypeParameter

Public Types

enum  TypeState { kAllocated , kFinalizedInstantiated , kFinalizedUninstantiated }
 
using NullabilityBits = BitField< uint32_t, uint8_t, 0, 2 >
 
using TypeStateBits = BitField< uint32_t, uint8_t, kTypeStateShift, kTypeStateBits >
 
- Public Types inherited from dart::UntaggedObject
enum  TagBits {
  kCardRememberedBit = 0 , kCanonicalBit = 1 , kNotMarkedBit = 2 , kNewBit = 3 ,
  kAlwaysSetBit = 4 , kOldAndNotRememberedBit = 5 , kImmutableBit = 6 , kReservedBit = 7 ,
  kSizeTagPos = kReservedBit + 1 , kSizeTagSize = 4 , kClassIdTagPos = kSizeTagPos + kSizeTagSize , kClassIdTagSize = 20 ,
  kHashTagPos = kClassIdTagPos + kClassIdTagSize , kHashTagSize = 32
}
 

Static Public Attributes

static constexpr intptr_t kNullabilityMask = NullabilityBits::mask()
 
static constexpr intptr_t kTypeStateShift = NullabilityBits::kNextBit
 
static constexpr intptr_t kTypeStateBits = 2
 
- Static Public Attributes inherited from dart::UntaggedInstance
static constexpr bool kContainsCompressedPointers = false
 
- Static Public Attributes inherited from dart::UntaggedObject
static constexpr intptr_t kGenerationalBarrierMask = 1 << kNewBit
 
static constexpr intptr_t kIncrementalBarrierMask = 1 << kNotMarkedBit
 
static constexpr intptr_t kBarrierOverlapShift = 2
 

Protected Member Functions

uint32_t flags () const
 
void set_flags (uint32_t value)
 
- Protected Member Functions inherited from dart::UntaggedObject
template<typename type , std::memory_order order = std::memory_order_relaxed>
type LoadPointer (type const *addr) const
 
template<typename type , typename compressed_type , std::memory_order order = std::memory_order_relaxed>
type LoadCompressedPointer (compressed_type const *addr) const
 
uword heap_base () const
 
template<typename type , std::memory_order order = std::memory_order_relaxed>
void StorePointer (type const *addr, type value)
 
template<typename type , typename compressed_type , std::memory_order order = std::memory_order_relaxed>
void StoreCompressedPointer (compressed_type const *addr, type value)
 
template<typename type >
void StorePointer (type const *addr, type value, Thread *thread)
 
template<typename type , typename compressed_type >
void StoreCompressedPointer (compressed_type const *addr, type value, Thread *thread)
 
template<typename type >
void StorePointerUnaligned (type const *addr, type value, Thread *thread)
 
template<typename type , std::memory_order order = std::memory_order_relaxed, typename value_type = type>
void StoreArrayPointer (type const *addr, value_type value)
 
template<typename type , typename value_type = type>
void StoreArrayPointer (type const *addr, value_type value, Thread *thread)
 
template<typename type , typename compressed_type , std::memory_order order>
void StoreCompressedArrayPointer (compressed_type const *addr, type value)
 
template<typename type , typename compressed_type , std::memory_order order>
void StoreCompressedArrayPointer (compressed_type const *addr, type value, Thread *thread)
 
template<typename type , typename compressed_type >
void StoreCompressedArrayPointer (compressed_type const *addr, type value, Thread *thread)
 
template<typename type , typename compressed_type , std::memory_order order = std::memory_order_relaxed>
type ExchangeCompressedPointer (compressed_type const *addr, type value)
 
template<std::memory_order order = std::memory_order_relaxed>
SmiPtr LoadSmi (SmiPtr const *addr) const
 
template<std::memory_order order = std::memory_order_relaxed>
SmiPtr LoadCompressedSmi (CompressedSmiPtr const *addr) const
 
template<typename type , std::memory_order order = std::memory_order_relaxed>
void StoreSmi (type const *addr, type value)
 
template<std::memory_order order = std::memory_order_relaxed>
void StoreCompressedSmi (CompressedSmiPtr const *addr, SmiPtr value)
 

Protected Attributes

std::atomic< uwordtype_test_stub_entry_point_
 
std::atomic< uint32_t > flags_
 

Friends

class ObjectStore
 
class StubCode
 

Additional Inherited Members

- Public Member Functions inherited from dart::UntaggedObject
 COMPILE_ASSERT (kNotMarkedBit+kBarrierOverlapShift==kAlwaysSetBit)
 
 COMPILE_ASSERT (kNewBit+kBarrierOverlapShift==kOldAndNotRememberedBit)
 
 COMPILE_ASSERT (kCardRememberedBit==0)
 
 COMPILE_ASSERT (kBitsPerByte *sizeof(ClassIdTagType) >=kClassIdTagSize)
 
 COMPILE_ASSERT (kClassIdTagMax==(1<< kClassIdTagSize) - 1)
 
bool IsNewObject () const
 
bool IsOldObject () const
 
uword tags () const
 
bool IsMarked () const
 
bool IsMarkedIgnoreRace () const
 
void SetMarkBit ()
 
void SetMarkBitUnsynchronized ()
 
void SetMarkBitRelease ()
 
void ClearMarkBit ()
 
void ClearMarkBitUnsynchronized ()
 
DART_WARN_UNUSED_RESULT bool TryAcquireMarkBit ()
 
bool IsCanonical () const
 
void SetCanonical ()
 
void ClearCanonical ()
 
bool IsImmutable () const
 
void SetImmutable ()
 
void ClearImmutable ()
 
bool InVMIsolateHeap () const
 
bool IsRemembered () const
 
bool TryAcquireRememberedBit ()
 
void ClearRememberedBit ()
 
void ClearRememberedBitUnsynchronized ()
 
DART_FORCE_INLINE void EnsureInRememberedSet (Thread *thread)
 
bool IsCardRemembered () const
 
void SetCardRememberedBitUnsynchronized ()
 
intptr_t GetClassId () const
 
intptr_t HeapSize () const
 
intptr_t HeapSize (uword tags) const
 
bool Contains (uword addr) const
 
void Validate (IsolateGroup *isolate_group) const
 
intptr_t VisitPointers (ObjectPointerVisitor *visitor)
 
template<class V >
DART_FORCE_INLINE intptr_t VisitPointersNonvirtual (V *visitor)
 
void VisitPointersPrecise (ObjectPointerVisitor *visitor)
 
- Static Public Member Functions inherited from dart::UntaggedObject
static bool IsMarked (uword tags)
 
static ObjectPtr FromAddr (uword addr)
 
static uword ToAddr (const UntaggedObject *raw_obj)
 
static uword ToAddr (const ObjectPtr raw_obj)
 
static bool IsCanonical (intptr_t value)
 
- Static Protected Member Functions inherited from dart::UntaggedObject
template<typename T >
static DART_FORCE_INLINE uword from_offset ()
 
template<typename T >
static DART_FORCE_INLINE uword to_offset (intptr_t length=0)
 
template<>
DART_FORCE_INLINE uword from_offset ()
 
template<>
DART_FORCE_INLINE uword to_offset (intptr_t length)
 
template<>
DART_FORCE_INLINE uword to_offset (intptr_t length)
 
template<>
DART_FORCE_INLINE uword to_offset (intptr_t length)
 
- Static Protected Attributes inherited from dart::UntaggedObject
static constexpr bool kContainsCompressedPointers = false
 
static constexpr bool kContainsPointerFields = false
 

Detailed Description

Definition at line 2740 of file raw_object.h.

Member Typedef Documentation

◆ NullabilityBits

using dart::UntaggedAbstractType::NullabilityBits = BitField<uint32_t, uint8_t, 0, 2>

Definition at line 2765 of file raw_object.h.

◆ TypeStateBits

Definition at line 2770 of file raw_object.h.

Member Enumeration Documentation

◆ TypeState

Enumerator
kAllocated 
kFinalizedInstantiated 
kFinalizedUninstantiated 

Definition at line 2759 of file raw_object.h.

2759 {
2760 kAllocated, // Initial state.
2761 kFinalizedInstantiated, // Instantiated type ready for use.
2762 kFinalizedUninstantiated, // Uninstantiated type ready for use.
2763 };

Member Function Documentation

◆ flags()

uint32_t dart::UntaggedAbstractType::flags ( ) const
inlineprotected

Definition at line 2753 of file raw_object.h.

2753{ return flags_.load(std::memory_order_relaxed); }
std::atomic< uint32_t > flags_

◆ set_flags()

void dart::UntaggedAbstractType::set_flags ( uint32_t  value)
inlineprotected

Definition at line 2754 of file raw_object.h.

2754 {
2755 flags_.store(value, std::memory_order_relaxed);
2756 }

Friends And Related Symbol Documentation

◆ ObjectStore

friend class ObjectStore
friend

Definition at line 2776 of file raw_object.h.

◆ StubCode

friend class StubCode
friend

Definition at line 2777 of file raw_object.h.

Member Data Documentation

◆ flags_

std::atomic<uint32_t> dart::UntaggedAbstractType::flags_
protected

Definition at line 2745 of file raw_object.h.

◆ kNullabilityMask

constexpr intptr_t dart::UntaggedAbstractType::kNullabilityMask = NullabilityBits::mask()
staticconstexpr

Definition at line 2766 of file raw_object.h.

◆ kTypeStateBits

constexpr intptr_t dart::UntaggedAbstractType::kTypeStateBits = 2
staticconstexpr

Definition at line 2769 of file raw_object.h.

◆ kTypeStateShift

constexpr intptr_t dart::UntaggedAbstractType::kTypeStateShift = NullabilityBits::kNextBit
staticconstexpr

Definition at line 2768 of file raw_object.h.

◆ type_test_stub_entry_point_

std::atomic<uword> dart::UntaggedAbstractType::type_test_stub_entry_point_
protected

Definition at line 2743 of file raw_object.h.


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