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

Side by Side Diff: test/codegen/expect/collection/collection.js

Issue 959003003: Typecheck constructor initializers properly (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 10 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
1 var collection; 1 var collection;
2 (function(collection) { 2 (function(collection) {
3 'use strict'; 3 'use strict';
4 let _HashMap$ = dart.generic(function(K, V) { 4 let _HashMap$ = dart.generic(function(K, V) {
5 class _HashMap extends dart.Object { 5 class _HashMap extends dart.Object {
6 _HashMap() { 6 _HashMap() {
7 this._length = 0; 7 this._length = 0;
8 this._strings = null; 8 this._strings = null;
9 this._nums = null; 9 this._nums = null;
10 this._rest = null; 10 this._rest = null;
(...skipping 269 matching lines...) Expand 10 before | Expand all | Expand 10 after
280 } 280 }
281 } 281 }
282 return _IdentityHashMap; 282 return _IdentityHashMap;
283 }); 283 });
284 let _IdentityHashMap = _IdentityHashMap$(dynamic, dynamic); 284 let _IdentityHashMap = _IdentityHashMap$(dynamic, dynamic);
285 let _CustomHashMap$ = dart.generic(function(K, V) { 285 let _CustomHashMap$ = dart.generic(function(K, V) {
286 class _CustomHashMap extends _HashMap$(K, V) { 286 class _CustomHashMap extends _HashMap$(K, V) {
287 _CustomHashMap(_equals, _hashCode, validKey) { 287 _CustomHashMap(_equals, _hashCode, validKey) {
288 this._equals = _equals; 288 this._equals = _equals;
289 this._hashCode = _hashCode; 289 this._hashCode = _hashCode;
290 this._validKey = validKey !== null ? validKey : (v) => dart.is(v, K); 290 this._validKey = dart.as(validKey !== null ? validKey : (v) => dart.is(v , K), _Predicate);
291 super._HashMap(); 291 super._HashMap();
292 } 292 }
293 get(key) { 293 get(key) {
294 if (!dart.notNull(this._validKey(key))) 294 if (!dart.notNull(this._validKey(key)))
295 return dart.as(null, V); 295 return dart.as(null, V);
296 return super._get(key); 296 return super._get(key);
297 } 297 }
298 set(key, value) { 298 set(key, value) {
299 super._set(key, value); 299 super._set(key, value);
300 } 300 }
(...skipping 372 matching lines...) Expand 10 before | Expand all | Expand 10 after
673 } 673 }
674 } 674 }
675 return _LinkedIdentityHashMap; 675 return _LinkedIdentityHashMap;
676 }); 676 });
677 let _LinkedIdentityHashMap = _LinkedIdentityHashMap$(dynamic, dynamic); 677 let _LinkedIdentityHashMap = _LinkedIdentityHashMap$(dynamic, dynamic);
678 let _LinkedCustomHashMap$ = dart.generic(function(K, V) { 678 let _LinkedCustomHashMap$ = dart.generic(function(K, V) {
679 class _LinkedCustomHashMap extends _LinkedHashMap$(K, V) { 679 class _LinkedCustomHashMap extends _LinkedHashMap$(K, V) {
680 _LinkedCustomHashMap(_equals, _hashCode, validKey) { 680 _LinkedCustomHashMap(_equals, _hashCode, validKey) {
681 this._equals = _equals; 681 this._equals = _equals;
682 this._hashCode = _hashCode; 682 this._hashCode = _hashCode;
683 this._validKey = validKey !== null ? validKey : (v) => dart.is(v, K); 683 this._validKey = dart.as(validKey !== null ? validKey : (v) => dart.is(v , K), _Predicate);
684 super._LinkedHashMap(); 684 super._LinkedHashMap();
685 } 685 }
686 get(key) { 686 get(key) {
687 if (!dart.notNull(this._validKey(key))) 687 if (!dart.notNull(this._validKey(key)))
688 return dart.as(null, V); 688 return dart.as(null, V);
689 return super._get(key); 689 return super._get(key);
690 } 690 }
691 set(key, value) { 691 set(key, value) {
692 super._set(key, value); 692 super._set(key, value);
693 } 693 }
(...skipping 344 matching lines...) Expand 10 before | Expand all | Expand 10 after
1038 } 1038 }
1039 } 1039 }
1040 return _IdentityHashSet; 1040 return _IdentityHashSet;
1041 }); 1041 });
1042 let _IdentityHashSet = _IdentityHashSet$(dynamic); 1042 let _IdentityHashSet = _IdentityHashSet$(dynamic);
1043 let _CustomHashSet$ = dart.generic(function(E) { 1043 let _CustomHashSet$ = dart.generic(function(E) {
1044 class _CustomHashSet extends _HashSet$(E) { 1044 class _CustomHashSet extends _HashSet$(E) {
1045 _CustomHashSet(_equality, _hasher, validKey) { 1045 _CustomHashSet(_equality, _hasher, validKey) {
1046 this._equality = _equality; 1046 this._equality = _equality;
1047 this._hasher = _hasher; 1047 this._hasher = _hasher;
1048 this._validKey = validKey !== null ? validKey : (x) => dart.is(x, E); 1048 this._validKey = dart.as(validKey !== null ? validKey : (x) => dart.is(x , E), _Predicate);
1049 super._HashSet(); 1049 super._HashSet();
1050 } 1050 }
1051 _newSet() { 1051 _newSet() {
1052 return new _CustomHashSet(this._equality, this._hasher, this._validKey); 1052 return new _CustomHashSet(this._equality, this._hasher, this._validKey);
1053 } 1053 }
1054 _findBucketIndex(bucket, element) { 1054 _findBucketIndex(bucket, element) {
1055 if (bucket === null) 1055 if (bucket === null)
1056 return -1; 1056 return -1;
1057 let length = dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, ' int', '#.length', bucket), core.int); 1057 let length = dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, ' int', '#.length', bucket), core.int);
1058 for (let i = 0; i < length; i++) { 1058 for (let i = 0; i < length; i++) {
(...skipping 347 matching lines...) Expand 10 before | Expand all | Expand 10 after
1406 } 1406 }
1407 } 1407 }
1408 return _LinkedIdentityHashSet; 1408 return _LinkedIdentityHashSet;
1409 }); 1409 });
1410 let _LinkedIdentityHashSet = _LinkedIdentityHashSet$(dynamic); 1410 let _LinkedIdentityHashSet = _LinkedIdentityHashSet$(dynamic);
1411 let _LinkedCustomHashSet$ = dart.generic(function(E) { 1411 let _LinkedCustomHashSet$ = dart.generic(function(E) {
1412 class _LinkedCustomHashSet extends _LinkedHashSet$(E) { 1412 class _LinkedCustomHashSet extends _LinkedHashSet$(E) {
1413 _LinkedCustomHashSet(_equality, _hasher, validKey) { 1413 _LinkedCustomHashSet(_equality, _hasher, validKey) {
1414 this._equality = _equality; 1414 this._equality = _equality;
1415 this._hasher = _hasher; 1415 this._hasher = _hasher;
1416 this._validKey = validKey !== null ? validKey : (x) => dart.is(x, E); 1416 this._validKey = dart.as(validKey !== null ? validKey : (x) => dart.is(x , E), _Predicate);
1417 super._LinkedHashSet(); 1417 super._LinkedHashSet();
1418 } 1418 }
1419 _newSet() { 1419 _newSet() {
1420 return new _LinkedCustomHashSet(this._equality, this._hasher, this._vali dKey); 1420 return new _LinkedCustomHashSet(this._equality, this._hasher, this._vali dKey);
1421 } 1421 }
1422 _findBucketIndex(bucket, element) { 1422 _findBucketIndex(bucket, element) {
1423 if (bucket === null) 1423 if (bucket === null)
1424 return -1; 1424 return -1;
1425 let length = dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, ' int', '#.length', bucket), core.int); 1425 let length = dart.as(dart.dinvokef(/* Unimplemented unknown name */JS, ' int', '#.length', bucket), core.int);
1426 for (let i = 0; i < length; i++) { 1426 for (let i = 0; i < length; i++) {
(...skipping 2782 matching lines...) Expand 10 before | Expand all | Expand 10 after
4209 return _TypeTest; 4209 return _TypeTest;
4210 }); 4210 });
4211 let _TypeTest = _TypeTest$(dynamic); 4211 let _TypeTest = _TypeTest$(dynamic);
4212 let SplayTreeMap$ = dart.generic(function(K, V) { 4212 let SplayTreeMap$ = dart.generic(function(K, V) {
4213 class SplayTreeMap extends _SplayTree$(K) { 4213 class SplayTreeMap extends _SplayTree$(K) {
4214 SplayTreeMap(compare, isValidKey) { 4214 SplayTreeMap(compare, isValidKey) {
4215 if (compare === void 0) 4215 if (compare === void 0)
4216 compare = null; 4216 compare = null;
4217 if (isValidKey === void 0) 4217 if (isValidKey === void 0)
4218 isValidKey = null; 4218 isValidKey = null;
4219 this._comparator = compare === null ? core.Comparable.compare : compare; 4219 this._comparator = dart.as(compare === null ? core.Comparable.compare : compare, core.Comparator);
4220 this._validKey = isValidKey !== null ? isValidKey : (v) => dart.is(v, K) ; 4220 this._validKey = dart.as(isValidKey !== null ? isValidKey : (v) => dart. is(v, K), _Predicate);
4221 super._SplayTree(); 4221 super._SplayTree();
4222 } 4222 }
4223 SplayTreeMap$from(other, compare, isValidKey) { 4223 SplayTreeMap$from(other, compare, isValidKey) {
4224 if (compare === void 0) 4224 if (compare === void 0)
4225 compare = null; 4225 compare = null;
4226 if (isValidKey === void 0) 4226 if (isValidKey === void 0)
4227 isValidKey = null; 4227 isValidKey = null;
4228 let result = new SplayTreeMap(); 4228 let result = new SplayTreeMap();
4229 other.forEach((k, v) => { 4229 other.forEach((k, v) => {
4230 result.set(k, dart.as(v, V)); 4230 result.set(k, dart.as(v, V));
(...skipping 338 matching lines...) Expand 10 before | Expand all | Expand 10 after
4569 return _SplayTreeNodeIterator; 4569 return _SplayTreeNodeIterator;
4570 }); 4570 });
4571 let _SplayTreeNodeIterator = _SplayTreeNodeIterator$(dynamic); 4571 let _SplayTreeNodeIterator = _SplayTreeNodeIterator$(dynamic);
4572 let SplayTreeSet$ = dart.generic(function(E) { 4572 let SplayTreeSet$ = dart.generic(function(E) {
4573 class SplayTreeSet extends dart.mixin(_SplayTree$(E), IterableMixin$(E), Set Mixin$(E)) { 4573 class SplayTreeSet extends dart.mixin(_SplayTree$(E), IterableMixin$(E), Set Mixin$(E)) {
4574 SplayTreeSet(compare, isValidKey) { 4574 SplayTreeSet(compare, isValidKey) {
4575 if (compare === void 0) 4575 if (compare === void 0)
4576 compare = null; 4576 compare = null;
4577 if (isValidKey === void 0) 4577 if (isValidKey === void 0)
4578 isValidKey = null; 4578 isValidKey = null;
4579 this._comparator = compare === null ? core.Comparable.compare : compare; 4579 this._comparator = dart.as(compare === null ? core.Comparable.compare : compare, core.Comparator);
4580 this._validKey = isValidKey !== null ? isValidKey : (v) => dart.is(v, E) ; 4580 this._validKey = dart.as(isValidKey !== null ? isValidKey : (v) => dart. is(v, E), _Predicate);
4581 super._SplayTree(); 4581 super._SplayTree();
4582 } 4582 }
4583 SplayTreeSet$from(elements, compare, isValidKey) { 4583 SplayTreeSet$from(elements, compare, isValidKey) {
4584 if (compare === void 0) 4584 if (compare === void 0)
4585 compare = null; 4585 compare = null;
4586 if (isValidKey === void 0) 4586 if (isValidKey === void 0)
4587 isValidKey = null; 4587 isValidKey = null;
4588 let result = new SplayTreeSet(compare, isValidKey); 4588 let result = new SplayTreeSet(compare, isValidKey);
4589 for (let element of elements) { 4589 for (let element of elements) {
4590 result.add(element); 4590 result.add(element);
(...skipping 196 matching lines...) Expand 10 before | Expand all | Expand 10 after
4787 collection.ListQueue$ = ListQueue$; 4787 collection.ListQueue$ = ListQueue$;
4788 collection.SetMixin = SetMixin; 4788 collection.SetMixin = SetMixin;
4789 collection.SetMixin$ = SetMixin$; 4789 collection.SetMixin$ = SetMixin$;
4790 collection.SetBase = SetBase; 4790 collection.SetBase = SetBase;
4791 collection.SetBase$ = SetBase$; 4791 collection.SetBase$ = SetBase$;
4792 collection.SplayTreeMap = SplayTreeMap; 4792 collection.SplayTreeMap = SplayTreeMap;
4793 collection.SplayTreeMap$ = SplayTreeMap$; 4793 collection.SplayTreeMap$ = SplayTreeMap$;
4794 collection.SplayTreeSet = SplayTreeSet; 4794 collection.SplayTreeSet = SplayTreeSet;
4795 collection.SplayTreeSet$ = SplayTreeSet$; 4795 collection.SplayTreeSet$ = SplayTreeSet$;
4796 })(collection || (collection = {})); 4796 })(collection || (collection = {}));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698