void insert(InstructionList freshIl, Where where) { InstructionHandle h; if (where == InsideBefore || where == OutsideBefore) { h = getStart(); } else { h = getEnd(); } if (where == InsideBefore || where == OutsideAfter) { body.append(h, freshIl); } else { InstructionHandle newStart = body.insert(h, freshIl); if (where == OutsideBefore) {    BcelShadow.retargetAllBranches(h, newStart); } }
InstructionHandle insert(Instruction i, Where where) { InstructionList il = new InstructionList(); InstructionHandle ret = il.insert(i); insert(il, where); return ret;
    void insert(InstructionList freshIl, Where where) {        InstructionHandle h;        if (where == InsideBefore || where == OutsideBefore) {            h = getStart();        } else {            h = getEnd();        }        if (where == InsideBefore || where == OutsideAfter) {            body.append(h, freshIl);        } else {        	InstructionHandle newStart = body.insert(h, freshIl);	        if (where == OutsideBefore) {	        	// XXX this is slow.  There's a better design than this.  We should	        	// never have to retarget branches apart from the creation of ranges.	        	// basically, we should never weave OutsideBefore.				BcelShadow.retargetAllBranches(h, newStart);	        }        }      }