Ejemplo n.º 1
0
        /// <summary>
        /// Lays out all parameters of the method.
        /// </summary>
        /// <param name="compiler">The method compiler providing the parameters.</param>
        private void LayoutParameters(IMethodCompiler compiler)
        {
            List <StackOperand> paramOps = new List <StackOperand>();

            int offset = 0;

            if (compiler.Method.Signature.HasThis || compiler.Method.Signature.HasExplicitThis)
            {
                ++offset;
            }
            for (int i = 0; i < compiler.Method.Parameters.Count + offset; ++i)
            {
                paramOps.Add((StackOperand)compiler.GetParameterOperand(i));
            }

            /*if (compiler.Method.Signature.HasThis || compiler.Method.Signature.HasExplicitThis)
             *      LayoutVariables(paramOps, cc, cc.OffsetOfFirstParameter + 4, -1);
             * else*/
            LayoutVariables(paramOps, callingConvention, callingConvention.OffsetOfFirstParameter, -1);

            if (TRACING.TraceInfo)
            {
                LogOperands(paramOps);
            }
        }
Ejemplo n.º 2
0
        /// <summary>
        /// Lays out all parameters of the method.
        /// </summary>
        /// <param name="compiler">The method compiler providing the parameters.</param>
        /// <param name="cc">The calling convention used to invoke the method, which controls parameter layout.</param>
        private void LayoutParameters(IMethodCompiler compiler, ICallingConvention cc)
        {
            List <StackOperand> paramOps = new List <StackOperand> ();

            for (int i = 0; i < compiler.Method.Parameters.Count; i++)
            {
                paramOps.Add((StackOperand)compiler.GetParameterOperand(i));
            }

            LayoutVariables(paramOps, cc, cc.OffsetOfFirstParameter, -1);

            if (TRACING.TraceInfo)
            {
                LogOperands(paramOps);
            }
        }
Ejemplo n.º 3
0
        /// <summary>
        /// Lays out all parameters of the method.
        /// </summary>
        /// <param name="compiler">The method compiler providing the parameters.</param>
        private void LayoutParameters(IMethodCompiler compiler)
        {
            List<StackOperand> paramOps = new List<StackOperand>();

            int offset = 0;

            if (compiler.Method.Signature.HasThis || compiler.Method.Signature.HasExplicitThis)
                ++offset;

            for (int i = 0; i < compiler.Method.Parameters.Count + offset; ++i)
                paramOps.Add((StackOperand)compiler.GetParameterOperand(i));

            LayoutVariables(paramOps, callingConvention, callingConvention.OffsetOfFirstParameter, -1);
        }
Ejemplo n.º 4
0
        /// <summary>
        /// Lays out all parameters of the method.
        /// </summary>
        /// <param name="compiler">The method compiler providing the parameters.</param>
        /// <param name="cc">The calling convention used to invoke the method, which controls parameter layout.</param>
        private void LayoutParameters(IMethodCompiler compiler, ICallingConvention cc)
        {
            List<StackOperand> paramOps = new List<StackOperand>();

            int offset = 0;
            if (compiler.Method.Signature.HasThis || compiler.Method.Signature.HasExplicitThis)
                ++offset;
            for (int i = 0; i < compiler.Method.Parameters.Count + offset; ++i)
                paramOps.Add((StackOperand)compiler.GetParameterOperand(i));

            /*if (compiler.Method.Signature.HasThis || compiler.Method.Signature.HasExplicitThis)
                LayoutVariables(paramOps, cc, cc.OffsetOfFirstParameter + 4, -1);
            else*/
                LayoutVariables(paramOps, cc, cc.OffsetOfFirstParameter, -1);

            if (TRACING.TraceInfo)
                LogOperands(paramOps);
        }
Ejemplo n.º 5
0
        /// <summary>
        /// Lays out all parameters of the method.
        /// </summary>
        /// <param name="compiler">The method compiler providing the parameters.</param>
        /// <param name="cc">The calling convention used to invoke the method, which controls parameter layout.</param>
        private void LayoutParameters(IMethodCompiler compiler, ICallingConvention cc)
        {
            List<StackOperand> paramOps = new List<StackOperand> ();

            for (int i = 0; i < compiler.Method.Parameters.Count; i++)
                paramOps.Add ((StackOperand)compiler.GetParameterOperand (i));

            LayoutVariables (paramOps, cc, cc.OffsetOfFirstParameter, -1);

            if (TRACING.TraceInfo)
                LogOperands (paramOps);
        }