Ejemplo n.º 1
0
        public void Generate(ICallingConventionEmitter ccr, DataType?dtRet, DataType?dtThis, List <DataType> dtParams)
        {
            ccr.LowLevelDetails(stackAlignment, retAddressOnStack);
            SetReturnStorage(ccr, dtRet, stackAlignment);

            if (dtThis != null)
            {
                ccr.ImplicitThisStack(dtThis);
            }
            if (reverseArguments)
            {
                for (int i = dtParams.Count - 1; i >= 0; --i)
                {
                    ccr.StackParam(dtParams[i]);
                }
                ccr.ReverseParameters();
            }
            else
            {
                for (int i = 0; i < dtParams.Count; ++i)
                {
                    ccr.StackParam(dtParams[i]);
                }
            }
            if (callerCleanup)
            {
                ccr.CallerCleanup(retAddressOnStack);
            }
            else
            {
                ccr.CalleeCleanup();
            }
        }