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

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

Issue 1524843002: JS: Format if statements with no else on a single line (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: rebased 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 const _iterables = Symbol('_iterables'); 9 const _iterables = Symbol('_iterables');
10 class IterableZip extends collection.IterableBase$(core.List) { 10 class IterableZip extends collection.IterableBase$(core.List) {
(...skipping 11 matching lines...) Expand all
22 }); 22 });
23 dart.defineExtensionMembers(IterableZip, ['iterator']); 23 dart.defineExtensionMembers(IterableZip, ['iterator']);
24 const _iterators = Symbol('_iterators'); 24 const _iterators = Symbol('_iterators');
25 const _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])) 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) { 33 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())) { 34 if (!dart.notNull(this[_iterators][dartx.get](i).moveNext())) {
36 this[_current] = null; 35 this[_current] = null;
37 return false; 36 return false;
38 } 37 }
39 } 38 }
40 this[_current] = core.List.new(this[_iterators][dartx.length]); 39 this[_current] = core.List.new(this[_iterators][dartx.length]);
41 for (let i = 0; dart.notNull(i) < dart.notNull(this[_iterators][dartx.leng th]); i = dart.notNull(i) + 1) { 40 for (let i = 0; dart.notNull(i) < dart.notNull(this[_iterators][dartx.leng th]); i = dart.notNull(i) + 1) {
42 this[_current][dartx.set](i, this[_iterators][dartx.get](i).current); 41 this[_current][dartx.set](i, this[_iterators][dartx.get](i).current);
43 } 42 }
44 return true; 43 return true;
45 } 44 }
46 get current() { 45 get current() {
47 return this[_current]; 46 return this[_current];
48 } 47 }
49 } 48 }
50 _IteratorZip[dart.implements] = () => [core.Iterator$(core.List)]; 49 _IteratorZip[dart.implements] = () => [core.Iterator$(core.List)];
51 dart.setSignature(_IteratorZip, { 50 dart.setSignature(_IteratorZip, {
52 constructors: () => ({_IteratorZip: [_IteratorZip, [core.List]]}), 51 constructors: () => ({_IteratorZip: [_IteratorZip, [core.List]]}),
53 methods: () => ({moveNext: [core.bool, []]}) 52 methods: () => ({moveNext: [core.bool, []]})
54 }); 53 });
55 // Exports: 54 // Exports:
56 exports.IterableZip = IterableZip; 55 exports.IterableZip = IterableZip;
57 }); 56 });
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