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
3 // found in the LICENSE file.
5 #include "src/compiler/graph.h"
7 #include "src/compiler/common-operator.h"
8 #include "src/compiler/generic-node-inl.h"
9 #include "src/compiler/graph-inl.h"
10 #include "src/compiler/node.h"
11 #include "src/compiler/node-aux-data-inl.h"
12 #include "src/compiler/node-properties.h"
13 #include "src/compiler/node-properties-inl.h"
14 #include "src/compiler/operator-properties.h"
15 #include "src/compiler/operator-properties-inl.h"
21 Graph::Graph(Zone* zone) : GenericGraph<Node>(zone), decorators_(zone) {}
24 Node* Graph::NewNode(const Operator* op, int input_count, Node** inputs) {
25 DCHECK_LE(op->InputCount(), input_count);
26 Node* result = Node::New(this, input_count, inputs);
27 result->Initialize(op);
28 for (ZoneVector<GraphDecorator*>::iterator i = decorators_.begin();
29 i != decorators_.end(); ++i) {
30 (*i)->Decorate(result);
35 } // namespace compiler
36 } // namespace internal