C# Class System.Linq.Expressions.Compiler.StackSpiller.TempMaker

Mostra file Open project: dotnet/corefx

Private Properties

Property Type Description
Free void
FreeTemp void
Mark int
Temp ParameterExpression
UseTemp ParameterExpression
VerifyTemps void

Private Methods

Method Description
Free ( int mark ) : void

Frees temporaries created since the last marking using Mark.

This is a performance optimization to lower the overall number of temporaries needed.

FreeTemp ( ParameterExpression temp ) : void

Puts the temporary variable on the free list which is used by the Temp method to reuse temporary variables.

Mark ( ) : int

Gets a watermark into the stack of used temporary variables. The returned watermark value can be passed to Free to free all variables below the watermark value, allowing them to be reused.

This is a performance optimization to lower the overall number of temporaries needed.

Temp ( Type type ) : ParameterExpression

Creates a temporary variable of the specified type.

UseTemp ( ParameterExpression temp ) : ParameterExpression

Registers the temporary variable in the stack of used temporary variables. The Mark and Free methods use a watermark index into this stack to enable recycling temporary variables in bulk.

VerifyTemps ( ) : void