IronPython.Compiler.Ast.ToDiskCompilationMode.ReduceAst C# (CSharp) Method

ReduceAst() public method

public ReduceAst ( IronPython.Compiler.Ast.PythonAst instance, string name ) : LightLambdaExpression
instance IronPython.Compiler.Ast.PythonAst
name string
return LightLambdaExpression
        public override LightLambdaExpression ReduceAst(PythonAst instance, string name) {
            return Utils.LightLambda<LookupCompilationDelegate>(
                typeof(object),
                Ast.Block(
                    new[] { PythonAst._globalArray },
                    Ast.Assign(
                        PythonAst._globalArray,
                        Ast.Call(
                            null,
                            typeof(PythonOps).GetMethod("GetGlobalArrayFromContext"),
                            IronPython.Compiler.Ast.PythonAst._globalContext
                        )
                    ),
                    AstUtils.Convert(instance.ReduceWorker(), typeof(object))
                ),
                name,
                PythonAst._arrayFuncParams
            );
        }