remove the block if stack analysis succeeded

git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@400 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent d5c76c287d
commit 1163db5bd8
  1. 14
      jode/jode/flow/SpecialBlock.java

@ -29,7 +29,6 @@ public class SpecialBlock extends StructuredBlock {
public static int SWAP = 1;
public static int POP = 2;
private static String[] output = { "DUP", "SWAP", "POP" };
private boolean resolved = false;
/**
* The type, one of DUP or SWAP
@ -66,20 +65,17 @@ public class SpecialBlock extends StructuredBlock {
}
public void removePush() {
resolved = true;
super.removePush();
/* XXX */
removeBlock();
}
public void dumpInstruction(TabbedPrintWriter writer)
throws java.io.IOException
{
if (!resolved)
writer.println(output[type]
+ ((count == 1) ? "" : "2")
+ ((depth == 0) ? "" : "_X"+depth));
else
writer.println("/* warning: unusual code */");
writer.println(output[type]
+ ((count == 1) ? "" : "2")
+ ((depth == 0) ? "" : "_X"+depth));
}
public boolean doTransformations() {

Loading…
Cancel
Save