Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(62)

Side by Side Diff: test/dart_codegen/expect/collection/hash_map.dart

Issue 1148283010: Remove dart backend (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 6 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View unified diff | Download patch
OLDNEW
(Empty)
1 part of dart.collection;
2 bool _defaultEquals(Object a, Object b) => a == b;
3 int _defaultHashCode(Object a) => a.hashCode;
4 typedef bool _Equality<K>(K a, K b);
5 typedef int _Hasher<K>(K object);
6 abstract class HashMap<K, V> implements Map<K, V> {external factory HashMap({
7 bool equals(K key1, K key2), int hashCode(K key), bool isValidKey(potentialKey )}
8 );
9 external factory HashMap.identity();
10 factory HashMap.from(Map other) {
11 HashMap<K, V> result = new HashMap<K, V>();
12 other.forEach((k, v) {
13 result[DEVC$RT.cast(k, dynamic, K, "CompositeCast", """line 87, column 35 of dart:collection/hash_map.dart: """, k is K, false)] = DEVC$RT.cast(v, dynamic, V, "CompositeCast", """line 87, column 40 of dart:collection/hash_map.dart: """, v is V, false);
14 }
15 );
16 return result;
17 }
18 factory HashMap.fromIterable(Iterable iterable, {
19 K key(element), V value(element)}
20 ) {
21 HashMap<K, V> map = new HashMap<K, V>();
22 Maps._fillMapWithMappedIterable(map, iterable, key, value);
23 return map;
24 }
25 factory HashMap.fromIterables(Iterable<K> keys, Iterable<V> values) {
26 HashMap<K, V> map = new HashMap<K, V>();
27 Maps._fillMapWithIterables(map, keys, values);
28 return map;
29 }
30 }
OLDNEW
« no previous file with comments | « test/dart_codegen/expect/collection/collections.dart ('k') | test/dart_codegen/expect/collection/hash_set.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698