Commit 132b8d06 authored by 13.beta2's avatar 13.beta2

core: inlining invoke arguments

protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(2130837505);
-->
protected void onCreate(Bundle bundle) {
super.onCreate(bundle);
setContentView(R.layout.samplelayout);
parent 5dc4c28d
......@@ -148,6 +148,8 @@ public class InsnGen {
String thisClass = mth.getParentClass().getFullName();
if (thisClass.startsWith(field.getDeclClass().getFullName())) {
return field.getName();
} else if (field.getDeclClass().getFullName().startsWith(mth.getParentClass().getPackage() + ".R")) {
return field.getDeclClass().getNameWithoutPackage() + '.' + field.getName();
} else {
return useClass(field.getDeclClass()) + '.' + field.getName();
}
......
......@@ -86,6 +86,18 @@ public class ModVisitor extends AbstractVisitor {
} else {
replaceInsn(block, i, co);
}
} else {
if (inv.getArgsCount() > 0) {
for (int j = 0; j < inv.getArgsCount(); j++) {
InsnArg arg = inv.getArg(j);
if (arg.isLiteral()) {
f = parentClass.getConstFieldByLiteralArg((LiteralArg) arg);
if (f != null) {
arg.wrapInstruction(new IndexInsnNode(InsnType.SGET, f.getFieldInfo(), 0));
}
}
}
}
}
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