git-svn-id: https://svn.code.sf.net/p/jode/code/trunk@138 379699f6-c40d-0410-875b-85095c16579e
stable
jochen 26 years ago
parent 074140743d
commit b749fa95ff
  1. 11
      jode/jode/flow/TransformConstructors.java

@ -39,6 +39,7 @@ public class TransformConstructors {
StructuredBlock[] sb = new StructuredBlock[constrCount]; StructuredBlock[] sb = new StructuredBlock[constrCount];
for (int i=0; i< constrCount; ) { for (int i=0; i< constrCount; ) {
sb[i] = cons[i].getMethodHeader().block; sb[i] = cons[i].getMethodHeader().block;
// System.err.println("constr "+i+": "+sb[i]);
if (!isStatic) { if (!isStatic) {
InstructionBlock ib; InstructionBlock ib;
if (sb[i] instanceof InstructionBlock) if (sb[i] instanceof InstructionBlock)
@ -66,7 +67,7 @@ public class TransformConstructors {
/* This constructor calls another constructor, so we /* This constructor calls another constructor, so we
* can skip it. * can skip it.
*/ */
System.err.println("skipping this()"); // System.err.println("skipping this()");
cons[i] = cons[--constrCount]; cons[i] = cons[--constrCount];
continue; continue;
} }
@ -80,7 +81,7 @@ public class TransformConstructors {
sb[i] = sb[i].getSubBlocks()[1]; sb[i] = sb[i].getSubBlocks()[1];
else else
sb[i] = null; sb[i] = null;
System.err.println("normal constructor"); // System.err.println("normal constructor");
} }
i++; i++;
} }
@ -123,9 +124,9 @@ public class TransformConstructors {
} }
for (int i=1; i< constrCount; i++) { for (int i=1; i< constrCount; i++) {
ib = (sb[0] instanceof SequentialBlock) ib = (sb[i] instanceof SequentialBlock)
? sb[0].getSubBlocks()[0] ? sb[i].getSubBlocks()[0]
: sb[0]; : sb[i];
if (!(ib instanceof InstructionBlock) if (!(ib instanceof InstructionBlock)
|| !((InstructionBlock)ib).getInstruction().equals(instr)) { || !((InstructionBlock)ib).getInstruction().equals(instr)) {
// System.err.println("constr "+i+" differs: "+ib); // System.err.println("constr "+i+" differs: "+ib);

Loading…
Cancel
Save