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

Side by Side Diff: test/codegen/expect/try_catch.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/temps.js ('k') | test/codegen/methods.dart » ('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 try_catch = dart.defineLibrary(try_catch, {}); 1 var try_catch = dart.defineLibrary(try_catch, {});
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 // Function foo: () → dynamic
6 function foo() { 5 function foo() {
7 try { 6 try {
8 throw "hi there"; 7 throw "hi there";
9 } catch (e$) { 8 } catch (e$) {
10 if (dart.is(e$, core.String)) { 9 if (dart.is(e$, core.String)) {
11 let e = e$; 10 let e = e$;
12 let t = dart.stackTrace(e); 11 let t = dart.stackTrace(e);
13 } else { 12 } else {
14 let e = e$; 13 let e = e$;
15 let t = dart.stackTrace(e); 14 let t = dart.stackTrace(e);
16 throw e; 15 throw e;
17 } 16 }
18 } 17 }
19 18
20 } 19 }
21 // Function bar: () → dynamic 20 dart.fn(foo);
22 function bar() { 21 function bar() {
23 try { 22 try {
24 throw "hi there"; 23 throw "hi there";
25 } catch (e$) { 24 } catch (e$) {
26 let e = e$; 25 let e = e$;
27 let t = dart.stackTrace(e); 26 let t = dart.stackTrace(e);
28 } 27 }
29 28
30 } 29 }
31 // Function baz: () → dynamic 30 dart.fn(bar);
32 function baz() { 31 function baz() {
33 try { 32 try {
34 throw "finally only"; 33 throw "finally only";
35 } finally { 34 } finally {
36 return true; 35 return true;
37 } 36 }
38 } 37 }
39 // Function qux: () → dynamic 38 dart.fn(baz);
40 function qux() { 39 function qux() {
41 try { 40 try {
42 throw "on only"; 41 throw "on only";
43 } catch (e) { 42 } catch (e) {
44 if (dart.is(e, core.String)) { 43 if (dart.is(e, core.String)) {
45 let t = dart.stackTrace(e); 44 let t = dart.stackTrace(e);
46 throw e; 45 throw e;
47 } else 46 } else
48 throw e; 47 throw e;
49 } 48 }
50 49
51 } 50 }
52 // Function wub: () → dynamic 51 dart.fn(qux);
53 function wub() { 52 function wub() {
54 try { 53 try {
55 throw "on without exception parameter"; 54 throw "on without exception parameter";
56 } catch (e) { 55 } catch (e) {
57 if (dart.is(e, core.String)) { 56 if (dart.is(e, core.String)) {
58 } else 57 } else
59 throw e; 58 throw e;
60 } 59 }
61 60
62 } 61 }
63 // Function main: () → dynamic 62 dart.fn(wub);
64 function main() { 63 function main() {
65 foo(); 64 foo();
66 bar(); 65 bar();
67 baz(); 66 baz();
68 qux(); 67 qux();
69 wub(); 68 wub();
70 } 69 }
70 dart.fn(main);
71 // Exports: 71 // Exports:
72 exports.foo = foo; 72 exports.foo = foo;
73 exports.bar = bar; 73 exports.bar = bar;
74 exports.baz = baz; 74 exports.baz = baz;
75 exports.qux = qux; 75 exports.qux = qux;
76 exports.wub = wub; 76 exports.wub = wub;
77 exports.main = main; 77 exports.main = main;
78 })(try_catch, core); 78 })(try_catch, core);
OLDNEW
« no previous file with comments | « test/codegen/expect/temps.js ('k') | test/codegen/methods.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698