| 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 #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/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/macro-assembler.h" | 10 #include "src/macro-assembler.h" |
| (...skipping 638 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 649 // following boilerplate stack-building prologue that is found both in | 649 // following boilerplate stack-building prologue that is found both in |
| 650 // FUNCTION and OPTIMIZED_FUNCTION code: | 650 // FUNCTION and OPTIMIZED_FUNCTION code: |
| 651 CodePatcher patcher(young_sequence_.start(), young_sequence_.length()); | 651 CodePatcher patcher(young_sequence_.start(), young_sequence_.length()); |
| 652 patcher.masm()->pushq(rbp); | 652 patcher.masm()->pushq(rbp); |
| 653 patcher.masm()->movp(rbp, rsp); | 653 patcher.masm()->movp(rbp, rsp); |
| 654 patcher.masm()->Push(rsi); | 654 patcher.masm()->Push(rsi); |
| 655 patcher.masm()->Push(rdi); | 655 patcher.masm()->Push(rdi); |
| 656 } | 656 } |
| 657 | 657 |
| 658 | 658 |
| 659 #ifdef DEBUG | 659 #if DCHECK_IS_ON |
| 660 bool CodeAgingHelper::IsOld(byte* candidate) const { | 660 bool CodeAgingHelper::IsOld(byte* candidate) const { |
| 661 return *candidate == kCallOpcode; | 661 return *candidate == kCallOpcode; |
| 662 } | 662 } |
| 663 #endif | 663 #endif |
| 664 | 664 |
| 665 | 665 |
| 666 bool Code::IsYoungSequence(Isolate* isolate, byte* sequence) { | 666 bool Code::IsYoungSequence(Isolate* isolate, byte* sequence) { |
| 667 bool result = isolate->code_aging_helper()->IsYoung(sequence); | 667 bool result = isolate->code_aging_helper()->IsYoung(sequence); |
| 668 DCHECK(result || isolate->code_aging_helper()->IsOld(sequence)); | 668 DCHECK(result || isolate->code_aging_helper()->IsOld(sequence)); |
| 669 return result; | 669 return result; |
| (...skipping 50 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 720 // argument_count_reg_ * times_pointer_size + (receiver - 1) * kPointerSize. | 720 // argument_count_reg_ * times_pointer_size + (receiver - 1) * kPointerSize. |
| 721 return Operand(base_reg_, argument_count_reg_, times_pointer_size, | 721 return Operand(base_reg_, argument_count_reg_, times_pointer_size, |
| 722 displacement_to_last_argument + (receiver - 1 - index) * kPointerSize); | 722 displacement_to_last_argument + (receiver - 1 - index) * kPointerSize); |
| 723 } | 723 } |
| 724 } | 724 } |
| 725 | 725 |
| 726 | 726 |
| 727 } } // namespace v8::internal | 727 } } // namespace v8::internal |
| 728 | 728 |
| 729 #endif // V8_TARGET_ARCH_X64 | 729 #endif // V8_TARGET_ARCH_X64 |
| OLD | NEW |