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

Side by Side Diff: src/compiler/graph-visualizer.cc

Issue 1109763002: [turbofan] Treat uninitialized source positions as unknown. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 7 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 | « src/compiler/code-generator.cc ('k') | src/compiler/instruction.cc » ('j') | 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/graph-visualizer.h" 5 #include "src/compiler/graph-visualizer.h"
6 6
7 #include <sstream> 7 #include <sstream>
8 #include <string> 8 #include <string>
9 9
10 #include "src/code-stubs.h" 10 #include "src/code-stubs.h"
(...skipping 104 matching lines...) Expand 10 before | Expand all | Expand 10 after
115 << "]"; 115 << "]";
116 } else if (opcode == IrOpcode::kIfTrue || opcode == IrOpcode::kIfFalse || 116 } else if (opcode == IrOpcode::kIfTrue || opcode == IrOpcode::kIfFalse ||
117 opcode == IrOpcode::kLoop) { 117 opcode == IrOpcode::kLoop) {
118 os_ << ",\"rankInputs\":[" << NodeProperties::FirstControlIndex(node) 118 os_ << ",\"rankInputs\":[" << NodeProperties::FirstControlIndex(node)
119 << "]"; 119 << "]";
120 } 120 }
121 if (opcode == IrOpcode::kBranch) { 121 if (opcode == IrOpcode::kBranch) {
122 os_ << ",\"rankInputs\":[0]"; 122 os_ << ",\"rankInputs\":[0]";
123 } 123 }
124 SourcePosition position = positions_->GetSourcePosition(node); 124 SourcePosition position = positions_->GetSourcePosition(node);
125 if (!position.IsUnknown()) { 125 if (position.IsKnown()) {
126 DCHECK(!position.IsInvalid());
127 os_ << ",\"pos\":" << position.raw(); 126 os_ << ",\"pos\":" << position.raw();
128 } 127 }
129 os_ << ",\"opcode\":\"" << IrOpcode::Mnemonic(node->opcode()) << "\""; 128 os_ << ",\"opcode\":\"" << IrOpcode::Mnemonic(node->opcode()) << "\"";
130 os_ << ",\"control\":" << (NodeProperties::IsControl(node) ? "true" 129 os_ << ",\"control\":" << (NodeProperties::IsControl(node) ? "true"
131 : "false"); 130 : "false");
132 if (NodeProperties::IsTyped(node)) { 131 if (NodeProperties::IsTyped(node)) {
133 Bounds bounds = NodeProperties::GetBounds(node); 132 Bounds bounds = NodeProperties::GetBounds(node);
134 std::ostringstream upper; 133 std::ostringstream upper;
135 bounds.upper->PrintTo(upper); 134 bounds.upper->PrintTo(upper);
136 std::ostringstream lower; 135 std::ostringstream lower;
(...skipping 506 matching lines...) Expand 10 before | Expand all | Expand 10 after
643 int uses = node->UseCount(); 642 int uses = node->UseCount();
644 PrintIndent(); 643 PrintIndent();
645 os_ << "0 " << uses << " "; 644 os_ << "0 " << uses << " ";
646 PrintNode(node); 645 PrintNode(node);
647 if (FLAG_trace_turbo_types) { 646 if (FLAG_trace_turbo_types) {
648 os_ << " "; 647 os_ << " ";
649 PrintType(node); 648 PrintType(node);
650 } 649 }
651 if (positions != NULL) { 650 if (positions != NULL) {
652 SourcePosition position = positions->GetSourcePosition(node); 651 SourcePosition position = positions->GetSourcePosition(node);
653 if (!position.IsUnknown()) { 652 if (position.IsKnown()) {
654 DCHECK(!position.IsInvalid());
655 os_ << " pos:" << position.raw(); 653 os_ << " pos:" << position.raw();
656 } 654 }
657 } 655 }
658 os_ << " <|@\n"; 656 os_ << " <|@\n";
659 } 657 }
660 658
661 BasicBlock::Control control = current->control(); 659 BasicBlock::Control control = current->control();
662 if (control != BasicBlock::kNone) { 660 if (control != BasicBlock::kNone) {
663 PrintIndent(); 661 PrintIndent();
664 os_ << "0 0 "; 662 os_ << "0 0 ";
(...skipping 159 matching lines...) Expand 10 before | Expand all | Expand 10 after
824 os << "#" << SafeId(i) << ":" << SafeMnemonic(i); 822 os << "#" << SafeId(i) << ":" << SafeMnemonic(i);
825 } 823 }
826 os << ")" << std::endl; 824 os << ")" << std::endl;
827 } 825 }
828 } 826 }
829 return os; 827 return os;
830 } 828 }
831 } 829 }
832 } 830 }
833 } // namespace v8::internal::compiler 831 } // namespace v8::internal::compiler
OLDNEW
« no previous file with comments | « src/compiler/code-generator.cc ('k') | src/compiler/instruction.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698