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 TestWithZone { | 16 class InstructionSequenceTest : public TestWithIsolateAndZone { |
17 public: | 17 public: |
18 static const int kDefaultNRegs = 4; | 18 static const int kDefaultNRegs = 4; |
19 static const int kNoValue = kMinInt; | 19 static const int kNoValue = kMinInt; |
20 | 20 |
21 typedef BasicBlock::RpoNumber Rpo; | 21 typedef BasicBlock::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) {} |
(...skipping 203 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
230 LoopBlocks loop_blocks_; | 230 LoopBlocks loop_blocks_; |
231 InstructionBlock* current_block_; | 231 InstructionBlock* current_block_; |
232 bool block_returns_; | 232 bool block_returns_; |
233 }; | 233 }; |
234 | 234 |
235 } // namespace compiler | 235 } // namespace compiler |
236 } // namespace internal | 236 } // namespace internal |
237 } // namespace v8 | 237 } // namespace v8 |
238 | 238 |
239 #endif // V8_UNITTESTS_COMPILER_INSTRUCTION_SEQUENCE_UNITTEST_H_ | 239 #endif // V8_UNITTESTS_COMPILER_INSTRUCTION_SEQUENCE_UNITTEST_H_ |
OLD | NEW |