private ExceptionConsumer createExceptionConsumer(MethodDependency methodDep, BasicBlockReader block) { List<? extends TryCatchBlockReader> tryCatchBlocks = block.readTryCatchBlocks(); ClassReader[] exceptions = new ClassReader[tryCatchBlocks.size()]; DependencyNode[] vars = new DependencyNode[tryCatchBlocks.size()]; for (int i = 0; i < tryCatchBlocks.size(); ++i) { TryCatchBlockReader tryCatch = tryCatchBlocks.get(i); if (tryCatch.getExceptionType() != null) { exceptions[i] = dependencyAnalyzer.getClassSource().get(tryCatch.getExceptionType()); } if (tryCatch.getHandler().getExceptionVariable() != null) { vars[i] = methodDep.getVariable(tryCatch.getHandler().getExceptionVariable().getIndex()); } } return new ExceptionConsumer(dependencyAnalyzer, exceptions, vars, methodDep); }
if (block.getExceptionVariable() != null) { sb.append(" @").append(stringifier.getVariableLabel(block.getExceptionVariable().getIndex())) .append(" := exception\n");
public static void copyBasicBlock(BasicBlockReader block, BasicBlock target) { Program targetProgram = target.getProgram(); if (block.getExceptionVariable() != null) { target.setExceptionVariable(targetProgram.variableAt(block.getExceptionVariable().getIndex())); } InstructionCopyReader copyReader = new InstructionCopyReader(targetProgram); for (InstructionIterator iterator = block.iterateInstructions(); iterator.hasNext();) { iterator.next(); iterator.read(copyReader); target.add(copyReader.getCopy()); } target.getPhis().addAll(copyPhis(block, targetProgram)); target.getTryCatchBlocks().addAll(copyTryCatches(block, targetProgram)); }
blockIndex = i == 0 ? startBlock : substitutor.blockOffset + i; BasicBlock targetBlock = program.basicBlockAt(blockIndex); if (templateBlock.getExceptionVariable() != null) { targetBlock.setExceptionVariable(substitutor.var(templateBlock.getExceptionVariable()));
BasicBlockReader block = program.basicBlockAt(i); if (block.getExceptionVariable() != null) { types[block.getExceptionVariable().getIndex()] = new InferenceType(InferenceKind.OBJECT, 0);
private ExceptionConsumer createExceptionConsumer(MethodDependency methodDep, BasicBlockReader block) { List<? extends TryCatchBlockReader> tryCatchBlocks = block.readTryCatchBlocks(); ClassReader[] exceptions = new ClassReader[tryCatchBlocks.size()]; DependencyNode[] vars = new DependencyNode[tryCatchBlocks.size()]; for (int i = 0; i < tryCatchBlocks.size(); ++i) { TryCatchBlockReader tryCatch = tryCatchBlocks.get(i); if (tryCatch.getExceptionType() != null) { exceptions[i] = dependencyChecker.getClassSource().get(tryCatch.getExceptionType()); } if (tryCatch.getHandler().getExceptionVariable() != null) { vars[i] = methodDep.getVariable(tryCatch.getHandler().getExceptionVariable().getIndex()); } } return new ExceptionConsumer(dependencyChecker, exceptions, vars, methodDep); }
if (block.getExceptionVariable() != null) { sb.append(" @").append(stringifier.getVariableLabel(block.getExceptionVariable().getIndex())) .append(" := exception\n");
public static void copyBasicBlock(BasicBlockReader block, BasicBlock target) { Program targetProgram = target.getProgram(); if (block.getExceptionVariable() != null) { target.setExceptionVariable(targetProgram.variableAt(block.getExceptionVariable().getIndex())); } InstructionCopyReader copyReader = new InstructionCopyReader(targetProgram); for (InstructionIterator iterator = block.iterateInstructions(); iterator.hasNext();) { iterator.next(); iterator.read(copyReader); target.add(copyReader.getCopy()); } target.getPhis().addAll(copyPhis(block, targetProgram)); target.getTryCatchBlocks().addAll(copyTryCatches(block, targetProgram)); }
blockIndex = i == 0 ? startBlock : substitutor.blockOffset + i; BasicBlock targetBlock = program.basicBlockAt(blockIndex); if (templateBlock.getExceptionVariable() != null) { targetBlock.setExceptionVariable(substitutor.var(templateBlock.getExceptionVariable()));
BasicBlockReader block = program.basicBlockAt(i); if (block.getExceptionVariable() != null) { types[block.getExceptionVariable().getIndex()] = VariableType.OBJECT;