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

Unified Diff: runtime/lib/string_patch.dart

Issue 563973004: Call special VM interpolate for single element interpolation. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Address comments. Created 6 years, 3 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 | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/lib/string_patch.dart
diff --git a/runtime/lib/string_patch.dart b/runtime/lib/string_patch.dart
index 3ac78a8fd9404faa5724cd771666eb61053110d5..9a454b114da22988e9e3ccbb692b605011f8ea72 100644
--- a/runtime/lib/string_patch.dart
+++ b/runtime/lib/string_patch.dart
@@ -518,6 +518,14 @@ class _StringBase {
return buffer.toString();
}
+ // Convert single object to string.
+ static String _interpolateSingle(Object o) {
+ final s = o.toString();
+ if (s is! String) {
+ throw new ArgumentError(o);
+ }
+ return s;
+ }
/**
* Convert all objects in [values] to strings and concat them
« no previous file with comments | « no previous file | runtime/vm/flow_graph_builder.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698