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

Unified Diff: runtime/vm/snapshot.cc

Issue 1323813004: Changes to prepare for allowing script snapshots to be taken after running the main application (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: fix-long-line Created 5 years, 4 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/snapshot.cc
diff --git a/runtime/vm/snapshot.cc b/runtime/vm/snapshot.cc
index 8f3dc434b72789d712e5e52df88fee209c829657..415d1ed1e6f50f3f61430f6f564f615b2318331d 100644
--- a/runtime/vm/snapshot.cc
+++ b/runtime/vm/snapshot.cc
@@ -1144,6 +1144,15 @@ RawObject* SnapshotReader::ReadVMIsolateObject(intptr_t header_value) {
if (object_id == kFalseValue) {
return Bool::False().raw();
}
+ if (object_id == kExtractorParameterTypes) {
+ return Object::extractor_parameter_types().raw();
+ }
+ if (object_id == kExtractorParameterNames) {
+ return Object::extractor_parameter_names().raw();
+ }
+ if (object_id == kEmptyContextScopeObject) {
+ return Object::empty_context_scope().raw();
+ }
if (object_id == kDoubleObject) {
ASSERT(kind_ == Snapshot::kMessage);
return Double::New(ReadDouble());
@@ -1417,6 +1426,7 @@ void SnapshotWriter::WriteObject(RawObject* rawobj) {
V(Mint) \
V(Bigint) \
V(Double) \
+ V(ImmutableArray) \
#define VM_OBJECT_WRITE(clazz) \
case clazz::kClassId: { \
@@ -1481,6 +1491,24 @@ void SnapshotWriter::HandleVMIsolateObject(RawObject* rawobj) {
return;
}
+ // Check if it is a singleton extractor parameter types array.
+ if (rawobj == Object::extractor_parameter_types().raw()) {
+ WriteVMIsolateObject(kExtractorParameterTypes);
+ return;
+ }
+
+ // Check if it is a singleton extractor parameter names array.
+ if (rawobj == Object::extractor_parameter_names().raw()) {
+ WriteVMIsolateObject(kExtractorParameterNames);
+ return;
+ }
+
+ // Check if it is a singleton empty context scope object.
+ if (rawobj == Object::empty_context_scope().raw()) {
+ WriteVMIsolateObject(kEmptyContextScopeObject);
+ return;
+ }
+
// Check if it is a singleton class object which is shared by
// all isolates.
intptr_t id = rawobj->GetClassId();

Powered by Google App Engine
This is Rietveld 408576698