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

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

Issue 1062823004: Fix a couple codegen crashers (Closed) Base URL: https://github.com/dart-lang/dev_compiler.git@master
Patch Set: Address comments Created 5 years, 8 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/cascade.txt ('k') | test/codegen/try_catch.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; 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$;
(...skipping 25 matching lines...) Expand all
36 } 36 }
37 } 37 }
38 // Function qux: () → dynamic 38 // Function qux: () → dynamic
39 function qux() { 39 function qux() {
40 try { 40 try {
41 throw "on only"; 41 throw "on only";
42 } catch (e) { 42 } catch (e) {
43 if (dart.is(e, core.String)) { 43 if (dart.is(e, core.String)) {
44 let t = dart.stackTrace(e); 44 let t = dart.stackTrace(e);
45 throw e; 45 throw e;
46 } 46 } else
47 throw e;
47 } 48 }
48 49
49 } 50 }
51 // Function wub: () → dynamic
52 function wub() {
53 try {
54 throw "on without exception parameter";
55 } catch (e$) {
56 if (dart.is(e$, core.String)) {
57 } else
58 throw e$;
59 }
60
61 }
50 // Function main: () → dynamic 62 // Function main: () → dynamic
51 function main() { 63 function main() {
52 foo(); 64 foo();
53 bar(); 65 bar();
54 baz(); 66 baz();
55 qux(); 67 qux();
68 wub();
56 } 69 }
57 // Exports: 70 // Exports:
58 exports.foo = foo; 71 exports.foo = foo;
59 exports.bar = bar; 72 exports.bar = bar;
60 exports.baz = baz; 73 exports.baz = baz;
61 exports.qux = qux; 74 exports.qux = qux;
75 exports.wub = wub;
62 exports.main = main; 76 exports.main = main;
63 })(try_catch || (try_catch = {})); 77 })(try_catch || (try_catch = {}));
OLDNEW
« no previous file with comments | « test/codegen/expect/cascade.txt ('k') | test/codegen/try_catch.dart » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698