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

Unified Diff: runtime/vm/object.cc

Issue 1123813002: Move symbol table from per isolate snapshot to vm isolate snapshot, this reduces the per isolate in… (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 7 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/object_store.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.cc
===================================================================
--- runtime/vm/object.cc (revision 45789)
+++ runtime/vm/object.cc (working copy)
@@ -109,6 +109,7 @@
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;
RawObject* Object::null_ = reinterpret_cast<RawObject*>(RAW_NULL);
RawClass* Object::class_class_ = reinterpret_cast<RawClass*>(RAW_NULL);
@@ -416,6 +417,7 @@
smi_illegal_cid_ = Smi::ReadOnlyHandle();
snapshot_writer_error_ = LanguageError::ReadOnlyHandle();
branch_offset_error_ = LanguageError::ReadOnlyHandle();
+ vm_isolate_snapshot_object_table_ = Array::ReadOnlyHandle();
// Allocate and initialize the null instance.
@@ -667,6 +669,10 @@
&empty_exception_handlers_->raw_ptr()->num_entries_, 0);
}
+ // The VM isolate snapshot object table is initialized to an empty array
+ // as we do not have any VM isolate snapshot at this time.
+ *vm_isolate_snapshot_object_table_ = Object::empty_array().raw();
+
cls = Class::New<Instance>(kDynamicCid);
cls.set_is_abstract();
cls.set_num_type_arguments(0);
@@ -746,6 +752,8 @@
ASSERT(snapshot_writer_error_->IsLanguageError());
ASSERT(!branch_offset_error_->IsSmi());
ASSERT(branch_offset_error_->IsLanguageError());
+ ASSERT(!vm_isolate_snapshot_object_table_->IsSmi());
+ ASSERT(vm_isolate_snapshot_object_table_->IsArray());
}
@@ -835,6 +843,12 @@
}
+void Object::InitVmIsolateSnapshotObjectTable(intptr_t len) {
+ ASSERT(Isolate::Current() == Dart::vm_isolate());
+ *vm_isolate_snapshot_object_table_ = Array::New(len, Heap::kOld);
+}
+
+
// Make unused space in an object whose type has been transformed safe
// for traversing during GC.
// The unused part of the transformed object is marked as an TypedDataInt8Array
« no previous file with comments | « runtime/vm/object.h ('k') | runtime/vm/object_store.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698