Exemplo n.º 1
0
        private static void emitPushArg(int argIndex)
        {
            var tmp = LocalTmpVar;

            E.AssignArgument(tmp, Object_info, (uint)argIndex);
            emitPushFrom(tmp);
        }
Exemplo n.º 2
0
        /// <summary>
        /// Generate header with instructions providing compiler environment.
        /// </summary>
        private void compilerPreparations()
        {
            E.StartNewInfoBlock().Comment = "===Compiler initialization===";

            prepareStack();

            if (_methodInfo.HasThis)
            {
                E.AssignArgument("this", _methodInfo.DeclaringType, 0);
            }

            //generate argument assigns
            for (uint i = 0; i < _methodInfo.Parameters.Length; ++i)
            {
                var arg = _methodInfo.Parameters[i];
                E.AssignArgument(arg.Name, arg.Type, i + 1); //argument 0 is always this object

                //TODO declare arguments
            }
        }