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

Unified Diff: runtime/vm/kernel_reader.cc

Issue 2539173002: VM: [Kernel] Allocate objects in KernelReader/kernel::FlowGraphBuilder in Heap::kOld if appropriate (Closed)
Patch Set: Update status files Created 4 years 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/kernel_to_il.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/kernel_reader.cc
diff --git a/runtime/vm/kernel_reader.cc b/runtime/vm/kernel_reader.cc
index e3b633f967c9ae4d55c1536616e4d82c87e77004..d11e931e529e27a84b6c13ab68a19e5910b13921 100644
--- a/runtime/vm/kernel_reader.cc
+++ b/runtime/vm/kernel_reader.cc
@@ -104,7 +104,7 @@ KernelReader::KernelReader(Program* program)
&active_class_,
/*finalize=*/false) {
intptr_t source_file_count = program_->line_starting_table().size();
- scripts_ = Array::New(source_file_count);
+ scripts_ = Array::New(source_file_count, Heap::kOld);
}
Object& KernelReader::ReadProgram() {
@@ -265,7 +265,7 @@ void KernelReader::ReadPreliminaryClass(dart::Class* klass,
// Build implemented interface types
intptr_t interface_count = kernel_klass->implemented_classes().length();
const dart::Array& interfaces =
- dart::Array::Handle(Z, dart::Array::New(interface_count));
+ dart::Array::Handle(Z, dart::Array::New(interface_count, Heap::kOld));
for (intptr_t i = 0; i < interface_count; i++) {
InterfaceType* kernel_interface_type =
kernel_klass->implemented_classes()[i];
@@ -435,13 +435,13 @@ Script& KernelReader::ScriptAt(intptr_t source_uri_index) {
script ^= scripts_.At(source_uri_index);
if (script.IsNull()) {
String* uri = program_->source_uri_table().strings()[source_uri_index];
- script = Script::New(H.DartString(uri), dart::String::ZoneHandle(Z),
- RawScript::kKernelTag);
+ script = Script::New(H.DartString(uri, Heap::kOld),
+ dart::String::ZoneHandle(Z), RawScript::kKernelTag);
scripts_.SetAt(source_uri_index, script);
intptr_t* line_starts =
program_->line_starting_table().valuesFor(source_uri_index);
intptr_t line_count = line_starts[0];
- Array& array_object = Array::Handle(Z, Array::New(line_count));
+ Array& array_object = Array::Handle(Z, Array::New(line_count, Heap::kOld));
Smi& value = Smi::Handle(Z);
for (intptr_t i = 0; i < line_count; ++i) {
value = Smi::New(line_starts[i + 1]);
« no previous file with comments | « no previous file | runtime/vm/kernel_to_il.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698