C# Class Mono.CSharp.LocalTemporary

An Expression to hold a temporary value.
The LocalTemporary class is used to hold temporary values of a given type to "simulate" the expression semantics. The local variable is never captured. The local temporary is used to alter the normal flow of code generation basically it creates a local variable, and its emit instruction generates code to access this value, return its address or save its value. If `is_address' is true, then the value that we store is the address to the real value, and not the value itself. This is needed for a value type, because otherwise you just end up making a copy of the value on the stack and modifying it. You really need a pointer to the origional value so that you can modify it in that location. This Does not happen with a class because a class is a pointer -- so you always get the indirection.
Inheritance: Mono.CSharp.Expression, IMemoryLocation, IAssignMethod
ファイルを表示 Open project: runefs/Marvin Class Usage Examples

Public Methods

Method Description
AddressOf ( EmitContext ec, AddressOp mode ) : void
ContainsEmitWithAwait ( ) : bool
CreateExpressionTree ( ResolveContext ec ) : Mono.CSharp.Expression
DoResolveLValue ( ResolveContext ec, Mono.CSharp.Expression right_side ) : Mono.CSharp.Expression
Emit ( EmitContext ec ) : void
Emit ( EmitContext ec, bool leave_copy ) : void
EmitAssign ( EmitContext ec, Mono.CSharp.Expression source, bool leave_copy, bool isCompound ) : void
LocalTemporary ( LocalBuilder b, System.TypeSpec t ) : System
LocalTemporary ( System.TypeSpec t ) : System
Release ( EmitContext ec ) : void
Store ( EmitContext ec ) : void

Protected Methods

Method Description
DoResolve ( ResolveContext ec ) : Mono.CSharp.Expression

Method Details

AddressOf() public method

public AddressOf ( EmitContext ec, AddressOp mode ) : void
ec EmitContext
mode AddressOp
return void

ContainsEmitWithAwait() public method

public ContainsEmitWithAwait ( ) : bool
return bool

CreateExpressionTree() public method

public CreateExpressionTree ( ResolveContext ec ) : Mono.CSharp.Expression
ec ResolveContext
return Mono.CSharp.Expression

DoResolve() protected method

protected DoResolve ( ResolveContext ec ) : Mono.CSharp.Expression
ec ResolveContext
return Mono.CSharp.Expression

DoResolveLValue() public method

public DoResolveLValue ( ResolveContext ec, Mono.CSharp.Expression right_side ) : Mono.CSharp.Expression
ec ResolveContext
right_side Mono.CSharp.Expression
return Mono.CSharp.Expression

Emit() public method

public Emit ( EmitContext ec ) : void
ec EmitContext
return void

Emit() public method

public Emit ( EmitContext ec, bool leave_copy ) : void
ec EmitContext
leave_copy bool
return void

EmitAssign() public method

public EmitAssign ( EmitContext ec, Mono.CSharp.Expression source, bool leave_copy, bool isCompound ) : void
ec EmitContext
source Mono.CSharp.Expression
leave_copy bool
isCompound bool
return void

LocalTemporary() public method

public LocalTemporary ( LocalBuilder b, System.TypeSpec t ) : System
b System.Reflection.Emit.LocalBuilder
t System.TypeSpec
return System

LocalTemporary() public method

public LocalTemporary ( System.TypeSpec t ) : System
t System.TypeSpec
return System

Release() public method

public Release ( EmitContext ec ) : void
ec EmitContext
return void

Store() public method

public Store ( EmitContext ec ) : void
ec EmitContext
return void