Index: src/arm/code-stubs-arm.cc |
diff --git a/src/arm/code-stubs-arm.cc b/src/arm/code-stubs-arm.cc |
index 3afa76c9bbeea22fb64ab1f29e02c74c249b4620..9c484c665fbb48f3fd4562ace350805131ad7f30 100644 |
--- a/src/arm/code-stubs-arm.cc |
+++ b/src/arm/code-stubs-arm.cc |
@@ -4908,6 +4908,7 @@ Object* CallFunctionStub::GetCachedValue(Address address) { |
void CallFunctionStub::Generate(MacroAssembler* masm) { |
+ // r1 : the function to call |
Label slow, non_function; |
// The receiver might implicitly be the global object. This is |
@@ -4928,10 +4929,6 @@ void CallFunctionStub::Generate(MacroAssembler* masm) { |
__ bind(&call); |
} |
- // Get the function to call from the stack. |
- // function, receiver [, arguments] |
- __ ldr(r1, MemOperand(sp, (argc_ + 1) * kPointerSize)); |
- |
// Check that the function is really a JavaScript function. |
// r1: pushed function (to be verified) |
__ JumpIfSmi(r1, &non_function); |
@@ -4969,7 +4966,7 @@ void CallFunctionStub::Generate(MacroAssembler* masm) { |
__ mov(r0, Operand(argc_ + 1, RelocInfo::NONE)); |
__ mov(r2, Operand(0, RelocInfo::NONE)); |
__ GetBuiltinEntry(r3, Builtins::CALL_FUNCTION_PROXY); |
- __ SetCallKind(r5, CALL_AS_FUNCTION); |
+ __ SetCallKind(r5, CALL_AS_METHOD); |
{ |
Handle<Code> adaptor = |
masm->isolate()->builtins()->ArgumentsAdaptorTrampoline(); |