AjTalk.Language.ExecutionContext.ExecutionContext C# (CSharp) Метод

ExecutionContext() приватный Метод

private ExecutionContext ( Block block, object arguments ) : System
block Block
arguments object
Результат System
        private ExecutionContext(Block block, object[] arguments)
        {
            this.block = block;
            this.Stack = new ArrayList(5);

            this.arguments = arguments;
            if (this.block.NoLocals > 0)
                this.locals = new object[this.block.NoLocals];
            else
                this.locals = null;

            // TODO refactor to no copy of arguments and locals
            this.arguments = arguments;

            if (block.Closure != null)
            {
                this.self = block.Closure.Self;
                this.nativeSelf = block.Closure.NativeSelf;

                int nlocs = block.NoLocals - block.Closure.NoLocals;

                if (nlocs > 0)
                    this.locals = new object[nlocs];
                else
                    this.locals = null;
            }
            else
            {
                if (this.block.NoLocals > 0)
                    this.locals = new object[this.block.NoLocals];
                else
                    this.locals = null;
            }
        }

Same methods

ExecutionContext::ExecutionContext ( System.Machine machine, IObject self, Block block, object arguments ) : System
ExecutionContext::ExecutionContext ( System.Machine machine, object nativeself, Block block, object arguments ) : System