| 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/arm/codegen-arm.h" | 5 #include "src/arm/codegen-arm.h" |
| 6 | 6 |
| 7 #if V8_TARGET_ARCH_ARM | 7 #if V8_TARGET_ARCH_ARM |
| 8 | 8 |
| 9 #include <memory> |
| 10 |
| 9 #include "src/arm/simulator-arm.h" | 11 #include "src/arm/simulator-arm.h" |
| 10 #include "src/codegen.h" | 12 #include "src/codegen.h" |
| 11 #include "src/macro-assembler.h" | 13 #include "src/macro-assembler.h" |
| 12 | 14 |
| 13 namespace v8 { | 15 namespace v8 { |
| 14 namespace internal { | 16 namespace internal { |
| 15 | 17 |
| 16 | 18 |
| 17 #define __ masm. | 19 #define __ masm. |
| 18 | 20 |
| (...skipping 720 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 739 static const uint32_t kCodeAgePatchFirstInstruction = 0xe24f0008; | 741 static const uint32_t kCodeAgePatchFirstInstruction = 0xe24f0008; |
| 740 #endif | 742 #endif |
| 741 | 743 |
| 742 CodeAgingHelper::CodeAgingHelper(Isolate* isolate) { | 744 CodeAgingHelper::CodeAgingHelper(Isolate* isolate) { |
| 743 USE(isolate); | 745 USE(isolate); |
| 744 DCHECK(young_sequence_.length() == kNoCodeAgeSequenceLength); | 746 DCHECK(young_sequence_.length() == kNoCodeAgeSequenceLength); |
| 745 // Since patcher is a large object, allocate it dynamically when needed, | 747 // Since patcher is a large object, allocate it dynamically when needed, |
| 746 // to avoid overloading the stack in stress conditions. | 748 // to avoid overloading the stack in stress conditions. |
| 747 // DONT_FLUSH is used because the CodeAgingHelper is initialized early in | 749 // DONT_FLUSH is used because the CodeAgingHelper is initialized early in |
| 748 // the process, before ARM simulator ICache is setup. | 750 // the process, before ARM simulator ICache is setup. |
| 749 base::SmartPointer<CodePatcher> patcher( | 751 std::unique_ptr<CodePatcher> patcher( |
| 750 new CodePatcher(isolate, young_sequence_.start(), | 752 new CodePatcher(isolate, young_sequence_.start(), |
| 751 young_sequence_.length() / Assembler::kInstrSize, | 753 young_sequence_.length() / Assembler::kInstrSize, |
| 752 CodePatcher::DONT_FLUSH)); | 754 CodePatcher::DONT_FLUSH)); |
| 753 PredictableCodeSizeScope scope(patcher->masm(), young_sequence_.length()); | 755 PredictableCodeSizeScope scope(patcher->masm(), young_sequence_.length()); |
| 754 patcher->masm()->PushStandardFrame(r1); | 756 patcher->masm()->PushStandardFrame(r1); |
| 755 patcher->masm()->nop(ip.code()); | 757 patcher->masm()->nop(ip.code()); |
| 756 } | 758 } |
| 757 | 759 |
| 758 | 760 |
| 759 #ifdef DEBUG | 761 #ifdef DEBUG |
| (...skipping 40 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 800 patcher.masm()->ldr(pc, MemOperand(pc, -4)); | 802 patcher.masm()->ldr(pc, MemOperand(pc, -4)); |
| 801 patcher.masm()->emit_code_stub_address(stub); | 803 patcher.masm()->emit_code_stub_address(stub); |
| 802 } | 804 } |
| 803 } | 805 } |
| 804 | 806 |
| 805 | 807 |
| 806 } // namespace internal | 808 } // namespace internal |
| 807 } // namespace v8 | 809 } // namespace v8 |
| 808 | 810 |
| 809 #endif // V8_TARGET_ARCH_ARM | 811 #endif // V8_TARGET_ARCH_ARM |
| OLD | NEW |