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

Unified Diff: runtime/vm/flow_graph_compiler.cc

Issue 1073173003: Eliminate object table and use regular object pool for deoptimization infos. (Closed) Base URL: http://dart.googlecode.com/svn/branches/bleeding_edge/dart/
Patch Set: Created 5 years, 8 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/flow_graph_compiler.h ('k') | runtime/vm/object.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler.cc
===================================================================
--- runtime/vm/flow_graph_compiler.cc (revision 45086)
+++ runtime/vm/flow_graph_compiler.cc (working copy)
@@ -846,18 +846,17 @@
}
-void FlowGraphCompiler::FinalizeDeoptInfo(const Code& code) {
+RawArray* FlowGraphCompiler::CreateDeoptInfo(Assembler* assembler) {
// For functions with optional arguments, all incoming arguments are copied
// to spill slots. The deoptimization environment does not track them.
const Function& function = parsed_function().function();
const intptr_t incoming_arg_count =
function.HasOptionalParameters() ? 0 : function.num_fixed_parameters();
- DeoptInfoBuilder builder(zone(), incoming_arg_count);
+ DeoptInfoBuilder builder(zone(), incoming_arg_count, assembler);
intptr_t deopt_info_table_size = DeoptTable::SizeFor(deopt_infos_.length());
if (deopt_info_table_size == 0) {
- code.set_deopt_info_array(Object::empty_array());
- code.set_object_table(Object::empty_array());
+ return Object::empty_array().raw();
} else {
const Array& array =
Array::Handle(Array::New(deopt_info_table_size, Heap::kOld));
@@ -872,11 +871,7 @@
deopt_infos_[i]->flags());
DeoptTable::SetEntry(array, i, offset, info, reason_and_flags);
}
- code.set_deopt_info_array(array);
- const Array& object_array =
- Array::Handle(Array::MakeArray(builder.object_table()));
- ASSERT(code.object_table() == Array::null());
- code.set_object_table(object_array);
+ return array.raw();
}
}
« no previous file with comments | « runtime/vm/flow_graph_compiler.h ('k') | runtime/vm/object.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698