| OLD | NEW |
| 1 // Copyright 2014 the V8 project authors. All rights reserved. | 1 // Copyright 2014 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_PPC | 7 #if V8_TARGET_ARCH_PPC |
| 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 625 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 636 PredictableCodeSizeScope scope(patcher->masm(), young_sequence_.length()); | 636 PredictableCodeSizeScope scope(patcher->masm(), young_sequence_.length()); |
| 637 patcher->masm()->PushFixedFrame(r4); | 637 patcher->masm()->PushFixedFrame(r4); |
| 638 patcher->masm()->addi(fp, sp, | 638 patcher->masm()->addi(fp, sp, |
| 639 Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); | 639 Operand(StandardFrameConstants::kFixedFrameSizeFromFp)); |
| 640 for (int i = 0; i < kNoCodeAgeSequenceNops; i++) { | 640 for (int i = 0; i < kNoCodeAgeSequenceNops; i++) { |
| 641 patcher->masm()->nop(); | 641 patcher->masm()->nop(); |
| 642 } | 642 } |
| 643 } | 643 } |
| 644 | 644 |
| 645 | 645 |
| 646 #ifdef DEBUG | 646 #if DCHECK_IS_ON |
| 647 bool CodeAgingHelper::IsOld(byte* candidate) const { | 647 bool CodeAgingHelper::IsOld(byte* candidate) const { |
| 648 return Assembler::IsNop(Assembler::instr_at(candidate)); | 648 return Assembler::IsNop(Assembler::instr_at(candidate)); |
| 649 } | 649 } |
| 650 #endif | 650 #endif |
| 651 | 651 |
| 652 | 652 |
| 653 bool Code::IsYoungSequence(Isolate* isolate, byte* sequence) { | 653 bool Code::IsYoungSequence(Isolate* isolate, byte* sequence) { |
| 654 bool result = isolate->code_aging_helper()->IsYoung(sequence); | 654 bool result = isolate->code_aging_helper()->IsYoung(sequence); |
| 655 DCHECK(result || isolate->code_aging_helper()->IsOld(sequence)); | 655 DCHECK(result || isolate->code_aging_helper()->IsOld(sequence)); |
| 656 return result; | 656 return result; |
| (...skipping 34 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 691 patcher.masm()->Jump(r3); | 691 patcher.masm()->Jump(r3); |
| 692 for (int i = 0; i < kCodeAgingSequenceNops; i++) { | 692 for (int i = 0; i < kCodeAgingSequenceNops; i++) { |
| 693 patcher.masm()->nop(); | 693 patcher.masm()->nop(); |
| 694 } | 694 } |
| 695 } | 695 } |
| 696 } | 696 } |
| 697 } | 697 } |
| 698 } // namespace v8::internal | 698 } // namespace v8::internal |
| 699 | 699 |
| 700 #endif // V8_TARGET_ARCH_PPC | 700 #endif // V8_TARGET_ARCH_PPC |
| OLD | NEW |