| 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_SIMPLIFIED_GRAPH_BUILDER_H_ | 5 #ifndef V8_CCTEST_COMPILER_SIMPLIFIED_GRAPH_BUILDER_H_ |
| 6 #define V8_CCTEST_COMPILER_SIMPLIFIED_GRAPH_BUILDER_H_ | 6 #define V8_CCTEST_COMPILER_SIMPLIFIED_GRAPH_BUILDER_H_ |
| 7 | 7 |
| 8 #include "src/compiler/common-operator.h" | 8 #include "src/compiler/common-operator.h" |
| 9 #include "src/compiler/graph-builder.h" | 9 #include "src/compiler/graph-builder.h" |
| 10 #include "src/compiler/machine-operator.h" | 10 #include "src/compiler/machine-operator.h" |
| (...skipping 27 matching lines...) Expand all Loading... |
| 38 void End(); | 38 void End(); |
| 39 | 39 |
| 40 Node* PointerConstant(void* value) { | 40 Node* PointerConstant(void* value) { |
| 41 intptr_t intptr_value = reinterpret_cast<intptr_t>(value); | 41 intptr_t intptr_value = reinterpret_cast<intptr_t>(value); |
| 42 return kPointerSize == 8 ? NewNode(common()->Int64Constant(intptr_value)) | 42 return kPointerSize == 8 ? NewNode(common()->Int64Constant(intptr_value)) |
| 43 : Int32Constant(static_cast<int>(intptr_value)); | 43 : Int32Constant(static_cast<int>(intptr_value)); |
| 44 } | 44 } |
| 45 Node* Int32Constant(int32_t value) { | 45 Node* Int32Constant(int32_t value) { |
| 46 return NewNode(common()->Int32Constant(value)); | 46 return NewNode(common()->Int32Constant(value)); |
| 47 } | 47 } |
| 48 Node* HeapConstant(Handle<Object> object) { | 48 Node* HeapConstant(Handle<HeapObject> object) { |
| 49 Unique<Object> val = Unique<Object>::CreateUninitialized(object); | 49 Unique<HeapObject> val = Unique<HeapObject>::CreateUninitialized(object); |
| 50 return NewNode(common()->HeapConstant(val)); | 50 return NewNode(common()->HeapConstant(val)); |
| 51 } | 51 } |
| 52 | 52 |
| 53 Node* BooleanNot(Node* a) { return NewNode(simplified()->BooleanNot(), a); } | 53 Node* BooleanNot(Node* a) { return NewNode(simplified()->BooleanNot(), a); } |
| 54 | 54 |
| 55 Node* NumberEqual(Node* a, Node* b) { | 55 Node* NumberEqual(Node* a, Node* b) { |
| 56 return NewNode(simplified()->NumberEqual(), a, b); | 56 return NewNode(simplified()->NumberEqual(), a, b); |
| 57 } | 57 } |
| 58 Node* NumberLessThan(Node* a, Node* b) { | 58 Node* NumberLessThan(Node* a, Node* b) { |
| 59 return NewNode(simplified()->NumberLessThan(), a, b); | 59 return NewNode(simplified()->NumberLessThan(), a, b); |
| (...skipping 87 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 147 CommonOperatorBuilder* common_; | 147 CommonOperatorBuilder* common_; |
| 148 MachineOperatorBuilder* machine_; | 148 MachineOperatorBuilder* machine_; |
| 149 SimplifiedOperatorBuilder* simplified_; | 149 SimplifiedOperatorBuilder* simplified_; |
| 150 }; | 150 }; |
| 151 | 151 |
| 152 } // namespace compiler | 152 } // namespace compiler |
| 153 } // namespace internal | 153 } // namespace internal |
| 154 } // namespace v8 | 154 } // namespace v8 |
| 155 | 155 |
| 156 #endif // V8_CCTEST_COMPILER_SIMPLIFIED_GRAPH_BUILDER_H_ | 156 #endif // V8_CCTEST_COMPILER_SIMPLIFIED_GRAPH_BUILDER_H_ |
| OLD | NEW |