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_CCTEST_COMPILER_VALUE_HELPER_H_ | 5 #ifndef V8_CCTEST_COMPILER_VALUE_HELPER_H_ |
6 #define V8_CCTEST_COMPILER_VALUE_HELPER_H_ | 6 #define V8_CCTEST_COMPILER_VALUE_HELPER_H_ |
7 | 7 |
8 #include "src/v8.h" | 8 #include "src/v8.h" |
9 | 9 |
10 #include "src/compiler/common-operator.h" | 10 #include "src/compiler/common-operator.h" |
(...skipping 26 matching lines...) Expand all Loading... |
37 CHECK_EQ(expected, OpParameter<double>(node)); | 37 CHECK_EQ(expected, OpParameter<double>(node)); |
38 } | 38 } |
39 | 39 |
40 void CheckInt32Constant(int32_t expected, Node* node) { | 40 void CheckInt32Constant(int32_t expected, Node* node) { |
41 CHECK_EQ(IrOpcode::kInt32Constant, node->opcode()); | 41 CHECK_EQ(IrOpcode::kInt32Constant, node->opcode()); |
42 CHECK_EQ(expected, OpParameter<int32_t>(node)); | 42 CHECK_EQ(expected, OpParameter<int32_t>(node)); |
43 } | 43 } |
44 | 44 |
45 void CheckUint32Constant(int32_t expected, Node* node) { | 45 void CheckUint32Constant(int32_t expected, Node* node) { |
46 CHECK_EQ(IrOpcode::kInt32Constant, node->opcode()); | 46 CHECK_EQ(IrOpcode::kInt32Constant, node->opcode()); |
47 CHECK_EQ(expected, OpParameter<uint32_t>(node)); | 47 CHECK_EQ(expected, OpParameter<int32_t>(node)); |
48 } | 48 } |
49 | 49 |
50 void CheckHeapConstant(Object* expected, Node* node) { | 50 void CheckHeapConstant(Object* expected, Node* node) { |
51 CHECK_EQ(IrOpcode::kHeapConstant, node->opcode()); | 51 CHECK_EQ(IrOpcode::kHeapConstant, node->opcode()); |
52 CHECK_EQ(expected, *OpParameter<Unique<Object> >(node).handle()); | 52 CHECK_EQ(expected, *OpParameter<Unique<Object> >(node).handle()); |
53 } | 53 } |
54 | 54 |
55 void CheckTrue(Node* node) { | 55 void CheckTrue(Node* node) { |
56 CheckHeapConstant(isolate_->heap()->true_value(), node); | 56 CheckHeapConstant(isolate_->heap()->true_value(), node); |
57 } | 57 } |
(...skipping 105 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
163 | 163 |
164 #define FOR_INT32_SHIFTS(var) for (int32_t var = 0; var < 32; var++) | 164 #define FOR_INT32_SHIFTS(var) for (int32_t var = 0; var < 32; var++) |
165 | 165 |
166 #define FOR_UINT32_SHIFTS(var) for (uint32_t var = 0; var < 32; var++) | 166 #define FOR_UINT32_SHIFTS(var) for (uint32_t var = 0; var < 32; var++) |
167 | 167 |
168 } // namespace compiler | 168 } // namespace compiler |
169 } // namespace internal | 169 } // namespace internal |
170 } // namespace v8 | 170 } // namespace v8 |
171 | 171 |
172 #endif // V8_CCTEST_COMPILER_VALUE_HELPER_H_ | 172 #endif // V8_CCTEST_COMPILER_VALUE_HELPER_H_ |
OLD | NEW |