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

Unified Diff: runtime/vm/stub_code_x64.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_mips.cc ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/stub_code_x64.cc
diff --git a/runtime/vm/stub_code_x64.cc b/runtime/vm/stub_code_x64.cc
index daf1e5e411f763e6ace4e93af824902ea351cf13..0c01d6882497e926e3602eee32ba206aad002fb5 100644
--- a/runtime/vm/stub_code_x64.cc
+++ b/runtime/vm/stub_code_x64.cc
@@ -2167,6 +2167,31 @@ void StubCode::GenerateICCallThroughCodeStub(Assembler* assembler) {
}
+// RDI: receiver
+// RBX: UnlinkedCall
+void StubCode::GenerateUnlinkedCallStub(Assembler* assembler) {
+ __ NoMonomorphicCheckedEntry();
+
+ __ EnterStubFrame();
+ __ pushq(RDI); // Preserve receiver.
+
+ __ PushObject(Object::null_object()); // Result.
+ __ pushq(RDI); // Arg0: Receiver
+ __ pushq(RBX); // Arg1: UnlinkedCall
+ __ CallRuntime(kUnlinkedCallRuntimeEntry, 2);
+ __ popq(RBX);
+ __ popq(RBX);
+ __ popq(RBX); // result = IC
+
+ __ popq(RDI); // Restore receiver.
+ __ LeaveStubFrame();
+
+ __ movq(CODE_REG, Address(THR, Thread::ic_lookup_through_code_stub_offset()));
+ __ movq(RCX, FieldAddress(CODE_REG, Code::checked_entry_point_offset()));
+ __ jmp(RCX);
+}
+
+
// Called from switchable IC calls.
// RDI: receiver
// RBX: SingleTargetCache
« no previous file with comments | « runtime/vm/stub_code_mips.cc ('k') | runtime/vm/symbols.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698