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

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

Issue 1036333003: Fix try catch crasher bug due to null else case. (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: Created 5 years, 9 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
OLDNEW
1 var try_catch; 1 var try_catch;
2 (function(exports) { 2 (function(exports) {
3 'use strict'; 3 'use strict';
4 // Function foo: () → dynamic 4 // Function foo: () → dynamic
5 function foo() { 5 function foo() {
6 try { 6 try {
7 throw "hi there"; 7 throw "hi there";
8 } catch (e$) { 8 } catch (e$) {
9 if (dart.is(e$, core.String)) { 9 if (dart.is(e$, core.String)) {
10 let e = e$; 10 let e = e$;
11 let t = dart.stackTrace(e); 11 let t = dart.stackTrace(e);
12 } else { 12 } else {
13 let e = e$; 13 let e = e$;
14 let t = dart.stackTrace(e); 14 let t = dart.stackTrace(e);
15 throw e; 15 throw e;
16 } 16 }
17 } 17 }
18 18
19 } 19 }
20 // Function bar: () → dynamic 20 // Function bar: () → dynamic
21 function bar() { 21 function bar() {
22 try { 22 try {
23 throw "hi there"; 23 throw "hi there";
24 } catch (e$) { 24 } catch (e$) {
25 let e = e$; 25 let e = e$;
26 let t = dart.stackTrace(e); 26 let t = dart.stackTrace(e);
27 } 27 }
28 28
29 } 29 }
30 // Function baz: () → dynamic
31 function baz() {
32 try {
33 throw "finally only";
34 } finally {
35 return true;
36 }
37 }
38 // Function qux: () → dynamic
39 function qux() {
40 try {
41 throw "on only";
42 } catch (e) {
43 if (dart.is(e, core.String)) {
44 let t = dart.stackTrace(e);
45 throw e;
46 }
47 }
48
49 }
30 // Function main: () → dynamic 50 // Function main: () → dynamic
31 function main() { 51 function main() {
32 foo(); 52 foo();
33 bar(); 53 bar();
54 baz();
55 qux();
34 } 56 }
35 // Exports: 57 // Exports:
36 exports.foo = foo; 58 exports.foo = foo;
37 exports.bar = bar; 59 exports.bar = bar;
60 exports.baz = baz;
61 exports.qux = qux;
38 exports.main = main; 62 exports.main = main;
39 })(try_catch || (try_catch = {})); 63 })(try_catch || (try_catch = {}));
OLDNEW

Powered by Google App Engine
This is Rietveld 408576698