| OLD | NEW |
| 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-visualizer.h" | 5 #include "src/compiler/graph-visualizer.h" |
| 6 | 6 |
| 7 #include "src/compiler/generic-algorithm.h" | 7 #include "src/compiler/generic-algorithm.h" |
| 8 #include "src/compiler/generic-node.h" | 8 #include "src/compiler/generic-node.h" |
| 9 #include "src/compiler/generic-node-inl.h" | 9 #include "src/compiler/generic-node-inl.h" |
| 10 #include "src/compiler/graph.h" | 10 #include "src/compiler/graph.h" |
| (...skipping 148 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 159 | 159 |
| 160 InputIter i = node->inputs().begin(); | 160 InputIter i = node->inputs().begin(); |
| 161 for (int j = OperatorProperties::GetValueInputCount(node->op()); j > 0; | 161 for (int j = OperatorProperties::GetValueInputCount(node->op()); j > 0; |
| 162 ++i, j--) { | 162 ++i, j--) { |
| 163 os_ << "|<I" << i.index() << ">#" << (*i)->id(); | 163 os_ << "|<I" << i.index() << ">#" << (*i)->id(); |
| 164 } | 164 } |
| 165 for (int j = OperatorProperties::GetContextInputCount(node->op()); j > 0; | 165 for (int j = OperatorProperties::GetContextInputCount(node->op()); j > 0; |
| 166 ++i, j--) { | 166 ++i, j--) { |
| 167 os_ << "|<I" << i.index() << ">X #" << (*i)->id(); | 167 os_ << "|<I" << i.index() << ">X #" << (*i)->id(); |
| 168 } | 168 } |
| 169 for (int j = OperatorProperties::GetFrameStateInputCount(node->op()); j > 0; |
| 170 ++i, j--) { |
| 171 os_ << "|<I" << i.index() << ">X #" << (*i)->id(); |
| 172 } |
| 169 for (int j = OperatorProperties::GetEffectInputCount(node->op()); j > 0; | 173 for (int j = OperatorProperties::GetEffectInputCount(node->op()); j > 0; |
| 170 ++i, j--) { | 174 ++i, j--) { |
| 171 os_ << "|<I" << i.index() << ">E #" << (*i)->id(); | 175 os_ << "|<I" << i.index() << ">E #" << (*i)->id(); |
| 172 } | 176 } |
| 173 | 177 |
| 174 if (!use_to_def_ || OperatorProperties::IsBasicBlockBegin(node->op()) || | 178 if (!use_to_def_ || OperatorProperties::IsBasicBlockBegin(node->op()) || |
| 175 GetControlCluster(node) == NULL) { | 179 GetControlCluster(node) == NULL) { |
| 176 for (int j = OperatorProperties::GetControlInputCount(node->op()); j > 0; | 180 for (int j = OperatorProperties::GetControlInputCount(node->op()); j > 0; |
| 177 ++i, j--) { | 181 ++i, j--) { |
| 178 os_ << "|<I" << i.index() << ">C #" << (*i)->id(); | 182 os_ << "|<I" << i.index() << ">C #" << (*i)->id(); |
| (...skipping 79 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 258 | 262 |
| 259 | 263 |
| 260 OStream& operator<<(OStream& os, const AsDOT& ad) { | 264 OStream& operator<<(OStream& os, const AsDOT& ad) { |
| 261 Zone tmp_zone(ad.graph.zone()->isolate()); | 265 Zone tmp_zone(ad.graph.zone()->isolate()); |
| 262 GraphVisualizer(os, &tmp_zone, &ad.graph).Print(); | 266 GraphVisualizer(os, &tmp_zone, &ad.graph).Print(); |
| 263 return os; | 267 return os; |
| 264 } | 268 } |
| 265 } | 269 } |
| 266 } | 270 } |
| 267 } // namespace v8::internal::compiler | 271 } // namespace v8::internal::compiler |
| OLD | NEW |