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

Side by Side Diff: src/compiler/node.cc

Issue 2134443002: [turbofan] Fixed segmentation fault while printing TurboFan node (Closed) Base URL: https://chromium.googlesource.com/v8/v8@master
Patch Set: Fixed segmentation fault while printing TurboFan node Created 4 years, 5 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
« no previous file with comments | « AUTHORS ('k') | no next file » | 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/node.h" 5 #include "src/compiler/node.h"
6 6
7 namespace v8 { 7 namespace v8 {
8 namespace internal { 8 namespace internal {
9 namespace compiler { 9 namespace compiler {
10 10
(...skipping 351 matching lines...) Expand 10 before | Expand all | Expand 10 after
362 } 362 }
363 #endif 363 #endif
364 364
365 365
366 std::ostream& operator<<(std::ostream& os, const Node& n) { 366 std::ostream& operator<<(std::ostream& os, const Node& n) {
367 os << n.id() << ": " << *n.op(); 367 os << n.id() << ": " << *n.op();
368 if (n.InputCount() > 0) { 368 if (n.InputCount() > 0) {
369 os << "("; 369 os << "(";
370 for (int i = 0; i < n.InputCount(); ++i) { 370 for (int i = 0; i < n.InputCount(); ++i) {
371 if (i != 0) os << ", "; 371 if (i != 0) os << ", ";
372 os << n.InputAt(i)->id(); 372 if (n.InputAt(i)) {
373 os << n.InputAt(i)->id();
374 } else {
375 os << "null";
376 }
373 } 377 }
374 os << ")"; 378 os << ")";
375 } 379 }
376 return os; 380 return os;
377 } 381 }
378 382
379 383
380 Node::InputEdges::iterator Node::InputEdges::iterator::operator++(int n) { 384 Node::InputEdges::iterator Node::InputEdges::iterator::operator++(int n) {
381 iterator result(*this); 385 iterator result(*this);
382 ++(*this); 386 ++(*this);
(...skipping 29 matching lines...) Expand all
412 ++(*this); 416 ++(*this);
413 return result; 417 return result;
414 } 418 }
415 419
416 420
417 bool Node::Uses::empty() const { return begin() == end(); } 421 bool Node::Uses::empty() const { return begin() == end(); }
418 422
419 } // namespace compiler 423 } // namespace compiler
420 } // namespace internal 424 } // namespace internal
421 } // namespace v8 425 } // namespace v8
OLDNEW
« no previous file with comments | « AUTHORS ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698