Esempio n. 1
0
        public Clr(int localCount = 5, int argCount = 5, bool haseResult = true, int maxStack = 5)
        {
#if JS
            _Stack = new BaseClrStack(maxStack);
#else
            Stack = new ClrStack(maxStack);
#endif
            RetResult     = haseResult;
            LocalVarCount = localCount;
            ArgsVarCount  = argCount;

#if JS
            CallStackClr = new BaseClrStack(localCount + argCount);
            CallStack    = CallStackClr.EvaluationStack;
#else
            CallStack = new StackItem[localCount + argCount];
#endif

            if (CallStack.Length <= 0)
            {
                return;
            }
#if JS
            _Csp  = 0;
            _Argp = Csp + localCount;
#else
            fixed(StackItem *csp = &CallStack[0])
            {
                Csp  = csp;
                Argp = csp + localCount;
            }

            for (int i = 0; i < CallStack.Length; i++)
            {
                CallStack[i].Index = i;
                CallStack[i].Fix();
                //fixed (int* x = &CallStack[i].IntValue)
                //{
                //    CallStack[i].VPoint = x;
                //}
            }
#endif
        }
Esempio n. 2
0
 public StackItem(int lindex, BaseClrStack current)
 {
     LValue  = lindex;
     Current = current;
 }
Esempio n. 3
0
 public void SetCurrent()
 {
     Current = this;
 }