public boolean bbIsProtected(BasicBlock b) { // No need to look in ensurerMap because (_bbEnsurerMap(b) != null) => (_bbResucerMap(b) != null) return getRescuerBBFor(b) != null; }
public boolean bbIsProtected(BasicBlock b) { // No need to look in ensurerMap because (_bbEnsurerMap(b) != null) => (_bbResucerMap(b) != null) return getRescuerBBFor(b) != null; }
public boolean bbIsProtected(BasicBlock b) { return getRescuerBBFor(b) != null; }
public boolean bbIsProtected(BasicBlock b) { return getRescuerBBFor(b) != null; }
public FlowGraphNode(DataFlowProblem p, BasicBlock n) { problem = p; basicBlock = n; rescuer = problem.getScope().cfg().getRescuerBBFor(basicBlock); }
public FlowGraphNode(T problem, BasicBlock basicBlock) { this.problem = problem; this.basicBlock = basicBlock; // Cache the rescuer node for easy access rescuer = problem.getScope().getCFG().getRescuerBBFor(basicBlock); }
public Map<BasicBlock, Label> buildJVMExceptionTable() { Map<BasicBlock, Label> map = new HashMap<>(1); for (BasicBlock bb: fullInterpreterContext.getLinearizedBBList()) { BasicBlock rescueBB = getCFG().getRescuerBBFor(bb); if (rescueBB != null) { map.put(bb, rescueBB.getLabel()); } } // SSS FIXME: This could be optimized by compressing entries for adjacent BBs that have identical handlers // This could be optimized either during generation or as another pass over the table. But, if the JVM // does that already, do we need to bother with it? return map; }
public FlowGraphNode(T problem, BasicBlock basicBlock) { this.problem = problem; this.basicBlock = basicBlock; // Cache the rescuer node for easy access rescuer = problem.getScope().getCFG().getRescuerBBFor(basicBlock); }
public FlowGraphNode(DataFlowProblem p, BasicBlock n) { problem = p; basicBlock = n; rescuer = problem.getScope().cfg().getRescuerBBFor(basicBlock); }
public Map<BasicBlock, Label> buildJVMExceptionTable() { Map<BasicBlock, Label> map = new HashMap<>(1); for (BasicBlock bb: fullInterpreterContext.getLinearizedBBList()) { BasicBlock rescueBB = getCFG().getRescuerBBFor(bb); if (rescueBB != null) { map.put(bb, rescueBB.getLabel()); } } // SSS FIXME: This could be optimized by compressing entries for adjacent BBs that have identical handlers // This could be optimized either during generation or as another pass over the table. But, if the JVM // does that already, do we need to bother with it? return map; }
private List<Object[]> buildJVMExceptionTable() { List<Object[]> etEntries = new ArrayList<Object[]>(); for (BasicBlock b: linearizedBBList) { // We need handlers for: // - Unrescuable (handled by ensures), // - Throwable (handled by rescues) // in that order since Throwable < Unrescuable BasicBlock rBB = cfg().getRescuerBBFor(b); BasicBlock eBB = cfg().getEnsurerBBFor(b); if ((eBB != null) && (rBB == eBB || rBB == null)) { // 1. same rescue and ensure handler ==> just spit out one entry with a Throwable class // 2. only ensure handler ==> just spit out one entry with a Throwable class etEntries.add(new Object[] {b.getLabel(), eBB.getLabel(), Throwable.class}); } else if (rBB != null) { // Unrescuable comes before Throwable if (eBB != null) etEntries.add(new Object[] {b.getLabel(), eBB.getLabel(), Unrescuable.class}); etEntries.add(new Object[] {b.getLabel(), rBB.getLabel(), Throwable.class}); } } // SSS FIXME: This could be optimized by compressing entries for adjacent BBs that have identical handlers // This could be optimized either during generation or as another pass over the table. But, if the JVM // does that already, do we need to bother with it? return etEntries; }
private List<Object[]> buildJVMExceptionTable() { List<Object[]> etEntries = new ArrayList<Object[]>(); for (BasicBlock b: linearizedBBList) { // We need handlers for: // - Unrescuable (handled by ensures), // - Throwable (handled by rescues) // in that order since Throwable < Unrescuable BasicBlock rBB = cfg().getRescuerBBFor(b); BasicBlock eBB = cfg().getEnsurerBBFor(b); if ((eBB != null) && (rBB == eBB || rBB == null)) { // 1. same rescue and ensure handler ==> just spit out one entry with a Throwable class // 2. only ensure handler ==> just spit out one entry with a Throwable class etEntries.add(new Object[] {b.getLabel(), eBB.getLabel(), Throwable.class}); } else if (rBB != null) { // Unrescuable comes before Throwable if (eBB != null) etEntries.add(new Object[] {b.getLabel(), eBB.getLabel(), Unrescuable.class}); etEntries.add(new Object[] {b.getLabel(), rBB.getLabel(), Throwable.class}); } } // SSS FIXME: This could be optimized by compressing entries for adjacent BBs that have identical handlers // This could be optimized either during generation or as another pass over the table. But, if the JVM // does that already, do we need to bother with it? return etEntries; }
public int getRescuerPC(Instr excInstr) { depends(cfg()); for (BasicBlock b : linearizedBBList) { for (Instr i : b.getInstrs()) { if (i == excInstr) { BasicBlock rescuerBB = cfg().getRescuerBBFor(b); return (rescuerBB == null) ? -1 : rescuerBB.getLabel().getTargetPC(); } } } // SSS FIXME: Cannot happen! Throw runtime exception LOG.error("Fell through looking for rescuer ipc for " + excInstr); return -1; }
for (int i = 0; i < basicBlocks.length; i++) { BasicBlock bb = basicBlocks[i]; BasicBlock rescuerBB = cfg.getRescuerBBFor(bb); int rescuerPC = rescuerBB == null ? -1 : rescuerBB.getLabel().getTargetPC(); rescueIPCs[i * 2] = ipc + bb.getInstrs().size();
public int getRescuerPC(Instr excInstr) { depends(cfg()); for (BasicBlock b : linearizedBBList) { for (Instr i : b.getInstrs()) { if (i == excInstr) { BasicBlock rescuerBB = cfg().getRescuerBBFor(b); return (rescuerBB == null) ? -1 : rescuerBB.getLabel().getTargetPC(); } } } // SSS FIXME: Cannot happen! Throw runtime exception LOG.error("Fell through looking for rescuer ipc for " + excInstr); return -1; }
for (int i = 0; i < basicBlocks.length; i++) { BasicBlock bb = basicBlocks[i]; BasicBlock rescuerBB = cfg.getRescuerBBFor(bb); int rescuerPC = rescuerBB == null ? -1 : rescuerBB.getLabel().getTargetPC(); rescueIPCs[i * 2] = ipc + bb.getInstrs().size();
private boolean mergeBBs(BasicBlock a, BasicBlock b) { BasicBlock aR = getRescuerBBFor(a); BasicBlock bR = getRescuerBBFor(b);
private boolean mergeBBs(BasicBlock a, BasicBlock b) { BasicBlock aR = getRescuerBBFor(a); BasicBlock bR = getRescuerBBFor(b);
private boolean mergeBBs(BasicBlock a, BasicBlock b) { BasicBlock aR = getRescuerBBFor(a); BasicBlock bR = getRescuerBBFor(b);
private boolean mergeBBs(BasicBlock a, BasicBlock b) { BasicBlock aR = getRescuerBBFor(a); BasicBlock bR = getRescuerBBFor(b);