Chromium Code Reviews| Index: runtime/vm/flow_graph_compiler.cc |
| diff --git a/runtime/vm/flow_graph_compiler.cc b/runtime/vm/flow_graph_compiler.cc |
| index 7a1985d47a6086124c60912489e4e69ec6de0f3c..2550c632f78c195ce22acac8523f612a30376ea7 100644 |
| --- a/runtime/vm/flow_graph_compiler.cc |
| +++ b/runtime/vm/flow_graph_compiler.cc |
| @@ -718,14 +718,14 @@ void FlowGraphCompiler::AddCurrentDescriptor(RawPcDescriptors::Kind kind, |
| void FlowGraphCompiler::AddStaticCallTarget(const Function& func) { |
| ASSERT(func.IsZoneHandle()); |
| static_calls_target_table_.Add( |
| - StaticCallsStruct(assembler()->CodeSize(), &func, NULL)); |
| + new StaticCallsStruct(assembler()->CodeSize(), &func, NULL)); |
|
koda
2015/08/21 17:21:14
Now we need to fetch the current zone from TLS and
srdjan
2015/08/21 17:33:41
Using new(zone()), thanks for spotting it. Having
hausner
2015/08/21 17:41:20
You mean there is less data to copy when it grows?
srdjan
2015/08/21 18:12:13
In this case it is probably not measurably faster.
|
| } |
| void FlowGraphCompiler::AddStubCallTarget(const Code& code) { |
| ASSERT(code.IsZoneHandle()); |
| static_calls_target_table_.Add( |
| - StaticCallsStruct(assembler()->CodeSize(), NULL, &code)); |
| + new StaticCallsStruct(assembler()->CodeSize(), NULL, &code)); |
| } |
| @@ -995,15 +995,15 @@ void FlowGraphCompiler::FinalizeStaticCallTargetsTable(const Code& code) { |
| Smi& smi_offset = Smi::Handle(zone()); |
| for (intptr_t i = 0; i < static_calls_target_table_.length(); i++) { |
| const intptr_t target_ix = Code::kSCallTableEntryLength * i; |
| - smi_offset = Smi::New(static_calls_target_table_[i].offset); |
| + smi_offset = Smi::New(static_calls_target_table_[i]->offset); |
| targets.SetAt(target_ix + Code::kSCallTableOffsetEntry, smi_offset); |
| - if (static_calls_target_table_[i].function != NULL) { |
| + if (static_calls_target_table_[i]->function != NULL) { |
| targets.SetAt(target_ix + Code::kSCallTableFunctionEntry, |
| - *static_calls_target_table_[i].function); |
| + *static_calls_target_table_[i]->function); |
| } |
| - if (static_calls_target_table_[i].code != NULL) { |
| + if (static_calls_target_table_[i]->code != NULL) { |
| targets.SetAt(target_ix + Code::kSCallTableCodeEntry, |
| - *static_calls_target_table_[i].code); |
| + *static_calls_target_table_[i]->code); |
| } |
| } |
| code.set_static_calls_target_table(targets); |