OLD | NEW |
1 // Copyright 2013 the V8 project authors. All rights reserved. | 1 // Copyright 2013 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 // TODO(jochen): Remove this after the setting is turned on globally. | 5 // TODO(jochen): Remove this after the setting is turned on globally. |
6 #define V8_IMMINENT_DEPRECATION_WARNINGS | 6 #define V8_IMMINENT_DEPRECATION_WARNINGS |
7 | 7 |
8 #include <sstream> | 8 #include <sstream> |
9 | 9 |
10 #include "src/compiler/operator.h" | 10 #include "src/compiler/operator.h" |
11 #include "test/cctest/cctest.h" | 11 #include "test/cctest/cctest.h" |
12 | 12 |
13 using namespace v8::internal; | 13 namespace v8 { |
14 using namespace v8::internal::compiler; | 14 namespace internal { |
| 15 namespace compiler { |
15 | 16 |
16 #define NONE Operator::kNoProperties | 17 #define NONE Operator::kNoProperties |
17 #define FOLD Operator::kFoldable | 18 #define FOLD Operator::kFoldable |
18 | 19 |
19 | 20 |
20 TEST(TestOperator_Mnemonic) { | 21 TEST(TestOperator_Mnemonic) { |
21 Operator op1(10, NONE, "ThisOne", 0, 0, 0, 0, 0, 0); | 22 Operator op1(10, NONE, "ThisOne", 0, 0, 0, 0, 0, 0); |
22 CHECK_EQ(0, strcmp(op1.mnemonic(), "ThisOne")); | 23 CHECK_EQ(0, strcmp(op1.mnemonic(), "ThisOne")); |
23 | 24 |
24 Operator op2(11, NONE, "ThatOne", 0, 0, 0, 0, 0, 0); | 25 Operator op2(11, NONE, "ThatOne", 0, 0, 0, 0, 0, 0); |
(...skipping 250 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
275 TEST(Operator_CountsOrder) { | 276 TEST(Operator_CountsOrder) { |
276 Operator op(29, NONE, "Flashy", 11, 22, 33, 44, 55, 66); | 277 Operator op(29, NONE, "Flashy", 11, 22, 33, 44, 55, 66); |
277 CHECK_EQ(11, op.ValueInputCount()); | 278 CHECK_EQ(11, op.ValueInputCount()); |
278 CHECK_EQ(22, op.EffectInputCount()); | 279 CHECK_EQ(22, op.EffectInputCount()); |
279 CHECK_EQ(33, op.ControlInputCount()); | 280 CHECK_EQ(33, op.ControlInputCount()); |
280 | 281 |
281 CHECK_EQ(44, op.ValueOutputCount()); | 282 CHECK_EQ(44, op.ValueOutputCount()); |
282 CHECK_EQ(55, op.EffectOutputCount()); | 283 CHECK_EQ(55, op.EffectOutputCount()); |
283 CHECK_EQ(66, op.ControlOutputCount()); | 284 CHECK_EQ(66, op.ControlOutputCount()); |
284 } | 285 } |
| 286 |
| 287 } // namespace compiler |
| 288 } // namespace internal |
| 289 } // namespace v8 |
OLD | NEW |