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/ast/scopes.h" | 7 #include "src/ast/scopes.h" |
8 #include "src/code-factory.h" | 8 #include "src/code-factory.h" |
9 #include "src/code-stubs.h" | 9 #include "src/code-stubs.h" |
10 #include "src/codegen.h" | 10 #include "src/codegen.h" |
(...skipping 2712 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
2723 EmitResolvePossiblyDirectEval(arg_count); | 2723 EmitResolvePossiblyDirectEval(arg_count); |
2724 | 2724 |
2725 // Touch up the callee. | 2725 // Touch up the callee. |
2726 __ movp(Operand(rsp, (arg_count + 1) * kPointerSize), rax); | 2726 __ movp(Operand(rsp, (arg_count + 1) * kPointerSize), rax); |
2727 | 2727 |
2728 PrepareForBailoutForId(expr->EvalId(), NO_REGISTERS); | 2728 PrepareForBailoutForId(expr->EvalId(), NO_REGISTERS); |
2729 | 2729 |
2730 SetCallPosition(expr); | 2730 SetCallPosition(expr); |
2731 __ movp(rdi, Operand(rsp, (arg_count + 1) * kPointerSize)); | 2731 __ movp(rdi, Operand(rsp, (arg_count + 1) * kPointerSize)); |
2732 __ Set(rax, arg_count); | 2732 __ Set(rax, arg_count); |
2733 __ Call(isolate()->builtins()->Call(), RelocInfo::CODE_TARGET); | 2733 __ Call(isolate()->builtins()->Call(ConvertReceiverMode::kAny, |
| 2734 expr->tail_call_mode()), |
| 2735 RelocInfo::CODE_TARGET); |
2734 RecordJSReturnSite(expr); | 2736 RecordJSReturnSite(expr); |
2735 // Restore context register. | 2737 // Restore context register. |
2736 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); | 2738 __ movp(rsi, Operand(rbp, StandardFrameConstants::kContextOffset)); |
2737 context()->DropAndPlug(1, rax); | 2739 context()->DropAndPlug(1, rax); |
2738 } | 2740 } |
2739 | 2741 |
2740 | 2742 |
2741 void FullCodeGenerator::VisitCallNew(CallNew* expr) { | 2743 void FullCodeGenerator::VisitCallNew(CallNew* expr) { |
2742 Comment cmnt(masm_, "[ CallNew"); | 2744 Comment cmnt(masm_, "[ CallNew"); |
2743 // According to ECMA-262, section 11.2.2, page 44, the function | 2745 // According to ECMA-262, section 11.2.2, page 44, the function |
(...skipping 1682 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
4426 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), | 4428 DCHECK_EQ(isolate->builtins()->OsrAfterStackCheck()->entry(), |
4427 Assembler::target_address_at(call_target_address, | 4429 Assembler::target_address_at(call_target_address, |
4428 unoptimized_code)); | 4430 unoptimized_code)); |
4429 return OSR_AFTER_STACK_CHECK; | 4431 return OSR_AFTER_STACK_CHECK; |
4430 } | 4432 } |
4431 | 4433 |
4432 } // namespace internal | 4434 } // namespace internal |
4433 } // namespace v8 | 4435 } // namespace v8 |
4434 | 4436 |
4435 #endif // V8_TARGET_ARCH_X64 | 4437 #endif // V8_TARGET_ARCH_X64 |
OLD | NEW |