OLD | NEW |
1 // Copyright 2012 the V8 project authors. All rights reserved. | 1 // Copyright 2012 the V8 project authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #if V8_TARGET_ARCH_X64 | 5 #if V8_TARGET_ARCH_X64 |
6 | 6 |
7 #include "src/full-codegen/full-codegen.h" | 7 #include "src/full-codegen/full-codegen.h" |
8 #include "src/ast/compile-time-value.h" | 8 #include "src/ast/compile-time-value.h" |
9 #include "src/ast/scopes.h" | 9 #include "src/ast/scopes.h" |
10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
(...skipping 2253 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2264 SetCallPosition(expr, expr->tail_call_mode()); | 2264 SetCallPosition(expr, expr->tail_call_mode()); |
2265 if (expr->tail_call_mode() == TailCallMode::kAllow) { | 2265 if (expr->tail_call_mode() == TailCallMode::kAllow) { |
2266 if (FLAG_trace) { | 2266 if (FLAG_trace) { |
2267 __ CallRuntime(Runtime::kTraceTailCall); | 2267 __ CallRuntime(Runtime::kTraceTailCall); |
2268 } | 2268 } |
2269 // Update profiling counters before the tail call since we will | 2269 // Update profiling counters before the tail call since we will |
2270 // not return to this function. | 2270 // not return to this function. |
2271 EmitProfilingCounterHandlingForReturnSequence(true); | 2271 EmitProfilingCounterHandlingForReturnSequence(true); |
2272 } | 2272 } |
2273 Handle<Code> code = | 2273 Handle<Code> code = |
2274 CodeFactory::CallIC(isolate(), arg_count, mode, expr->tail_call_mode()) | 2274 CodeFactory::CallIC(isolate(), mode, expr->tail_call_mode()).code(); |
2275 .code(); | |
2276 __ Move(rdx, SmiFromSlot(expr->CallFeedbackICSlot())); | 2275 __ Move(rdx, SmiFromSlot(expr->CallFeedbackICSlot())); |
2277 __ movp(rdi, Operand(rsp, (arg_count + 1) * kPointerSize)); | 2276 __ movp(rdi, Operand(rsp, (arg_count + 1) * kPointerSize)); |
| 2277 __ Set(rax, arg_count); |
2278 __ call(code, RelocInfo::CODE_TARGET); | 2278 __ call(code, RelocInfo::CODE_TARGET); |
2279 OperandStackDepthDecrement(arg_count + 1); | 2279 OperandStackDepthDecrement(arg_count + 1); |
2280 | 2280 |
2281 RecordJSReturnSite(expr); | 2281 RecordJSReturnSite(expr); |
2282 RestoreContext(); | 2282 RestoreContext(); |
2283 // Discard the function left on TOS. | 2283 // Discard the function left on TOS. |
2284 context()->DropAndPlug(1, rax); | 2284 context()->DropAndPlug(1, rax); |
2285 } | 2285 } |
2286 | 2286 |
2287 void FullCodeGenerator::EmitResolvePossiblyDirectEval(Call* expr) { | 2287 void FullCodeGenerator::EmitResolvePossiblyDirectEval(Call* expr) { |
(...skipping 1260 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
3548 DCHECK_EQ( | 3548 DCHECK_EQ( |
3549 isolate->builtins()->OnStackReplacement()->entry(), | 3549 isolate->builtins()->OnStackReplacement()->entry(), |
3550 Assembler::target_address_at(call_target_address, unoptimized_code)); | 3550 Assembler::target_address_at(call_target_address, unoptimized_code)); |
3551 return ON_STACK_REPLACEMENT; | 3551 return ON_STACK_REPLACEMENT; |
3552 } | 3552 } |
3553 | 3553 |
3554 } // namespace internal | 3554 } // namespace internal |
3555 } // namespace v8 | 3555 } // namespace v8 |
3556 | 3556 |
3557 #endif // V8_TARGET_ARCH_X64 | 3557 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |