| OLD | NEW |
| 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2012, the Dart project authors. Please see the AUTHORS file |
| 2 // for details. All rights reserved. Use of this source code is governed by a | 2 // for details. All rights reserved. Use of this source code is governed by a |
| 3 // BSD-style license that can be found in the LICENSE file. | 3 // BSD-style license that can be found in the LICENSE file. |
| 4 | 4 |
| 5 part of _interceptors; | 5 part of _interceptors; |
| 6 | 6 |
| 7 class ListConstructorSentinel { | |
| 8 const ListConstructorSentinel(); | |
| 9 } | |
| 10 | |
| 11 /** | 7 /** |
| 12 * The interceptor class for [List]. The compiler recognizes this | 8 * The interceptor class for [List]. The compiler recognizes this |
| 13 * class as an interceptor, and changes references to [:this:] to | 9 * class as an interceptor, and changes references to [:this:] to |
| 14 * actually use the receiver of the method, which is generated as an extra | 10 * actually use the receiver of the method, which is generated as an extra |
| 15 * argument added to each member. | 11 * argument added to each member. |
| 16 */ | 12 */ |
| 17 class JSArray<E> extends Interceptor implements List<E>, JSIndexable { | 13 class JSArray<E> extends Interceptor implements List<E>, JSIndexable { |
| 18 | 14 |
| 19 const JSArray(); | 15 const JSArray(); |
| 20 | 16 |
| (...skipping 354 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 375 } | 371 } |
| 376 | 372 |
| 377 /** | 373 /** |
| 378 * Dummy subclasses that allow the backend to track more precise | 374 * Dummy subclasses that allow the backend to track more precise |
| 379 * information about arrays through their type. The CPA type inference | 375 * information about arrays through their type. The CPA type inference |
| 380 * relies on the fact that these classes do not override [] nor []=. | 376 * relies on the fact that these classes do not override [] nor []=. |
| 381 */ | 377 */ |
| 382 class JSMutableArray<E> extends JSArray<E> implements JSMutableIndexable {} | 378 class JSMutableArray<E> extends JSArray<E> implements JSMutableIndexable {} |
| 383 class JSFixedArray<E> extends JSMutableArray<E> {} | 379 class JSFixedArray<E> extends JSMutableArray<E> {} |
| 384 class JSExtendableArray<E> extends JSMutableArray<E> {} | 380 class JSExtendableArray<E> extends JSMutableArray<E> {} |
| OLD | NEW |