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/mips/codegen-mips.h" | 5 #include "src/mips/codegen-mips.h" |
6 | 6 |
7 #if V8_TARGET_ARCH_MIPS | 7 #if V8_TARGET_ARCH_MIPS |
8 | 8 |
| 9 #include <memory> |
| 10 |
9 #include "src/codegen.h" | 11 #include "src/codegen.h" |
10 #include "src/macro-assembler.h" | 12 #include "src/macro-assembler.h" |
11 #include "src/mips/simulator-mips.h" | 13 #include "src/mips/simulator-mips.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 1025 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1044 #endif | 1046 #endif |
1045 | 1047 |
1046 | 1048 |
1047 CodeAgingHelper::CodeAgingHelper(Isolate* isolate) { | 1049 CodeAgingHelper::CodeAgingHelper(Isolate* isolate) { |
1048 USE(isolate); | 1050 USE(isolate); |
1049 DCHECK(young_sequence_.length() == kNoCodeAgeSequenceLength); | 1051 DCHECK(young_sequence_.length() == kNoCodeAgeSequenceLength); |
1050 // Since patcher is a large object, allocate it dynamically when needed, | 1052 // Since patcher is a large object, allocate it dynamically when needed, |
1051 // to avoid overloading the stack in stress conditions. | 1053 // to avoid overloading the stack in stress conditions. |
1052 // DONT_FLUSH is used because the CodeAgingHelper is initialized early in | 1054 // DONT_FLUSH is used because the CodeAgingHelper is initialized early in |
1053 // the process, before MIPS simulator ICache is setup. | 1055 // the process, before MIPS simulator ICache is setup. |
1054 base::SmartPointer<CodePatcher> patcher( | 1056 std::unique_ptr<CodePatcher> patcher( |
1055 new CodePatcher(isolate, young_sequence_.start(), | 1057 new CodePatcher(isolate, young_sequence_.start(), |
1056 young_sequence_.length() / Assembler::kInstrSize, | 1058 young_sequence_.length() / Assembler::kInstrSize, |
1057 CodePatcher::DONT_FLUSH)); | 1059 CodePatcher::DONT_FLUSH)); |
1058 PredictableCodeSizeScope scope(patcher->masm(), young_sequence_.length()); | 1060 PredictableCodeSizeScope scope(patcher->masm(), young_sequence_.length()); |
1059 patcher->masm()->PushStandardFrame(a1); | 1061 patcher->masm()->PushStandardFrame(a1); |
1060 patcher->masm()->nop(Assembler::CODE_AGE_SEQUENCE_NOP); | 1062 patcher->masm()->nop(Assembler::CODE_AGE_SEQUENCE_NOP); |
1061 } | 1063 } |
1062 | 1064 |
1063 | 1065 |
1064 #ifdef DEBUG | 1066 #ifdef DEBUG |
(...skipping 51 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
1116 } | 1118 } |
1117 } | 1119 } |
1118 | 1120 |
1119 | 1121 |
1120 #undef __ | 1122 #undef __ |
1121 | 1123 |
1122 } // namespace internal | 1124 } // namespace internal |
1123 } // namespace v8 | 1125 } // namespace v8 |
1124 | 1126 |
1125 #endif // V8_TARGET_ARCH_MIPS | 1127 #endif // V8_TARGET_ARCH_MIPS |
OLD | NEW |