Index: runtime/vm/raw_object_snapshot.cc |
diff --git a/runtime/vm/raw_object_snapshot.cc b/runtime/vm/raw_object_snapshot.cc |
index 2759f83f2cde54e0d7a60b1382bfe617bb18764e..051855ff1a4c24f637e05d9492a854d8bf047812 100644 |
--- a/runtime/vm/raw_object_snapshot.cc |
+++ b/runtime/vm/raw_object_snapshot.cc |
@@ -701,7 +701,7 @@ void RawFunction::WriteTo(SnapshotWriter* writer, |
writer->Write<bool>(is_in_fullsnapshot); |
if (kind == Snapshot::kFull || !is_in_fullsnapshot) { |
- bool is_optimized = Code::IsOptimized(ptr()->code_); |
+ bool is_optimized = Code::IsOptimized(ptr()->instructions_->ptr()->code_); |
// Write out all the non object fields. |
writer->Write<int32_t>(ptr()->token_pos_); |
@@ -1191,6 +1191,8 @@ RawCode* Code::ReadFrom(SnapshotReader* reader, |
result.set_compile_timestamp(reader->Read<int64_t>()); |
result.set_state_bits(reader->Read<int32_t>()); |
+ result.set_entry_patch_pc_offset(reader->Read<int32_t>()); |
+ result.set_patch_code_pc_offset(reader->Read<int32_t>()); |
result.set_lazy_deopt_pc_offset(reader->Read<int32_t>()); |
// Set all the object fields. |
@@ -1227,6 +1229,8 @@ void RawCode::WriteTo(SnapshotWriter* writer, |
// Write out all the non object fields. |
writer->Write<int64_t>(ptr()->compile_timestamp_); |
writer->Write<int32_t>(ptr()->state_bits_); |
+ writer->Write<int32_t>(ptr()->entry_patch_pc_offset_); |
+ writer->Write<int32_t>(ptr()->patch_code_pc_offset_); |
writer->Write<int32_t>(ptr()->lazy_deopt_pc_offset_); |
// Write out all the object pointer fields. |
@@ -1283,6 +1287,12 @@ void RawInstructions::WriteTo(SnapshotWriter* writer, |
ptr()->tags_ = object_tags; |
writer->Write<int32_t>(writer->GetInstructionsId(this)); |
ptr()->tags_ = snapshot_tags; |
+ |
+ { |
+ // TODO(rmacnak): Drop after calling convention change. |
+ writer->WriteObjectImpl(ptr()->code_, kAsReference); |
+ writer->WriteObjectImpl(ptr()->object_pool_, kAsReference); |
+ } |
} |