Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Member Functions | Static Public Member Functions | List of all members
dart::SlotCache Class Reference
Inheritance diagram for dart::SlotCache:
dart::ZoneAllocated

Public Member Functions

const SlotCanonicalize (const Slot &value)
 
const SlotGetNativeSlot (Slot::Kind kind)
 
- Public Member Functions inherited from dart::ZoneAllocated
 ZoneAllocated ()
 
void * operator new (size_t size)
 
void * operator new (size_t size, Zone *zone)
 
void operator delete (void *pointer)
 

Static Public Member Functions

static SlotCacheInstance (Thread *thread)
 

Detailed Description

Definition at line 27 of file slot.cc.

Member Function Documentation

◆ Canonicalize()

const Slot & dart::SlotCache::Canonicalize ( const Slot value)
inline

Definition at line 39 of file slot.cc.

39 {
40 auto result = fields_.LookupValue(&value);
41 if (result == nullptr) {
42 result = new (zone_) Slot(value);
43 fields_.Insert(result);
44 }
45 return *result;
46 }
GAsyncResult * result

◆ GetNativeSlot()

const Slot & dart::SlotCache::GetNativeSlot ( Slot::Kind  kind)
inline

Definition at line 48 of file slot.cc.

48 {
49 const intptr_t index = static_cast<intptr_t>(kind);
50 ASSERT((index >= 0) && (index < kNativeSlotsCount));
51 const Slot* slot = native_fields_[index];
52 if (slot == nullptr) {
53 native_fields_[index] = slot = CreateNativeSlot(kind);
54 }
55 return *slot;
56 }
#define ASSERT(E)
@ kNativeSlotsCount
Definition slot.cc:20

◆ Instance()

static SlotCache & dart::SlotCache::Instance ( Thread thread)
inlinestatic

Definition at line 30 of file slot.cc.

30 {
31 auto result = thread->compiler_state().slot_cache();
32 if (result == nullptr) {
33 result = new (thread->zone()) SlotCache(thread);
34 thread->compiler_state().set_slot_cache(result);
35 }
36 return *result;
37 }

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