C# Class Jurassic.Compiler.OptimizationInfo

Represents information about one or more code generation optimizations.
Afficher le fichier Open project: paulbartrum/jurassic Class Usage Examples

Méthodes publiques

Méthode Description
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.

Private Methods

Méthode Description
GetBreakOrContinueLabelDepth ( ILLabel label ) : int

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

Method Details

EmitLongJump() public méthode

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.
Résultat void

GetBreakTarget() public méthode

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.
Résultat ILLabel

GetContinueTarget() public méthode

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.
Résultat ILLabel

GetRegExpVariable() public méthode

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.
Résultat ILLocalVariable

MarkSequencePoint() public méthode

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.
Résultat void

OptimizationInfo() public méthode

Creates a new OptimizationInfo instance.
public OptimizationInfo ( ScriptEngine engine ) : System
engine ScriptEngine The associated script engine.
Résultat System

PopBreakOrContinueInfo() public méthode

Removes the top-most break or continue information from the stack.
public PopBreakOrContinueInfo ( ) : void
Résultat void

PushBreakOrContinueInfo() public méthode

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.
Résultat void