Example #1
0
 /// <summary>
 ///
 /// </summary>
 /// <param name="args"></param>
 private void MovePublic(CodespaceElement receiver, object[] args)
 {
     //todo - THE WORK OF MOVEPUBLIC
     Debug.WriteLine(receiver.Key);
     Debug.WriteLine(args[0].ToString());
     Debug.WriteLine(args[1].ToString());
 }
Example #2
0
        private void Invoke(MethodType method)
        {
            //expected order arg0, arg1, ... , argn, RECEIVER

            object[] operands = new object[method.ArgCount];

            int x = 0;

            //Pop x arguments from stack...
            while (x < method.ArgCount)
            {
                operands[x++] = _vm.PopStack();
            }

            CodespaceElement receiver = _vm.PopStack() as CodespaceElement;

            if (receiver == null)
            {
                throw new ArgumentException("MISSING CodespaceElement reciever for method call");
            }

            method.Delegate(receiver, operands);
        }
Example #3
0
 internal void Push(CodespaceElement el)
 {
     Insert(Instruction.Push(el));
 }