Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(114)

Unified Diff: src/compiler/node.cc

Issue 838783002: [turbofan] Cleanup Graph and related classes. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Parameter pack causes compile errors. Created 5 years, 11 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « src/compiler/node.h ('k') | src/compiler/node-marker.h » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/node.cc
diff --git a/src/compiler/node.cc b/src/compiler/node.cc
index 8f44c24fd2117018dc28d0181e046d1378611d94..b86b0bde51366b5fb2bb3a77ba38e81eecf9ab0c 100644
--- a/src/compiler/node.cc
+++ b/src/compiler/node.cc
@@ -4,15 +4,15 @@
#include "src/compiler/node.h"
-#include "src/compiler/graph.h"
-#include "src/zone.h"
-
namespace v8 {
namespace internal {
namespace compiler {
-Node::Node(NodeId id, int input_count, int reserved_input_count)
- : id_(id),
+Node::Node(NodeId id, const Operator* op, int input_count,
+ int reserved_input_count)
+ : op_(op),
+ mark_(0),
+ id_(id),
bit_field_(InputCountField::encode(input_count) |
ReservedInputCountField::encode(reserved_input_count) |
HasAppendableInputsField::encode(false)),
@@ -22,17 +22,15 @@ Node::Node(NodeId id, int input_count, int reserved_input_count)
}
-Node* Node::New(Graph* graph, int input_count, Node** inputs,
- bool has_extensible_inputs) {
+Node* Node::New(Zone* zone, NodeId id, const Operator* op, int input_count,
+ Node** inputs, bool has_extensible_inputs) {
size_t node_size = sizeof(Node);
int reserve_input_count = has_extensible_inputs ? kDefaultReservedInputs : 0;
size_t inputs_size = (input_count + reserve_input_count) * sizeof(Input);
size_t uses_size = input_count * sizeof(Use);
int size = static_cast<int>(node_size + inputs_size + uses_size);
- Zone* zone = graph->zone();
void* buffer = zone->New(size);
- Node* result =
- new (buffer) Node(graph->NextNodeID(), input_count, reserve_input_count);
+ Node* result = new (buffer) Node(id, op, input_count, reserve_input_count);
Input* input =
reinterpret_cast<Input*>(reinterpret_cast<char*>(buffer) + node_size);
Use* use =
« no previous file with comments | « src/compiler/node.h ('k') | src/compiler/node-marker.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698