Optimize constant pooling for Byte and Short

This commit is contained in:
Iaroslav 2020-06-22 15:15:46 +07:00
parent e99f7ad360
commit 29c6d25967
No known key found for this signature in database
GPG Key ID: 46E15E4A31B3BCD7

View File

@ -257,6 +257,8 @@ internal class AsmBuilder<T> internal constructor(
if (sigLetter != null) { if (sigLetter != null) {
when (value) { when (value) {
is Byte -> invokeMethodVisitor.visitLdcOrIntConstant(value.toInt())
is Short -> invokeMethodVisitor.visitLdcOrIntConstant(value.toInt())
is Int -> invokeMethodVisitor.visitLdcOrIntConstant(value) is Int -> invokeMethodVisitor.visitLdcOrIntConstant(value)
is Double -> invokeMethodVisitor.visitLdcOrDoubleConstant(value) is Double -> invokeMethodVisitor.visitLdcOrDoubleConstant(value)
is Float -> invokeMethodVisitor.visitLdcOrFloatConstant(value) is Float -> invokeMethodVisitor.visitLdcOrFloatConstant(value)