public FunctionStack(CodeContext context, LuaScope upScope, LuaScope execScope, string identifier) { ContractUtils.Requires(context != null); Context = context; UpScope = upScope; ExecScope = execScope; if (UpScope != null) UpValueNames = UpScope.GetLocalNames().ToArray(); if (ExecScope != null) LocalVariableNames = ExecScope.GetLocalNames().ToArray(); if (ExecScope != null && ExecScope.LocalsCount > 0) Locals = new Stack<VariableAccess>(); else Locals = null; Identifier = identifier; LocalVariableNames = null; LocalVariables = null; UpValueNames = null; UpValues = null; }