C# Class IronPython.Compiler.ClosureExpression

Small reducable node which just fetches the value from a ClosureCell object. Like w/ global variables the compiler recognizes these on sets and turns them into assignments on the python global object.
Inheritance: Expression, IPythonVariableExpression
Show file Open project: jschementi/iron Class Usage Examples

Public Methods

Method Description
Assign ( Expression value ) : Expression

Assigns a value to the closure cell.

ClosureExpression ( Microsoft.Scripting.Ast.Ast variable, Expression closureCell, System.Linq.Expressions.ParameterExpression parameter ) : System.Linq.Expressions
Create ( ) : Expression

Creates the storage for the closure cell. If this is a closure over a parameter it captures the initial incoming parameter value.

Delete ( ) : Expression

Removes the current value from the closure cell.

Reduce ( ) : Expression

Reduces the closure cell to a read of the value stored in the cell.

Method Details

Assign() public method

Assigns a value to the closure cell.
public Assign ( Expression value ) : Expression
value Expression
return Expression

ClosureExpression() public method

public ClosureExpression ( Microsoft.Scripting.Ast.Ast variable, Expression closureCell, System.Linq.Expressions.ParameterExpression parameter ) : System.Linq.Expressions
variable Microsoft.Scripting.Ast.Ast
closureCell Expression
parameter System.Linq.Expressions.ParameterExpression
return System.Linq.Expressions

Create() public method

Creates the storage for the closure cell. If this is a closure over a parameter it captures the initial incoming parameter value.
public Create ( ) : Expression
return Expression

Delete() public method

Removes the current value from the closure cell.
public Delete ( ) : Expression
return Expression

Reduce() public method

Reduces the closure cell to a read of the value stored in the cell.
public Reduce ( ) : Expression
return Expression