Chromium Code Reviews| Index: runtime/vm/intermediate_language.cc |
| diff --git a/runtime/vm/intermediate_language.cc b/runtime/vm/intermediate_language.cc |
| index a2a9d2768a3eeca3dde6f90e183d07cca37b1d3b..a8c218bdb8acadb08673abeb6f1a129eb4d37012 100644 |
| --- a/runtime/vm/intermediate_language.cc |
| +++ b/runtime/vm/intermediate_language.cc |
| @@ -3280,7 +3280,6 @@ LocationSummary* StaticCallInstr::MakeLocationSummary(Zone* zone, |
| void StaticCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| -#if !defined(TARGET_ARCH_DBC) |
| const ICData* call_ic_data = NULL; |
| if (!FLAG_propagate_ic_data || !compiler->is_optimizing() || |
| (ic_data() == NULL)) { |
| @@ -3306,6 +3305,8 @@ void StaticCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| } else { |
| call_ic_data = &ICData::ZoneHandle(ic_data()->raw()); |
| } |
| + |
| +#if !defined(TARGET_ARCH_DBC) |
| compiler->GenerateStaticCall(deopt_id(), |
| token_pos(), |
| function(), |
| @@ -3322,16 +3323,19 @@ void StaticCallInstr::EmitNativeCode(FlowGraphCompiler* compiler) { |
| const intptr_t argdesc_kidx = __ AddConstant(arguments_descriptor); |
| __ PushConstant(function()); |
|
Vyacheslav Egorov (Google)
2016/07/18 13:52:46
Maybe instead of pushing function() push ic_data h
zra
2016/07/18 17:38:47
Done.
|
| - __ StaticCall(ArgumentCount(), argdesc_kidx); |
| - RawPcDescriptors::Kind kind = (compiler->is_optimizing()) |
| - ? RawPcDescriptors::kOther |
| - : RawPcDescriptors::kUnoptStaticCall; |
| - compiler->AddCurrentDescriptor(kind, deopt_id(), token_pos()); |
| - |
| - compiler->RecordAfterCall(this); |
| - |
| if (compiler->is_optimizing()) { |
| + __ OptimizedStaticCall(ArgumentCount(), argdesc_kidx); |
| + compiler->AddCurrentDescriptor(RawPcDescriptors::kOther, |
| + deopt_id(), token_pos()); |
| + compiler->RecordAfterCall(this); |
| __ PopLocal(locs()->out(0).reg()); |
| + } else { |
| + const intptr_t ic_data_kidx = __ AddConstant(*call_ic_data); |
| + __ StaticCall(ArgumentCount(), argdesc_kidx); |
| + compiler->AddCurrentDescriptor(RawPcDescriptors::kUnoptStaticCall, |
| + deopt_id(), token_pos()); |
| + compiler->RecordAfterCall(this); |
| + __ Nop(ic_data_kidx); |
| } |
| #endif // !defined(TARGET_ARCH_DBC) |
| } |