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

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
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/pages.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
diff --git a/runtime/vm/object.cc b/runtime/vm/object.cc
index d95e73d1ab4fde2156e11c45950f869317bcfc1b..799c4dbe22ba401dfd7810cbc8f916f711c36568 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();
+ }
}
}
};
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/pages.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698