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

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

Issue 13940015: Allow using native JS []= on typed data lists. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Created 7 years, 8 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
Index: sdk/lib/_internal/compiler/implementation/lib/interceptors.dart
diff --git a/sdk/lib/_internal/compiler/implementation/lib/interceptors.dart b/sdk/lib/_internal/compiler/implementation/lib/interceptors.dart
index 457844b44b2b8cf56d13388940766c1b2b15e071..4c316881ef265a1e89a4b459a71efb408c257274 100644
--- a/sdk/lib/_internal/compiler/implementation/lib/interceptors.dart
+++ b/sdk/lib/_internal/compiler/implementation/lib/interceptors.dart
@@ -263,9 +263,19 @@ class JSNull extends Interceptor implements Null {
/**
* The supertype for JSString and JSArray. Used by the backend as to
- * have a type mask that contains the primitive objects that we can
- * use the [] operator on.
+ * have a type mask that contains the objects that we can use the
+ * native JS [] operator and length on.
*/
abstract class JSIndexable {
int get length;
+ operator[](int index);
+}
+
+/**
+ * The supertype for JSMutableArray and
+ * JavaScriptIndexingBehavior. Used by the backend to have a type mask
+ * that contains the objects we can use the JS []= operator on.
+ */
+abstract class JSMutableIndexable extends JSIndexable {
+ operator[]=(int index, var value);
}

Powered by Google App Engine
This is Rietveld 408576698