C# Класс 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.
Наследование: Mono.CSharp.Expression, IMemoryLocation, IAssignMethod
Показать файл Открыть проект Примеры использования класса

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

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

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

Метод Описание
DoResolve ( ResolveContext ec ) : Mono.CSharp.Expression

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

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

public AddressOf ( EmitContext ec, AddressOp mode ) : void
ec EmitContext
mode AddressOp
Результат void

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

public ContainsEmitWithAwait ( ) : bool
Результат bool

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

public CreateExpressionTree ( ResolveContext ec ) : Mono.CSharp.Expression
ec ResolveContext
Результат Mono.CSharp.Expression

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

protected DoResolve ( ResolveContext ec ) : Mono.CSharp.Expression
ec ResolveContext
Результат Mono.CSharp.Expression

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

public DoResolveLValue ( ResolveContext ec, Mono.CSharp.Expression right_side ) : Mono.CSharp.Expression
ec ResolveContext
right_side Mono.CSharp.Expression
Результат Mono.CSharp.Expression

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

public Emit ( EmitContext ec ) : void
ec EmitContext
Результат void

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

public Emit ( EmitContext ec, bool leave_copy ) : void
ec EmitContext
leave_copy bool
Результат void

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

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
Результат void

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

public LocalTemporary ( LocalBuilder b, System.TypeSpec t ) : System
b System.Reflection.Emit.LocalBuilder
t System.TypeSpec
Результат System

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

public LocalTemporary ( System.TypeSpec t ) : System
t System.TypeSpec
Результат System

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

public Release ( EmitContext ec ) : void
ec EmitContext
Результат void

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

public Store ( EmitContext ec ) : void
ec EmitContext
Результат void