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

Side by Side Diff: test/codegen/expect/collection/iterable_zip.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
OLDNEW
1 dart_library.library('collection/iterable_zip', null, /* Imports */[ 1 dart_library.library('collection/iterable_zip', null, /* Imports */[
2 "dart/_runtime", 2 "dart/_runtime",
3 'dart/collection', 3 'dart/collection',
4 'dart/core' 4 'dart/core'
5 ], /* Lazy imports */[ 5 ], /* Lazy imports */[
6 ], function(exports, dart, collection, core) { 6 ], function(exports, dart, collection, core) {
7 'use strict'; 7 'use strict';
8 let dartx = dart.dartx; 8 let dartx = dart.dartx;
9 let _iterables = Symbol('_iterables'); 9 const _iterables = Symbol('_iterables');
10 class IterableZip extends collection.IterableBase$(core.List) { 10 class IterableZip extends collection.IterableBase$(core.List) {
11 IterableZip(iterables) { 11 IterableZip(iterables) {
12 this[_iterables] = iterables; 12 this[_iterables] = iterables;
13 super.IterableBase(); 13 super.IterableBase();
14 } 14 }
15 get iterator() { 15 get iterator() {
16 let iterators = this[_iterables][dartx.map](dart.fn(x => dart.dload(x, 'it erator')))[dartx.toList]({growable: false}); 16 let iterators = this[_iterables][dartx.map](dart.fn(x => dart.dload(x, 'it erator')))[dartx.toList]({growable: false});
17 return new _IteratorZip(iterators); 17 return new _IteratorZip(iterators);
18 } 18 }
19 } 19 }
20 dart.setSignature(IterableZip, { 20 dart.setSignature(IterableZip, {
21 constructors: () => ({IterableZip: [IterableZip, [core.Iterable$(core.Iterab le)]]}) 21 constructors: () => ({IterableZip: [IterableZip, [core.Iterable$(core.Iterab le)]]})
22 }); 22 });
23 dart.defineExtensionMembers(IterableZip, ['iterator']); 23 dart.defineExtensionMembers(IterableZip, ['iterator']);
24 let _iterators = Symbol('_iterators'); 24 const _iterators = Symbol('_iterators');
25 let _current = Symbol('_current'); 25 const _current = Symbol('_current');
26 class _IteratorZip extends core.Object { 26 class _IteratorZip extends core.Object {
27 _IteratorZip(iterators) { 27 _IteratorZip(iterators) {
28 this[_iterators] = dart.as(iterators, core.List$(core.Iterator)); 28 this[_iterators] = dart.as(iterators, core.List$(core.Iterator));
29 this[_current] = null; 29 this[_current] = null;
30 } 30 }
31 moveNext() { 31 moveNext() {
32 if (dart.notNull(this[_iterators][dartx.isEmpty])) 32 if (dart.notNull(this[_iterators][dartx.isEmpty]))
33 return false; 33 return false;
34 for (let i = 0; dart.notNull(i) < dart.notNull(this[_iterators][dartx.leng th]); i = dart.notNull(i) + 1) { 34 for (let i = 0; dart.notNull(i) < dart.notNull(this[_iterators][dartx.leng th]); i = dart.notNull(i) + 1) {
35 if (!dart.notNull(this[_iterators][dartx.get](i).moveNext())) { 35 if (!dart.notNull(this[_iterators][dartx.get](i).moveNext())) {
(...skipping 12 matching lines...) Expand all
48 } 48 }
49 } 49 }
50 _IteratorZip[dart.implements] = () => [core.Iterator$(core.List)]; 50 _IteratorZip[dart.implements] = () => [core.Iterator$(core.List)];
51 dart.setSignature(_IteratorZip, { 51 dart.setSignature(_IteratorZip, {
52 constructors: () => ({_IteratorZip: [_IteratorZip, [core.List]]}), 52 constructors: () => ({_IteratorZip: [_IteratorZip, [core.List]]}),
53 methods: () => ({moveNext: [core.bool, []]}) 53 methods: () => ({moveNext: [core.bool, []]})
54 }); 54 });
55 // Exports: 55 // Exports:
56 exports.IterableZip = IterableZip; 56 exports.IterableZip = IterableZip;
57 }); 57 });
OLDNEW
« no previous file with comments | « test/codegen/expect/collection/algorithms.js ('k') | test/codegen/expect/collection/priority_queue.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698