| 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_X87 | 7 #if V8_TARGET_ARCH_X87 |
| 8 | 8 |
| 9 #include "src/codegen.h" | 9 #include "src/codegen.h" |
| 10 #include "src/heap/heap.h" | 10 #include "src/heap/heap.h" |
| (...skipping 563 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 574 CodeAgingHelper::CodeAgingHelper() { | 574 CodeAgingHelper::CodeAgingHelper() { |
| 575 DCHECK(young_sequence_.length() == kNoCodeAgeSequenceLength); | 575 DCHECK(young_sequence_.length() == kNoCodeAgeSequenceLength); |
| 576 CodePatcher patcher(young_sequence_.start(), young_sequence_.length()); | 576 CodePatcher patcher(young_sequence_.start(), young_sequence_.length()); |
| 577 patcher.masm()->push(ebp); | 577 patcher.masm()->push(ebp); |
| 578 patcher.masm()->mov(ebp, esp); | 578 patcher.masm()->mov(ebp, esp); |
| 579 patcher.masm()->push(esi); | 579 patcher.masm()->push(esi); |
| 580 patcher.masm()->push(edi); | 580 patcher.masm()->push(edi); |
| 581 } | 581 } |
| 582 | 582 |
| 583 | 583 |
| 584 #ifdef DEBUG | 584 #if DCHECK_IS_ON |
| 585 bool CodeAgingHelper::IsOld(byte* candidate) const { | 585 bool CodeAgingHelper::IsOld(byte* candidate) const { |
| 586 return *candidate == kCallOpcode; | 586 return *candidate == kCallOpcode; |
| 587 } | 587 } |
| 588 #endif | 588 #endif |
| 589 | 589 |
| 590 | 590 |
| 591 bool Code::IsYoungSequence(Isolate* isolate, byte* sequence) { | 591 bool Code::IsYoungSequence(Isolate* isolate, byte* sequence) { |
| 592 bool result = isolate->code_aging_helper()->IsYoung(sequence); | 592 bool result = isolate->code_aging_helper()->IsYoung(sequence); |
| 593 DCHECK(result || isolate->code_aging_helper()->IsOld(sequence)); | 593 DCHECK(result || isolate->code_aging_helper()->IsOld(sequence)); |
| 594 return result; | 594 return result; |
| (...skipping 27 matching lines...) Expand all Loading... |
| 622 Code* stub = GetCodeAgeStub(isolate, age, parity); | 622 Code* stub = GetCodeAgeStub(isolate, age, parity); |
| 623 CodePatcher patcher(sequence, young_length); | 623 CodePatcher patcher(sequence, young_length); |
| 624 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32); | 624 patcher.masm()->call(stub->instruction_start(), RelocInfo::NONE32); |
| 625 } | 625 } |
| 626 } | 626 } |
| 627 | 627 |
| 628 | 628 |
| 629 } } // namespace v8::internal | 629 } } // namespace v8::internal |
| 630 | 630 |
| 631 #endif // V8_TARGET_ARCH_X87 | 631 #endif // V8_TARGET_ARCH_X87 |
| OLD | NEW |