package lua.io; import lua.StackState; import lua.value.LInteger; import lua.value.LNil; import lua.value.LValue; public class Closure extends LValue { public LValue env; public Proto p; public UpVal[] upVals; public Closure(StackState state, Proto p) { this.env = state.gt(); this.p = p; upVals = new UpVal[p.nups]; for ( int i=0; i