Index: src/x64/macro-assembler-x64.cc |
diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc |
index d461f8caecfabce8ea16f0b318ee80e6b6e9891b..48ad4c347e7d715f2bdf35b07e4777638738bed0 100644 |
--- a/src/x64/macro-assembler-x64.cc |
+++ b/src/x64/macro-assembler-x64.cc |
@@ -3822,43 +3822,6 @@ |
} |
-void MacroAssembler::InvokeFunction(Register function, |
- const ParameterCount& actual, |
- InvokeFlag flag, |
- const CallWrapper& call_wrapper) { |
- movp(rdx, FieldOperand(function, JSFunction::kSharedFunctionInfoOffset)); |
- LoadSharedFunctionInfoSpecialField( |
- rbx, rdx, SharedFunctionInfo::kFormalParameterCountOffset); |
- |
- ParameterCount expected(rbx); |
- InvokeFunction(function, expected, actual, flag, call_wrapper); |
-} |
- |
- |
-void MacroAssembler::InvokeFunction(Handle<JSFunction> function, |
- const ParameterCount& expected, |
- const ParameterCount& actual, |
- InvokeFlag flag, |
- const CallWrapper& call_wrapper) { |
- Move(rdi, function); |
- InvokeFunction(rdi, expected, actual, flag, call_wrapper); |
-} |
- |
- |
-void MacroAssembler::InvokeFunction(Register function, |
- const ParameterCount& expected, |
- const ParameterCount& actual, |
- InvokeFlag flag, |
- const CallWrapper& call_wrapper) { |
- DCHECK(function.is(rdi)); |
- movp(rsi, FieldOperand(function, JSFunction::kContextOffset)); |
- // Advances rdx to the end of the Code object header, to the start of |
- // the executable code. |
- movp(rdx, FieldOperand(rdi, JSFunction::kCodeEntryOffset)); |
- InvokeCode(rdx, expected, actual, flag, call_wrapper); |
-} |
- |
- |
void MacroAssembler::InvokeCode(Register code, |
const ParameterCount& expected, |
const ParameterCount& actual, |
@@ -3889,6 +3852,55 @@ |
} |
bind(&done); |
} |
+} |
+ |
+ |
+void MacroAssembler::InvokeFunction(Register function, |
+ const ParameterCount& actual, |
+ InvokeFlag flag, |
+ const CallWrapper& call_wrapper) { |
+ // You can't call a function without a valid frame. |
+ DCHECK(flag == JUMP_FUNCTION || has_frame()); |
+ |
+ DCHECK(function.is(rdi)); |
+ movp(rdx, FieldOperand(function, JSFunction::kSharedFunctionInfoOffset)); |
+ movp(rsi, FieldOperand(function, JSFunction::kContextOffset)); |
+ LoadSharedFunctionInfoSpecialField(rbx, rdx, |
+ SharedFunctionInfo::kFormalParameterCountOffset); |
+ // Advances rdx to the end of the Code object header, to the start of |
+ // the executable code. |
+ movp(rdx, FieldOperand(rdi, JSFunction::kCodeEntryOffset)); |
+ |
+ ParameterCount expected(rbx); |
+ InvokeCode(rdx, expected, actual, flag, call_wrapper); |
+} |
+ |
+ |
+void MacroAssembler::InvokeFunction(Register function, |
+ const ParameterCount& expected, |
+ const ParameterCount& actual, |
+ InvokeFlag flag, |
+ const CallWrapper& call_wrapper) { |
+ // You can't call a function without a valid frame. |
+ DCHECK(flag == JUMP_FUNCTION || has_frame()); |
+ |
+ DCHECK(function.is(rdi)); |
+ movp(rsi, FieldOperand(function, JSFunction::kContextOffset)); |
+ // Advances rdx to the end of the Code object header, to the start of |
+ // the executable code. |
+ movp(rdx, FieldOperand(rdi, JSFunction::kCodeEntryOffset)); |
+ |
+ InvokeCode(rdx, expected, actual, flag, call_wrapper); |
+} |
+ |
+ |
+void MacroAssembler::InvokeFunction(Handle<JSFunction> function, |
+ const ParameterCount& expected, |
+ const ParameterCount& actual, |
+ InvokeFlag flag, |
+ const CallWrapper& call_wrapper) { |
+ Move(rdi, function); |
+ InvokeFunction(rdi, expected, actual, flag, call_wrapper); |
} |