OLD | NEW |
1 // Copyright (c) 2013, the Dart project authors. Please see the AUTHORS file | 1 // Copyright (c) 2013, 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 dart._js_helper; | 5 library dart._js_helper; |
6 | 6 |
7 import 'dart:collection'; | 7 import 'dart:collection'; |
8 | 8 |
9 import 'dart:_foreign_helper' show | 9 import 'dart:_foreign_helper' show |
10 JS, | 10 JS, |
(...skipping 750 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
761 class JSName { | 761 class JSName { |
762 final String name; | 762 final String name; |
763 const JSName(this.name); | 763 const JSName(this.name); |
764 } | 764 } |
765 | 765 |
766 /** | 766 /** |
767 * Special interface recognized by the compiler and implemented by DOM | 767 * Special interface recognized by the compiler and implemented by DOM |
768 * objects that support integer indexing. This interface is not | 768 * objects that support integer indexing. This interface is not |
769 * visible to anyone, and is only injected into special libraries. | 769 * visible to anyone, and is only injected into special libraries. |
770 */ | 770 */ |
771 abstract class JavaScriptIndexingBehavior extends JSMutableIndexable { | 771 abstract class JavaScriptIndexingBehavior { |
772 } | 772 } |
773 | 773 |
774 // TODO(lrn): These exceptions should be implemented in core. | 774 // TODO(lrn): These exceptions should be implemented in core. |
775 // When they are, remove the 'Implementation' here. | 775 // When they are, remove the 'Implementation' here. |
776 | 776 |
777 /** Thrown by type assertions that fail. */ | 777 /** Thrown by type assertions that fail. */ |
778 class TypeErrorImplementation extends Error implements TypeError { | 778 class TypeErrorImplementation extends Error implements TypeError { |
779 final String message; | 779 final String message; |
780 | 780 |
781 /** | 781 /** |
(...skipping 112 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
894 // we have no way of telling the compiler yet, so it will generate an extra | 894 // we have no way of telling the compiler yet, so it will generate an extra |
895 // layer of indirection that wraps the SyncIterator. | 895 // layer of indirection that wraps the SyncIterator. |
896 _jsIterator() => JS('', '#(...#)', _generator, _args); | 896 _jsIterator() => JS('', '#(...#)', _generator, _args); |
897 | 897 |
898 Iterator<E> get iterator => new SyncIterator<E>(_jsIterator()); | 898 Iterator<E> get iterator => new SyncIterator<E>(_jsIterator()); |
899 } | 899 } |
900 | 900 |
901 class BooleanConversionAssertionError extends AssertionError { | 901 class BooleanConversionAssertionError extends AssertionError { |
902 toString() => 'Failed assertion: boolean expression must not be null'; | 902 toString() => 'Failed assertion: boolean expression must not be null'; |
903 } | 903 } |
OLD | NEW |