public LocalVariable getNewLocalVariable(String name, int depth) {
if (isForLoopBody) return getLexicalParent().getNewLocalVariable(name, depth);
if (depth == 0) {
LocalVariable lvar = new ClosureLocalVariable(this, name, 0, localVars.nextSlot);
localVars.putVariable(name, lvar);
return lvar;
} else {
return getLexicalParent().getNewLocalVariable(name, depth-1);
}