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

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

Issue 2451853002: Uniform and precise source positions for inlining (Closed)
Patch Set: fixed obsolete identifiers Created 4 years, 1 month 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
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 <memory> 7 #include <memory>
8 #include <sstream> 8 #include <sstream>
9 #include <string> 9 #include <string>
10 10
(...skipping 133 matching lines...) Expand 10 before | Expand all | Expand 10 after
144 } else if (opcode == IrOpcode::kIfTrue || opcode == IrOpcode::kIfFalse || 144 } else if (opcode == IrOpcode::kIfTrue || opcode == IrOpcode::kIfFalse ||
145 opcode == IrOpcode::kLoop) { 145 opcode == IrOpcode::kLoop) {
146 os_ << ",\"rankInputs\":[" << NodeProperties::FirstControlIndex(node) 146 os_ << ",\"rankInputs\":[" << NodeProperties::FirstControlIndex(node)
147 << "]"; 147 << "]";
148 } 148 }
149 if (opcode == IrOpcode::kBranch) { 149 if (opcode == IrOpcode::kBranch) {
150 os_ << ",\"rankInputs\":[0]"; 150 os_ << ",\"rankInputs\":[0]";
151 } 151 }
152 SourcePosition position = positions_->GetSourcePosition(node); 152 SourcePosition position = positions_->GetSourcePosition(node);
153 if (position.IsKnown()) { 153 if (position.IsKnown()) {
154 os_ << ",\"pos\":" << position.raw(); 154 os_ << ",\"pos\":" << position.ScriptOffset();
155 } 155 }
156 os_ << ",\"opcode\":\"" << IrOpcode::Mnemonic(node->opcode()) << "\""; 156 os_ << ",\"opcode\":\"" << IrOpcode::Mnemonic(node->opcode()) << "\"";
157 os_ << ",\"control\":" << (NodeProperties::IsControl(node) ? "true" 157 os_ << ",\"control\":" << (NodeProperties::IsControl(node) ? "true"
158 : "false"); 158 : "false");
159 os_ << ",\"opinfo\":\"" << node->op()->ValueInputCount() << " v " 159 os_ << ",\"opinfo\":\"" << node->op()->ValueInputCount() << " v "
160 << node->op()->EffectInputCount() << " eff " 160 << node->op()->EffectInputCount() << " eff "
161 << node->op()->ControlInputCount() << " ctrl in, " 161 << node->op()->ControlInputCount() << " ctrl in, "
162 << node->op()->ValueOutputCount() << " v " 162 << node->op()->ValueOutputCount() << " v "
163 << node->op()->EffectOutputCount() << " eff " 163 << node->op()->EffectOutputCount() << " eff "
164 << node->op()->ControlOutputCount() << " ctrl out\""; 164 << node->op()->ControlOutputCount() << " ctrl out\"";
(...skipping 324 matching lines...) Expand 10 before | Expand all | Expand 10 after
489 PrintIndent(); 489 PrintIndent();
490 os_ << "0 " << uses << " "; 490 os_ << "0 " << uses << " ";
491 PrintNode(node); 491 PrintNode(node);
492 if (FLAG_trace_turbo_types) { 492 if (FLAG_trace_turbo_types) {
493 os_ << " "; 493 os_ << " ";
494 PrintType(node); 494 PrintType(node);
495 } 495 }
496 if (positions != nullptr) { 496 if (positions != nullptr) {
497 SourcePosition position = positions->GetSourcePosition(node); 497 SourcePosition position = positions->GetSourcePosition(node);
498 if (position.IsKnown()) { 498 if (position.IsKnown()) {
499 os_ << " pos:" << position.raw(); 499 os_ << " pos:" << position.ScriptOffset();
500 } 500 }
501 } 501 }
502 os_ << " <|@\n"; 502 os_ << " <|@\n";
503 } 503 }
504 504
505 BasicBlock::Control control = current->control(); 505 BasicBlock::Control control = current->control();
506 if (control != BasicBlock::kNone) { 506 if (control != BasicBlock::kNone) {
507 PrintIndent(); 507 PrintIndent();
508 os_ << "0 0 "; 508 os_ << "0 0 ";
509 if (current->control_input() != nullptr) { 509 if (current->control_input() != nullptr) {
(...skipping 193 matching lines...) Expand 10 before | Expand all | Expand 10 after
703 os << "]"; 703 os << "]";
704 } 704 }
705 os << std::endl; 705 os << std::endl;
706 } 706 }
707 } 707 }
708 return os; 708 return os;
709 } 709 }
710 } // namespace compiler 710 } // namespace compiler
711 } // namespace internal 711 } // namespace internal
712 } // namespace v8 712 } // namespace v8
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698