public BasicBlockStatement getBasichead() { if (type == TYPE_BASICBLOCK) { return (BasicBlockStatement)this; } else { return first.getBasichead(); } }
public HashSet<Statement> buildContinueSet() { continueSet.clear(); for (Statement st : stats) { continueSet.addAll(st.buildContinueSet()); if (st != first) { continueSet.remove(st.getBasichead()); } } for (StatEdge edge : getEdges(StatEdge.TYPE_CONTINUE, DIRECTION_FORWARD)) { continueSet.add(edge.getDestination().getBasichead()); } if (type == TYPE_DO) { continueSet.remove(first.getBasichead()); } return continueSet; }
public static Statement isHead(Statement head) { if (head.getLastBasicType() == LASTBASICTYPE_GENERAL && !head.isMonitorEnter()) { // at most one outgoing edge StatEdge edge = null; List<StatEdge> lstSuccs = head.getSuccessorEdges(STATEDGE_DIRECT_ALL); if (!lstSuccs.isEmpty()) { edge = lstSuccs.get(0); } // regular loop if (edge != null && edge.getType() == StatEdge.TYPE_REGULAR && edge.getDestination() == head) { return new DoStatement(head); } // continues if (head.type != TYPE_DO && (edge == null || edge.getType() != StatEdge.TYPE_REGULAR) && head.getContinueSet().contains(head.getBasichead())) { return new DoStatement(head); } } return null; }
Map<BasicBlock, Boolean> mapLast = information.mapLast; BasicBlock first = fstat.getHandler().getBasichead().getBlock(); boolean skippedFirst = false; removeExceptionInstructionsEx(fstat.getHandler().getBasichead().getBlock(), 1, finallytype);
private void mapMonitorExitInstr(BytecodeMappingTracer tracer) { BasicBlock block = body.getBasichead().getBlock(); if (!block.getSeq().isEmpty() && block.getLastInstruction().opcode == CodeConstants.opc_monitorexit) { Integer offset = block.getOldOffset(block.size() - 1); if (offset > -1) tracer.addMapping(offset); } }
BasicBlock handler = fin.getHandler().getBasichead().getBlock();
private Record getFinallyInformation(StructMethod mt, RootStatement root, CatchAllStatement fstat) { Map<BasicBlock, Boolean> mapLast = new HashMap<>(); BasicBlockStatement firstBlockStatement = fstat.getHandler().getBasichead(); BasicBlock firstBasicBlock = firstBlockStatement.getBlock(); Instruction instrFirst = firstBasicBlock.getInstruction(0);
Statement stat = stats.get(i); BasicBlock block = stat.getBasichead().getBlock(); if (!block.getSeq().isEmpty() && block.getInstruction(0).opcode == CodeConstants.opc_astore) { Integer offset = block.getOldOffset(0);
public BasicBlockStatement getBasichead() { if (type == TYPE_BASICBLOCK) { return (BasicBlockStatement)this; } else { return first.getBasichead(); } }
public HashSet<Statement> buildContinueSet() { continueSet.clear(); for (Statement st : stats) { continueSet.addAll(st.buildContinueSet()); if (st != first) { continueSet.remove(st.getBasichead()); } } for (StatEdge edge : getEdges(StatEdge.TYPE_CONTINUE, DIRECTION_FORWARD)) { continueSet.add(edge.getDestination().getBasichead()); } if (type == TYPE_DO) { continueSet.remove(first.getBasichead()); } return continueSet; }
if (parentloop == null || parentloop.getBasichead() != loop.getBasichead()) { return false;
public static Statement isHead(Statement head) { if (head.getLastBasicType() == LASTBASICTYPE_GENERAL && !head.isMonitorEnter()) { // at most one outgoing edge StatEdge edge = null; List<StatEdge> lstSuccs = head.getSuccessorEdges(STATEDGE_DIRECT_ALL); if (!lstSuccs.isEmpty()) { edge = lstSuccs.get(0); } // regular loop if (edge != null && edge.getType() == StatEdge.TYPE_REGULAR && edge.getDestination() == head) { return new DoStatement(head); } // continues if (head.type != TYPE_DO && (edge == null || edge.getType() != StatEdge.TYPE_REGULAR) && head.getContinueSet().contains(head.getBasichead())) { return new DoStatement(head); } } return null; }
Map<BasicBlock, Boolean> mapLast = information.mapLast; BasicBlock first = fstat.getHandler().getBasichead().getBlock(); boolean skippedFirst = false; removeExceptionInstructionsEx(fstat.getHandler().getBasichead().getBlock(), 1, finallytype);
private void mapMonitorExitInstr(BytecodeMappingTracer tracer) { BasicBlock block = body.getBasichead().getBlock(); if (!block.getSeq().isEmpty() && block.getLastInstruction().opcode == CodeConstants.opc_monitorexit) { Integer offset = block.getOldOffset(block.size() - 1); if (offset > -1) tracer.addMapping(offset); } }
BasicBlock handler = fin.getHandler().getBasichead().getBlock();
private Record getFinallyInformation(StructMethod mt, RootStatement root, CatchAllStatement fstat) { Map<BasicBlock, Boolean> mapLast = new HashMap<>(); BasicBlockStatement firstBlockStatement = fstat.getHandler().getBasichead(); BasicBlock firstBasicBlock = firstBlockStatement.getBlock(); Instruction instrFirst = firstBasicBlock.getInstruction(0);
Statement stat = stats.get(i); BasicBlock block = stat.getBasichead().getBlock(); if (!block.getSeq().isEmpty() && block.getInstruction(0).opcode == CodeConstants.opc_astore) { Integer offset = block.getOldOffset(0);