BasicBlock toBasicBlock() { InsnList result = new InsnList(instructions.size()); for (int i = 0; i < instructions.size(); i++) { result.set(i, instructions.get(i)); } result.setImmutable(); int primarySuccessorIndex = -1; IntList successors = new IntList(); for (Label catchLabel : catchLabels) { successors.add(catchLabel.id); } if (primarySuccessor != null) { primarySuccessorIndex = primarySuccessor.id; successors.add(primarySuccessorIndex); } if (alternateSuccessor != null) { successors.add(alternateSuccessor.id); } successors.setImmutable(); return new BasicBlock(id, result, successors, primarySuccessorIndex); } }
/** * Creates a new OneToOneRegisterMapper. * * @param countOldRegisters the number of registers in the old name space */ public BasicRegisterMapper(int countOldRegisters) { oldToNew = new IntList(countOldRegisters); }
/** {@inheritDoc} */ public LabeledList(int size) { super(size); labelToIndex = new IntList(size); }
/** * Creates a new OneToOneRegisterMapper. * * @param countOldRegisters the number of registers in the old name space */ public BasicRegisterMapper(int countOldRegisters) { oldToNew = new IntList(countOldRegisters); }
/** @inheritDoc */ public LabeledList(int size) { super(size); labelToIndex = new IntList(size); }
/** * Creates a new OneToOneRegisterMapper. * * @param countOldRegisters the number of registers in the old name space */ public BasicRegisterMapper(int countOldRegisters) { oldToNew = new IntList(countOldRegisters); }
/** {@inheritDoc} */ public LabeledList(int size) { super(size); labelToIndex = new IntList(size); }
/** * Constructs an instance */ public ListIntSet() { ints = new IntList(); ints.sort(); }
/** * Constructs an instance */ public ListIntSet() { ints = new IntList(); ints.sort(); }
/** * Constructs a new immutable instance with the given element. * * @param value the sole value in the list */ public static IntList makeImmutable(int value) { IntList result = new IntList(1); result.add(value); result.setImmutable(); return result; }
/** * Constructs a new immutable instance with the given element. * * @param value the sole value in the list */ public static IntList makeImmutable(int value) { IntList result = new IntList(1); result.add(value); result.setImmutable(); return result; }
/** * Constructs a new immutable instance with the given element. * * @param value the sole value in the list */ public static IntList makeImmutable(int value) { IntList result = new IntList(1); result.add(value); result.setImmutable(); return result; }
/** * @return successor list of rop labels */ public IntList getRopLabelSuccessorList() { IntList result = new IntList(successorList.size()); int sz = successorList.size(); for (int i = 0; i < sz; i++) { result.add(parent.blockIndexToRopLabel(successorList.get(i))); } return result; }
/** * @return successor list of rop labels */ public IntList getRopLabelSuccessorList() { IntList result = new IntList(successorList.size()); int sz = successorList.size(); for (int i = 0; i < sz; i++) { result.add(parent.blockIndexToRopLabel(successorList.get(i))); } return result; }
/** * @return successor list of rop labels */ public IntList getRopLabelSuccessorList() { IntList result = new IntList(successorList.size()); int sz = successorList.size(); for (int i = 0; i < sz; i++) { result.add(parent.blockIndexToRopLabel(successorList.get(i))); } return result; }
public void test_addSorted() { IntList list = new IntList(2); list.add(9); list.add(12); assertTrue(list.contains(9)); assertTrue(list.contains(12)); }