| 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 library _interceptors; | 5 library _interceptors; |
| 6 | 6 |
| 7 import 'dart:collection'; | 7 import 'dart:collection'; |
| 8 import 'dart:_internal' hide Symbol; | 8 import 'dart:_internal' hide Symbol; |
| 9 import "dart:_internal" as _symbol_dev show Symbol; | 9 import "dart:_internal" as _symbol_dev show Symbol; |
| 10 import 'dart:_js_helper' show allMatchesInStringUnchecked, | 10 import 'dart:_js_helper' show allMatchesInStringUnchecked, |
| (...skipping 311 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 322 class JSNull extends Interceptor implements Null { | 322 class JSNull extends Interceptor implements Null { |
| 323 const JSNull(); | 323 const JSNull(); |
| 324 | 324 |
| 325 bool operator ==(other) => identical(null, other); | 325 bool operator ==(other) => identical(null, other); |
| 326 | 326 |
| 327 // Note: if you change this, also change the function [S]. | 327 // Note: if you change this, also change the function [S]. |
| 328 String toString() => 'null'; | 328 String toString() => 'null'; |
| 329 | 329 |
| 330 int get hashCode => 0; | 330 int get hashCode => 0; |
| 331 | 331 |
| 332 // The spec guarantees that `null` is the singleton instance of the `Null` |
| 333 // class. In the mirrors library we also have to patch the `type` getter to |
| 334 // special case `null`. |
| 332 Type get runtimeType => Null; | 335 Type get runtimeType => Null; |
| 336 |
| 337 dynamic noSuchMethod(Invocation invocation) => super.noSuchMethod(invocation); |
| 333 } | 338 } |
| 334 | 339 |
| 335 /** | 340 /** |
| 336 * The supertype for JSString and JSArray. Used by the backend as to | 341 * The supertype for JSString and JSArray. Used by the backend as to |
| 337 * have a type mask that contains the objects that we can use the | 342 * have a type mask that contains the objects that we can use the |
| 338 * native JS [] operator and length on. | 343 * native JS [] operator and length on. |
| 339 */ | 344 */ |
| 340 abstract class JSIndexable { | 345 abstract class JSIndexable { |
| 341 int get length; | 346 int get length; |
| 342 operator[](int index); | 347 operator[](int index); |
| (...skipping 41 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 384 } | 389 } |
| 385 | 390 |
| 386 | 391 |
| 387 /** | 392 /** |
| 388 * Interceptor for unclassified JavaScript objects, typically objects with a | 393 * Interceptor for unclassified JavaScript objects, typically objects with a |
| 389 * non-trivial prototype chain. | 394 * non-trivial prototype chain. |
| 390 */ | 395 */ |
| 391 class UnknownJavaScriptObject extends JavaScriptObject { | 396 class UnknownJavaScriptObject extends JavaScriptObject { |
| 392 const UnknownJavaScriptObject(); | 397 const UnknownJavaScriptObject(); |
| 393 } | 398 } |
| OLD | NEW |