C# Class Pchp.CodeAnalysis.CodeGen.InstanceCacheHolder

Helper object emitting value of a member instance. Used to avoid repetitious evaluation of the instance in case of BoundCompoundAssignEx or Increment/Decrement.
Inheritance: IDisposable
ファイルを表示 Open project: iolevel/peachpie Class Usage Examples

Public Methods

Method Description
Dispose ( ) : void
EmitInstance ( InstanceCacheHolder holderOrNull, CodeGenerator cg, BoundExpression instance ) : TypeSymbol

Emits instance. Caches the result if holder is provided, or loads evaluated instance if holder was initialized already.

EmitInstance ( InstanceCacheHolder holderOrNull, CodeGenerator cg, Func emitter ) : TypeSymbol
EmitName ( InstanceCacheHolder holderOrNull, CodeGenerator cg, BoundExpression name ) : void

Emits name as string. Caches the result if holder is provided, or loads evaluated name if holder was initialized already.

Private Methods

Method Description
EmitInstance ( CodeGenerator cg, Func emitter ) : TypeSymbol

Emits , uses cached value if initialized already.

EmitName ( CodeGenerator cg, BoundExpression name ) : void

Emits name as string, uses cached variable.

Method Details

Dispose() public method

public Dispose ( ) : void
return void

EmitInstance() public static method

Emits instance. Caches the result if holder is provided, or loads evaluated instance if holder was initialized already.
public static EmitInstance ( InstanceCacheHolder holderOrNull, CodeGenerator cg, BoundExpression instance ) : TypeSymbol
holderOrNull InstanceCacheHolder
cg CodeGenerator
instance Pchp.CodeAnalysis.Semantics.BoundExpression
return TypeSymbol

EmitInstance() public static method

public static EmitInstance ( InstanceCacheHolder holderOrNull, CodeGenerator cg, Func emitter ) : TypeSymbol
holderOrNull InstanceCacheHolder
cg CodeGenerator
emitter Func
return TypeSymbol

EmitName() public static method

Emits name as string. Caches the result if holder is provided, or loads evaluated name if holder was initialized already.
public static EmitName ( InstanceCacheHolder holderOrNull, CodeGenerator cg, BoundExpression name ) : void
holderOrNull InstanceCacheHolder
cg CodeGenerator
name Pchp.CodeAnalysis.Semantics.BoundExpression
return void