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

Unified Diff: sdk/lib/core/string.dart

Issue 212423003: Optimize String.fromCharCode. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Shortcut List creation. Created 6 years, 9 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 | « sdk/lib/_internal/lib/js_helper.dart ('k') | no next file » | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/core/string.dart
diff --git a/sdk/lib/core/string.dart b/sdk/lib/core/string.dart
index 5488a2ff6430d6c75a34ec03b3d8b29641791885..1de01c6218e9a0b65e52f03b8e8fd1496495b126 100644
--- a/sdk/lib/core/string.dart
+++ b/sdk/lib/core/string.dart
@@ -116,13 +116,9 @@ abstract class String implements Comparable<String>, Pattern {
* the code units form a surrogate pair. See documentation for
* [fromCharCodes].
*
- * Creating a String with half of a surrogate pair is legal but generally
- * discouraged.
+ * Creating a String with half of a surrogate pair is allowed.
*/
- factory String.fromCharCode(int charCode) {
- List<int> charCodes = new List<int>.filled(1, charCode);
- return new String.fromCharCodes(charCodes);
- }
+ external factory String.fromCharCode(int charCode);
/**
* Returns the string value of the environment declaration [name].
« no previous file with comments | « sdk/lib/_internal/lib/js_helper.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698