fix: run code schrink after insn args simplify (#1838)

This commit is contained in:
Skylot
2023-04-24 22:10:02 +01:00
parent 7f3bd8c668
commit 54f83cee1c
4 changed files with 85 additions and 1 deletions
@@ -259,6 +259,11 @@ public class InsnNode extends LineAttrNode {
case STR_CONCAT:
return true;
case SGET:
case IGET:
// TODO: allow to move final fields
return false;
default:
return false;
}
@@ -72,7 +72,7 @@ public class SimplifyVisitor extends AbstractVisitor {
changed = true;
}
}
if (changed) {
if (changed || mth.contains(AFlag.REQUEST_CODE_SHRINK)) {
CodeShrinkVisitor.shrinkMethod(mth);
}
}
@@ -121,6 +121,7 @@ public class SimplifyVisitor extends AbstractVisitor {
}
if (changed) {
insn.rebindArgs();
mth.add(AFlag.REQUEST_CODE_SHRINK);
}
}