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

Side by Side Diff: test/unittests/compiler/instruction-sequence-unittest.h

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, 5 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 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 #ifndef V8_UNITTESTS_COMPILER_INSTRUCTION_SEQUENCE_UNITTEST_H_ 5 #ifndef V8_UNITTESTS_COMPILER_INSTRUCTION_SEQUENCE_UNITTEST_H_
6 #define V8_UNITTESTS_COMPILER_INSTRUCTION_SEQUENCE_UNITTEST_H_ 6 #define V8_UNITTESTS_COMPILER_INSTRUCTION_SEQUENCE_UNITTEST_H_
7 7
8 #include <memory>
9
8 #include "src/compiler/instruction.h" 10 #include "src/compiler/instruction.h"
9 #include "test/unittests/test-utils.h" 11 #include "test/unittests/test-utils.h"
10 #include "testing/gmock/include/gmock/gmock.h" 12 #include "testing/gmock/include/gmock/gmock.h"
11 13
12 namespace v8 { 14 namespace v8 {
13 namespace internal { 15 namespace internal {
14 namespace compiler { 16 namespace compiler {
15 17
16 class InstructionSequenceTest : public TestWithIsolateAndZone { 18 class InstructionSequenceTest : public TestWithIsolateAndZone {
17 public: 19 public:
(...skipping 204 matching lines...) Expand 10 before | Expand all | Expand 10 after
222 224
223 struct LoopData { 225 struct LoopData {
224 Rpo loop_header_; 226 Rpo loop_header_;
225 int expected_blocks_; 227 int expected_blocks_;
226 }; 228 };
227 229
228 typedef std::vector<LoopData> LoopBlocks; 230 typedef std::vector<LoopData> LoopBlocks;
229 typedef std::map<int, const Instruction*> Instructions; 231 typedef std::map<int, const Instruction*> Instructions;
230 typedef std::vector<BlockCompletion> Completions; 232 typedef std::vector<BlockCompletion> Completions;
231 233
232 base::SmartPointer<RegisterConfiguration> config_; 234 std::unique_ptr<RegisterConfiguration> config_;
233 InstructionSequence* sequence_; 235 InstructionSequence* sequence_;
234 int num_general_registers_; 236 int num_general_registers_;
235 int num_double_registers_; 237 int num_double_registers_;
236 238
237 // Block building state. 239 // Block building state.
238 InstructionBlocks instruction_blocks_; 240 InstructionBlocks instruction_blocks_;
239 Instructions instructions_; 241 Instructions instructions_;
240 Completions completions_; 242 Completions completions_;
241 LoopBlocks loop_blocks_; 243 LoopBlocks loop_blocks_;
242 InstructionBlock* current_block_; 244 InstructionBlock* current_block_;
243 bool block_returns_; 245 bool block_returns_;
246
247 DISALLOW_COPY_AND_ASSIGN(InstructionSequenceTest);
244 }; 248 };
245 249
246 } // namespace compiler 250 } // namespace compiler
247 } // namespace internal 251 } // namespace internal
248 } // namespace v8 252 } // namespace v8
249 253
250 #endif // V8_UNITTESTS_COMPILER_INSTRUCTION_SEQUENCE_UNITTEST_H_ 254 #endif // V8_UNITTESTS_COMPILER_INSTRUCTION_SEQUENCE_UNITTEST_H_
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698