[JS IR] Implement MoveTemporaryVariableDeclarationToAssignment optimization
This commit is contained in:
committed by
Space Team
parent
25f7b81d51
commit
524c475834
+3
-3
@@ -3,18 +3,18 @@ function f(x) {
|
||||
}
|
||||
|
||||
function box() {
|
||||
var result1, result2, $a, $b;
|
||||
var $a, $b;
|
||||
|
||||
if (f(true)) {
|
||||
$a = "1";
|
||||
}
|
||||
result1 = $a;
|
||||
var result1 = $a;
|
||||
if (result1 !== "1") return "fail1: " + result1;
|
||||
|
||||
if (f(false)) {
|
||||
$b = "1";
|
||||
}
|
||||
result2 = $b;
|
||||
var result2 = $b;
|
||||
if (result2 !== void 0) return "fail2: " + result2;
|
||||
|
||||
return "OK";
|
||||
|
||||
Reference in New Issue
Block a user