C# Class IronPython.Compiler.Ast.FunctionDefinition

Inheritance: ScopeStatement
Afficher le fichier Open project: jschementi/iron Class Usage Examples

Protected Properties

Свойство Type Description
_body Statement

Private Properties

Свойство Type Description
AddDefaultReturn System.Linq.Expressions.Expression
AddReturnTarget System.Linq.Expressions.Expression
Bind void
BindReference PythonVariable
CompileAssignment void
CreateFunctionInstructions void
CreateFunctionLambda Microsoft.Scripting.Ast.LightLambdaExpression
CreateFunctionVariables void
CreateParameters System.Linq.Expressions.ParameterExpression[]
EmitDebugFunction bool
EnsureFunctionLambda Microsoft.Scripting.Ast.LightLambdaExpression
ExposesLocalVariable bool
FinishBind void
FunctionDefinition System
FunctionDefinition System
GetDelegateType System.Type
GetLambda Microsoft.Scripting.Ast.LightLambdaExpression
GetParentClosureTuple System.Linq.Expressions.Expression
GetVarNames IList
InitializeParameters void
MakeFunctionExpression System.Linq.Expressions.Expression
RewriteBody void
TryBindOuter bool
Verify void

Méthodes publiques

Méthode Description
FunctionDefinition ( string name, Parameter parameters ) : System
FunctionDefinition ( string name, Parameter parameters, Statement body ) : System
Reduce ( ) : Expression
Walk ( IronPython.Compiler.Ast.PythonWalker walker ) : void

Méthodes protégées

Méthode Description
IInstructionProvider ( LightCompiler compiler ) : void

Private Methods

Méthode Description
AddDefaultReturn ( System.Linq.Expressions body, Type returnType ) : Expression
AddReturnTarget ( System.Linq.Expressions expression ) : Expression
Bind ( PythonNameBinder binder ) : void
BindReference ( PythonNameBinder binder, PythonReference reference ) : PythonVariable
CompileAssignment ( LightCompiler compiler, System.Linq.Expressions variable, Action compileValue ) : void
CreateFunctionInstructions ( LightCompiler compiler ) : void
CreateFunctionLambda ( ) : Microsoft.Scripting.Ast.LightLambdaExpression

Creates the LambdaExpression which implements the body of the function. The functions signature is either "object Function(PythonFunction, ...)" where there is one object parameter for each user defined parameter or object Function(PythonFunction, object[]) for functions which take more than PythonCallTargets.MaxArgs arguments.

CreateFunctionVariables ( ReadOnlyCollectionBuilder locals, List init ) : void
CreateParameters ( bool needsWrapperMethod, ReadOnlyCollectionBuilder locals ) : System.Linq.Expressions.ParameterExpression[]
EmitDebugFunction ( ) : bool
EnsureFunctionLambda ( ) : Microsoft.Scripting.Ast.LightLambdaExpression

Creates the LambdaExpression which is the actual function body.

ExposesLocalVariable ( PythonVariable variable ) : bool
FinishBind ( PythonNameBinder binder ) : void
FunctionDefinition ( string name, Parameter parameters, SourceUnit sourceUnit ) : System
FunctionDefinition ( string name, Parameter parameters, Statement body, SourceUnit sourceUnit ) : System
GetDelegateType ( Parameter parameters, bool wrapper, Delegate &originalTarget ) : Type

Determines delegate type for the Python function

GetLambda ( ) : Microsoft.Scripting.Ast.LightLambdaExpression
GetParentClosureTuple ( ) : Expression

Pulls the closure tuple from our function/generator which is flowed into each function call.

GetVarNames ( ) : IList
InitializeParameters ( List init, bool needsWrapperMethod, System.Linq.Expressions parameters ) : void
MakeFunctionExpression ( ) : Expression

Returns an expression which creates the function object.

RewriteBody ( IronPython.Compiler.Ast.PythonAst visitor ) : void
TryBindOuter ( ScopeStatement from, PythonReference reference, PythonVariable &variable ) : bool
Verify ( PythonNameBinder binder ) : void

Method Details

FunctionDefinition() public méthode

public FunctionDefinition ( string name, Parameter parameters ) : System
name string
parameters Parameter
Résultat System

FunctionDefinition() public méthode

public FunctionDefinition ( string name, Parameter parameters, Statement body ) : System
name string
parameters Parameter
body Statement
Résultat System

IInstructionProvider() protected méthode

protected IInstructionProvider ( LightCompiler compiler ) : void
compiler LightCompiler
Résultat void

Reduce() public méthode

public Reduce ( ) : Expression
Résultat System.Linq.Expressions.Expression

Walk() public méthode

public Walk ( IronPython.Compiler.Ast.PythonWalker walker ) : void
walker IronPython.Compiler.Ast.PythonWalker
Résultat void

Property Details

_body protected_oe property

protected Statement,IronPython.Compiler.Ast _body
Résultat Statement