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

Side by Side 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 unified diff | Download patch | Annotate | Revision Log
« no previous file with comments | « src/compiler/graph.h ('k') | src/compiler/graph-builder.cc » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 // Copyright 2013 the V8 project authors. All rights reserved. 1 // Copyright 2013 the V8 project authors. All rights reserved.
2 // Use of this source code is governed by a BSD-style license that can be 2 // Use of this source code is governed by a BSD-style license that can be
3 // found in the LICENSE file. 3 // found in the LICENSE file.
4 4
5 #include "src/compiler/graph.h" 5 #include "src/compiler/graph.h"
6 6
7 #include "src/compiler/common-operator.h" 7 #include "src/compiler/common-operator.h"
8 #include "src/compiler/generic-node-inl.h" 8 #include "src/compiler/generic-node-inl.h"
9 #include "src/compiler/graph-inl.h" 9 #include "src/compiler/graph-inl.h"
10 #include "src/compiler/node.h" 10 #include "src/compiler/node.h"
11 #include "src/compiler/node-aux-data-inl.h" 11 #include "src/compiler/node-aux-data-inl.h"
12 #include "src/compiler/node-properties.h" 12 #include "src/compiler/node-properties.h"
13 #include "src/compiler/node-properties-inl.h" 13 #include "src/compiler/node-properties-inl.h"
14 #include "src/compiler/operator-properties.h" 14 #include "src/compiler/operator-properties.h"
15 #include "src/compiler/operator-properties-inl.h" 15 #include "src/compiler/operator-properties-inl.h"
16 16
17 namespace v8 { 17 namespace v8 {
18 namespace internal { 18 namespace internal {
19 namespace compiler { 19 namespace compiler {
20 20
21 Graph::Graph(Zone* zone) : GenericGraph<Node>(zone), decorators_(zone) {} 21 Graph::Graph(Zone* zone) : GenericGraph<Node>(zone), decorators_(zone) {}
22 22
23 23
24 Node* Graph::NewNode(const Operator* op, int input_count, Node** inputs) { 24 void Graph::Decorate(Node* node) {
25 for (ZoneVector<GraphDecorator*>::iterator i = decorators_.begin();
26 i != decorators_.end(); ++i) {
27 (*i)->Decorate(node);
28 }
29 }
30
31
32 Node* Graph::NewNode(
33 const Operator* op, int input_count, Node** inputs, bool incomplete) {
25 DCHECK_LE(op->InputCount(), input_count); 34 DCHECK_LE(op->InputCount(), input_count);
26 Node* result = Node::New(this, input_count, inputs); 35 Node* result = Node::New(this, input_count, inputs);
27 result->Initialize(op); 36 result->Initialize(op);
28 for (ZoneVector<GraphDecorator*>::iterator i = decorators_.begin(); 37 if (!incomplete) Decorate(result);
29 i != decorators_.end(); ++i) {
30 (*i)->Decorate(result);
31 }
32 return result; 38 return result;
33 } 39 }
34 40
35 } // namespace compiler 41 } // namespace compiler
36 } // namespace internal 42 } // namespace internal
37 } // namespace v8 43 } // namespace v8
OLDNEW
« 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