C# Class IronPython.Compiler.CompilationMode

Show file Open project: jschementi/iron Class Usage Examples

Public Properties

Property Type Description
Collectable CompilationMode
Lookup CompilationMode
ToDisk CompilationMode
Uncollectable CompilationMode

Public Methods

Method Description
Dynamic ( DynamicMetaObjectBinder binder, Type retType, System.Linq.Expressions arg0 ) : Expression
Dynamic ( DynamicMetaObjectBinder binder, Type retType, System.Linq.Expressions arg0, System.Linq.Expressions arg1 ) : Expression
Dynamic ( DynamicMetaObjectBinder binder, Type retType, System.Linq.Expressions arg0, System.Linq.Expressions arg1, System.Linq.Expressions arg2 ) : Expression
Dynamic ( DynamicMetaObjectBinder binder, Type retType, System.Linq.Expressions arg0, System.Linq.Expressions arg1, System.Linq.Expressions arg2, System.Linq.Expressions arg3 ) : Expression
GetConstant ( object value ) : Expression
GetConstantType ( object value ) : Type
GetContext ( ) : UncollectableCompilationMode.ConstantInfo
GetGlobal ( System.Linq.Expressions globalContext, int arrayIndex, PythonVariable variable, IronPython.Compiler.PythonGlobal global ) : Expression
MakeScriptCode ( IronPython.Compiler.Ast.PythonAst ast ) : ScriptCode
PrepareScope ( IronPython.Compiler.Ast.PythonAst ast, ReadOnlyCollectionBuilder locals, List init ) : void
PublishContext ( CodeContext codeContext, UncollectableCompilationMode _contextInfo ) : void
ReduceAst ( IronPython.Compiler.Ast.PythonAst instance, string name ) : LightLambdaExpression
ReduceDynamic ( DynamicMetaObjectBinder binder, Type retType, System.Linq.Expressions arg0 ) : Expression
ReduceDynamic ( DynamicMetaObjectBinder binder, Type retType, System.Linq.Expressions arg0, System.Linq.Expressions arg1 ) : Expression
ReduceDynamic ( DynamicMetaObjectBinder binder, Type retType, System.Linq.Expressions arg0, System.Linq.Expressions arg1, System.Linq.Expressions arg2 ) : Expression
ReduceDynamic ( DynamicMetaObjectBinder binder, Type retType, System.Linq.Expressions arg0, System.Linq.Expressions arg1, System.Linq.Expressions arg2, System.Linq.Expressions arg3 ) : Expression

Method Details

Dynamic() public method

public Dynamic ( DynamicMetaObjectBinder binder, Type retType, System.Linq.Expressions arg0 ) : Expression
binder DynamicMetaObjectBinder
retType System.Type
arg0 System.Linq.Expressions
return System.Linq.Expressions.Expression

Dynamic() public method

public Dynamic ( DynamicMetaObjectBinder binder, Type retType, System.Linq.Expressions arg0, System.Linq.Expressions arg1 ) : Expression
binder DynamicMetaObjectBinder
retType System.Type
arg0 System.Linq.Expressions
arg1 System.Linq.Expressions
return System.Linq.Expressions.Expression

Dynamic() public method

public Dynamic ( DynamicMetaObjectBinder binder, Type retType, System.Linq.Expressions arg0, System.Linq.Expressions arg1, System.Linq.Expressions arg2 ) : Expression
binder DynamicMetaObjectBinder
retType System.Type
arg0 System.Linq.Expressions
arg1 System.Linq.Expressions
arg2 System.Linq.Expressions
return System.Linq.Expressions.Expression

Dynamic() public method

public Dynamic ( DynamicMetaObjectBinder binder, Type retType, System.Linq.Expressions arg0, System.Linq.Expressions arg1, System.Linq.Expressions arg2, System.Linq.Expressions arg3 ) : Expression
binder DynamicMetaObjectBinder
retType System.Type
arg0 System.Linq.Expressions
arg1 System.Linq.Expressions
arg2 System.Linq.Expressions
arg3 System.Linq.Expressions
return System.Linq.Expressions.Expression

GetConstant() public method

public GetConstant ( object value ) : Expression
value object
return System.Linq.Expressions.Expression

