Currently, some variable slots don't have any location information (i.e., getLocation() returns null). For example, CombVariableSlot are instanciated with location equals to null in:
@Override
public CombVariableSlot createCombVariableSlot(Slot receiver, Slot declared) {
CombVariableSlot combVariableSlot;
Pair<Slot, Slot> pair = new Pair<>(receiver, declared);
if (combSlotPairCache.containsKey(pair)) {
int id = combSlotPairCache.get(pair);
combVariableSlot = (CombVariableSlot) getSlot(id);
} else {
combVariableSlot = new CombVariableSlot(nextId(), null, receiver, declared);
addToSlots(combVariableSlot);
combSlotPairCache.put(pair, combVariableSlot.getId());
}
return combVariableSlot;
}
Another example is LubVariableSlot, which has a similar instanciation strategy in createMergeVariableSlot. Also, we may need special handling for the join of two branches (e.g., point to the if statement).
Currently, some variable slots don't have any location information (i.e.,
getLocation()returns null). For example,CombVariableSlotare instanciated with location equals to null in:Another example is
LubVariableSlot, which has a similar instanciation strategy increateMergeVariableSlot. Also, we may need special handling for the join of two branches (e.g., point to theifstatement).