Exemplo n.º 1
0
        /// <summary>
        /// Redefines a <see cref="StackOperand"/> with a new SSA version.
        /// </summary>
        /// <param name="cur">The StackOperand to redefine.</param>
        /// <returns>A new StackOperand.</returns>
        private StackOperand RedefineOperand(StackOperand cur)
        {
            string name = cur.Name;

            if (cur.Version == 0)
            {
                name = String.Format("T_{0}", name);
            }
            StackOperand op = MethodCompiler.CreateTemporary(cur.Type) as StackOperand;

            //StackOperand op = new LocalVariableOperand(cur.Base, name, idx, cur.Type);
            op.Version = ++_ssaVersion;
            return(op);
        }