V8 Project
graph.cc
Go to the documentation of this file.
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.
4 
5 #include "src/compiler/graph.h"
6 
10 #include "src/compiler/node.h"
16 
17 namespace v8 {
18 namespace internal {
19 namespace compiler {
20 
21 Graph::Graph(Zone* zone) : GenericGraph<Node>(zone), decorators_(zone) {}
22 
23 
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);
29  i != decorators_.end(); ++i) {
30  (*i)->Decorate(result);
31  }
32  return result;
33 }
34 
35 } // namespace compiler
36 } // namespace internal
37 } // namespace v8
ZoneVector< GraphDecorator * > decorators_
Definition: graph.h:79
Node * NewNode(const Operator *op, int input_count, Node **inputs)
Definition: graph.cc:24
virtual int InputCount() const =0
#define DCHECK_LE(v1, v2)
Definition: logging.h:210
Debugger support for the V8 JavaScript engine.
Definition: accessors.cc:20