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

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

Issue 12088086: Adapt String interface for Utf16. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Don't change intrinsified String.charCodeAt. Created 7 years, 10 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 | « runtime/lib/string_base.dart ('k') | sdk/lib/core/string.dart » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: sdk/lib/_internal/compiler/implementation/lib/js_string.dart
diff --git a/sdk/lib/_internal/compiler/implementation/lib/js_string.dart b/sdk/lib/_internal/compiler/implementation/lib/js_string.dart
index d0d857c2feb5996c99446a27bf1c90fcb659af97..381a690564ac2c86ee075b4d996308cbc0bd2828 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/js_string.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/js_string.dart
@@ -13,7 +13,9 @@ part of _interceptors;
class JSString implements String {
const JSString();
- int charCodeAt(index) {
+ int charCodeAt(index) => codeUnitAt(index);
+
+ int codeUnitAt(int index) {
if (index is !num) throw new ArgumentError(index);
if (index < 0) throw new RangeError.value(index);
if (index >= length) throw new RangeError.value(index);
@@ -147,6 +149,14 @@ class JSString implements String {
return result;
}
+ Iterable<int> get codeUnits {
+ throw new UnimplementedError("String.codeUnits");
+ }
+
+ Iterable<int> get runes {
+ throw new UnimplementedError("String.runes");
+ }
+
int indexOf(String other, [int start = 0]) {
checkNull(other);
if (start is !int) throw new ArgumentError(start);
« no previous file with comments | « runtime/lib/string_base.dart ('k') | sdk/lib/core/string.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698