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 web_ui.src.utils_observe; | 5 library web_ui.src.utils_observe; |
6 | 6 |
7 import 'dart:async'; | |
8 import 'dart:collection'; | 7 import 'dart:collection'; |
9 | 8 |
10 // TODO(jmesserly): helpers to combine hash codes. Reuse these from somewhere. | 9 // TODO(jmesserly): helpers to combine hash codes. Reuse these from somewhere. |
11 hash2(x, y) => x.hashCode * 31 + y.hashCode; | 10 hash2(x, y) => x.hashCode * 31 + y.hashCode; |
12 | 11 |
13 hash3(x, y, z) => hash2(hash2(x, y), z); | 12 hash3(x, y, z) => hash2(hash2(x, y), z); |
14 | 13 |
15 hash4(w, x, y, z) => hash2(hash2(w, x), hash2(y, z)); | 14 hash4(w, x, y, z) => hash2(hash2(w, x), hash2(y, z)); |
16 | 15 |
17 class Arrays { | 16 class Arrays { |
(...skipping 26 matching lines...) Expand all Loading... |
44 String message = "$start + $length must be in the range [0..${a.length})"; | 43 String message = "$start + $length must be in the range [0..${a.length})"; |
45 throw new RangeError(message); | 44 throw new RangeError(message); |
46 } | 45 } |
47 } | 46 } |
48 } | 47 } |
49 | 48 |
50 // TODO(jmesserly): bogus type to workaround spurious VM bug with generic base | 49 // TODO(jmesserly): bogus type to workaround spurious VM bug with generic base |
51 // class and mixins. | 50 // class and mixins. |
52 abstract class IterableWorkaround extends IterableBase<dynamic> {} | 51 abstract class IterableWorkaround extends IterableBase<dynamic> {} |
53 abstract class ListMixinWorkaround extends ListMixin<dynamic> {} | 52 abstract class ListMixinWorkaround extends ListMixin<dynamic> {} |
OLD | NEW |