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

Unified Diff: runtime/vm/flow_graph_compiler_arm64.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_arm.cc ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/flow_graph_compiler_arm64.cc
diff --git a/runtime/vm/flow_graph_compiler_arm64.cc b/runtime/vm/flow_graph_compiler_arm64.cc
index 178482ab4a727eaa2c62db958671b6ebd3f1dffb..5dd2308580d4db556a76e8adddb9f7df989ae81c 100644
--- a/runtime/vm/flow_graph_compiler_arm64.cc
+++ b/runtime/vm/flow_graph_compiler_arm64.cc
@@ -1314,9 +1314,8 @@ void FlowGraphCompiler::EmitMegamorphicInstanceCall(
}
__ LoadObject(R5, cache);
- __ ldr(LR, Address(THR, Thread::megamorphic_lookup_entry_point_offset()));
+ __ ldr(LR, Address(THR, Thread::megamorphic_lookup_checked_entry_offset()));
__ blr(LR);
- __ blr(R1);
__ Bind(&done);
RecordSafepoint(locs, slow_path_argument_count);
@@ -1353,12 +1352,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");
+
__ LoadFromOffset(R0, SP, (argument_count - 1) * kWordSize);
- ASSERT(ic_data.NumArgsTested() == 1);
__ LoadUniqueObject(R5, ic_data);
- __ BranchLinkPatchable(*StubCode::ICLookupThroughFunction_entry());
- __ blr(R1);
+ __ LoadUniqueObject(CODE_REG, initial_stub);
+ __ ldr(TMP, FieldAddress(CODE_REG, Code::checked_entry_point_offset()));
+ __ blr(TMP);
AddCurrentDescriptor(RawPcDescriptors::kOther,
Thread::kNoDeoptId, token_pos);
« no previous file with comments | « runtime/vm/flow_graph_compiler_arm.cc ('k') | runtime/vm/flow_graph_compiler_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698