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

Unified Diff: runtime/vm/flow_graph_compiler_mips.cc

Issue 2226893002: Optimize AOT's switchable calls for the monomorphic case. (Closed) Base URL: git@github.com:dart-lang/sdk.git@master
Patch Set: sync Created 4 years, 4 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_ia32.cc ('k') | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler_mips.cc
diff --git a/runtime/vm/flow_graph_compiler_mips.cc b/runtime/vm/flow_graph_compiler_mips.cc
index a6f3f140b01644166b9414d6b0f95220dceb7bab..8e568c90feddde7553665af195527cfbe3e1ca01 100644
--- a/runtime/vm/flow_graph_compiler_mips.cc
+++ b/runtime/vm/flow_graph_compiler_mips.cc
@@ -1339,9 +1339,8 @@ void FlowGraphCompiler::EmitMegamorphicInstanceCall(
__ Comment("Slow case: megamorphic call");
}
__ LoadObject(S5, cache);
- __ lw(T9, Address(THR, Thread::megamorphic_lookup_entry_point_offset()));
+ __ lw(T9, Address(THR, Thread::megamorphic_lookup_checked_entry_offset()));
__ jalr(T9);
- __ jalr(T1);
__ Bind(&done);
RecordSafepoint(locs, slow_path_argument_count);
@@ -1378,12 +1377,16 @@ void FlowGraphCompiler::EmitSwitchableInstanceCall(
intptr_t deopt_id,
TokenPosition token_pos,
LocationSummary* locs) {
+ ASSERT(ic_data.NumArgsTested() == 1);
+ const Code& initial_stub = Code::ZoneHandle(
+ StubCode::ICLookupThroughFunction_entry()->code());
+
__ Comment("SwitchableCall");
__ lw(T0, Address(SP, (argument_count - 1) * kWordSize));
- ASSERT(ic_data.NumArgsTested() == 1);
__ LoadUniqueObject(S5, ic_data);
- __ BranchLinkPatchable(*StubCode::ICLookupThroughFunction_entry());
- __ jalr(T1);
+ __ LoadUniqueObject(CODE_REG, initial_stub);
+ __ lw(T9, FieldAddress(CODE_REG, Code::checked_entry_point_offset()));
+ __ jalr(T9);
AddCurrentDescriptor(RawPcDescriptors::kOther,
Thread::kNoDeoptId, token_pos);
« no previous file with comments | « runtime/vm/flow_graph_compiler_ia32.cc ('k') | runtime/vm/flow_graph_compiler_x64.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698