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 <memory> | 8 #include <memory> |
9 | 9 |
10 #include "src/compiler/instruction.h" | 10 #include "src/compiler/instruction.h" |
11 #include "test/unittests/test-utils.h" | 11 #include "test/unittests/test-utils.h" |
12 #include "testing/gmock/include/gmock/gmock.h" | 12 #include "testing/gmock/include/gmock/gmock.h" |
13 | 13 |
14 namespace v8 { | 14 namespace v8 { |
15 namespace internal { | 15 namespace internal { |
16 namespace compiler { | 16 namespace compiler { |
17 | 17 |
18 class InstructionSequenceTest : public TestWithIsolateAndZone { | 18 class InstructionSequenceTest : public TestWithIsolateAndZone { |
19 public: | 19 public: |
20 static const int kDefaultNRegs = 8; | 20 static const int kDefaultNRegs = 8; |
21 static const int kNoValue = kMinInt; | 21 static const int kNoValue = kMinInt; |
22 static const MachineRepresentation kNoRep = MachineRepresentation::kNone; | 22 static const MachineRepresentation kNoRep = MachineRepresentation::kNone; |
| 23 static const MachineRepresentation kFloat32 = MachineRepresentation::kFloat32; |
23 static const MachineRepresentation kFloat64 = MachineRepresentation::kFloat64; | 24 static const MachineRepresentation kFloat64 = MachineRepresentation::kFloat64; |
| 25 static const MachineRepresentation kSimd128 = MachineRepresentation::kSimd128; |
24 | 26 |
25 typedef RpoNumber Rpo; | 27 typedef RpoNumber Rpo; |
26 | 28 |
27 struct VReg { | 29 struct VReg { |
28 VReg() : value_(kNoValue) {} | 30 VReg() : value_(kNoValue) {} |
29 VReg(PhiInstruction* phi) : value_(phi->virtual_register()) {} // NOLINT | 31 VReg(PhiInstruction* phi) : value_(phi->virtual_register()) {} // NOLINT |
30 explicit VReg(int value, MachineRepresentation rep = kNoRep) | 32 explicit VReg(int value, MachineRepresentation rep = kNoRep) |
31 : value_(value), rep_(rep) {} | 33 : value_(value), rep_(rep) {} |
32 int value_; | 34 int value_; |
33 MachineRepresentation rep_ = kNoRep; | 35 MachineRepresentation rep_ = kNoRep; |
(...skipping 251 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
285 bool block_returns_; | 287 bool block_returns_; |
286 | 288 |
287 DISALLOW_COPY_AND_ASSIGN(InstructionSequenceTest); | 289 DISALLOW_COPY_AND_ASSIGN(InstructionSequenceTest); |
288 }; | 290 }; |
289 | 291 |
290 } // namespace compiler | 292 } // namespace compiler |
291 } // namespace internal | 293 } // namespace internal |
292 } // namespace v8 | 294 } // namespace v8 |
293 | 295 |
294 #endif // V8_UNITTESTS_COMPILER_INSTRUCTION_SEQUENCE_UNITTEST_H_ | 296 #endif // V8_UNITTESTS_COMPILER_INSTRUCTION_SEQUENCE_UNITTEST_H_ |
OLD | NEW |