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

Unified Diff: runtime/vm/raw_object_snapshot.cc

Issue 876603003: VM: Refactor more intrinsics of GrowableList to use IR builder. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 11 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/method_recognizer.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/raw_object_snapshot.cc
===================================================================
--- runtime/vm/raw_object_snapshot.cc (revision 43193)
+++ runtime/vm/raw_object_snapshot.cc (working copy)
@@ -1366,12 +1366,8 @@
// Allocate context object.
int32_t num_vars = reader->Read<int32_t>();
- Context& context = Context::ZoneHandle(reader->isolate(), Context::null());
- if (kind == Snapshot::kFull) {
- context = reader->NewContext(num_vars);
- } else {
- context = Context::New(num_vars, HEAP_SPACE(kind));
- }
+ Context& context = Context::ZoneHandle(
+ reader->isolate(), NEW_OBJECT_WITH_LEN(Context, num_vars));
reader->AddBackRef(object_id, &context, kIsDeserialized);
// Set the object tags.
@@ -1406,8 +1402,6 @@
// Write out num of variables in the context.
writer->Write<int32_t>(ptr()->num_variables_);
- // Can't serialize the isolate pointer, we set it implicitly on read.
-
// Write out all the object pointer fields.
SnapshotWriterVisitor visitor(writer);
visitor.VisitPointers(from(), to(ptr()->num_variables_));
« no previous file with comments | « runtime/vm/method_recognizer.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698