Ejemplo n.º 1
0
 public override MSAst.LambdaExpression ReduceAst(PythonAst instance, string name) {
     return Ast.Lambda<Func<CodeContext, FunctionCode, object>>(
         AstUtils.Convert(instance.ReduceWorker(), typeof(object)),
         name,
         PythonAst._arrayFuncParams
     );
 }
Ejemplo n.º 2
0
 public override LightLambdaExpression ReduceAst(PythonAst instance, string name) {
     return Utils.LightLambda<LookupCompilationDelegate>(
         typeof(object),
         AstUtils.Convert(instance.ReduceWorker(), typeof(object)),
         name,
         PythonAst._arrayFuncParams
     );
 }
Ejemplo n.º 3
0
 public override MSAst.LambdaExpression ReduceAst(PythonAst instance, string name)
 {
     return(Ast.Lambda <Func <CodeContext, FunctionCode, object> >(
                AstUtils.Convert(instance.ReduceWorker(), typeof(object)),
                name,
                PythonAst._arrayFuncParams
                ));
 }
Ejemplo n.º 4
0
 public override LightLambdaExpression ReduceAst(PythonAst instance, string name)
 {
     return(Utils.LightLambda <LookupCompilationDelegate>(
                typeof(object),
                AstUtils.Convert(instance.ReduceWorker(), typeof(object)),
                name,
                PythonAst._arrayFuncParams
                ));
 }
Ejemplo n.º 5
0
 public override MSAst.LambdaExpression ReduceAst(PythonAst instance, string name) {
     return Ast.Lambda<Func<FunctionCode, object>>(
             Ast.Block(
                 new[] { PythonAst._globalArray, PythonAst._globalContext },
                 Ast.Assign(PythonAst._globalArray, instance.GlobalArrayInstance),
                 Ast.Assign(PythonAst._globalContext, Ast.Constant(instance.ModuleContext.GlobalContext)),
                 AstUtils.Convert(instance.ReduceWorker(), typeof(object))
             ),
             name,
             new[] { PythonAst._functionCode }
         );
 }
Ejemplo n.º 6
0
 public override MSAst.LambdaExpression ReduceAst(PythonAst instance, string name)
 {
     return(Ast.Lambda <Func <FunctionCode, object> >(
                Ast.Block(
                    new[] { PythonAst._globalArray, PythonAst._globalContext },
                    Ast.Assign(PythonAst._globalArray, instance.GlobalArrayInstance),
                    Ast.Assign(PythonAst._globalContext, Ast.Constant(instance.ModuleContext.GlobalContext)),
                    AstUtils.Convert(instance.ReduceWorker(), typeof(object))
                    ),
                name,
                new[] { PythonAst._functionCode }
                ));
 }
Ejemplo n.º 7
0
 public override MSAst.LambdaExpression ReduceAst(PythonAst instance, string name) {
     return Ast.Lambda<Func<CodeContext, FunctionCode, 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
     );
 }
Ejemplo n.º 8
0
 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
     );
 }
Ejemplo n.º 9
0
 public override MSAst.LambdaExpression ReduceAst(PythonAst instance, string name)
 {
     return(Ast.Lambda <Func <CodeContext, FunctionCode, 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
                ));
 }
Ejemplo n.º 10
0
 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(nameof(PythonOps.GetGlobalArrayFromContext)),
                            PythonAst._globalContext
                            )
                        ),
                    AstUtils.Convert(instance.ReduceWorker(), typeof(object))
                    ),
                name,
                PythonAst._arrayFuncParams
                ));
 }
 public override LightLambdaExpression ReduceAst(PythonAst instance, string name)
 {
     return(Utils.LightLambda <Func <FunctionCode, object> >(typeof(object), AstUtils.Convert(instance.ReduceWorker(), typeof(object)), name, new[] { PythonAst._functionCode }));
 }