Chromium Code Reviews| OLD | NEW |
|---|---|
| 1 var collection = dart.defineLibrary(collection, {}); | 1 var collection = dart.defineLibrary(collection, {}); |
| 2 var _internal = dart.lazyImport(_internal); | 2 var _internal = dart.lazyImport(_internal); |
| 3 var core = dart.import(core); | 3 var core = dart.import(core); |
| 4 var _js_helper = dart.lazyImport(_js_helper); | 4 var _js_helper = dart.lazyImport(_js_helper); |
| 5 var math = dart.lazyImport(math); | 5 var math = dart.lazyImport(math); |
| 6 (function(exports, _internal, core, _js_helper, math) { | 6 (function(exports, _internal, core, _js_helper, math) { |
| 7 'use strict'; | 7 'use strict'; |
| 8 let _source = Symbol('_source'); | 8 let _source = Symbol('_source'); |
| 9 let UnmodifiableListView$ = dart.generic(function(E) { | 9 let UnmodifiableListView$ = dart.generic(function(E) { |
| 10 class UnmodifiableListView extends _internal.UnmodifiableListBase$(E) { | 10 class UnmodifiableListView extends _internal.UnmodifiableListBase$(E) { |
| (...skipping 61 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 72 } | 72 } |
| 73 } | 73 } |
| 74 return new (_CustomHashMap$(K, V))(equals, hashCode, isValidKey); | 74 return new (_CustomHashMap$(K, V))(equals, hashCode, isValidKey); |
| 75 } | 75 } |
| 76 static identity() { | 76 static identity() { |
| 77 return new (_IdentityHashMap$(K, V))(); | 77 return new (_IdentityHashMap$(K, V))(); |
| 78 } | 78 } |
| 79 static from(other) { | 79 static from(other) { |
| 80 let result = HashMap$(K, V).new(); | 80 let result = HashMap$(K, V).new(); |
| 81 other.forEach(dart.fn((k, v) => { | 81 other.forEach(dart.fn((k, v) => { |
| 82 result.set(k, dart.as(v, V)); | 82 result.set(dart.as(k, K), dart.as(v, V)); |
| 83 })); | 83 })); |
| 84 return result; | 84 return result; |
| 85 } | 85 } |
| 86 static fromIterable(iterable, opts) { | 86 static fromIterable(iterable, opts) { |
| 87 let key = opts && 'key' in opts ? opts.key : null; | 87 let key = opts && 'key' in opts ? opts.key : null; |
| 88 let value = opts && 'value' in opts ? opts.value : null; | 88 let value = opts && 'value' in opts ? opts.value : null; |
| 89 let map = HashMap$(K, V).new(); | 89 let map = HashMap$(K, V).new(); |
| 90 Maps._fillMapWithMappedIterable(map, iterable, key, value); | 90 Maps._fillMapWithMappedIterable(map, iterable, key, value); |
| 91 return map; | 91 return map; |
| 92 } | 92 } |
| (...skipping 1118 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 1211 } | 1211 } |
| 1212 } | 1212 } |
| 1213 return new (_LinkedCustomHashMap$(K, V))(equals, hashCode, isValidKey); | 1213 return new (_LinkedCustomHashMap$(K, V))(equals, hashCode, isValidKey); |
| 1214 } | 1214 } |
| 1215 static identity() { | 1215 static identity() { |
| 1216 return new (_LinkedIdentityHashMap$(K, V))(); | 1216 return new (_LinkedIdentityHashMap$(K, V))(); |
| 1217 } | 1217 } |
| 1218 static from(other) { | 1218 static from(other) { |
| 1219 let result = LinkedHashMap$(K, V).new(); | 1219 let result = LinkedHashMap$(K, V).new(); |
| 1220 other.forEach(dart.fn((k, v) => { | 1220 other.forEach(dart.fn((k, v) => { |
| 1221 result.set(k, dart.as(v, V)); | 1221 result.set(dart.as(k, K), dart.as(v, V)); |
|
Jennifer Messerly
2015/06/02 23:29:47
pretty neat how these just got figured out automag
| |
| 1222 })); | 1222 })); |
| 1223 return result; | 1223 return result; |
| 1224 } | 1224 } |
| 1225 static fromIterable(iterable, opts) { | 1225 static fromIterable(iterable, opts) { |
| 1226 let key = opts && 'key' in opts ? opts.key : null; | 1226 let key = opts && 'key' in opts ? opts.key : null; |
| 1227 let value = opts && 'value' in opts ? opts.value : null; | 1227 let value = opts && 'value' in opts ? opts.value : null; |
| 1228 let map = LinkedHashMap$(K, V).new(); | 1228 let map = LinkedHashMap$(K, V).new(); |
| 1229 Maps._fillMapWithMappedIterable(map, iterable, key, value); | 1229 Maps._fillMapWithMappedIterable(map, iterable, key, value); |
| 1230 return map; | 1230 return map; |
| 1231 } | 1231 } |
| (...skipping 2085 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 3317 this[_validKey] = isValidKey != null ? isValidKey : dart.fn(v => dart.is (v, K), core.bool, [core.Object]); | 3317 this[_validKey] = isValidKey != null ? isValidKey : dart.fn(v => dart.is (v, K), core.bool, [core.Object]); |
| 3318 super._SplayTree(); | 3318 super._SplayTree(); |
| 3319 } | 3319 } |
| 3320 static from(other, compare, isValidKey) { | 3320 static from(other, compare, isValidKey) { |
| 3321 if (compare === void 0) | 3321 if (compare === void 0) |
| 3322 compare = null; | 3322 compare = null; |
| 3323 if (isValidKey === void 0) | 3323 if (isValidKey === void 0) |
| 3324 isValidKey = null; | 3324 isValidKey = null; |
| 3325 let result = new (SplayTreeMap$(K, V))(); | 3325 let result = new (SplayTreeMap$(K, V))(); |
| 3326 other.forEach(dart.fn((k, v) => { | 3326 other.forEach(dart.fn((k, v) => { |
| 3327 result.set(k, dart.as(v, V)); | 3327 result.set(dart.as(k, K), dart.as(v, V)); |
| 3328 })); | 3328 })); |
| 3329 return result; | 3329 return result; |
| 3330 } | 3330 } |
| 3331 static fromIterable(iterable, opts) { | 3331 static fromIterable(iterable, opts) { |
| 3332 let key = opts && 'key' in opts ? opts.key : null; | 3332 let key = opts && 'key' in opts ? opts.key : null; |
| 3333 let value = opts && 'value' in opts ? opts.value : null; | 3333 let value = opts && 'value' in opts ? opts.value : null; |
| 3334 let compare = opts && 'compare' in opts ? opts.compare : null; | 3334 let compare = opts && 'compare' in opts ? opts.compare : null; |
| 3335 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; | 3335 let isValidKey = opts && 'isValidKey' in opts ? opts.isValidKey : null; |
| 3336 let map = new (SplayTreeMap$(K, V))(compare, isValidKey); | 3336 let map = new (SplayTreeMap$(K, V))(compare, isValidKey); |
| 3337 Maps._fillMapWithMappedIterable(map, iterable, key, value); | 3337 Maps._fillMapWithMappedIterable(map, iterable, key, value); |
| (...skipping 2454 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
| 5792 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$; | 5792 exports.LinkedHashMapKeyIterable$ = LinkedHashMapKeyIterable$; |
| 5793 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable; | 5793 exports.LinkedHashMapKeyIterable = LinkedHashMapKeyIterable; |
| 5794 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$; | 5794 exports.LinkedHashMapKeyIterator$ = LinkedHashMapKeyIterator$; |
| 5795 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator; | 5795 exports.LinkedHashMapKeyIterator = LinkedHashMapKeyIterator; |
| 5796 exports.HashSetIterator$ = HashSetIterator$; | 5796 exports.HashSetIterator$ = HashSetIterator$; |
| 5797 exports.HashSetIterator = HashSetIterator; | 5797 exports.HashSetIterator = HashSetIterator; |
| 5798 exports.LinkedHashSetCell = LinkedHashSetCell; | 5798 exports.LinkedHashSetCell = LinkedHashSetCell; |
| 5799 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$; | 5799 exports.LinkedHashSetIterator$ = LinkedHashSetIterator$; |
| 5800 exports.LinkedHashSetIterator = LinkedHashSetIterator; | 5800 exports.LinkedHashSetIterator = LinkedHashSetIterator; |
| 5801 })(collection, _internal, core, _js_helper, math); | 5801 })(collection, _internal, core, _js_helper, math); |
| OLD | NEW |