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

Unified Diff: runtime/vm/dart.cc

Issue 664593002: - Add a separate step to finalize the VM isolate explicitly. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 years, 2 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 | « no previous file | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/dart.cc
===================================================================
--- runtime/vm/dart.cc (revision 41169)
+++ runtime/vm/dart.cc (working copy)
@@ -45,21 +45,6 @@
DebugInfo* Dart::pprof_symbol_generator_ = NULL;
ReadOnlyHandles* Dart::predefined_handles_ = NULL;
-// An object visitor which will mark all visited objects. This is used to
-// premark all objects in the vm_isolate_ heap.
-class PremarkingVisitor : public ObjectVisitor {
- public:
- explicit PremarkingVisitor(Isolate* isolate) : ObjectVisitor(isolate) {}
-
- void VisitObject(RawObject* obj) {
- // RawInstruction objects are premarked on allocation.
- if (!obj->IsMarked()) {
- obj->SetMarkBit();
- }
- }
-};
-
-
// Structure for managing read-only global handles allocation used for
// creating global read-only handles that are pre created and initialized
// for use across all isolates. Having these global pre created handles
@@ -131,7 +116,7 @@
FLAG_old_gen_heap_size * MBInWords);
ObjectStore::Init(vm_isolate_);
TargetCPUFeatures::InitOnce();
- Object::InitOnce();
+ Object::InitOnce(vm_isolate_);
ArgumentsDescriptor::InitOnce();
StubCode::InitOnce();
Symbols::InitOnce(vm_isolate_);
@@ -142,11 +127,7 @@
return "SSE2 is required.";
}
#endif
- PremarkingVisitor premarker(vm_isolate_);
- vm_isolate_->heap()->WriteProtect(false);
- ASSERT(vm_isolate_->heap()->UsedInWords(Heap::kNew) == 0);
- vm_isolate_->heap()->IterateOldObjects(&premarker);
- vm_isolate_->heap()->WriteProtect(true);
+ Object::FinalizeVMIsolate(vm_isolate_);
}
// There is a planned and known asymmetry here: We enter one scope for the VM
// isolate so that we can allocate the "persistent" scoped handles for the
« no previous file with comments | « no previous file | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698