Commit c35f6e25 authored by Bob Flavin's avatar Bob Flavin

Extended convertInvoke to handle calls to StringBuilder constructor with

arguments, ie: new StringBuilder("str")  or  new
StringBuilder(String.valueOf(var))
parent 8052a90d
...@@ -87,6 +87,17 @@ public class SimplifyVisitor extends AbstractVisitor { ...@@ -87,6 +87,17 @@ public class SimplifyVisitor extends AbstractVisitor {
} }
break; break;
case MOVE:
InsnArg firstArg = insn.getArg(0);
if (firstArg.isLiteral()) {
InsnNode constInsn = new InsnNode(InsnType.CONST, 1);
constInsn.setResult(insn.getResult());
constInsn.addArg(firstArg);
constInsn.copyAttributesFrom(insn);
return constInsn;
}
break;
default: default:
break; break;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment