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

Side by Side Diff: test/codegen/expect/methods.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
« no previous file with comments | « test/codegen/expect/js/js.js ('k') | test/codegen/expect/script.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('methods', null, /* Imports */[ 1 dart_library.library('methods', null, /* Imports */[
2 "dart/_runtime", 2 "dart/_runtime",
3 'dart/core' 3 'dart/core'
4 ], /* Lazy imports */[ 4 ], /* Lazy imports */[
5 ], function(exports, dart, core) { 5 ], function(exports, dart, core) {
6 'use strict'; 6 'use strict';
7 let dartx = dart.dartx; 7 let dartx = dart.dartx;
8 const _c = Symbol('_c'); 8 const _c = Symbol('_c');
9 class A extends core.Object { 9 class A extends core.Object {
10 A() { 10 A() {
11 this[_c] = 3; 11 this[_c] = 3;
12 } 12 }
13 x() { 13 x() {
14 return 42; 14 return 42;
15 } 15 }
16 y(a) { 16 y(a) {
17 return a; 17 return a;
18 } 18 }
19 z(b) { 19 z(b) {
20 if (b === void 0) 20 if (b === void 0) b = null;
21 b = null;
22 return dart.asInt(b); 21 return dart.asInt(b);
23 } 22 }
24 zz(b) { 23 zz(b) {
25 if (b === void 0) 24 if (b === void 0) b = 0;
26 b = 0;
27 return b; 25 return b;
28 } 26 }
29 w(a, opts) { 27 w(a, opts) {
30 let b = opts && 'b' in opts ? opts.b : null; 28 let b = opts && 'b' in opts ? opts.b : null;
31 return dart.asInt(dart.notNull(a) + dart.notNull(b)); 29 return dart.asInt(dart.notNull(a) + dart.notNull(b));
32 } 30 }
33 clashWithObjectProperty(opts) { 31 clashWithObjectProperty(opts) {
34 let constructor = opts && 'constructor' in opts ? opts.constructor : null; 32 let constructor = opts && 'constructor' in opts ? opts.constructor : null;
35 return constructor; 33 return constructor;
36 } 34 }
(...skipping 48 matching lines...) Expand 10 before | Expand all | Expand 10 after
85 let c = dart.bind("", dartx.padLeft); 83 let c = dart.bind("", dartx.padLeft);
86 let r = dart.bind(3.0, dartx.floor); 84 let r = dart.bind(3.0, dartx.floor);
87 } 85 }
88 dart.fn(test); 86 dart.fn(test);
89 // Exports: 87 // Exports:
90 exports.A = A; 88 exports.A = A;
91 exports.Bar = Bar; 89 exports.Bar = Bar;
92 exports.Foo = Foo; 90 exports.Foo = Foo;
93 exports.test = test; 91 exports.test = test;
94 }); 92 });
OLDNEW
« no previous file with comments | « test/codegen/expect/js/js.js ('k') | test/codegen/expect/script.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698