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

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

Issue 1138793002: Tag closures with their types (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: More comment fixes Created 5 years, 7 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
« no previous file with comments | « test/codegen/expect/sunflower/sunflower.js ('k') | test/codegen/expect/try_catch.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 var temps = dart.defineLibrary(temps, {}); 1 var temps = dart.defineLibrary(temps, {});
2 var core = dart.import(core); 2 var core = dart.import(core);
3 (function(exports, core) { 3 (function(exports, core) {
4 'use strict'; 4 'use strict';
5 let _x = Symbol('_x'); 5 let _x = Symbol('_x');
6 let __x = Symbol('__x'); 6 let __x = Symbol('__x');
7 let _function = Symbol('_function'); 7 let _function = Symbol('_function');
8 class FormalCollision extends core.Object { 8 class FormalCollision extends core.Object {
9 FormalCollision(x, _x$, func) { 9 FormalCollision(x, _x$, func) {
10 this[_x] = x; 10 this[_x] = x;
11 this[__x] = _x$; 11 this[__x] = _x$;
12 this[_function] = func; 12 this[_function] = func;
13 } 13 }
14 } 14 }
15 dart.setSignature(FormalCollision, {});
15 let _opt = Symbol('_opt'); 16 let _opt = Symbol('_opt');
16 class OptionalArg extends core.Object { 17 class OptionalArg extends core.Object {
17 OptionalArg(opt) { 18 OptionalArg(opt) {
18 if (opt === void 0) 19 if (opt === void 0)
19 opt = 123; 20 opt = 123;
20 this[_opt] = opt; 21 this[_opt] = opt;
21 } 22 }
22 named(opts) { 23 named(opts) {
23 let opt = opts && '_opt' in opts ? opts._opt : 456; 24 let opt = opts && '_opt' in opts ? opts._opt : 456;
24 this[_opt] = opt; 25 this[_opt] = opt;
25 } 26 }
26 } 27 }
27 dart.defineNamedConstructor(OptionalArg, 'named'); 28 dart.defineNamedConstructor(OptionalArg, 'named');
28 // Function main: () → dynamic 29 dart.setSignature(OptionalArg, {});
29 function main() { 30 function main() {
30 core.print(new FormalCollision(1, 2, x => x)); 31 core.print(new FormalCollision(1, 2, dart.fn(x => x)));
31 core.print(new OptionalArg()[_opt]); 32 core.print(new OptionalArg()[_opt]);
32 core.print(new OptionalArg.named()[_opt]); 33 core.print(new OptionalArg.named()[_opt]);
33 } 34 }
35 dart.fn(main);
34 // Exports: 36 // Exports:
35 exports.FormalCollision = FormalCollision; 37 exports.FormalCollision = FormalCollision;
36 exports.OptionalArg = OptionalArg; 38 exports.OptionalArg = OptionalArg;
37 exports.main = main; 39 exports.main = main;
38 })(temps, core); 40 })(temps, core);
OLDNEW
« no previous file with comments | « test/codegen/expect/sunflower/sunflower.js ('k') | test/codegen/expect/try_catch.js » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698