コード例 #1
0
        /// <summary>
        /// Converts all field accesses of the function to local variable accesses, creating a new variable
        /// for each accesses field.
        /// </summary>
        /// <param name="fun">function</param>
        /// <param name="locals">out parameter to receive the newly created local variables</param>
        /// <returns>the modified function</returns>
        public static Function ConvertFieldsToLocals(this Function fun, out Variable[] locals)
        {
            FieldLocalizer fl     = new FieldLocalizer(fun);
            Function       result = fl.GetAlgorithm();

            result.Name = fun.Name;
            locals      = fl.Locals;
            return(result);
        }
コード例 #2
0
 /// <summary>
 /// Converts all field accesses of the function to local variable accesses, creating a new variable
 /// for each accesses field.
 /// </summary>
 /// <param name="fun">function</param>
 /// <param name="locals">out parameter to receive the newly created local variables</param>
 /// <returns>the modified function</returns>
 public static Function ConvertFieldsToLocals(this Function fun, out Variable[] locals)
 {
     FieldLocalizer fl = new FieldLocalizer(fun);
     Function result = fl.GetAlgorithm();
     result.Name = fun.Name;
     locals = fl.Locals;
     return result;
 }