Skip to content

Commit

Permalink
fix compiler error in generating asmifier of dex file
Browse files Browse the repository at this point in the history
--HG--
branch : 2.x
pxb1988 committed May 29, 2015
1 parent d09c422 commit d69d6c1
Showing 2 changed files with 3 additions and 10 deletions.
Original file line number Diff line number Diff line change
@@ -47,6 +47,7 @@ public ASMifierClassV(String pkgName, String javaClassName, int access_flags, St
out.s("import com.googlecode.d2j.*;");
out.s("import com.googlecode.d2j.visitors.*;");
out.s("import static com.googlecode.d2j.DexConstants.*;");
out.s("import static com.googlecode.d2j.reader.Op.*;");
out.s("public class %s {", javaClassName);
out.push();
out.s("public static void accept(DexFileVisitor v) {");
Original file line number Diff line number Diff line change
@@ -175,9 +175,7 @@ public void visitFillArrayDataStmt(Op op, int ra, Object array) {

@Override
public DexDebugVisitor visitDebug() {
m.s("DexDebugVisitor ddv=code.visitDebug();");
m.s("if(ddv!=null){");
m.push();
m.s("DexDebugVisitor ddv=new DexDebugVisitor(code.visitDebug());");
return new DexDebugVisitor() {
@Override
public void visitParameterName(int reg, String name) {
@@ -217,13 +215,7 @@ public void visitSetFile(String file) {

@Override
public void visitRestartLocal(int reg, DexLabel label) {
m.s("ddv.visitReStartLocal(%d,%s);", reg, v(label));
}

@Override
public void visitEnd() {
m.pop();
m.s("}");
m.s("ddv.visitRestartLocal(%d,%s);", reg, v(label));
}
};
}

0 comments on commit d69d6c1

Please sign in to comment.