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

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

Issue 1252093002: [turbofan] Remove bloated GraphBuilder base class. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 5 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 | « BUILD.gn ('k') | src/compiler/raw-machine-assembler.h » ('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
deleted file mode 100644
index f2fb7f6c096a8963aadebac936ca39b0bb0886e4..0000000000000000000000000000000000000000
--- a/src/compiler/graph-builder.h
+++ /dev/null
@@ -1,82 +0,0 @@
-// Copyright 2013 the V8 project authors. All rights reserved.
-// Use of this source code is governed by a BSD-style license that can be
-// found in the LICENSE file.
-
-#ifndef V8_COMPILER_GRAPH_BUILDER_H_
-#define V8_COMPILER_GRAPH_BUILDER_H_
-
-#include "src/allocation.h"
-#include "src/compiler/common-operator.h"
-#include "src/compiler/graph.h"
-#include "src/compiler/node.h"
-#include "src/unique.h"
-
-namespace v8 {
-namespace internal {
-namespace compiler {
-
-// A common base class for anything that creates nodes in a graph.
-class GraphBuilder {
- public:
- GraphBuilder(Isolate* isolate, Graph* graph)
- : isolate_(isolate), graph_(graph) {}
- virtual ~GraphBuilder() {}
-
- Node* NewNode(const Operator* op, bool incomplete = false) {
- return MakeNode(op, 0, static_cast<Node**>(NULL), incomplete);
- }
-
- Node* NewNode(const Operator* op, Node* n1) {
- return MakeNode(op, 1, &n1, false);
- }
-
- Node* NewNode(const Operator* op, Node* n1, Node* n2) {
- Node* buffer[] = {n1, n2};
- return MakeNode(op, arraysize(buffer), buffer, false);
- }
-
- Node* NewNode(const Operator* op, Node* n1, Node* n2, Node* n3) {
- Node* buffer[] = {n1, n2, n3};
- return MakeNode(op, arraysize(buffer), buffer, false);
- }
-
- 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, false);
- }
-
- 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, false);
- }
-
- 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, false);
- }
-
- Node* NewNode(const Operator* op, int value_input_count, Node** value_inputs,
- bool incomplete = false) {
- return MakeNode(op, value_input_count, value_inputs, incomplete);
- }
-
- Isolate* isolate() const { return isolate_; }
- Graph* graph() const { return graph_; }
-
- protected:
- // Base implementation used by all factory methods.
- virtual Node* MakeNode(const Operator* op, int value_input_count,
- Node** value_inputs, bool incomplete) = 0;
-
- private:
- Isolate* isolate_;
- Graph* graph_;
-};
-
-} // namespace compiler
-} // namespace internal
-} // namespace v8
-
-#endif // V8_COMPILER_GRAPH_BUILDER_H__
« no previous file with comments | « BUILD.gn ('k') | src/compiler/raw-machine-assembler.h » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698