Beispiel #1
0
 @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);
 }
Beispiel #2
0
 private Set<PseudoValue> getMergedValues(@NotNull PseudoValue value) {
   Set<PseudoValue> result = mergedValues.get(value);
   return result != null ? result : Collections.<PseudoValue>emptySet();
 }
Beispiel #3
0
 @NotNull
 @Override
 public List<? extends Instruction> getUsages(@Nullable PseudoValue value) {
   List<? extends Instruction> result = valueUsages.get(value);
   return result != null ? result : Collections.<Instruction>emptyList();
 }
Beispiel #4
0
 @NotNull
 @Override
 public List<? extends KtElement> getValueElements(@Nullable PseudoValue value) {
   List<? extends KtElement> result = elementsToValues.getKeysByValue(value);
   return result != null ? result : Collections.<KtElement>emptyList();
 }