Exemple #1
0
        /// <summary>
        /// Recursively inlines all function calls, i.e. replaces each function call with the content of the called function.
        /// </summary>
        /// <param name="fun">function whose calls shall be inlined</param>
        /// <returns>the modified function</returns>
        public static Function InlineCalls(this Function fun)
        {
            FunctionInliner fi     = new FunctionInliner(fun);
            Function        result = fi.GetAlgorithm();

            return(result);
        }
Exemple #2
0
        /// <summary>
        /// Recursively inlines all function calls, i.e. replaces each function call with the content of the called function.
        /// </summary>
        /// <param name="fun">function whose calls shall be inlined</param>
        /// <param name="inlinedFunctions">out parameter to receive an enumeration of all functions which were inlined</param>
        /// <returns>the modified function</returns>
        public static Function InlineCalls(this Function fun, out IEnumerable <Function> inlinedFunctions)
        {
            InlineVerifier.CheckAllLocalsDeclared(fun);
            FunctionInliner fi     = new FunctionInliner(fun);
            Function        result = fi.GetAlgorithm();

            result.Name      = fun.Name;
            inlinedFunctions = fi.InlinedFunctions;
            InlineVerifier.CheckAllLocalsDeclared(result);
            return(result);
        }
 /// <summary>
 /// Recursively inlines all function calls, i.e. replaces each function call with the content of the called function.
 /// </summary>
 /// <param name="fun">function whose calls shall be inlined</param>
 /// <param name="inlinedFunctions">out parameter to receive an enumeration of all functions which were inlined</param>
 /// <returns>the modified function</returns>
 public static Function InlineCalls(this Function fun, out IEnumerable<Function> inlinedFunctions)
 {
     InlineVerifier.CheckAllLocalsDeclared(fun);
     FunctionInliner fi = new FunctionInliner(fun);
     Function result = fi.GetAlgorithm();
     result.Name = fun.Name;
     inlinedFunctions = fi.InlinedFunctions; 
     InlineVerifier.CheckAllLocalsDeclared(result);
     return result;
 }
 /// <summary>
 /// Recursively inlines all function calls, i.e. replaces each function call with the content of the called function.
 /// </summary>
 /// <param name="fun">function whose calls shall be inlined</param>
 /// <returns>the modified function</returns>
 public static Function InlineCalls(this Function fun)
 {
     FunctionInliner fi = new FunctionInliner(fun);
     Function result = fi.GetAlgorithm();
     return result;
 }