Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(90)

Unified Diff: runtime/vm/raw_object_snapshot.cc

Issue 1343373003: Revert "VM: New calling convention for generated code." (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: Created 5 years, 3 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/raw_object.cc ('k') | runtime/vm/runtime_entry_list.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
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);
+ }
}
« no previous file with comments | « runtime/vm/raw_object.cc ('k') | runtime/vm/runtime_entry_list.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698