public StaticScope allocateStaticScope(StaticScope parent) {
Iterator<LocalVariable> variables = getLiveLocalVariables();
StaticScope scope = constructStaticScope(parent);
while (variables.hasNext()) {
LocalVariable variable = variables.next();
int destination = scope.addVariable(variable.getName());
System.out.println("Allocating " + variable + " to " + destination);
// Ick: Same Variable objects are not used for all references to the same variable. S
// o setting destination on one will not set them on all
variable.setLocation(destination);
}
return scope;
}