JVM skip redundant boxing optimization in methods without boxing
This commit is contained in:
committed by
teamcityserver
parent
a8e379a025
commit
c1a5ce6e61
+1
-1
@@ -56,7 +56,7 @@ class TaintedBoxedValue(private val boxedBasicValue: CleanBoxedValue) : BoxedBas
|
||||
|
||||
|
||||
class BoxedValueDescriptor(
|
||||
private val boxedType: Type,
|
||||
boxedType: Type,
|
||||
val boxingInsn: AbstractInsnNode,
|
||||
val progressionIterator: ProgressionIteratorBasicValue?,
|
||||
val generationState: GenerationState
|
||||
|
||||
+4
@@ -38,6 +38,10 @@ import java.util.*
|
||||
class RedundantBoxingMethodTransformer(private val generationState: GenerationState) : MethodTransformer() {
|
||||
|
||||
override fun transform(internalClassName: String, node: MethodNode) {
|
||||
val insns = node.instructions.toArray()
|
||||
if (insns.none { it.isBoxing(generationState) || it.isMethodInsnWith(Opcodes.INVOKEINTERFACE) { name == "next" } })
|
||||
return
|
||||
|
||||
val interpreter = RedundantBoxingInterpreter(node.instructions, generationState)
|
||||
val frames = analyze(internalClassName, node, interpreter)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user