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

Unified Diff: src/compiler/graph-builder.h

Issue 555283004: [turbofan] Next step towards shared operators. (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Created 6 years, 3 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/common-operator-unittest.cc ('k') | src/compiler/graph-builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/graph-builder.h
diff --git a/src/compiler/graph-builder.h b/src/compiler/graph-builder.h
index fb0431902c8ee61baa525e1e1c7fa0ab7b193460..c966c299b98265be53a59a46569892b11debe0be 100644
--- a/src/compiler/graph-builder.h
+++ b/src/compiler/graph-builder.h
@@ -24,40 +24,41 @@ class GraphBuilder {
explicit GraphBuilder(Graph* graph) : graph_(graph) {}
virtual ~GraphBuilder() {}
- Node* NewNode(Operator* op) {
+ Node* NewNode(const Operator* op) {
return MakeNode(op, 0, static_cast<Node**>(NULL));
}
- Node* NewNode(Operator* op, Node* n1) { return MakeNode(op, 1, &n1); }
+ Node* NewNode(const Operator* op, Node* n1) { return MakeNode(op, 1, &n1); }
- Node* NewNode(Operator* op, Node* n1, Node* n2) {
+ Node* NewNode(const Operator* op, Node* n1, Node* n2) {
Node* buffer[] = {n1, n2};
return MakeNode(op, arraysize(buffer), buffer);
}
- Node* NewNode(Operator* op, Node* n1, Node* n2, Node* n3) {
+ Node* NewNode(const Operator* op, Node* n1, Node* n2, Node* n3) {
Node* buffer[] = {n1, n2, n3};
return MakeNode(op, arraysize(buffer), buffer);
}
- Node* NewNode(Operator* op, Node* n1, Node* n2, Node* n3, Node* n4) {
+ Node* NewNode(const Operator* op, Node* n1, Node* n2, Node* n3, Node* n4) {
Node* buffer[] = {n1, n2, n3, n4};
return MakeNode(op, arraysize(buffer), buffer);
}
- Node* NewNode(Operator* op, Node* n1, Node* n2, Node* n3, Node* n4,
+ Node* NewNode(const Operator* op, Node* n1, Node* n2, Node* n3, Node* n4,
Node* n5) {
Node* buffer[] = {n1, n2, n3, n4, n5};
return MakeNode(op, arraysize(buffer), buffer);
}
- Node* NewNode(Operator* op, Node* n1, Node* n2, Node* n3, Node* n4, Node* n5,
- Node* n6) {
+ Node* NewNode(const Operator* op, Node* n1, Node* n2, Node* n3, Node* n4,
+ Node* n5, Node* n6) {
Node* nodes[] = {n1, n2, n3, n4, n5, n6};
return MakeNode(op, arraysize(nodes), nodes);
}
- Node* NewNode(Operator* op, int value_input_count, Node** value_inputs) {
+ Node* NewNode(const Operator* op, int value_input_count,
+ Node** value_inputs) {
return MakeNode(op, value_input_count, value_inputs);
}
@@ -65,7 +66,7 @@ class GraphBuilder {
protected:
// Base implementation used by all factory methods.
- virtual Node* MakeNode(Operator* op, int value_input_count,
+ virtual Node* MakeNode(const Operator* op, int value_input_count,
Node** value_inputs) = 0;
private:
@@ -107,8 +108,8 @@ class StructuredGraphBuilder : public GraphBuilder {
// The following method creates a new node having the specified operator and
// ensures effect and control dependencies are wired up. The dependencies
// tracked by the environment might be mutated.
- virtual Node* MakeNode(Operator* op, int value_input_count,
- Node** value_inputs);
+ virtual Node* MakeNode(const Operator* op, int value_input_count,
+ Node** value_inputs) FINAL;
Environment* environment() const { return environment_; }
void set_environment(Environment* env) { environment_ = env; }
« no previous file with comments | « src/compiler/common-operator-unittest.cc ('k') | src/compiler/graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698