Chromium Code Reviews| Index: runtime/vm/flow_graph_compiler.cc |
| =================================================================== |
| --- runtime/vm/flow_graph_compiler.cc (revision 15037) |
| +++ runtime/vm/flow_graph_compiler.cc (working copy) |
| @@ -144,6 +144,8 @@ |
| is_optimizing ? new StackmapTableBuilder() : NULL), |
| block_info_(block_order_.length()), |
| deopt_infos_(), |
| + static_calls_target_table_(GrowableObjectArray::ZoneHandle( |
| + GrowableObjectArray::New())), |
| is_optimizing_(is_optimizing), |
| may_reoptimize_(false), |
| bool_true_(Bool::ZoneHandle(Bool::True())), |
| @@ -282,6 +284,13 @@ |
| } |
| +void FlowGraphCompiler::AddStaticCallTarget(const Function& func) { |
| + static_calls_target_table_.Add( |
| + Smi::Handle(Smi::New(assembler()->CodeSize()))); |
| + static_calls_target_table_.Add(func); |
| +} |
| + |
| + |
| void FlowGraphCompiler::AddDeoptIndexAtCall(intptr_t deopt_id, |
| intptr_t token_pos) { |
| ASSERT(is_optimizing()); |
| @@ -396,6 +405,7 @@ |
| 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); |
| } |
| @@ -426,6 +436,12 @@ |
| } |
| +void FlowGraphCompiler::FinalizeStaticCallTargetsTable(const Code& code) { |
|
siva
2012/11/16 23:15:23
ASSERT(code.static_calls_target_table() == Array::
srdjan
2012/11/17 00:47:24
Done.
|
| + code.set_static_calls_target_table( |
| + Array::Handle(Array::MakeArray(static_calls_target_table_))); |
| +} |
| + |
| + |
| // Returns 'true' if code generation for this function is complete, i.e., |
| // no fall-through to regular code is needed. |
| bool FlowGraphCompiler::TryIntrinsify() { |