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

Unified Diff: pkg/compiler/lib/src/ssa/kernel_string_builder.dart

Issue 2512303002: Don't call stringify if we can prove that the type is a string. (Closed)
Patch Set: just updated comment instead 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 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: pkg/compiler/lib/src/ssa/kernel_string_builder.dart
diff --git a/pkg/compiler/lib/src/ssa/kernel_string_builder.dart b/pkg/compiler/lib/src/ssa/kernel_string_builder.dart
index 21da2e4b9afd51bad449697733336bc521b97629..38a3f639dccea316d7cf68a894be393869ce2718 100644
--- a/pkg/compiler/lib/src/ssa/kernel_string_builder.dart
+++ b/pkg/compiler/lib/src/ssa/kernel_string_builder.dart
@@ -43,9 +43,10 @@ class KernelStringBuilder extends ir.Visitor {
return;
}
- // TODO(het): If toString method is guaranteed to return a string, then call
- // it directly instead of stringify. Or, better yet, do this later in the
- // optimization phase.
+ // TODO(efortuna): If we decide to do inlining before finishing constructing
+ // the control flow graph, we'd want to do the optimization of
+ // calling toString here if the type is provably a string rather than in the
+ // optimization phase (which is where we currently do it).
append(stringify(expression));
}
« 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