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

Unified Diff: src/compiler/graph.cc

Issue 658543002: Better typing and type verification (Closed) Base URL: https://v8.googlecode.com/svn/branches/bleeding_edge
Patch Set: Addressed comments Created 6 years, 2 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/graph.h ('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.cc
diff --git a/src/compiler/graph.cc b/src/compiler/graph.cc
index 7b5f228aa163ffd1a4ddc02d218cf095efedb6a0..19e9c7fec6b1e6d81c7efd7fd0cd27dd0ad29b2d 100644
--- a/src/compiler/graph.cc
+++ b/src/compiler/graph.cc
@@ -21,14 +21,20 @@ namespace compiler {
Graph::Graph(Zone* zone) : GenericGraph<Node>(zone), decorators_(zone) {}
-Node* Graph::NewNode(const Operator* op, int input_count, Node** inputs) {
- DCHECK_LE(op->InputCount(), input_count);
- Node* result = Node::New(this, input_count, inputs);
- result->Initialize(op);
+void Graph::Decorate(Node* node) {
for (ZoneVector<GraphDecorator*>::iterator i = decorators_.begin();
i != decorators_.end(); ++i) {
- (*i)->Decorate(result);
+ (*i)->Decorate(node);
}
+}
+
+
+Node* Graph::NewNode(
+ const Operator* op, int input_count, Node** inputs, bool incomplete) {
+ DCHECK_LE(op->InputCount(), input_count);
+ Node* result = Node::New(this, input_count, inputs);
+ result->Initialize(op);
+ if (!incomplete) Decorate(result);
return result;
}
« no previous file with comments | « src/compiler/graph.h ('k') | src/compiler/graph-builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698