private static void tryAndRemoveUnneededJump(BasicBlock next, CFG cfg, Instr lastInstr, BasicBlock current) { if (next == cfg.getBBForLabel(((JumpInstr) lastInstr).getJumpTarget())) current.removeInstr(lastInstr); }
private static void tryAndRemoveUnneededJump(BasicBlock next, CFG cfg, Instr lastInstr, BasicBlock current) { if (next == cfg.getBBForLabel(((JumpInstr) lastInstr).getJumpTarget())) current.removeInstr(lastInstr); }
private static void tryAndRemoveUnneededJump(BasicBlock next, CFG cfg, Instr lastInstr, BasicBlock current) { if (next == cfg.getBBForLabel(((JumpInstr) lastInstr).getJumpTarget())) current.removeInstr(lastInstr); }
private static void tryAndRemoveUnneededJump(BasicBlock next, CFG cfg, Instr lastInstr, BasicBlock current) { if (next == cfg.getBBForLabel(((JumpInstr) lastInstr).getJumpTarget())) current.removeInstr(lastInstr); }
public FullInterpreterContext duplicate() { try { CFG newCFG = cfg.clone(new SimpleCloneInfo(getScope(), false, true), getScope()); BasicBlock[] newLinearizedBBList = new BasicBlock[linearizedBBList.length]; for (int i = 0; i < linearizedBBList.length; i++) { newLinearizedBBList[i] = newCFG.getBBForLabel(linearizedBBList[i].getLabel()); } return new FullInterpreterContext(getScope(), newCFG, newLinearizedBBList); } catch (Throwable t) { t.printStackTrace(); return null; } }
public FullInterpreterContext duplicate() { try { CFG newCFG = cfg.clone(new SimpleCloneInfo(getScope(), false, true), getScope()); BasicBlock[] newLinearizedBBList = new BasicBlock[linearizedBBList.length]; for (int i = 0; i < linearizedBBList.length; i++) { newLinearizedBBList[i] = newCFG.getBBForLabel(linearizedBBList[i].getLabel()); } return new FullInterpreterContext(getScope(), newCFG, newLinearizedBBList); } catch (Throwable t) { t.printStackTrace(); return null; } }
public void CFG(CFG cfg, String name) { startTag(writer, "graph"); startTag(writer, "properties"); property(writer, "name", name); endTag(writer, "properties"); startTag(writer, "nodes"); visitBasicBlocks(cfg); endTag(writer, "nodes"); startTag(writer, "edges"); for (Tuple<Integer, Integer> edge: instrEdges) { emptyTag(writer, "edge", "from", edge.a, "to", edge.b); } for (Tuple<Integer, JumpTargetInstr> edge: extraInstrEdges) { emptyTag(writer, "edge", "from", edge.a, "to", indexOffsets.get(cfg.getBBForLabel(edge.b.getJumpTarget()))); } for (Tuple<Instr, Instr> edge: listener.getRemovedEdges()) { emptyTag(writer, "removedEdge", "from", System.identityHashCode(edge.a), "to", System.identityHashCode(edge.b)); } endTag(writer, "edges"); startTag(writer, "controlFlow"); visitEdges(cfg); endTag(writer, "controlFlow"); endTag(writer, "graph"); }
public void CFG(CFG cfg, String name) { startTag(writer, "graph"); startTag(writer, "properties"); property(writer, "name", name); endTag(writer, "properties"); startTag(writer, "nodes"); visitBasicBlocks(cfg); endTag(writer, "nodes"); startTag(writer, "edges"); for (Tuple<Integer, Integer> edge: instrEdges) { emptyTag(writer, "edge", "from", edge.a, "to", edge.b); } for (Tuple<Integer, JumpTargetInstr> edge: extraInstrEdges) { emptyTag(writer, "edge", "from", edge.a, "to", indexOffsets.get(cfg.getBBForLabel(edge.b.getJumpTarget()))); } for (Tuple<Instr, Instr> edge: listener.getRemovedEdges()) { emptyTag(writer, "removedEdge", "from", System.identityHashCode(edge.a), "to", System.identityHashCode(edge.b)); } endTag(writer, "edges"); startTag(writer, "controlFlow"); visitEdges(cfg); endTag(writer, "controlFlow"); endTag(writer, "graph"); }