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

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

Issue 1483813002: Use const for const/final top-levels, types, symbols. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Rebased after vsm's regen Created 5 years 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
« no previous file with comments | « test/codegen/expect/collection/src/utils.js ('k') | test/codegen/expect/constructors.js » ('j') | no next file with comments »
Toggle Intra-line Diffs ('i') | Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
OLDNEW
1 dart_library.library('collection/wrappers', null, /* Imports */[ 1 dart_library.library('collection/wrappers', null, /* Imports */[
2 "dart/_runtime", 2 "dart/_runtime",
3 'collection/src/canonicalized_map', 3 'collection/src/canonicalized_map',
4 'dart/core', 4 'dart/core',
5 'dart/math', 5 'dart/math',
6 'dart/collection' 6 'dart/collection'
7 ], /* Lazy imports */[ 7 ], /* Lazy imports */[
8 'collection/src/unmodifiable_wrappers' 8 'collection/src/unmodifiable_wrappers'
9 ], function(exports, dart, canonicalized_map, core, math, collection, unmodifiab le_wrappers) { 9 ], function(exports, dart, canonicalized_map, core, math, collection, unmodifiab le_wrappers) {
10 'use strict'; 10 'use strict';
11 let dartx = dart.dartx; 11 let dartx = dart.dartx;
12 dart.export(exports, canonicalized_map); 12 dart.export(exports, canonicalized_map);
13 dart.export(exports, unmodifiable_wrappers); 13 dart.export(exports, unmodifiable_wrappers);
14 let _base = Symbol('_base'); 14 const _base = Symbol('_base');
15 let _DelegatingIterableBase$ = dart.generic(function(E) { 15 const _DelegatingIterableBase$ = dart.generic(function(E) {
16 class _DelegatingIterableBase extends core.Object { 16 class _DelegatingIterableBase extends core.Object {
17 _DelegatingIterableBase() { 17 _DelegatingIterableBase() {
18 } 18 }
19 any(test) { 19 any(test) {
20 dart.as(test, dart.functionType(core.bool, [E])); 20 dart.as(test, dart.functionType(core.bool, [E]));
21 return this[_base][dartx.any](test); 21 return this[_base][dartx.any](test);
22 } 22 }
23 contains(element) { 23 contains(element) {
24 return this[_base][dartx.contains](element); 24 return this[_base][dartx.contains](element);
25 } 25 }
(...skipping 150 matching lines...) Expand 10 before | Expand all | Expand 10 after
176 'isEmpty', 176 'isEmpty',
177 'isNotEmpty', 177 'isNotEmpty',
178 'iterator', 178 'iterator',
179 'last', 179 'last',
180 'length', 180 'length',
181 'single' 181 'single'
182 ]); 182 ]);
183 return _DelegatingIterableBase; 183 return _DelegatingIterableBase;
184 }); 184 });
185 let _DelegatingIterableBase = _DelegatingIterableBase$(); 185 let _DelegatingIterableBase = _DelegatingIterableBase$();
186 let DelegatingIterable$ = dart.generic(function(E) { 186 const DelegatingIterable$ = dart.generic(function(E) {
187 class DelegatingIterable extends _DelegatingIterableBase$(E) { 187 class DelegatingIterable extends _DelegatingIterableBase$(E) {
188 DelegatingIterable(base) { 188 DelegatingIterable(base) {
189 this[_base] = base; 189 this[_base] = base;
190 super._DelegatingIterableBase(); 190 super._DelegatingIterableBase();
191 } 191 }
192 } 192 }
193 dart.setSignature(DelegatingIterable, { 193 dart.setSignature(DelegatingIterable, {
194 constructors: () => ({DelegatingIterable: [DelegatingIterable$(E), [core.I terable$(E)]]}) 194 constructors: () => ({DelegatingIterable: [DelegatingIterable$(E), [core.I terable$(E)]]})
195 }); 195 });
196 return DelegatingIterable; 196 return DelegatingIterable;
197 }); 197 });
198 let DelegatingIterable = DelegatingIterable$(); 198 let DelegatingIterable = DelegatingIterable$();
199 let _listBase = Symbol('_listBase'); 199 const _listBase = Symbol('_listBase');
200 let DelegatingList$ = dart.generic(function(E) { 200 const DelegatingList$ = dart.generic(function(E) {
201 class DelegatingList extends DelegatingIterable$(E) { 201 class DelegatingList extends DelegatingIterable$(E) {
202 DelegatingList(base) { 202 DelegatingList(base) {
203 super.DelegatingIterable(base); 203 super.DelegatingIterable(base);
204 } 204 }
205 get [_listBase]() { 205 get [_listBase]() {
206 return dart.as(this[_base], core.List$(E)); 206 return dart.as(this[_base], core.List$(E));
207 } 207 }
208 get(index) { 208 get(index) {
209 return this[_listBase][dartx.get](index); 209 return this[_listBase][dartx.get](index);
210 } 210 }
(...skipping 156 matching lines...) Expand 10 before | Expand all | Expand 10 after
367 'setRange', 367 'setRange',
368 'shuffle', 368 'shuffle',
369 'sort', 369 'sort',
370 'sublist', 370 'sublist',
371 'length', 371 'length',
372 'reversed' 372 'reversed'
373 ]); 373 ]);
374 return DelegatingList; 374 return DelegatingList;
375 }); 375 });
376 let DelegatingList = DelegatingList$(); 376 let DelegatingList = DelegatingList$();
377 let _setBase = Symbol('_setBase'); 377 const _setBase = Symbol('_setBase');
378 let DelegatingSet$ = dart.generic(function(E) { 378 const DelegatingSet$ = dart.generic(function(E) {
379 class DelegatingSet extends DelegatingIterable$(E) { 379 class DelegatingSet extends DelegatingIterable$(E) {
380 DelegatingSet(base) { 380 DelegatingSet(base) {
381 super.DelegatingIterable(base); 381 super.DelegatingIterable(base);
382 } 382 }
383 get [_setBase]() { 383 get [_setBase]() {
384 return dart.as(this[_base], core.Set$(E)); 384 return dart.as(this[_base], core.Set$(E));
385 } 385 }
386 add(value) { 386 add(value) {
387 dart.as(value, E); 387 dart.as(value, E);
388 return this[_setBase].add(value); 388 return this[_setBase].add(value);
(...skipping 60 matching lines...) Expand 10 before | Expand all | Expand 10 after
449 retainAll: [dart.void, [core.Iterable$(core.Object)]], 449 retainAll: [dart.void, [core.Iterable$(core.Object)]],
450 retainWhere: [dart.void, [dart.functionType(core.bool, [E])]], 450 retainWhere: [dart.void, [dart.functionType(core.bool, [E])]],
451 union: [core.Set$(E), [core.Set$(E)]], 451 union: [core.Set$(E), [core.Set$(E)]],
452 toSet: [core.Set$(E), []] 452 toSet: [core.Set$(E), []]
453 }) 453 })
454 }); 454 });
455 dart.defineExtensionMembers(DelegatingSet, ['toSet']); 455 dart.defineExtensionMembers(DelegatingSet, ['toSet']);
456 return DelegatingSet; 456 return DelegatingSet;
457 }); 457 });
458 let DelegatingSet = DelegatingSet$(); 458 let DelegatingSet = DelegatingSet$();
459 let _baseQueue = Symbol('_baseQueue'); 459 const _baseQueue = Symbol('_baseQueue');
460 let DelegatingQueue$ = dart.generic(function(E) { 460 const DelegatingQueue$ = dart.generic(function(E) {
461 class DelegatingQueue extends DelegatingIterable$(E) { 461 class DelegatingQueue extends DelegatingIterable$(E) {
462 DelegatingQueue(queue) { 462 DelegatingQueue(queue) {
463 super.DelegatingIterable(queue); 463 super.DelegatingIterable(queue);
464 } 464 }
465 get [_baseQueue]() { 465 get [_baseQueue]() {
466 return dart.as(this[_base], collection.Queue$(E)); 466 return dart.as(this[_base], collection.Queue$(E));
467 } 467 }
468 add(value) { 468 add(value) {
469 dart.as(value, E); 469 dart.as(value, E);
470 this[_baseQueue].add(value); 470 this[_baseQueue].add(value);
(...skipping 43 matching lines...) Expand 10 before | Expand all | Expand 10 after
514 remove: [core.bool, [core.Object]], 514 remove: [core.bool, [core.Object]],
515 removeWhere: [dart.void, [dart.functionType(core.bool, [E])]], 515 removeWhere: [dart.void, [dart.functionType(core.bool, [E])]],
516 retainWhere: [dart.void, [dart.functionType(core.bool, [E])]], 516 retainWhere: [dart.void, [dart.functionType(core.bool, [E])]],
517 removeFirst: [E, []], 517 removeFirst: [E, []],
518 removeLast: [E, []] 518 removeLast: [E, []]
519 }) 519 })
520 }); 520 });
521 return DelegatingQueue; 521 return DelegatingQueue;
522 }); 522 });
523 let DelegatingQueue = DelegatingQueue$(); 523 let DelegatingQueue = DelegatingQueue$();
524 let DelegatingMap$ = dart.generic(function(K, V) { 524 const DelegatingMap$ = dart.generic(function(K, V) {
525 class DelegatingMap extends core.Object { 525 class DelegatingMap extends core.Object {
526 DelegatingMap(base) { 526 DelegatingMap(base) {
527 this[_base] = base; 527 this[_base] = base;
528 } 528 }
529 get(key) { 529 get(key) {
530 return this[_base].get(key); 530 return this[_base].get(key);
531 } 531 }
532 set(key, value) { 532 set(key, value) {
533 dart.as(key, K); 533 dart.as(key, K);
534 dart.as(value, V); 534 dart.as(value, V);
(...skipping 55 matching lines...) Expand 10 before | Expand all | Expand 10 after
590 containsKey: [core.bool, [core.Object]], 590 containsKey: [core.bool, [core.Object]],
591 containsValue: [core.bool, [core.Object]], 591 containsValue: [core.bool, [core.Object]],
592 forEach: [dart.void, [dart.functionType(dart.void, [K, V])]], 592 forEach: [dart.void, [dart.functionType(dart.void, [K, V])]],
593 putIfAbsent: [V, [K, dart.functionType(V, [])]], 593 putIfAbsent: [V, [K, dart.functionType(V, [])]],
594 remove: [V, [core.Object]] 594 remove: [V, [core.Object]]
595 }) 595 })
596 }); 596 });
597 return DelegatingMap; 597 return DelegatingMap;
598 }); 598 });
599 let DelegatingMap = DelegatingMap$(); 599 let DelegatingMap = DelegatingMap$();
600 let _baseMap = Symbol('_baseMap'); 600 const _baseMap = Symbol('_baseMap');
601 let MapKeySet$ = dart.generic(function(E) { 601 const MapKeySet$ = dart.generic(function(E) {
602 class MapKeySet extends dart.mixin(_DelegatingIterableBase$(E), unmodifiable _wrappers.UnmodifiableSetMixin$(E)) { 602 class MapKeySet extends dart.mixin(_DelegatingIterableBase$(E), unmodifiable _wrappers.UnmodifiableSetMixin$(E)) {
603 MapKeySet(base) { 603 MapKeySet(base) {
604 this[_baseMap] = base; 604 this[_baseMap] = base;
605 super._DelegatingIterableBase(); 605 super._DelegatingIterableBase();
606 } 606 }
607 get [_base]() { 607 get [_base]() {
608 return this[_baseMap].keys; 608 return this[_baseMap].keys;
609 } 609 }
610 contains(element) { 610 contains(element) {
611 return this[_baseMap].containsKey(element); 611 return this[_baseMap].containsKey(element);
(...skipping 46 matching lines...) Expand 10 before | Expand all | Expand 10 after
658 dart.defineExtensionMembers(MapKeySet, [ 658 dart.defineExtensionMembers(MapKeySet, [
659 'contains', 659 'contains',
660 'toString', 660 'toString',
661 'isEmpty', 661 'isEmpty',
662 'isNotEmpty', 662 'isNotEmpty',
663 'length' 663 'length'
664 ]); 664 ]);
665 return MapKeySet; 665 return MapKeySet;
666 }); 666 });
667 dart.defineLazyClassGeneric(exports, 'MapKeySet', {get: MapKeySet$}); 667 dart.defineLazyClassGeneric(exports, 'MapKeySet', {get: MapKeySet$});
668 let _keyForValue = Symbol('_keyForValue'); 668 const _keyForValue = Symbol('_keyForValue');
669 let MapValueSet$ = dart.generic(function(K, V) { 669 const MapValueSet$ = dart.generic(function(K, V) {
670 class MapValueSet extends _DelegatingIterableBase$(V) { 670 class MapValueSet extends _DelegatingIterableBase$(V) {
671 MapValueSet(base, keyForValue) { 671 MapValueSet(base, keyForValue) {
672 this[_baseMap] = base; 672 this[_baseMap] = base;
673 this[_keyForValue] = keyForValue; 673 this[_keyForValue] = keyForValue;
674 super._DelegatingIterableBase(); 674 super._DelegatingIterableBase();
675 } 675 }
676 get [_base]() { 676 get [_base]() {
677 return this[_baseMap].values; 677 return this[_baseMap].values;
678 } 678 }
679 contains(element) { 679 contains(element) {
(...skipping 116 matching lines...) Expand 10 before | Expand all | Expand 10 after
796 dart.defineExtensionMembers(MapValueSet, [ 796 dart.defineExtensionMembers(MapValueSet, [
797 'contains', 797 'contains',
798 'toString', 798 'toString',
799 'isEmpty', 799 'isEmpty',
800 'isNotEmpty', 800 'isNotEmpty',
801 'length' 801 'length'
802 ]); 802 ]);
803 return MapValueSet; 803 return MapValueSet;
804 }); 804 });
805 let MapValueSet = MapValueSet$(); 805 let MapValueSet = MapValueSet$();
806 let __CastType0$ = dart.generic(function(V) { 806 const __CastType0$ = dart.generic(function(V) {
807 let __CastType0 = dart.typedef('__CastType0', () => dart.functionType(V, []) ); 807 const __CastType0 = dart.typedef('__CastType0', () => dart.functionType(V, [ ]));
808 return __CastType0; 808 return __CastType0;
809 }); 809 });
810 let __CastType0 = __CastType0$(); 810 let __CastType0 = __CastType0$();
811 // Exports: 811 // Exports:
812 exports.DelegatingIterable$ = DelegatingIterable$; 812 exports.DelegatingIterable$ = DelegatingIterable$;
813 exports.DelegatingIterable = DelegatingIterable; 813 exports.DelegatingIterable = DelegatingIterable;
814 exports.DelegatingList$ = DelegatingList$; 814 exports.DelegatingList$ = DelegatingList$;
815 exports.DelegatingList = DelegatingList; 815 exports.DelegatingList = DelegatingList;
816 exports.DelegatingSet$ = DelegatingSet$; 816 exports.DelegatingSet$ = DelegatingSet$;
817 exports.DelegatingSet = DelegatingSet; 817 exports.DelegatingSet = DelegatingSet;
818 exports.DelegatingQueue$ = DelegatingQueue$; 818 exports.DelegatingQueue$ = DelegatingQueue$;
819 exports.DelegatingQueue = DelegatingQueue; 819 exports.DelegatingQueue = DelegatingQueue;
820 exports.DelegatingMap$ = DelegatingMap$; 820 exports.DelegatingMap$ = DelegatingMap$;
821 exports.DelegatingMap = DelegatingMap; 821 exports.DelegatingMap = DelegatingMap;
822 exports.MapKeySet$ = MapKeySet$; 822 exports.MapKeySet$ = MapKeySet$;
823 exports.MapValueSet$ = MapValueSet$; 823 exports.MapValueSet$ = MapValueSet$;
824 exports.MapValueSet = MapValueSet; 824 exports.MapValueSet = MapValueSet;
825 }); 825 });
OLDNEW
« no previous file with comments | « test/codegen/expect/collection/src/utils.js ('k') | test/codegen/expect/constructors.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698