5#ifndef RUNTIME_VM_COMPILER_ASSEMBLER_OBJECT_POOL_BUILDER_H_
6#define RUNTIME_VM_COMPILER_ASSEMBLER_OBJECT_POOL_BUILDER_H_
59#if defined(TARGET_ARCH_IS_32_BIT)
99#if defined(ARCH_IS_32_BIT)
141 : key_(reinterpret_cast<
uword>(nullptr),
153#if defined(TARGET_ARCH_IS_32_BIT)
154 }
else if (
key.type() == ObjectPoolBuilderEntry::kImmediate64) {
180#if defined(TARGET_ARCH_IS_32_BIT)
181 if (kv.key_.
type() == ObjectPoolBuilderEntry::kImmediate64) {
185 return kv.key_.
imm_ ==
key.imm_;
203 base_index_(parent != nullptr ? parent->
CurrentLength() : 0),
207 if (zone_ !=
nullptr) {
223 ASSERT(object_pool_.length() == 0);
224 ASSERT(zone_ ==
nullptr && zone !=
nullptr);
257 return object_pool_.length() + used_from_parent_.
length();
260 if (
i < used_from_parent_.
length()) {
261 return parent_->
EntryAt(used_from_parent_[
i]);
263 return object_pool_[
i - used_from_parent_.
length()];
266 if (
i < used_from_parent_.
length()) {
267 return parent_->
EntryAt(used_from_parent_[
i]);
269 return object_pool_[
i - used_from_parent_.
length()];
291 const intptr_t base_index_;
static void info(const char *fmt,...) SK_PRINTF_LIKE(1
static constexpr T decode(S value)
static constexpr S encode(T value)
static bool IsKeyEqual(Pair kv, Key key)
static Key KeyOf(Pair kv)
static Value ValueOf(Pair kv)
ObjectPoolBuilderEntry Key
static constexpr intptr_t kNoIndex
static uword Hash(Key key)
ObjIndexPair(Key key, Value value)
intptr_t AddObject(const Object &obj, ObjectPoolBuilderEntry::Patchability patchable=ObjectPoolBuilderEntry::kNotPatchable, ObjectPoolBuilderEntry::SnapshotBehavior snapshot_behavior=ObjectPoolBuilderEntry::kSnapshotable)
intptr_t AddImmediate(uword imm, ObjectPoolBuilderEntry::Patchability patchable=ObjectPoolBuilderEntry::kNotPatchable, ObjectPoolBuilderEntry::SnapshotBehavior snapshotability=ObjectPoolBuilderEntry::kSnapshotable)
intptr_t AddImmediate64(uint64_t imm)
intptr_t CurrentLength() const
void InitializeWithZone(Zone *zone)
intptr_t FindImmediate128(simd128_value_t imm)
intptr_t FindObject(const Object &obj, ObjectPoolBuilderEntry::Patchability patchable=ObjectPoolBuilderEntry::kNotPatchable, ObjectPoolBuilderEntry::SnapshotBehavior snapshot_behavior=ObjectPoolBuilderEntry::kSnapshotable)
const ObjectPoolBuilderEntry & EntryAt(intptr_t i) const
intptr_t FindImmediate(uword imm)
intptr_t FindImmediate64(uint64_t imm)
ObjectPoolBuilderEntry & EntryAt(intptr_t i)
intptr_t FindNativeFunction(const ExternalLabel *label, ObjectPoolBuilderEntry::Patchability patchable)
ObjectPoolBuilder(ObjectPoolBuilder *parent=nullptr)
intptr_t AddImmediate128(simd128_value_t imm)
bool IsSameObject(const Object &a, const Object &b)
ObjectPoolBuilderEntry(uword value, EntryType info, Patchability patchable, SnapshotBehavior snapshot_behavior=SnapshotBehavior::kSnapshotable)
static uint8_t EncodeTraits(EntryType type, Patchability patchable, SnapshotBehavior snapshot_behavior=SnapshotBehavior::kSnapshotable)
const Object * equivalence_
@ kResetToBootstrapNative
@ kResetToSwitchableCallMissEntryPoint
ObjectPoolBuilderEntry(const Object *obj, Patchability patchable, SnapshotBehavior snapshot_behavior=kSnapshotable)
ObjectPoolBuilderEntry(const Object *obj, const Object *eqv, Patchability patchable, SnapshotBehavior snapshot_behavior=kSnapshotable)
Patchability patchable() const
ObjectPoolBuilderEntry(simd128_value_t value, EntryType info, Patchability patchable)
SnapshotBehavior snapshot_behavior() const