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

Unified Diff: runtime/vm/raw_object_snapshot.cc

Issue 1358773002: Load the native call wrapper via Thread. (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/object.cc ('k') | runtime/vm/stub_code_arm.cc » ('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 7288624e7f302d374af6072ea08224ba7ae58186..7f20153165aa3813c048b3b8c3864aee102a9da2 100644
--- a/runtime/vm/raw_object_snapshot.cc
+++ b/runtime/vm/raw_object_snapshot.cc
@@ -1318,20 +1318,10 @@ RawObjectPool* ObjectPool::ReadFrom(SnapshotReader* reader,
result.SetRawValueAt(i, raw_value);
break;
}
- case ObjectPool::kExternalLabel: {
- // TODO(rmacnak): Relocate.
- intptr_t raw_value = reader->Read<intptr_t>();
- result.SetRawValueAt(i, raw_value);
- break;
- }
case ObjectPool::kNativeEntry: {
// Read nothing. Initialize with the lazy link entry.
- uword entry = reinterpret_cast<uword>(&NativeEntry::LinkNativeCall);
-#if defined(USING_SIMULATOR)
- entry = Simulator::RedirectExternalReference(
- entry, Simulator::kBootstrapNativeCall, NativeEntry::kNumArguments);
-#endif
- result.SetRawValueAt(i, entry);
+ uword new_entry = NativeEntry::LinkNativeCallEntry();
+ result.SetRawValueAt(i, static_cast<intptr_t>(new_entry));
break;
}
default:
@@ -1367,19 +1357,18 @@ void RawObjectPool::WriteTo(SnapshotWriter* writer,
writer->Write<int8_t>(entry_type);
Entry& entry = ptr()->data()[i];
switch (entry_type) {
- case ObjectPool::kTaggedObject:
+ case ObjectPool::kTaggedObject: {
writer->WriteObjectImpl(entry.raw_obj_, kAsReference);
break;
- case ObjectPool::kImmediate:
- writer->Write<intptr_t>(entry.raw_value_);
- break;
- case ObjectPool::kExternalLabel:
- // TODO(rmacnak): Write symbolically.
+ }
+ case ObjectPool::kImmediate: {
writer->Write<intptr_t>(entry.raw_value_);
break;
- case ObjectPool::kNativeEntry:
+ }
+ case ObjectPool::kNativeEntry: {
// Write nothing. Will initialize with the lazy link entry.
break;
+ }
default:
UNREACHABLE();
}
« no previous file with comments | « runtime/vm/object.cc ('k') | runtime/vm/stub_code_arm.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698