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

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

Issue 11412105: - Move length getter and setter interceptors to the new interceptor scheme. (Closed) Base URL: http://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/interceptors.dart
===================================================================
--- sdk/lib/_internal/compiler/implementation/lib/interceptors.dart (revision 15190)
+++ sdk/lib/_internal/compiler/implementation/lib/interceptors.dart (working copy)
@@ -34,26 +34,6 @@
return const ObjectInterceptor();
}
-get$length(var receiver) {
- if (receiver is String || isJsArray(receiver)) {
- return JS('num', r'#.length', receiver); // TODO(sra): Use 'int'?
- } else {
- return UNINTERCEPTED(receiver.length);
- }
-}
-
-set$length(receiver, newLength) {
- if (isJsArray(receiver)) {
- if (newLength is !int) throw new ArgumentError(newLength);
- if (newLength < 0) throw new RangeError.value(newLength);
- checkGrowable(receiver, 'set length');
- JS('void', r'#.length = #', receiver, newLength);
- } else {
- UNINTERCEPTED(receiver.length = newLength);
- }
- return newLength;
-}
-
/**
* The interceptor class for tear-off static methods. Unlike
* tear-off instance methods, tear-off static methods are just the JS

Powered by Google App Engine
This is Rietveld 408576698