| Index: src/x64/macro-assembler-x64.cc
|
| diff --git a/src/x64/macro-assembler-x64.cc b/src/x64/macro-assembler-x64.cc
|
| index e7d02d20032815bed17425a6d21351fa31a93699..9ebaaa94cc66212a9f06e9bd44df9eb21f9ff2c5 100644
|
| --- a/src/x64/macro-assembler-x64.cc
|
| +++ b/src/x64/macro-assembler-x64.cc
|
| @@ -623,7 +623,9 @@ MaybeObject* MacroAssembler::TryJumpToExternalReference(
|
| }
|
|
|
|
|
| -void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id, InvokeFlag flag) {
|
| +void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id,
|
| + InvokeFlag flag,
|
| + PostCallGenerator* post_call_generator) {
|
| // Calls are not allowed in some stubs.
|
| ASSERT(flag == JUMP_FUNCTION || allow_stub_calls());
|
|
|
| @@ -632,7 +634,7 @@ void MacroAssembler::InvokeBuiltin(Builtins::JavaScript id, InvokeFlag flag) {
|
| // parameter count to avoid emitting code to do the check.
|
| ParameterCount expected(0);
|
| GetBuiltinEntry(rdx, id);
|
| - InvokeCode(rdx, expected, expected, flag);
|
| + InvokeCode(rdx, expected, expected, flag, post_call_generator);
|
| }
|
|
|
|
|
| @@ -1835,11 +1837,19 @@ void MacroAssembler::DebugBreak() {
|
| void MacroAssembler::InvokeCode(Register code,
|
| const ParameterCount& expected,
|
| const ParameterCount& actual,
|
| - InvokeFlag flag) {
|
| + InvokeFlag flag,
|
| + PostCallGenerator* post_call_generator) {
|
| NearLabel done;
|
| - InvokePrologue(expected, actual, Handle<Code>::null(), code, &done, flag);
|
| + InvokePrologue(expected,
|
| + actual,
|
| + Handle<Code>::null(),
|
| + code,
|
| + &done,
|
| + flag,
|
| + post_call_generator);
|
| if (flag == CALL_FUNCTION) {
|
| call(code);
|
| + if (post_call_generator != NULL) post_call_generator->Generate();
|
| } else {
|
| ASSERT(flag == JUMP_FUNCTION);
|
| jmp(code);
|
| @@ -1852,12 +1862,20 @@ void MacroAssembler::InvokeCode(Handle<Code> code,
|
| const ParameterCount& expected,
|
| const ParameterCount& actual,
|
| RelocInfo::Mode rmode,
|
| - InvokeFlag flag) {
|
| + InvokeFlag flag,
|
| + PostCallGenerator* post_call_generator) {
|
| NearLabel done;
|
| Register dummy = rax;
|
| - InvokePrologue(expected, actual, code, dummy, &done, flag);
|
| + InvokePrologue(expected,
|
| + actual,
|
| + code,
|
| + dummy,
|
| + &done,
|
| + flag,
|
| + post_call_generator);
|
| if (flag == CALL_FUNCTION) {
|
| Call(code, rmode);
|
| + if (post_call_generator != NULL) post_call_generator->Generate();
|
| } else {
|
| ASSERT(flag == JUMP_FUNCTION);
|
| Jump(code, rmode);
|
| @@ -1868,7 +1886,8 @@ void MacroAssembler::InvokeCode(Handle<Code> code,
|
|
|
| void MacroAssembler::InvokeFunction(Register function,
|
| const ParameterCount& actual,
|
| - InvokeFlag flag) {
|
| + InvokeFlag flag,
|
| + PostCallGenerator* post_call_generator) {
|
| ASSERT(function.is(rdi));
|
| movq(rdx, FieldOperand(function, JSFunction::kSharedFunctionInfoOffset));
|
| movq(rsi, FieldOperand(function, JSFunction::kContextOffset));
|
| @@ -1879,13 +1898,14 @@ void MacroAssembler::InvokeFunction(Register function,
|
| movq(rdx, FieldOperand(rdi, JSFunction::kCodeEntryOffset));
|
|
|
| ParameterCount expected(rbx);
|
| - InvokeCode(rdx, expected, actual, flag);
|
| + InvokeCode(rdx, expected, actual, flag, post_call_generator);
|
| }
|
|
|
|
|
| void MacroAssembler::InvokeFunction(JSFunction* function,
|
| const ParameterCount& actual,
|
| - InvokeFlag flag) {
|
| + InvokeFlag flag,
|
| + PostCallGenerator* post_call_generator) {
|
| ASSERT(function->is_compiled());
|
| // Get the function and setup the context.
|
| Move(rdi, Handle<JSFunction>(function));
|
| @@ -1896,12 +1916,17 @@ void MacroAssembler::InvokeFunction(JSFunction* function,
|
| // the Code object every time we call the function.
|
| movq(rdx, FieldOperand(rdi, JSFunction::kCodeEntryOffset));
|
| ParameterCount expected(function->shared()->formal_parameter_count());
|
| - InvokeCode(rdx, expected, actual, flag);
|
| + InvokeCode(rdx, expected, actual, flag, post_call_generator);
|
| } else {
|
| // Invoke the cached code.
|
| Handle<Code> code(function->code());
|
| ParameterCount expected(function->shared()->formal_parameter_count());
|
| - InvokeCode(code, expected, actual, RelocInfo::CODE_TARGET, flag);
|
| + InvokeCode(code,
|
| + expected,
|
| + actual,
|
| + RelocInfo::CODE_TARGET,
|
| + flag,
|
| + post_call_generator);
|
| }
|
| }
|
|
|
|
|