本文整理汇总了C#中IronPython.Compiler.Ast.PythonAst.ReduceWorker方法的典型用法代码示例。如果您正苦于以下问题:C# PythonAst.ReduceWorker方法的具体用法?C# PythonAst.ReduceWorker怎么用?C# PythonAst.ReduceWorker使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IronPython.Compiler.Ast.PythonAst
的用法示例。
在下文中一共展示了PythonAst.ReduceWorker方法的5个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: ReduceAst
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
);
}
示例2: ReduceAst
public override LightLambdaExpression ReduceAst(PythonAst instance, string name) {
return Utils.LightLambda<LookupCompilationDelegate>(
typeof(object),
AstUtils.Convert(instance.ReduceWorker(), typeof(object)),
name,
PythonAst._arrayFuncParams
);
}
示例3: ReduceAst
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 }
);
}
示例4: ReduceAst
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
);
}
示例5: ReduceAst
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
);
}