Use bipush, sipush for byte and short constants

This commit is contained in:
Michael Bogdanov
2016-02-12 10:39:31 +03:00
parent 0073257841
commit 384d2ea0d1
6 changed files with 13 additions and 13 deletions
@@ -720,8 +720,8 @@ public abstract class StackValue {
@Override
public void putSelector(@NotNull Type type, @NotNull InstructionAdapter v) {
if (value instanceof Integer) {
v.iconst((Integer) value);
if (value instanceof Integer || value instanceof Byte || value instanceof Short) {
v.iconst(((Number) value).intValue());
}
else if (value instanceof Long) {
v.lconst((Long) value);