/** * */ private void addBackwardsReach() { if (getBranchOffset() >= 0) { return; } int target = getBranchTarget(); for (Jump j : backwardReach) { if (j.to < target && target <= j.from) { target = j.to; } } assert target <= getBranchTarget(); assert target < getPC(); for (Iterator<Jump> i = backwardReach.iterator(); i.hasNext();) { Jump j = i.next(); if (target <= j.to && getPC() >= j.from) { i.remove(); } } backwardReach.add(new Jump(getPC(), target)); }
if (getBranchOffset() < 0) { BackwardsBranch bb = new BackwardsBranch(stack, getPC(), getBranchTarget()); if (bb.invariantRegisters.size() > 0) { OpcodeStack.Item item0 = stack.getStackItem(0); int target = getBranchTarget(); if (getBranchOffset() > 0) { forwardConditionalBranches.add(new ForwardConditionalBranch(item0, item0, getPC(), target)); break; OpcodeStack.Item item1 = stack.getStackItem(1); int target = getBranchTarget(); if (getBranchOffset() > 0) { forwardConditionalBranches.add(new ForwardConditionalBranch(item0, item1, getPC(), target)); break;
/** * */ private void addBackwardsReach() { if (getBranchOffset() >= 0) { return; } int target = getBranchTarget(); for (Jump j : backwardReach) { if (j.to < target && target <= j.from) { target = j.to; } } assert target <= getBranchTarget(); assert target < getPC(); for (Iterator<Jump> i = backwardReach.iterator(); i.hasNext();) { Jump j = i.next(); if (target <= j.to && getPC() >= j.from) { i.remove(); } } backwardReach.add(new Jump(getPC(), target)); }
if (getBranchOffset() < 0) { BackwardsBranch bb = new BackwardsBranch(stack, getPC(), getBranchTarget()); if (bb.invariantRegisters.size() > 0) { OpcodeStack.Item item0 = stack.getStackItem(0); int target = getBranchTarget(); if (getBranchOffset() > 0) { forwardConditionalBranches.add(new ForwardConditionalBranch(item0, item0, getPC(), target)); break; OpcodeStack.Item item1 = stack.getStackItem(1); int target = getBranchTarget(); if (getBranchOffset() > 0) { forwardConditionalBranches.add(new ForwardConditionalBranch(item0, item1, getPC(), target)); break;