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

Unified Diff: src/compiler/source-position.cc

Issue 985023002: [turbofan] Add schedule to visualizer output (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Tweaks 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 | « src/compiler/source-position.h ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/compiler/source-position.cc
diff --git a/src/compiler/source-position.cc b/src/compiler/source-position.cc
index 2ef18548ddded676605e6c60817aca162dc2701c..f5756560657b97797b00048b34d7aaff0dc7bf02 100644
--- a/src/compiler/source-position.cc
+++ b/src/compiler/source-position.cc
@@ -50,6 +50,24 @@ SourcePosition SourcePositionTable::GetSourcePosition(Node* node) const {
return table_.Get(node);
}
+
+void SourcePositionTable::Print(std::ostream& os) const {
+ os << "{";
+ bool needs_comma = false;
+ for (auto i : table_) {
+ SourcePosition pos = i.second;
+ if (!pos.IsUnknown()) {
+ if (needs_comma) {
+ os << ",";
+ }
+ os << "\"" << i.first << "\""
+ << ":" << pos.raw();
+ needs_comma = true;
+ }
+ }
+ os << "}";
+}
+
} // namespace compiler
} // namespace internal
} // namespace v8
« no previous file with comments | « src/compiler/source-position.h ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698