Index: src/arm/codegen-arm.cc |
diff --git a/src/arm/codegen-arm.cc b/src/arm/codegen-arm.cc |
index 2de0bd169b36e76c42edc94d91c99b6459bd3a3b..bfca13e8b26ff87f03cb099241d9171b480f72ef 100644 |
--- a/src/arm/codegen-arm.cc |
+++ b/src/arm/codegen-arm.cc |
@@ -6917,6 +6917,9 @@ void CallFunctionStub::Generate(MacroAssembler* masm) { |
// Slow-case: Non-function called. |
__ bind(&slow); |
+ // CALL_NON_FUNCTION expects the non-function callee as receiver (instead |
+ // of the original receiver from the call site). |
+ __ str(r1, MemOperand(sp, argc_ * kPointerSize)); |
__ mov(r0, Operand(argc_)); // Setup the number of arguments. |
__ mov(r2, Operand(0)); |
__ GetBuiltinEntry(r3, Builtins::CALL_NON_FUNCTION); |