| Index: src/x64/macro-assembler-x64.cc
|
| diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
|
| index f6e44bc6274498778be00e04e756b2b043550cf7..3913a9b78336f2680a1993c391a0ae1415e40ae9 100644
|
| --- a/src/x64/macro-assembler-x64.cc
|
| +++ b/src/x64/macro-assembler-x64.cc
|
| @@ -386,6 +386,16 @@ void MacroAssembler::CallRuntime(Runtime::Function* f, int num_arguments) {
|
| }
|
|
|
|
|
| +void MacroAssembler::CallExternalReference(const ExternalReference& ext,
|
| + int num_arguments) {
|
| + movq(rax, Immediate(num_arguments));
|
| + movq(rbx, ext);
|
| +
|
| + CEntryStub stub(1);
|
| + CallStub(&stub);
|
| +}
|
| +
|
| +
|
| void MacroAssembler::TailCallRuntime(ExternalReference const& ext,
|
| int num_arguments,
|
| int result_size) {
|
| @@ -1892,6 +1902,21 @@ void MacroAssembler::InvokeFunction(Register function,
|
| }
|
|
|
|
|
| +void MacroAssembler::InvokeFunction(JSFunction* function,
|
| + const ParameterCount& actual) {
|
| + ASSERT(function->is_compiled());
|
| + // Get the function and setup the context.
|
| + Move(rdi, Handle<JSFunction>(function));
|
| + movq(rsi, FieldOperand(rdi, JSFunction::kContextOffset));
|
| +
|
| + // Jump to the cached code (tail call).
|
| + Handle<Code> code(function->code());
|
| + ParameterCount expected(function->shared()->formal_parameter_count());
|
| + InvokeCode(code, expected, actual,
|
| + RelocInfo::CODE_TARGET, JUMP_FUNCTION);
|
| +}
|
| +
|
| +
|
| void MacroAssembler::EnterFrame(StackFrame::Type type) {
|
| push(rbp);
|
| movq(rbp, rsp);
|
|
|