Fix compilation against asm 7.0
This commit is contained in:
+2
-2
@@ -84,7 +84,7 @@ class CapturedVarsOptimizationMethodTransformer : MethodTransformer() {
|
|||||||
private fun AbstractInsnNode.getIndex() = methodNode.instructions.indexOf(this)
|
private fun AbstractInsnNode.getIndex() = methodNode.instructions.indexOf(this)
|
||||||
|
|
||||||
private fun createRefValues() {
|
private fun createRefValues() {
|
||||||
for (insn in methodNode.instructions) {
|
for (insn in methodNode.instructions.asSequence()) {
|
||||||
if (insn.opcode == Opcodes.NEW && insn is TypeInsnNode) {
|
if (insn.opcode == Opcodes.NEW && insn is TypeInsnNode) {
|
||||||
val type = Type.getObjectType(insn.desc)
|
val type = Type.getObjectType(insn.desc)
|
||||||
if (AsmTypes.isSharedVarType(type)) {
|
if (AsmTypes.isSharedVarType(type)) {
|
||||||
@@ -124,7 +124,7 @@ class CapturedVarsOptimizationMethodTransformer : MethodTransformer() {
|
|||||||
}
|
}
|
||||||
|
|
||||||
private fun trackPops(frames: Array<out Frame<BasicValue>?>) {
|
private fun trackPops(frames: Array<out Frame<BasicValue>?>) {
|
||||||
for ((i, insn) in methodNode.instructions.withIndex()) {
|
for ((i, insn) in methodNode.instructions.asSequence().withIndex()) {
|
||||||
val frame = frames[i] ?: continue
|
val frame = frames[i] ?: continue
|
||||||
when (insn.opcode) {
|
when (insn.opcode) {
|
||||||
Opcodes.POP -> {
|
Opcodes.POP -> {
|
||||||
|
|||||||
Reference in New Issue
Block a user