| OLD | NEW |
| 1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 #include "src/v8.h" | 5 #include "src/v8.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_X64 | 7 #if V8_TARGET_ARCH_X64 |
| 8 | 8 |
| 9 #include "src/base/bits.h" | 9 #include "src/base/bits.h" |
| 10 #include "src/code-factory.h" | 10 #include "src/code-factory.h" |
| (...skipping 2804 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 2815 int no_frame_start = -1; | 2815 int no_frame_start = -1; |
| 2816 if (NeedsEagerFrame()) { | 2816 if (NeedsEagerFrame()) { |
| 2817 __ movp(rsp, rbp); | 2817 __ movp(rsp, rbp); |
| 2818 __ popq(rbp); | 2818 __ popq(rbp); |
| 2819 no_frame_start = masm_->pc_offset(); | 2819 no_frame_start = masm_->pc_offset(); |
| 2820 } | 2820 } |
| 2821 if (instr->has_constant_parameter_count()) { | 2821 if (instr->has_constant_parameter_count()) { |
| 2822 __ Ret((ToInteger32(instr->constant_parameter_count()) + 1) * kPointerSize, | 2822 __ Ret((ToInteger32(instr->constant_parameter_count()) + 1) * kPointerSize, |
| 2823 rcx); | 2823 rcx); |
| 2824 } else { | 2824 } else { |
| 2825 DCHECK(info()->IsStub()); // Functions would need to drop one more value. |
| 2825 Register reg = ToRegister(instr->parameter_count()); | 2826 Register reg = ToRegister(instr->parameter_count()); |
| 2826 // The argument count parameter is a smi | 2827 // The argument count parameter is a smi |
| 2827 __ SmiToInteger32(reg, reg); | 2828 __ SmiToInteger32(reg, reg); |
| 2828 Register return_addr_reg = reg.is(rcx) ? rbx : rcx; | 2829 Register return_addr_reg = reg.is(rcx) ? rbx : rcx; |
| 2829 __ PopReturnAddressTo(return_addr_reg); | 2830 __ PopReturnAddressTo(return_addr_reg); |
| 2830 __ shlp(reg, Immediate(kPointerSizeLog2)); | 2831 __ shlp(reg, Immediate(kPointerSizeLog2)); |
| 2831 __ addp(rsp, reg); | 2832 __ addp(rsp, reg); |
| 2832 __ jmp(return_addr_reg); | 2833 __ jmp(return_addr_reg); |
| 2833 } | 2834 } |
| 2834 if (no_frame_start != -1) { | 2835 if (no_frame_start != -1) { |
| (...skipping 3047 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 5882 CallRuntime(Runtime::kPushBlockContext, 2, instr); | 5883 CallRuntime(Runtime::kPushBlockContext, 2, instr); |
| 5883 RecordSafepoint(Safepoint::kNoLazyDeopt); | 5884 RecordSafepoint(Safepoint::kNoLazyDeopt); |
| 5884 } | 5885 } |
| 5885 | 5886 |
| 5886 | 5887 |
| 5887 #undef __ | 5888 #undef __ |
| 5888 | 5889 |
| 5889 } } // namespace v8::internal | 5890 } } // namespace v8::internal |
| 5890 | 5891 |
| 5891 #endif // V8_TARGET_ARCH_X64 | 5892 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |