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

Unified Diff: src/compiler/graph-visualizer.cc

Issue 1083083006: [visualizer]: Add types to visualizer output (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Created 5 years, 8 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 side-by-side diff with in-line comments
Download patch
« no previous file with comments | « no previous file | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/graph-visualizer.cc
diff --git a/src/compiler/graph-visualizer.cc b/src/compiler/graph-visualizer.cc
index 5d255f064ec2c32fce563097778c9f989aab214d..67b10d6e8330a5beab4c97579020d491473c26b0 100644
--- a/src/compiler/graph-visualizer.cc
+++ b/src/compiler/graph-visualizer.cc
@@ -129,6 +129,15 @@ class JSONGraphNodeWriter {
os_ << ",\"opcode\":\"" << IrOpcode::Mnemonic(node->opcode()) << "\"";
os_ << ",\"control\":" << (NodeProperties::IsControl(node) ? "true"
: "false");
+ if (NodeProperties::IsTyped(node)) {
+ Bounds bounds = NodeProperties::GetBounds(node);
+ std::ostringstream upper;
+ bounds.upper->PrintTo(upper);
+ std::ostringstream lower;
+ bounds.lower->PrintTo(lower);
+ os_ << ",\"upper_type\":\"" << Escaped(upper, "\"") << "\"";
+ os_ << ",\"lower_type\":\"" << Escaped(lower, "\"") << "\"";
+ }
os_ << "}";
}
« no previous file with comments | « no previous file | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698