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

Unified Diff: runtime/vm/code_generator.cc

Issue 578443003: Support old-space allocation in generated code (bump block only for now). (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 6 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
Index: runtime/vm/code_generator.cc
===================================================================
--- runtime/vm/code_generator.cc (revision 40518)
+++ runtime/vm/code_generator.cc (working copy)
@@ -117,7 +117,8 @@
Exceptions::ThrowArgumentError(error);
}
- const Array& array = Array::Handle(Array::New(len));
+ Heap::Space space = isolate->heap()->SpaceForAllocation(kArrayCid);
+ const Array& array = Array::Handle(Array::New(len, space));
arguments.SetReturn(array);
TypeArguments& element_type =
TypeArguments::CheckedHandle(arguments.ArgAt(1));
@@ -156,9 +157,9 @@
}
}
#endif
+ Heap::Space space = isolate->heap()->SpaceForAllocation(cls.id());
+ const Instance& instance = Instance::Handle(Instance::New(cls, space));
- const Instance& instance = Instance::Handle(Instance::New(cls));
-
arguments.SetReturn(instance);
if (cls.NumTypeArguments() == 0) {
// No type arguments required for a non-parameterized type.
« no previous file with comments | « runtime/vm/assembler_x64.cc ('k') | runtime/vm/heap.h » ('j') | runtime/vm/stub_code_x64.cc » ('J')

Powered by Google App Engine
This is Rietveld 408576698