-
Type:
Enhancement
-
Resolution: Fixed
-
Priority:
P4
-
Affects Version/s: None
-
Component/s: core-libs
-
b97
-
generic
-
generic
Current implementation of InvokerBytecodeGenerator emits optimized bytecode for small Integer and Long constants, while Byte, Short and Character falls through and is treated as Object.
if (con instanceof Integer) {
emitIconstInsn((int) con);
return;
}
could reasonably be replaced with:
if (con instanceof Integer || con instanceof Short || con instanceof Byte || con instanceof Character) {
emitIconstInsn((int) con);
return;
}
if (con instanceof Integer) {
emitIconstInsn((int) con);
return;
}
could reasonably be replaced with:
if (con instanceof Integer || con instanceof Short || con instanceof Byte || con instanceof Character) {
emitIconstInsn((int) con);
return;
}