| 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 29 matching lines...) Expand all Loading... |
| 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<int32_t>(node)); | 47 CHECK_EQ(expected, OpParameter<int32_t>(node)); |
| 48 } | 48 } |
| 49 | 49 |
| 50 void CheckHeapConstant(Object* expected, Node* node) { | 50 void CheckHeapConstant(HeapObject* 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<Handle<HeapObject>>(node)); |
| 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 } |
| 58 | 58 |
| 59 void CheckFalse(Node* node) { | 59 void CheckFalse(Node* node) { |
| 60 CheckHeapConstant(isolate_->heap()->false_value(), node); | 60 CheckHeapConstant(isolate_->heap()->false_value(), node); |
| 61 } | 61 } |
| 62 | 62 |
| (...skipping 98 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 161 | 161 |
| 162 #define FOR_INT32_SHIFTS(var) for (int32_t var = 0; var < 32; var++) | 162 #define FOR_INT32_SHIFTS(var) for (int32_t var = 0; var < 32; var++) |
| 163 | 163 |
| 164 #define FOR_UINT32_SHIFTS(var) for (uint32_t var = 0; var < 32; var++) | 164 #define FOR_UINT32_SHIFTS(var) for (uint32_t var = 0; var < 32; var++) |
| 165 | 165 |
| 166 } // namespace compiler | 166 } // namespace compiler |
| 167 } // namespace internal | 167 } // namespace internal |
| 168 } // namespace v8 | 168 } // namespace v8 |
| 169 | 169 |
| 170 #endif // V8_CCTEST_COMPILER_VALUE_HELPER_H_ | 170 #endif // V8_CCTEST_COMPILER_VALUE_HELPER_H_ |
| OLD | NEW |