Index: src/x64/code-stubs-x64.cc |
diff --git a/src/x64/code-stubs-x64.cc b/src/x64/code-stubs-x64.cc |
index b210f74c8a9f18de084915e59d37107873e8d5bf..937cf321d50b3e4cbf27594369a305ecfbeba6ec 100644 |
--- a/src/x64/code-stubs-x64.cc |
+++ b/src/x64/code-stubs-x64.cc |
@@ -3342,6 +3342,7 @@ Object* CallFunctionStub::GetCachedValue(Address address) { |
void CallFunctionStub::Generate(MacroAssembler* masm) { |
+ // rdi : the function to call |
Label slow, non_function; |
// The receiver might implicitly be the global object. This is |
@@ -3362,10 +3363,6 @@ void CallFunctionStub::Generate(MacroAssembler* masm) { |
__ bind(&call); |
} |
- // Get the function to call from the stack. |
- // +2 ~ receiver, return address |
- __ movq(rdi, Operand(rsp, (argc_ + 2) * kPointerSize)); |
- |
// Check that the function really is a JavaScript function. |
__ JumpIfSmi(rdi, &non_function); |
// Goto slow case if we do not have a function. |
@@ -3402,7 +3399,7 @@ void CallFunctionStub::Generate(MacroAssembler* masm) { |
__ push(rcx); |
__ Set(rax, argc_ + 1); |
__ Set(rbx, 0); |
- __ SetCallKind(rcx, CALL_AS_FUNCTION); |
+ __ SetCallKind(rcx, CALL_AS_METHOD); |
__ GetBuiltinEntry(rdx, Builtins::CALL_FUNCTION_PROXY); |
{ |
Handle<Code> adaptor = |