3249 {
3250 Deserializer::Local
d(d_);
3251
3253 fill_position_ =
d.Position();
3254#if defined(DART_PRECOMPILED_RUNTIME)
3256 ObjectPool::EntryType::kImmediate, ObjectPool::Patchability::kPatchable,
3257 ObjectPool::SnapshotBehavior::kSnapshotable);
3258 uword switchable_call_miss_entry_point =
3259 StubCode::SwitchableCallMiss().MonomorphicEntryPoint();
3260#endif
3261
3263 const intptr_t
length =
d.ReadUnsigned();
3264 ObjectPoolPtr
pool =
static_cast<ObjectPoolPtr
>(
d.Ref(
id));
3268 for (intptr_t j = 0; j <
length; j++) {
3269 const uint8_t entry_bits =
d.Read<uint8_t>();
3270 pool->untag()->entry_bits()[j] = entry_bits;
3272 const auto snapshot_behavior =
3274 ASSERT(snapshot_behavior !=
3275 ObjectPool::SnapshotBehavior::kNotSnapshotable);
3276 switch (snapshot_behavior) {
3277 case ObjectPool::SnapshotBehavior::kSnapshotable:
3278
3279 break;
3280 case ObjectPool::SnapshotBehavior::kResetToBootstrapNative:
3281 entry.raw_obj_ = StubCode::CallBootstrapNative().ptr();
3282 continue;
3283#if defined(DART_PRECOMPILED_RUNTIME)
3284 case ObjectPool::SnapshotBehavior::
3285 kResetToSwitchableCallMissEntryPoint:
3286 pool->untag()->entry_bits()[j] = immediate_bits;
3287 entry.raw_value_ =
3288 static_cast<intptr_t>(switchable_call_miss_entry_point);
3289 continue;
3290#endif
3291 case ObjectPool::SnapshotBehavior::kSetToZero:
3292 entry.raw_value_ = 0;
3293 continue;
3294 default:
3295 FATAL(
"Unexpected snapshot behavior: %d\n", snapshot_behavior);
3296 }
3298 case ObjectPool::EntryType::kTaggedObject:
3299 entry.raw_obj_ =
d.ReadRef();
3300 break;
3301 case ObjectPool::EntryType::kImmediate:
3302 entry.raw_value_ =
d.Read<intptr_t>();
3303 break;
3304 case ObjectPool::EntryType::kNativeFunction: {
3305
3307 entry.raw_value_ = static_cast<intptr_t>(new_entry);
3308 break;
3309 }
3310 default:
3312 }
3313 }
3314 }
3315 }
static constexpr T decode(S value)
bool is_canonical() const
static void InitializeHeader(ObjectPtr raw, intptr_t cid, intptr_t size, bool is_canonical=false)
static uword LinkNativeCallEntry()
static uint8_t EncodeBits(EntryType type, Patchability patchable, SnapshotBehavior snapshot_behavior)