C# Класс IronPython.Compiler.Ast.FunctionDefinition

Наследование: ScopeStatement
Показать файл Открыть проект Примеры использования класса

Защищенные свойства (Protected)

Свойство Тип Описание
_body Statement

Private Properties

Свойство Тип Описание
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

Открытые методы

Метод Описание
FunctionDefinition ( string name, Parameter parameters ) : System
FunctionDefinition ( string name, Parameter parameters, Statement body ) : System
Reduce ( ) : Expression
Walk ( IronPython.Compiler.Ast.PythonWalker walker ) : void

Защищенные методы

Метод Описание
IInstructionProvider ( LightCompiler compiler ) : void

Приватные методы

Метод Описание
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

Описание методов

FunctionDefinition() публичный Метод

public FunctionDefinition ( string name, Parameter parameters ) : System
name string
parameters Parameter
Результат System

FunctionDefinition() публичный Метод

public FunctionDefinition ( string name, Parameter parameters, Statement body ) : System
name string
parameters Parameter
body Statement
Результат System

IInstructionProvider() защищенный Метод

protected IInstructionProvider ( LightCompiler compiler ) : void
compiler LightCompiler
Результат void

Reduce() публичный Метод

public Reduce ( ) : Expression
Результат System.Linq.Expressions.Expression

Walk() публичный Метод

public Walk ( IronPython.Compiler.Ast.PythonWalker walker ) : void
walker IronPython.Compiler.Ast.PythonWalker
Результат void

Описание свойств

_body защищенное свойство

protected Statement,IronPython.Compiler.Ast _body
Результат Statement