Flutter Engine
The Flutter Engine
Loading...
Searching...
No Matches
Public Types | Public Member Functions | Static Public Member Functions | Public Attributes | List of all members
dart::compiler::ObjectPoolBuilderEntry Struct Reference

#include <object_pool_builder.h>

Public Types

enum  Patchability { kPatchable = 0 , kNotPatchable }
 
enum  SnapshotBehavior {
  kSnapshotable , kNotSnapshotable , kResetToBootstrapNative , kResetToSwitchableCallMissEntryPoint ,
  kSetToZero
}
 
enum  EntryType { kImmediate = 0 , kTaggedObject , kNativeFunction , kImmediate128 }
 
using TypeBits = BitField< uint8_t, EntryType, 0, 4 >
 
using PatchableBit = BitField< uint8_t, Patchability, TypeBits::kNextBit, 1 >
 
using SnapshotBehaviorBits = BitField< uint8_t, SnapshotBehavior, PatchableBit::kNextBit, 3 >
 

Public Member Functions

 ObjectPoolBuilderEntry ()
 
 ObjectPoolBuilderEntry (const Object *obj, Patchability patchable, SnapshotBehavior snapshot_behavior=kSnapshotable)
 
 ObjectPoolBuilderEntry (const Object *obj, const Object *eqv, Patchability patchable, SnapshotBehavior snapshot_behavior=kSnapshotable)
 
 ObjectPoolBuilderEntry (uword value, EntryType info, Patchability patchable, SnapshotBehavior snapshot_behavior=SnapshotBehavior::kSnapshotable)
 
 ObjectPoolBuilderEntry (simd128_value_t value, EntryType info, Patchability patchable)
 
EntryType type () const
 
Patchability patchable () const
 
SnapshotBehavior snapshot_behavior () const
 

Static Public Member Functions

static uint8_t EncodeTraits (EntryType type, Patchability patchable, SnapshotBehavior snapshot_behavior=SnapshotBehavior::kSnapshotable)
 

Public Attributes

union { 
 
   const Object *   obj_ 
 
   uword   imm_ 
 
   uint64_t   imm64_ 
 
   simd128_value_t   imm128_ 
 
};  
 
uint8_t entry_bits_
 
const Objectequivalence_
 

Detailed Description

Definition at line 23 of file object_pool_builder.h.

Member Typedef Documentation

◆ PatchableBit

Definition at line 66 of file object_pool_builder.h.

◆ SnapshotBehaviorBits

Definition at line 67 of file object_pool_builder.h.

◆ TypeBits

Definition at line 65 of file object_pool_builder.h.

Member Enumeration Documentation

◆ EntryType

Enumerator
kImmediate 
kTaggedObject 
kNativeFunction 
kImmediate128 

Definition at line 52 of file object_pool_builder.h.

52 {
53 kImmediate = 0,
56
57 // Used only during object pool building to find duplicates. Become multiple
58 // kImmediate in the final pool.
59#if defined(TARGET_ARCH_IS_32_BIT)
60 kImmediate64,
61#endif
63 };

◆ Patchability

Enumerator
kPatchable 
kNotPatchable 

Definition at line 24 of file object_pool_builder.h.

◆ SnapshotBehavior

Enumerator
kSnapshotable 
kNotSnapshotable 
kResetToBootstrapNative 
kResetToSwitchableCallMissEntryPoint 
kSetToZero 

Definition at line 29 of file object_pool_builder.h.

29 {
31
32 // This should never be snapshot. Typically an memory address in the current
33 // process.
35
36 // Set the value to StubCode::CallBootstrapNative() on snapshot reading.
38
39 // Only used in AOT. Every switchable call site will put (`ic_data`,
40 // [kTaggedObject] `code`) into the object pool. The `code` is initialized
41 // (at AOT compile-time) to be [StubCode::SwitchableCallMiss].
42 //
43 // The extra indirection via the `code` object is removed by storing
44 // (`ic_data`, [kImmediate] `entrypoint`) in the object pool instead on
45 // deserialization.
47
48 // Set the value to 0 on snapshot writing.
50 };

