| Index: src/compiler/node.cc
|
| diff --git a/src/compiler/node.cc b/src/compiler/node.cc
|
| index 1410ab436cef5c2ebac7786155b40e85ee0aef4f..758be07d40d6529b6316b1ea31f1a28b4e9b9559 100644
|
| --- a/src/compiler/node.cc
|
| +++ b/src/compiler/node.cc
|
| @@ -300,8 +300,27 @@ bool Node::OwnedBy(Node const* owner1, Node const* owner2) const {
|
| void Node::Print() const {
|
| OFStream os(stdout);
|
| os << *this << std::endl;
|
| + for (Node* input : this->inputs()) {
|
| + os << " " << *input << std::endl;
|
| + }
|
| }
|
|
|
| +std::ostream& operator<<(std::ostream& os, const Node& n) {
|
| + os << n.id() << ": " << *n.op();
|
| + if (n.InputCount() > 0) {
|
| + os << "(";
|
| + for (int i = 0; i < n.InputCount(); ++i) {
|
| + if (i != 0) os << ", ";
|
| + if (n.InputAt(i)) {
|
| + os << n.InputAt(i)->id();
|
| + } else {
|
| + os << "null";
|
| + }
|
| + }
|
| + os << ")";
|
| + }
|
| + return os;
|
| +}
|
|
|
| Node::Node(NodeId id, const Operator* op, int inline_count, int inline_capacity)
|
| : op_(op),
|
| @@ -378,25 +397,6 @@ void Node::Verify() {
|
| }
|
| #endif
|
|
|
| -
|
| -std::ostream& operator<<(std::ostream& os, const Node& n) {
|
| - os << n.id() << ": " << *n.op();
|
| - if (n.InputCount() > 0) {
|
| - os << "(";
|
| - for (int i = 0; i < n.InputCount(); ++i) {
|
| - if (i != 0) os << ", ";
|
| - if (n.InputAt(i)) {
|
| - os << n.InputAt(i)->id();
|
| - } else {
|
| - os << "null";
|
| - }
|
| - }
|
| - os << ")";
|
| - }
|
| - return os;
|
| -}
|
| -
|
| -
|
| Node::InputEdges::iterator Node::InputEdges::iterator::operator++(int n) {
|
| iterator result(*this);
|
| ++(*this);
|
|
|