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

Unified Diff: runtime/vm/stub_code_arm64.cc

Issue 2357313003: AOT: Add a separate switchable call state for unlinked calls. (Closed)
Patch Set: . Created 4 years, 3 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/stub_code_arm.cc ('k') | runtime/vm/stub_code_ia32.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_arm64.cc
diff --git a/runtime/vm/stub_code_arm64.cc b/runtime/vm/stub_code_arm64.cc
index f550777f342d2d3d90986871b092db5b0baae185..09d973b1e4a8752030a613d6f927b7db895d7bbe 100644
--- a/runtime/vm/stub_code_arm64.cc
+++ b/runtime/vm/stub_code_arm64.cc
@@ -2186,6 +2186,31 @@ void StubCode::GenerateICCallThroughCodeStub(Assembler* assembler) {
// Called from switchable IC calls.
// R0: receiver
// R5: SingleTargetCache
+void StubCode::GenerateUnlinkedCallStub(Assembler* assembler) {
+ __ NoMonomorphicCheckedEntry();
+
+ __ EnterStubFrame();
+ __ Push(R0); // Preserve receiver.
+
+ __ PushObject(Object::null_object()); // Result.
+ __ Push(R0); // Arg0: Receiver
+ __ Push(R5); // Arg1: UnlinkedCall
+ __ CallRuntime(kUnlinkedCallRuntimeEntry, 2);
+ __ Drop(2);
+ __ Pop(R5); // result = IC
+
+ __ Pop(R0); // Restore receiver.
+ __ LeaveStubFrame();
+
+ __ ldr(CODE_REG, Address(THR, Thread::ic_lookup_through_code_stub_offset()));
+ __ ldr(R1, FieldAddress(CODE_REG, Code::checked_entry_point_offset()));
+ __ br(R1);
+}
+
+
+// Called from switchable IC calls.
+// R0: receiver
+// R5: SingleTargetCache
// Passed to target:
// CODE_REG: target Code object
void StubCode::GenerateSingleTargetCallStub(Assembler* assembler) {
« no previous file with comments | « runtime/vm/stub_code_arm.cc ('k') | runtime/vm/stub_code_ia32.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698