| 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:_js_embedded_names' show | 7 import 'dart:_js_embedded_names' show |
| 8 DISPATCH_PROPERTY_NAME, | 8 DISPATCH_PROPERTY_NAME, |
| 9 TYPE_TO_INTERCEPTOR_MAP; | 9 TYPE_TO_INTERCEPTOR_MAP; |
| 10 | 10 |
| (...skipping 272 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 283 * implementations on Object to ignore the explicit receiver argument, which | 283 * implementations on Object to ignore the explicit receiver argument, which |
| 284 * allows dummy receiver optimization. | 284 * allows dummy receiver optimization. |
| 285 */ | 285 */ |
| 286 abstract class Interceptor { | 286 abstract class Interceptor { |
| 287 const Interceptor(); | 287 const Interceptor(); |
| 288 | 288 |
| 289 bool operator ==(other) => identical(this, other); | 289 bool operator ==(other) => identical(this, other); |
| 290 | 290 |
| 291 int get hashCode => Primitives.objectHashCode(this); | 291 int get hashCode => Primitives.objectHashCode(this); |
| 292 | 292 |
| 293 String toString() => Primitives.objectToString(this); | 293 String toString() => Primitives.objectToHumanReadableString(this); |
| 294 | 294 |
| 295 dynamic noSuchMethod(Invocation invocation) { | 295 dynamic noSuchMethod(Invocation invocation) { |
| 296 throw new NoSuchMethodError( | 296 throw new NoSuchMethodError( |
| 297 this, | 297 this, |
| 298 invocation.memberName, | 298 invocation.memberName, |
| 299 invocation.positionalArguments, | 299 invocation.positionalArguments, |
| 300 invocation.namedArguments); | 300 invocation.namedArguments); |
| 301 } | 301 } |
| 302 | 302 |
| 303 Type get runtimeType => getRuntimeType(this); | 303 Type get runtimeType => getRuntimeType(this); |
| (...skipping 96 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
| 400 * Interceptor for unclassified JavaScript objects, typically objects with a | 400 * Interceptor for unclassified JavaScript objects, typically objects with a |
| 401 * non-trivial prototype chain. | 401 * non-trivial prototype chain. |
| 402 * | 402 * |
| 403 * This class also serves as a fallback for unknown JavaScript exceptions. | 403 * This class also serves as a fallback for unknown JavaScript exceptions. |
| 404 */ | 404 */ |
| 405 class UnknownJavaScriptObject extends JavaScriptObject { | 405 class UnknownJavaScriptObject extends JavaScriptObject { |
| 406 const UnknownJavaScriptObject(); | 406 const UnknownJavaScriptObject(); |
| 407 | 407 |
| 408 String toString() => JS('String', 'String(#)', this); | 408 String toString() => JS('String', 'String(#)', this); |
| 409 } | 409 } |
| OLD | NEW |