optimize try-catch-finally (#1731)
- eliminate empty blocks - flatten out if try-block does not throw
This commit is contained in:
@@ -70,6 +70,7 @@ side_effects_finally: {
|
||||
function f() {
|
||||
function g() {
|
||||
try {
|
||||
x();
|
||||
} catch (e) {
|
||||
} finally {
|
||||
console.log("PASS");
|
||||
@@ -83,6 +84,7 @@ side_effects_finally: {
|
||||
function f() {
|
||||
(function() {
|
||||
try {
|
||||
x();
|
||||
} catch (e) {
|
||||
} finally {
|
||||
console.log("PASS");
|
||||
|
||||
Reference in New Issue
Block a user