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 #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 "src/compiler/instruction.h" | 8 #include "src/compiler/instruction.h" |
9 #include "test/unittests/test-utils.h" | 9 #include "test/unittests/test-utils.h" |
10 #include "testing/gmock/include/gmock/gmock.h" | 10 #include "testing/gmock/include/gmock/gmock.h" |
11 | 11 |
12 namespace v8 { | 12 namespace v8 { |
13 namespace internal { | 13 namespace internal { |
14 namespace compiler { | 14 namespace compiler { |
15 | 15 |
16 class InstructionSequenceTest : public TestWithIsolateAndZone { | 16 class InstructionSequenceTest : public TestWithIsolateAndZone { |
17 public: | 17 public: |
18 static const int kDefaultNRegs = 4; | 18 static const int kDefaultNRegs = 8; |
19 static const int kNoValue = kMinInt; | 19 static const int kNoValue = kMinInt; |
20 | 20 |
21 typedef RpoNumber Rpo; | 21 typedef RpoNumber Rpo; |
22 | 22 |
23 struct VReg { | 23 struct VReg { |
24 VReg() : value_(kNoValue) {} | 24 VReg() : value_(kNoValue) {} |
25 VReg(PhiInstruction* phi) : value_(phi->virtual_register()) {} // NOLINT | 25 VReg(PhiInstruction* phi) : value_(phi->virtual_register()) {} // NOLINT |
26 explicit VReg(int value) : value_(value) {} | 26 explicit VReg(int value) : value_(value) {} |
27 int value_; | 27 int value_; |
28 }; | 28 }; |
(...skipping 206 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
235 LoopBlocks loop_blocks_; | 235 LoopBlocks loop_blocks_; |
236 InstructionBlock* current_block_; | 236 InstructionBlock* current_block_; |
237 bool block_returns_; | 237 bool block_returns_; |
238 }; | 238 }; |
239 | 239 |
240 } // namespace compiler | 240 } // namespace compiler |
241 } // namespace internal | 241 } // namespace internal |
242 } // namespace v8 | 242 } // namespace v8 |
243 | 243 |
244 #endif // V8_UNITTESTS_COMPILER_INSTRUCTION_SEQUENCE_UNITTEST_H_ | 244 #endif // V8_UNITTESTS_COMPILER_INSTRUCTION_SEQUENCE_UNITTEST_H_ |
OLD | NEW |