@Override public InstructionHandle getHandle() { return b.getExceptionThrower(); }
@Override public String toString() { return "ex: "+b.getExceptionThrower()+" at "+b; } }
private static Location getLocation(BasicBlock block) { InstructionHandle handle = block.getFirstInstruction(); if(handle == null) { handle = block.getExceptionThrower(); } return handle == null ? null : new Location(handle, block); }
@Override public String toString() { StringBuilder buf = new StringBuilder(); buf.append("[basicBlock="); buf.append(getBasicBlock().getLabel()); if (next != null) { buf.append(", next=" + next); } else if (getBasicBlock().isExceptionThrower()) { buf.append(", check for" + getBasicBlock().getExceptionThrower()); } else { buf.append(", end"); } buf.append(']'); return buf.toString(); } }
public int pos() { if (isEmpty()) { return getExceptionThrower().getPosition(); } return firstInstruction.getPosition(); }
String exInfo = " -> "; if (targetInstruction == null && target.isExceptionThrower()) { targetInstruction = target.getExceptionThrower(); exInfo = " => "; } else { buf.append(" [failed check for "); buf.append(source.getExceptionThrower().getPosition()); if (targetInstruction != null) { buf.append(" to ");
public void print(PrintStream out) { Iterator<BasicBlock> i = cfg.blockIterator(); while (i.hasNext()) { BasicBlock bb = i.next(); out.println(); out.println("BASIC BLOCK: " + bb.getLabel() + (bb.isExceptionThrower() ? " [EXCEPTION THROWER]" : "") + blockStartAnnotate(bb)); if (bb.isExceptionThrower()) { out.println(" Exception thrower: " + bb.getExceptionThrower()); } CodeExceptionGen exceptionGen = bb.getExceptionGen(); if (exceptionGen != null) { out.println("\tCATCHES " + exceptionGen.getCatchType()); } Iterator<InstructionHandle> j = instructionIterator(bb); while (j.hasNext()) { InstructionHandle handle = j.next(); out.println(handle + instructionAnnotate(handle, bb)); } out.println("END" + blockAnnotate(bb)); Iterator<Edge> edgeIter = isForwards ? cfg.outgoingEdgeIterator(bb) : cfg.incomingEdgeIterator(bb); while (edgeIter.hasNext()) { Edge edge = edgeIter.next(); out.println(" " + edge.formatAsString(!isForwards) + " " + edgeAnnotate(edge)); } } }
@Override public void visitEdge(Edge edge) { if (REPORT_PATH_DEBUG) { System.out.println("Edge of type " + Edge.edgeTypeToString(edge.getType()) + " to " + edge.getTarget().getLabel()); if (edge.getTarget().getFirstInstruction() != null) { System.out.println(" First instruction in target: " + edge.getTarget().getFirstInstruction()); } if (edge.getTarget().isExceptionThrower()) { System.out.println(" exception thrower for " + edge.getTarget().getExceptionThrower()); } if (edge.isExceptionEdge()) { System.out.println(" exceptions thrown: " + typeDataflow.getEdgeExceptionSet(edge)); } } } };
InstructionHandle instructionHandle = basicBlock.getExceptionThrower(); Instruction exceptionThrower = instructionHandle.getInstruction(); if (!(exceptionThrower instanceof InvokeInstruction)) {
InstructionHandle handle = exceptionEdge.getSource().getExceptionThrower(); if (handle == null) { throw new IllegalStateException();
BasicBlock b = cfg.getSuccessorWithEdgeType(source, EdgeTypes.FALL_THROUGH_EDGE); if (b != null) { location = new Location(source.getExceptionThrower(), b);
@Override public void transfer(BasicBlock basicBlock, InstructionHandle end, ValueNumberFrame start, ValueNumberFrame result) throws DataflowAnalysisException { if(basicBlock.isExceptionThrower() && isFactValid(start)) { /* If exceptionThrower is invoke instruction then it's possible that * it was partially executed before an exception occurred * So we have to kill available loads when control is transferred to the catch block */ InstructionHandle handle = basicBlock.getExceptionThrower(); Instruction inst = handle.getInstruction(); if(inst instanceof InvokeInstruction || inst instanceof INVOKEDYNAMIC) { copy(start, result); visitor.setFrameAndLocation(result, new Location(handle, basicBlock)); visitor.setHandle(handle); visitor.visitInvokeOnException(inst); return; } } super.transfer(basicBlock, end, start, result); }
continue; InstructionHandle thrower = basicBlock.getExceptionThrower(); Instruction ins = thrower.getInstruction(); if (!(ins instanceof InvokeInstruction)) {
InstructionHandle exceptionThrowerHandle = basicBlock.getExceptionThrower(); Instruction exceptionThrower = exceptionThrowerHandle.getInstruction(); InstructionHandle eth = bb.getExceptionThrower(); if (eth == exceptionThrowerHandle) { continue;
InstructionHandle pei = basicBlock.getExceptionThrower(); Instruction ins = pei.getInstruction();
InstructionHandle handle = sourceBlock.getExceptionThrower(); fact.setOnExceptionPath(true);
InstructionHandle exceptionThrowerHandle = basicBlock.getExceptionThrower(); Instruction exceptionThrower = exceptionThrowerHandle.getInstruction(); ValueNumberFrame vnaFrame = vna.getStartFact(basicBlock);
resultBlock.setExceptionThrower(subBlock.getExceptionThrower());
InstructionHandle exceptionThrower = source.getExceptionThrower(); BasicBlock fallThroughSuccessor = cfg.getSuccessorWithEdgeType(source, FALL_THROUGH_EDGE); if (DEBUG && fallThroughSuccessor == null) {
public int pos() { if (isEmpty()) { return getExceptionThrower().getPosition(); } return firstInstruction.getPosition(); }