5 #ifndef V8_COMPILER_MACHINE_GRAPH_H_ 6 #define V8_COMPILER_MACHINE_GRAPH_H_ 8 #include "src/base/compiler-specific.h" 9 #include "src/compiler/common-node-cache.h" 10 #include "src/compiler/common-operator.h" 11 #include "src/compiler/graph.h" 12 #include "src/compiler/machine-operator.h" 13 #include "src/globals.h" 14 #include "src/runtime/runtime.h" 23 class V8_EXPORT_PRIVATE
MachineGraph :
public NON_EXPORTED_BASE(ZoneObject) {
27 : graph_(graph), common_(common), machine_(machine), cache_(zone()) {}
30 Node* Int32Constant(int32_t value);
32 return Int32Constant(bit_cast<int32_t>(value));
37 Node* Uint64Constant(uint64_t value) {
38 return Int64Constant(bit_cast<int64_t>(value));
45 Node* IntPtrConstant(intptr_t value);
47 Node* RelocatableInt32Constant(int32_t value, RelocInfo::Mode rmode);
48 Node* RelocatableInt64Constant(
int64_t value, RelocInfo::Mode rmode);
49 Node* RelocatableIntPtrConstant(intptr_t value, RelocInfo::Mode rmode);
52 Node* Float32Constant(
float value);
55 Node* Float64Constant(
double value);
58 Node* PointerConstant(intptr_t value);
60 Node* PointerConstant(
T* value) {
61 return PointerConstant(bit_cast<intptr_t>(value));
66 Node* ExternalConstant(Runtime::FunctionId function_id);
70 return Dead_ ? Dead_ : Dead_ = graph_->NewNode(common_->Dead());
75 Graph* graph()
const {
return graph_; }
76 Zone* zone()
const {
return graph()->zone(); }
83 Node* Dead_ =
nullptr;
92 #endif // V8_COMPILER_MACHINE_GRAPH_H_