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

Unified Diff: runtime/vm/object.cc

Issue 1336763002: Last snapshot bits to get working precompiled hello_world on x64. (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
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index e76e80e572f13e1f7440986e43c582245b6415c5..ea7757885624eb4f1f55fd4b8d9b26ba0ef738db 100644
--- a/runtime/vm/object.cc
+++ b/runtime/vm/object.cc
@@ -115,7 +115,6 @@ Smi* Object::smi_illegal_cid_ = NULL;
LanguageError* Object::snapshot_writer_error_ = NULL;
LanguageError* Object::branch_offset_error_ = NULL;
Array* Object::vm_isolate_snapshot_object_table_ = NULL;
-const uint8_t* Object::instructions_snapshot_buffer_ = NULL;
RawObject* Object::null_ = reinterpret_cast<RawObject*>(RAW_NULL);
RawClass* Object::class_class_ = reinterpret_cast<RawClass*>(RAW_NULL);
@@ -832,11 +831,16 @@ class PremarkingVisitor : public ObjectVisitor {
explicit PremarkingVisitor(Isolate* isolate) : ObjectVisitor(isolate) {}
void VisitObject(RawObject* obj) {
- ASSERT(!obj->IsMarked());
// Free list elements should never be marked.
if (!obj->IsFreeListElement()) {
ASSERT(obj->IsVMHeapObject());
- obj->SetMarkBitUnsynchronized();
+ if (obj->IsMarked()) {
+ // Precompiled instructions are loaded pre-marked.
+ ASSERT(Dart::IsRunningPrecompiledCode());
+ ASSERT(obj->IsInstructions());
+ } else {
+ obj->SetMarkBitUnsynchronized();
+ }
}
}
};

Powered by Google App Engine
This is Rietveld 408576698