C# Класс Jurassic.Compiler.OptimizationInfo

Represents information about one or more code generation optimizations.
Показать файл Открыть проект Примеры использования класса

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

Метод Описание
EmitLongJump ( ILGenerator generator, ILLabel targetLabel ) : void

Emits code to branch between statements, even if code generation is within a finally block (where unconditional branches are not allowed).

GetBreakTarget ( string labelName = null ) : ILLabel

Returns the break target for the statement with the given label, if one is provided, or the top-most break target otherwise.

GetContinueTarget ( string labelName = null ) : ILLabel

Returns the continue target for the statement with the given label, if one is provided, or the top-most continue target otherwise.

GetRegExpVariable ( ILGenerator generator, Jurassic.Compiler.RegularExpressionLiteral literal ) : ILLocalVariable

Retrieves a variable that can be used to store a shared instance of a regular expression.

MarkSequencePoint ( ILGenerator generator, Jurassic.Compiler.SourceCodeSpan span ) : void

Emits a sequence point, and sets the SourceSpan property.

OptimizationInfo ( ScriptEngine engine ) : System

Creates a new OptimizationInfo instance.

PopBreakOrContinueInfo ( ) : void

Removes the top-most break or continue information from the stack.

PushBreakOrContinueInfo ( IList labelNames, ILLabel breakTarget, ILLabel continueTarget, bool labelledOnly ) : void

Pushes information about break or continue targets to a stack.

Приватные методы

Метод Описание
GetBreakOrContinueLabelDepth ( ILLabel label ) : int

Searches for the given label in the break/continue stack.

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

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

Emits code to branch between statements, even if code generation is within a finally block (where unconditional branches are not allowed).
public EmitLongJump ( ILGenerator generator, ILLabel targetLabel ) : void
generator ILGenerator The generator to output the CIL to.
targetLabel ILLabel The label to jump to.
Результат void

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

Returns the break target for the statement with the given label, if one is provided, or the top-most break target otherwise.
public GetBreakTarget ( string labelName = null ) : ILLabel
labelName string The label associated with the break target. Can be /// null.
Результат ILLabel

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

Returns the continue target for the statement with the given label, if one is provided, or the top-most continue target otherwise.
public GetContinueTarget ( string labelName = null ) : ILLabel
labelName string The label associated with the continue target. Can be /// null.
Результат ILLabel

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

Retrieves a variable that can be used to store a shared instance of a regular expression.
public GetRegExpVariable ( ILGenerator generator, Jurassic.Compiler.RegularExpressionLiteral literal ) : ILLocalVariable
generator ILGenerator The IL generator used to create the variable.
literal Jurassic.Compiler.RegularExpressionLiteral The regular expression literal.
Результат ILLocalVariable

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

Emits a sequence point, and sets the SourceSpan property.
public MarkSequencePoint ( ILGenerator generator, Jurassic.Compiler.SourceCodeSpan span ) : void
generator ILGenerator The IL generator used to emit the sequence point.
span Jurassic.Compiler.SourceCodeSpan The source code span.
Результат void

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

Creates a new OptimizationInfo instance.
public OptimizationInfo ( ScriptEngine engine ) : System
engine ScriptEngine The associated script engine.
Результат System

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

Removes the top-most break or continue information from the stack.
public PopBreakOrContinueInfo ( ) : void
Результат void

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

Pushes information about break or continue targets to a stack.
public PushBreakOrContinueInfo ( IList labelNames, ILLabel breakTarget, ILLabel continueTarget, bool labelledOnly ) : void
labelNames IList The label names associated with the break or continue target. /// Can be null.
breakTarget ILLabel The IL label to jump to if a break statement is encountered.
continueTarget ILLabel The IL label to jump to if a continue statement is /// encountered. Can be null.
labelledOnly bool true if break or continue statements without a label /// should ignore this entry; false otherwise.
Результат void