GetConstantType() public method

public GetConstantType ( object value ) : Type
value object
return System.Type

GetContext() public method

public GetContext ( ) : UncollectableCompilationMode.ConstantInfo
return UncollectableCompilationMode.ConstantInfo

GetGlobal() public abstract method

public abstract GetGlobal ( System.Linq.Expressions globalContext, int arrayIndex, PythonVariable variable, IronPython.Compiler.PythonGlobal global ) : Expression
globalContext System.Linq.Expressions
arrayIndex int
variable IronPython.Compiler.Ast.PythonVariable
global IronPython.Compiler.PythonGlobal
return System.Linq.Expressions.Expression

MakeScriptCode() public method

public MakeScriptCode ( IronPython.Compiler.Ast.PythonAst ast ) : ScriptCode
ast IronPython.Compiler.Ast.PythonAst
return Microsoft.Scripting.ScriptCode

PrepareScope() public method

public PrepareScope ( IronPython.Compiler.Ast.PythonAst ast, ReadOnlyCollectionBuilder locals, List init ) : void
ast IronPython.Compiler.Ast.PythonAst
locals ReadOnlyCollectionBuilder
init List
return void

PublishContext() public method

public PublishContext ( CodeContext codeContext, UncollectableCompilationMode _contextInfo ) : void
codeContext CodeContext
_contextInfo UncollectableCompilationMode
return void

ReduceAst() public abstract method

public abstract ReduceAst ( IronPython.Compiler.Ast.PythonAst instance, string name ) : LightLambdaExpression
instance IronPython.Compiler.Ast.PythonAst
name string
return LightLambdaExpression

ReduceDynamic() public method

public ReduceDynamic ( DynamicMetaObjectBinder binder, Type retType, System.Linq.Expressions arg0 ) : Expression
binder DynamicMetaObjectBinder
retType System.Type
arg0 System.Linq.Expressions
return System.Linq.Expressions.Expression

ReduceDynamic() public method

public ReduceDynamic ( DynamicMetaObjectBinder binder, Type retType, System.Linq.Expressions arg0, System.Linq.Expressions arg1 ) : Expression
binder DynamicMetaObjectBinder
retType System.Type
arg0 System.Linq.Expressions
arg1 System.Linq.Expressions
return System.Linq.Expressions.Expression

ReduceDynamic() public method

public ReduceDynamic ( DynamicMetaObjectBinder binder, Type retType, System.Linq.Expressions arg0, System.Linq.Expressions arg1, System.Linq.Expressions arg2 ) : Expression
binder DynamicMetaObjectBinder
retType System.Type
arg0 System.Linq.Expressions
arg1 System.Linq.Expressions
arg2 System.Linq.Expressions
return System.Linq.Expressions.Expression

ReduceDynamic() public method

public ReduceDynamic ( DynamicMetaObjectBinder binder, Type retType, System.Linq.Expressions arg0, System.Linq.Expressions arg1, System.Linq.Expressions arg2, System.Linq.Expressions arg3 ) : Expression
binder DynamicMetaObjectBinder
retType System.Type
arg0 System.Linq.Expressions
arg1 System.Linq.Expressions
arg2 System.Linq.Expressions
arg3 System.Linq.Expressions
return System.Linq.Expressions.Expression

Property Details

Collectable public static property

Compilation will use an array for globals. The resulting code will be fully collectible and once all references are released will be collected.
public static CompilationMode,IronPython.Compiler Collectable
return CompilationMode

Lookup public static property

Compilation will force all global accesses to do a full lookup. This will also happen for any unbound local references. This is the slowest form of code generation and is only used for exec/eval code where we can run against an arbitrary dictionary.
public static CompilationMode,IronPython.Compiler Lookup
return CompilationMode

ToDisk public static property

Compilation will proceed in a manner in which the resulting AST can be serialized to disk.
public static CompilationMode,IronPython.Compiler ToDisk
return CompilationMode

Uncollectable public static property

Compilation will use a type and declare static fields for globals. The resulting type is uncollectible and therefore extended use of this will cause memory leaks.
public static CompilationMode,IronPython.Compiler Uncollectable
return CompilationMode