| 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 628 matching lines...) Expand 10 before | Expand all | Expand 10 after  Loading... | 
| 639   return result; | 639   return result; | 
| 640 } | 640 } | 
| 641 | 641 | 
| 642 | 642 | 
| 643 void Code::GetCodeAgeAndParity(Isolate* isolate, byte* sequence, Age* age, | 643 void Code::GetCodeAgeAndParity(Isolate* isolate, byte* sequence, Age* age, | 
| 644                                MarkingParity* parity) { | 644                                MarkingParity* parity) { | 
| 645   if (IsYoungSequence(isolate, sequence)) { | 645   if (IsYoungSequence(isolate, sequence)) { | 
| 646     *age = kNoAgeCodeAge; | 646     *age = kNoAgeCodeAge; | 
| 647     *parity = NO_MARKING_PARITY; | 647     *parity = NO_MARKING_PARITY; | 
| 648   } else { | 648   } else { | 
| 649     ConstantPoolArray* constant_pool = NULL; | 649     Code* code = NULL; | 
| 650     Address target_address = Assembler::target_address_at( | 650     Address target_address = | 
| 651         sequence + kCodeAgingTargetDelta, constant_pool); | 651         Assembler::target_address_at(sequence + kCodeAgingTargetDelta, code); | 
| 652     Code* stub = GetCodeFromTargetAddress(target_address); | 652     Code* stub = GetCodeFromTargetAddress(target_address); | 
| 653     GetCodeAgeAndParity(stub, age, parity); | 653     GetCodeAgeAndParity(stub, age, parity); | 
| 654   } | 654   } | 
| 655 } | 655 } | 
| 656 | 656 | 
| 657 | 657 | 
| 658 void Code::PatchPlatformCodeAge(Isolate* isolate, byte* sequence, Code::Age age, | 658 void Code::PatchPlatformCodeAge(Isolate* isolate, byte* sequence, Code::Age age, | 
| 659                                 MarkingParity parity) { | 659                                 MarkingParity parity) { | 
| 660   uint32_t young_length = isolate->code_aging_helper()->young_sequence_length(); | 660   uint32_t young_length = isolate->code_aging_helper()->young_sequence_length(); | 
| 661   if (age == kNoAgeCodeAge) { | 661   if (age == kNoAgeCodeAge) { | 
| (...skipping 12 matching lines...) Expand all  Loading... | 
| 674     patcher.masm()->Jump(r3); | 674     patcher.masm()->Jump(r3); | 
| 675     for (int i = 0; i < kCodeAgingSequenceNops; i++) { | 675     for (int i = 0; i < kCodeAgingSequenceNops; i++) { | 
| 676       patcher.masm()->nop(); | 676       patcher.masm()->nop(); | 
| 677     } | 677     } | 
| 678   } | 678   } | 
| 679 } | 679 } | 
| 680 } | 680 } | 
| 681 }  // namespace v8::internal | 681 }  // namespace v8::internal | 
| 682 | 682 | 
| 683 #endif  // V8_TARGET_ARCH_PPC | 683 #endif  // V8_TARGET_ARCH_PPC | 
| OLD | NEW | 
|---|