@NotNull @Override public List<Instruction> getReversedInstructions() { LinkedHashSet<Instruction> traversedInstructions = Sets.newLinkedHashSet(); PseudocodeTraverserKt.traverseFollowingInstructions( sinkInstruction, traversedInstructions, BACKWARD, null); if (traversedInstructions.size() < instructions.size()) { List<Instruction> simplyReversedInstructions = Lists.newArrayList(instructions); Collections.reverse(simplyReversedInstructions); for (Instruction instruction : simplyReversedInstructions) { if (!traversedInstructions.contains(instruction)) { PseudocodeTraverserKt.traverseFollowingInstructions( instruction, traversedInstructions, BACKWARD, null); } } } return Lists.newArrayList(traversedInstructions); }
private Set<PseudoValue> getMergedValues(@NotNull PseudoValue value) { Set<PseudoValue> result = mergedValues.get(value); return result != null ? result : Collections.<PseudoValue>emptySet(); }
@NotNull @Override public List<? extends Instruction> getUsages(@Nullable PseudoValue value) { List<? extends Instruction> result = valueUsages.get(value); return result != null ? result : Collections.<Instruction>emptyList(); }
@NotNull @Override public List<? extends KtElement> getValueElements(@Nullable PseudoValue value) { List<? extends KtElement> result = elementsToValues.getKeysByValue(value); return result != null ? result : Collections.<KtElement>emptyList(); }