Index: runtime/vm/stub_code_arm.cc |
diff --git a/runtime/vm/stub_code_arm.cc b/runtime/vm/stub_code_arm.cc |
index 82c50a1efc8063ec95d161602081438133cfa4cc..c94edc5249fa79ae805a431735a3ddf0870948e8 100644 |
--- a/runtime/vm/stub_code_arm.cc |
+++ b/runtime/vm/stub_code_arm.cc |
@@ -2125,6 +2125,31 @@ void StubCode::GenerateICCallThroughCodeStub(Assembler* assembler) { |
// Called from switchable IC calls. |
// R0: receiver |
+// R9: UnlinkedCall |
+void StubCode::GenerateUnlinkedCallStub(Assembler* assembler) { |
+ __ NoMonomorphicCheckedEntry(); |
+ |
+ __ EnterStubFrame(); |
+ __ Push(R0); // Preserve receiver. |
+ |
+ __ PushObject(Object::null_object()); // Result. |
+ __ Push(R0); // Arg0: Receiver |
+ __ Push(R9); // Arg1: UnlinkedCall |
+ __ CallRuntime(kUnlinkedCallRuntimeEntry, 2); |
+ __ Drop(2); |
+ __ Pop(R9); // 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())); |
+ __ bx(R1); |
+} |
+ |
+ |
+// Called from switchable IC calls. |
+// R0: receiver |
// R9: SingleTargetCache |
// Passed to target: |
// CODE_REG: target Code object |