| 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_GRAPH_BUILDER_TESTER_H_ | 5 #ifndef V8_CCTEST_COMPILER_GRAPH_BUILDER_TESTER_H_ |
| 6 #define V8_CCTEST_COMPILER_GRAPH_BUILDER_TESTER_H_ | 6 #define V8_CCTEST_COMPILER_GRAPH_BUILDER_TESTER_H_ |
| 7 | 7 |
| 8 #include "src/v8.h" | 8 #include "src/v8.h" |
| 9 #include "test/cctest/cctest.h" | 9 #include "test/cctest/cctest.h" |
| 10 | 10 |
| (...skipping 86 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 97 | 97 |
| 98 Node* PointerConstant(void* value) { | 98 Node* PointerConstant(void* value) { |
| 99 intptr_t intptr_value = reinterpret_cast<intptr_t>(value); | 99 intptr_t intptr_value = reinterpret_cast<intptr_t>(value); |
| 100 return kPointerSize == 8 ? NewNode(common()->Int64Constant(intptr_value)) | 100 return kPointerSize == 8 ? NewNode(common()->Int64Constant(intptr_value)) |
| 101 : Int32Constant(static_cast<int>(intptr_value)); | 101 : Int32Constant(static_cast<int>(intptr_value)); |
| 102 } | 102 } |
| 103 Node* Int32Constant(int32_t value) { | 103 Node* Int32Constant(int32_t value) { |
| 104 return NewNode(common()->Int32Constant(value)); | 104 return NewNode(common()->Int32Constant(value)); |
| 105 } | 105 } |
| 106 Node* HeapConstant(Handle<HeapObject> object) { | 106 Node* HeapConstant(Handle<HeapObject> object) { |
| 107 Unique<HeapObject> val = Unique<HeapObject>::CreateUninitialized(object); | 107 return NewNode(common()->HeapConstant(object)); |
| 108 return NewNode(common()->HeapConstant(val)); | |
| 109 } | 108 } |
| 110 | 109 |
| 111 Node* BooleanNot(Node* a) { return NewNode(simplified()->BooleanNot(), a); } | 110 Node* BooleanNot(Node* a) { return NewNode(simplified()->BooleanNot(), a); } |
| 112 | 111 |
| 113 Node* NumberEqual(Node* a, Node* b) { | 112 Node* NumberEqual(Node* a, Node* b) { |
| 114 return NewNode(simplified()->NumberEqual(), a, b); | 113 return NewNode(simplified()->NumberEqual(), a, b); |
| 115 } | 114 } |
| 116 Node* NumberLessThan(Node* a, Node* b) { | 115 Node* NumberLessThan(Node* a, Node* b) { |
| 117 return NewNode(simplified()->NumberLessThan(), a, b); | 116 return NewNode(simplified()->NumberLessThan(), a, b); |
| 118 } | 117 } |
| (...skipping 180 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 299 Node* return_; | 298 Node* return_; |
| 300 Node** parameters_; | 299 Node** parameters_; |
| 301 MaybeHandle<Code> code_; | 300 MaybeHandle<Code> code_; |
| 302 }; | 301 }; |
| 303 | 302 |
| 304 } // namespace compiler | 303 } // namespace compiler |
| 305 } // namespace internal | 304 } // namespace internal |
| 306 } // namespace v8 | 305 } // namespace v8 |
| 307 | 306 |
| 308 #endif // V8_CCTEST_COMPILER_GRAPH_BUILDER_TESTER_H_ | 307 #endif // V8_CCTEST_COMPILER_GRAPH_BUILDER_TESTER_H_ |
| OLD | NEW |