JS: make JsEmpty singleton

This commit is contained in:
Alexey Tsvetkov
2015-03-26 21:58:34 +03:00
parent dd13e91883
commit efba2a2372
11 changed files with 11 additions and 35 deletions
@@ -517,7 +517,7 @@ public class JsAstMapper {
toForIn.setBody(bodyStmt);
}
else {
toForIn.setBody(program.getEmptyStatement());
toForIn.setBody(JsEmpty.INSTANCE$);
}
return toForIn;
@@ -545,7 +545,7 @@ public class JsAstMapper {
toFor.setBody(bodyStmt);
}
else {
toFor.setBody(program.getEmptyStatement());
toFor.setBody(JsEmpty.INSTANCE$);
}
return toFor;
}
@@ -892,7 +892,7 @@ public class JsAstMapper {
else {
// When map() returns null, we return an empty statement.
//
return program.getEmptyStatement();
return JsEmpty.INSTANCE$;
}
}