5 #ifndef V8_COMPILER_STATE_VALUES_UTILS_H_ 6 #define V8_COMPILER_STATE_VALUES_UTILS_H_ 9 #include "src/compiler/common-operator.h" 10 #include "src/compiler/js-graph.h" 11 #include "src/globals.h" 26 Node* GetNodeForValues(
Node** values,
size_t count,
28 int liveness_offset = 0);
31 static const size_t kMaxInputCount = 8;
32 typedef std::array<Node*, kMaxInputCount> WorkingBuffer;
37 explicit NodeKey(
Node* node) : node(node) {}
40 struct StateValuesKey :
public NodeKey {
47 : NodeKey(
nullptr), count(count), mask(mask), values(values) {}
50 static bool AreKeysEqual(
void* key1,
void* key2);
51 static bool IsKeysEqualToNode(StateValuesKey* key,
Node* node);
52 static bool AreValueKeysEqual(StateValuesKey* key1, StateValuesKey* key2);
61 Node** values,
size_t count,
65 Node* BuildTree(
size_t* values_idx,
Node** values,
size_t count,
66 const BitVector* liveness,
int liveness_offset,
size_t level);
68 WorkingBuffer* GetWorkingSpace(
size_t level);
69 Node* GetEmptyStateValues();
70 Node* GetValuesNodeFromCache(
Node** nodes,
size_t count,
73 Graph* graph() {
return js_graph_->graph(); }
76 Zone* zone() {
return graph()->zone(); }
81 Node* empty_state_values_;
112 void Push(
Node* node);
115 static const int kMaxInlineDepth = 8;
123 iterator begin() {
return iterator(node_); }
124 iterator end() {
return iterator(); }
134 #endif // V8_COMPILER_STATE_VALUES_UTILS_H_