InstructionHandle target = oldIfInst.getTarget(); int relativeTargetOffset = target.getPosition() - oldIfHandle.getPosition();
private void updateBranchTargets() { for(Iterator i = branches.iterator(); i.hasNext(); ) { BranchInstruction bi = (BranchInstruction)i.next(); BranchHandle bh = (BranchHandle)branch_map.get(bi); int pos = bh.getPosition(); String name = bi.getName() + "_" + pos; int t_pos = bh.getTarget().getPosition(); _out.println(" " + name + ".setTarget(ih_" + t_pos + ");"); if(bi instanceof Select) { InstructionHandle[] ihs = ((Select)bi).getTargets(); for(int j = 0; j < ihs.length; j++) { t_pos = ihs[j].getPosition(); _out.println(" " + name + ".setTarget(" + j + ", ih_" + t_pos + ");"); } } } }
@Override public void visitBranchInstruction( final BranchInstruction bi ) { final BranchHandle bh = (BranchHandle) branch_map.get(bi); final int pos = bh.getPosition(); final String name = bi.getName() + "_" + pos; if (bi instanceof Select) {
public void visitBranchInstruction(BranchInstruction bi) { BranchHandle bh = (BranchHandle)branch_map.get(bi); int pos = bh.getPosition(); String name = bi.getName() + "_" + pos;
private void updateBranchTargets() { for (final BranchInstruction bi : branches) { final BranchHandle bh = (BranchHandle) branch_map.get(bi); final int pos = bh.getPosition(); final String name = bi.getName() + "_" + pos; int t_pos = bh.getTarget().getPosition(); _out.println(" " + name + ".setTarget(ih_" + t_pos + ");"); if (bi instanceof Select) { final InstructionHandle[] ihs = ((Select) bi).getTargets(); for (int j = 0; j < ihs.length; j++) { t_pos = ihs[j].getPosition(); _out.println(" " + name + ".setTarget(" + j + ", ih_" + t_pos + ");"); } } } }
InstructionHandle target = oldIfInst.getTarget(); int relativeTargetOffset = target.getPosition() - oldIfHandle.getPosition();
InstructionHandle target = oldIfInst.getTarget(); int relativeTargetOffset = target.getPosition() - oldIfHandle.getPosition();
InstructionHandle target = oldIfInst.getTarget(); int relativeTargetOffset = target.getPosition() - oldIfHandle.getPosition();