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

Unified Diff: sdk/lib/_internal/compiler/implementation/lib/js_helper.dart

Issue 11411092: Revert "Add some support for the code-point code-unit distinction." (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 8 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
Index: sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
diff --git a/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart b/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
index fe40bdc78b7b4c5a9173e6fa948838b3937ed6e4..7a2e4b807ad13662fa8c821b86f4ead1cab1383c 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/js_helper.dart
@@ -535,12 +535,11 @@ class Primitives {
static num dateNow() => JS('num', r'Date.now()');
- static String stringFromCodeUnits(codeUnits) {
- for (var i in codeUnits) {
+ static String stringFromCharCodes(charCodes) {
+ for (var i in charCodes) {
if (i is !int) throw new ArgumentError(i);
- if (i > String.MAX_CODE_UNIT) throw new ArgumentError(i);
}
- return JS('String', r'String.fromCharCode.apply(#, #)', null, codeUnits);
+ return JS('String', r'String.fromCharCode.apply(#, #)', null, charCodes);
}
static String getTimeZoneName(receiver) {

Powered by Google App Engine
This is Rietveld 408576698