private void setupLabelPCs(HashMap<Label, Integer> labelIPCMap) { for (BasicBlock b: linearizedBBList) { Label l = b.getLabel(); l.setTargetPC(labelIPCMap.get(l)); } }
private void setupLabelPCs(HashMap<Label, Integer> labelIPCMap) { for (BasicBlock b: linearizedBBList) { Label l = b.getLabel(); l.setTargetPC(labelIPCMap.get(l)); } }
public Label clone() { Label newL = new Label(prefix, id); newL.setTargetPC(getTargetPC()); // Strictly not necessary, but, copy everything over return newL; }
public Label clone() { Label newL = new Label(prefix, id); newL.setTargetPC(getTargetPC()); // Strictly not necessary, but, copy everything over return newL; }
private Instr[] prepareBuildInstructions(List<Instr> instructions) { int length = instructions.size(); Instr[] linearizedInstrArray = instructions.toArray(new Instr[length]); for (int ipc = 0; ipc < length; ipc++) { Instr i = linearizedInstrArray[ipc]; if (i instanceof LabelInstr) ((LabelInstr) i).getLabel().setTargetPC(ipc + 1); } Stack<Integer> markers = new Stack(); rescueIPCs = new int[length]; int rpc = -1; for (int ipc = 0; ipc < length; ipc++) { Instr i = linearizedInstrArray[ipc]; if (i instanceof ExceptionRegionStartMarkerInstr) { rpc = ((ExceptionRegionStartMarkerInstr) i).getFirstRescueBlockLabel().getTargetPC(); markers.push(rpc); } else if (i instanceof ExceptionRegionEndMarkerInstr) { markers.pop(); rpc = markers.isEmpty() ? -1 : markers.peek().intValue(); } rescueIPCs[ipc] = rpc; } return linearizedInstrArray; }
private Instr[] prepareBuildInstructions(List<Instr> instructions) { int length = instructions.size(); Instr[] linearizedInstrArray = instructions.toArray(new Instr[length]); for (int ipc = 0; ipc < length; ipc++) { Instr i = linearizedInstrArray[ipc]; if (i instanceof LabelInstr) ((LabelInstr) i).getLabel().setTargetPC(ipc + 1); } Stack<Integer> markers = new Stack(); rescueIPCs = new int[length]; int rpc = -1; for (int ipc = 0; ipc < length; ipc++) { Instr i = linearizedInstrArray[ipc]; if (i instanceof ExceptionRegionStartMarkerInstr) { rpc = ((ExceptionRegionStartMarkerInstr) i).getFirstRescueBlockLabel().getTargetPC(); markers.push(rpc); } else if (i instanceof ExceptionRegionEndMarkerInstr) { markers.pop(); rpc = markers.isEmpty() ? -1 : markers.peek().intValue(); } rescueIPCs[ipc] = rpc; } return linearizedInstrArray; }
b.getLabel().setTargetPC(ipc); Instr instr = bbInstrs.get(i); if (!(instr instanceof ReceiveSelfInstr)) { if (instr instanceof LabelInstr) ((LabelInstr) instr).getLabel().setTargetPC(ipc); newInstrs.add(instr); ipc++; cfg.getExitBB().getLabel().setTargetPC(ipc + 1); // Exit BB ipc
b.getLabel().setTargetPC(ipc); Instr instr = bbInstrs.get(i); if (!(instr instanceof ReceiveSelfInstr)) { if (instr instanceof LabelInstr) ((LabelInstr) instr).getLabel().setTargetPC(ipc); newInstrs.add(instr); ipc++; cfg.getExitBB().getLabel().setTargetPC(ipc + 1); // Exit BB ipc
cfg().getExitBB().getLabel().setTargetPC(ipc + 1);
cfg().getExitBB().getLabel().setTargetPC(ipc + 1);