Index: src/x64/macro-assembler-x64.cc |
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc |
index 25f4bd37301b6dd12fd777216f0991bd02f47e57..2eaa1cabc5e6f259efd340910675490ca00a1591 100644 |
--- a/src/x64/macro-assembler-x64.cc |
+++ b/src/x64/macro-assembler-x64.cc |
@@ -3597,7 +3597,7 @@ void MacroAssembler::InvokeFunction(Register function, |
} |
-void MacroAssembler::InvokeFunction(Handle<JSFunction> function, |
+void MacroAssembler::InvokeFunction(Register function, |
const ParameterCount& expected, |
const ParameterCount& actual, |
InvokeFlag flag, |
@@ -3606,18 +3606,27 @@ void MacroAssembler::InvokeFunction(Handle<JSFunction> function, |
// You can't call a function without a valid frame. |
ASSERT(flag == JUMP_FUNCTION || has_frame()); |
- // Get the function and setup the context. |
- Move(rdi, function); |
- movq(rsi, FieldOperand(rdi, JSFunction::kContextOffset)); |
- |
- // We call indirectly through the code field in the function to |
- // allow recompilation to take effect without changing any of the |
- // call sites. |
+ ASSERT(function.is(rdi)); |
+ movq(rsi, FieldOperand(function, JSFunction::kContextOffset)); |
+ // Advances rdx to the end of the Code object header, to the start of |
+ // the executable code. |
movq(rdx, FieldOperand(rdi, JSFunction::kCodeEntryOffset)); |
Igor Sheludko
2013/11/28 13:06:08
rdi -> function?
|
+ |
InvokeCode(rdx, expected, actual, flag, call_wrapper, call_kind); |
} |
+void MacroAssembler::InvokeFunction(Handle<JSFunction> function, |
+ const ParameterCount& expected, |
+ const ParameterCount& actual, |
+ InvokeFlag flag, |
+ const CallWrapper& call_wrapper, |
+ CallKind call_kind) { |
+ Move(rdi, function); |
+ InvokeFunction(rdi, expected, actual, flag, call_wrapper, call_kind); |
+} |
+ |
+ |
void MacroAssembler::InvokePrologue(const ParameterCount& expected, |
const ParameterCount& actual, |
Handle<Code> code_constant, |