| Index: src/x64/macro-assembler-x64.cc
|
| diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
|
| index 48ad4c347e7d715f2bdf35b07e4777638738bed0..d461f8caecfabce8ea16f0b318ee80e6b6e9891b 100644
|
| --- a/src/x64/macro-assembler-x64.cc
|
| +++ b/src/x64/macro-assembler-x64.cc
|
| @@ -3822,6 +3822,43 @@ void MacroAssembler::DebugBreak() {
|
| }
|
|
|
|
|
| +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,
|
| @@ -3855,55 +3892,6 @@ void MacroAssembler::InvokeCode(Register code,
|
| }
|
|
|
|
|
| -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);
|
| -}
|
| -
|
| -
|
| void MacroAssembler::InvokePrologue(const ParameterCount& expected,
|
| const ParameterCount& actual,
|
| Handle<Code> code_constant,
|
|
|