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

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

Issue 1139673005: fix temps that have the same name to have different Elements (Closed) Base URL: git@github.com:dart-lang/dev_compiler.git@master
Patch Set: 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
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 5 // Function foo: () → dynamic
6 function foo() { 6 function foo() {
7 try { 7 try {
8 throw "hi there"; 8 throw "hi there";
9 } catch (e$) { 9 } catch (e$) {
10 if (dart.is(e$, core.String)) { 10 if (dart.is(e$, core.String)) {
(...skipping 35 matching lines...) Expand 10 before | Expand all | Expand 10 after
46 throw e; 46 throw e;
47 } else 47 } else
48 throw e; 48 throw e;
49 } 49 }
50 50
51 } 51 }
52 // Function wub: () → dynamic 52 // Function wub: () → dynamic
53 function wub() { 53 function wub() {
54 try { 54 try {
55 throw "on without exception parameter"; 55 throw "on without exception parameter";
56 } catch (e$) { 56 } catch (e) {
Jennifer Messerly 2015/05/11 23:22:01 the name here should've been a clue ... why `e$` w
57 if (dart.is(e$, core.String)) { 57 if (dart.is(e, core.String)) {
58 } else 58 } else
59 throw e$; 59 throw e;
60 } 60 }
61 61
62 } 62 }
63 // Function main: () → dynamic 63 // Function main: () → dynamic
64 function main() { 64 function main() {
65 foo(); 65 foo();
66 bar(); 66 bar();
67 baz(); 67 baz();
68 qux(); 68 qux();
69 wub(); 69 wub();
70 } 70 }
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
« lib/src/codegen/js_codegen.dart ('K') | « lib/src/codegen/js_names.dart ('k') | no next file » | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698