| Index: src/x64/stub-cache-x64.cc
|
| ===================================================================
|
| --- src/x64/stub-cache-x64.cc (revision 6350)
|
| +++ src/x64/stub-cache-x64.cc (working copy)
|
| @@ -2262,17 +2262,24 @@
|
| __ movq(Operand(rsp, (argc + 1) * kPointerSize), rdx);
|
| }
|
|
|
| - // Setup the context (function already in edi).
|
| + // Setup the context (function already in rdi).
|
| __ movq(rsi, FieldOperand(rdi, JSFunction::kContextOffset));
|
|
|
| // Jump to the cached code (tail call).
|
| __ IncrementCounter(&Counters::call_global_inline, 1);
|
| ASSERT(function->is_compiled());
|
| - Handle<Code> code(function->code());
|
| ParameterCount expected(function->shared()->formal_parameter_count());
|
| - __ InvokeCode(code, expected, arguments(),
|
| - RelocInfo::CODE_TARGET, JUMP_FUNCTION);
|
| -
|
| + if (V8::UseCrankshaft()) {
|
| + // TODO(kasperl): For now, we always call indirectly through the
|
| + // code field in the function to allow recompilation to take effect
|
| + // without changing any of the call sites.
|
| + __ movq(rdx, FieldOperand(rdi, JSFunction::kCodeEntryOffset));
|
| + __ InvokeCode(rdx, expected, arguments(), JUMP_FUNCTION);
|
| + } else {
|
| + Handle<Code> code(function->code());
|
| + __ InvokeCode(code, expected, arguments(),
|
| + RelocInfo::CODE_TARGET, JUMP_FUNCTION);
|
| + }
|
| // Handle call cache miss.
|
| __ bind(&miss);
|
| __ IncrementCounter(&Counters::call_global_inline_miss, 1);
|
|
|