Constructor & Destructor Documentation

◆ ObjectPoolBuilderEntry() [1/5]

dart::compiler::ObjectPoolBuilderEntry::ObjectPoolBuilderEntry ( )
inline

◆ ObjectPoolBuilderEntry() [2/5]

dart::compiler::ObjectPoolBuilderEntry::ObjectPoolBuilderEntry ( const Object obj,
Patchability  patchable,
SnapshotBehavior  snapshot_behavior = kSnapshotable 
)
inline

◆ ObjectPoolBuilderEntry() [3/5]

dart::compiler::ObjectPoolBuilderEntry::ObjectPoolBuilderEntry ( const Object obj,
const Object eqv,
Patchability  patchable,
SnapshotBehavior  snapshot_behavior = kSnapshotable 
)
inline

Definition at line 84 of file object_pool_builder.h.

88 : obj_(obj),
90 equivalence_(eqv) {}
static uint8_t EncodeTraits(EntryType type, Patchability patchable, SnapshotBehavior snapshot_behavior=SnapshotBehavior::kSnapshotable)

◆ ObjectPoolBuilderEntry() [4/5]

dart::compiler::ObjectPoolBuilderEntry::ObjectPoolBuilderEntry ( uword  value,
EntryType  info,
Patchability  patchable,
SnapshotBehavior  snapshot_behavior = SnapshotBehavior::kSnapshotable 
)
inline

Definition at line 91 of file object_pool_builder.h.

96 : imm_(value),
98 equivalence_() {}
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
Definition DM.cpp:213

◆ ObjectPoolBuilderEntry() [5/5]

dart::compiler::ObjectPoolBuilderEntry::ObjectPoolBuilderEntry ( simd128_value_t  value,
EntryType  info,
Patchability  patchable 
)
inline

Definition at line 105 of file object_pool_builder.h.

108 : imm128_(value),
110 equivalence_() {}

Member Function Documentation

◆ EncodeTraits()

static uint8_t dart::compiler::ObjectPoolBuilderEntry::EncodeTraits ( EntryType  type,
Patchability  patchable,
SnapshotBehavior  snapshot_behavior = SnapshotBehavior::kSnapshotable 
)
inlinestatic

◆ patchable()

Patchability dart::compiler::ObjectPoolBuilderEntry::patchable ( ) const
inline

Definition at line 114 of file object_pool_builder.h.

static constexpr T decode(S value)
Definition bitfield.h:173

◆ snapshot_behavior()

SnapshotBehavior dart::compiler::ObjectPoolBuilderEntry::snapshot_behavior ( ) const
inline

Definition at line 116 of file object_pool_builder.h.

116 {
118 }

◆ type()

EntryType dart::compiler::ObjectPoolBuilderEntry::type ( ) const
inline

Definition at line 112 of file object_pool_builder.h.

112{ return TypeBits::decode(entry_bits_); }

Member Data Documentation

◆ [union]

◆ entry_bits_

uint8_t dart::compiler::ObjectPoolBuilderEntry::entry_bits_

Definition at line 126 of file object_pool_builder.h.

◆ equivalence_

const Object* dart::compiler::ObjectPoolBuilderEntry::equivalence_

Definition at line 127 of file object_pool_builder.h.

◆ imm128_

simd128_value_t dart::compiler::ObjectPoolBuilderEntry::imm128_

Definition at line 124 of file object_pool_builder.h.

◆ imm64_

uint64_t dart::compiler::ObjectPoolBuilderEntry::imm64_

Definition at line 123 of file object_pool_builder.h.

◆ imm_

uword dart::compiler::ObjectPoolBuilderEntry::imm_

Definition at line 122 of file object_pool_builder.h.

◆ obj_

const Object* dart::compiler::ObjectPoolBuilderEntry::obj_

Definition at line 121 of file object_pool_builder.h.


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