Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(116)

Side by Side Diff: src/mips64/codegen-mips64.cc

Issue 2175233003: Replace SmartPointer<T> with unique_ptr<T> (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@smart-array
Patch Set: Created 4 years, 4 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
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/mips64/codegen-mips64.h" 5 #include "src/mips64/codegen-mips64.h"
6 6
7 #if V8_TARGET_ARCH_MIPS64 7 #if V8_TARGET_ARCH_MIPS64
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/mips64/simulator-mips64.h" 13 #include "src/mips64/simulator-mips64.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 1024 matching lines...) Expand 10 before | Expand all | Expand 10 after
1043 #endif 1045 #endif
1044 1046
1045 1047
1046 CodeAgingHelper::CodeAgingHelper(Isolate* isolate) { 1048 CodeAgingHelper::CodeAgingHelper(Isolate* isolate) {
1047 USE(isolate); 1049 USE(isolate);
1048 DCHECK(young_sequence_.length() == kNoCodeAgeSequenceLength); 1050 DCHECK(young_sequence_.length() == kNoCodeAgeSequenceLength);
1049 // Since patcher is a large object, allocate it dynamically when needed, 1051 // Since patcher is a large object, allocate it dynamically when needed,
1050 // to avoid overloading the stack in stress conditions. 1052 // to avoid overloading the stack in stress conditions.
1051 // DONT_FLUSH is used because the CodeAgingHelper is initialized early in 1053 // DONT_FLUSH is used because the CodeAgingHelper is initialized early in
1052 // the process, before MIPS simulator ICache is setup. 1054 // the process, before MIPS simulator ICache is setup.
1053 base::SmartPointer<CodePatcher> patcher( 1055 std::unique_ptr<CodePatcher> patcher(
1054 new CodePatcher(isolate, young_sequence_.start(), 1056 new CodePatcher(isolate, young_sequence_.start(),
1055 young_sequence_.length() / Assembler::kInstrSize, 1057 young_sequence_.length() / Assembler::kInstrSize,
1056 CodePatcher::DONT_FLUSH)); 1058 CodePatcher::DONT_FLUSH));
1057 PredictableCodeSizeScope scope(patcher->masm(), young_sequence_.length()); 1059 PredictableCodeSizeScope scope(patcher->masm(), young_sequence_.length());
1058 patcher->masm()->PushStandardFrame(a1); 1060 patcher->masm()->PushStandardFrame(a1);
1059 patcher->masm()->nop(Assembler::CODE_AGE_SEQUENCE_NOP); 1061 patcher->masm()->nop(Assembler::CODE_AGE_SEQUENCE_NOP);
1060 patcher->masm()->nop(Assembler::CODE_AGE_SEQUENCE_NOP); 1062 patcher->masm()->nop(Assembler::CODE_AGE_SEQUENCE_NOP);
1061 patcher->masm()->nop(Assembler::CODE_AGE_SEQUENCE_NOP); 1063 patcher->masm()->nop(Assembler::CODE_AGE_SEQUENCE_NOP);
1062 } 1064 }
1063 1065
(...skipping 53 matching lines...) Expand 10 before | Expand all | Expand 10 after
1117 } 1119 }
1118 } 1120 }
1119 1121
1120 1122
1121 #undef __ 1123 #undef __
1122 1124
1123 } // namespace internal 1125 } // namespace internal
1124 } // namespace v8 1126 } // namespace v8
1125 1127
1126 #endif // V8_TARGET_ARCH_MIPS64 1128 #endif // V8_TARGET_ARCH_MIPS64
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698