C# Class Mono.CSharp.Switch

Inheritance: Statement
Afficher le fichier Open project: kumpera/mono Class Usage Examples

Méthodes publiques

Свойство Type Description
Elements SwitchLabel>.IDictionary
Expr Mono.CSharp.Expression
Sections List
SwitchType System.TypeSpec

Méthodes publiques

Méthode Description
DoEmitStringSwitch ( LocalTemporary value, EmitContext ec ) : void
EmitObjectInteger ( EmitContext ec, object k ) : void
Reset ( ) : void
Resolve ( BlockContext ec ) : bool
ResolveStringSwitchMap ( ResolveContext ec ) : void
Switch ( Mono.CSharp.Expression e, ExplicitBlock block, List sects, Mono.CSharp.Location l ) : System
TableSwitchEmit ( EmitContext ec, Mono.CSharp.Expression val ) : void

This method emits code for a lookup-based switch statement (non-string) Basically it groups the cases into blocks that are at least half full, and then spits out individual lookup opcodes for each block. It emits the longest blocks first, and short blocks are just handled with direct compares.

Méthodes protégées

Méthode Description
CloneTo ( CloneContext clonectx, Statement t ) : void
DoEmit ( EmitContext ec ) : void

Private Methods

Méthode Description
CheckSwitch ( ResolveContext ec ) : bool
FindSection ( SwitchLabel label ) : SwitchSection
SwitchGoverningType ( ResolveContext ec, Mono.CSharp.Expression expr ) : Mono.CSharp.Expression

Method Details

CloneTo() protected méthode

protected CloneTo ( CloneContext clonectx, Statement t ) : void
clonectx CloneContext
t Statement
Résultat void

DoEmit() protected méthode

protected DoEmit ( EmitContext ec ) : void
ec EmitContext
Résultat void

DoEmitStringSwitch() public méthode

public DoEmitStringSwitch ( LocalTemporary value, EmitContext ec ) : void
value LocalTemporary
ec EmitContext
Résultat void

EmitObjectInteger() public méthode

public EmitObjectInteger ( EmitContext ec, object k ) : void
ec EmitContext
k object
Résultat void

Reset() public static méthode

public static Reset ( ) : void
Résultat void

Resolve() public méthode

public Resolve ( BlockContext ec ) : bool
ec BlockContext
Résultat bool

ResolveStringSwitchMap() public méthode

public ResolveStringSwitchMap ( ResolveContext ec ) : void
ec ResolveContext
Résultat void

Switch() public méthode

public Switch ( Mono.CSharp.Expression e, ExplicitBlock block, List sects, Mono.CSharp.Location l ) : System
e Mono.CSharp.Expression
block ExplicitBlock
sects List
l Mono.CSharp.Location
Résultat System

TableSwitchEmit() public méthode

This method emits code for a lookup-based switch statement (non-string) Basically it groups the cases into blocks that are at least half full, and then spits out individual lookup opcodes for each block. It emits the longest blocks first, and short blocks are just handled with direct compares.
public TableSwitchEmit ( EmitContext ec, Mono.CSharp.Expression val ) : void
ec EmitContext
val Mono.CSharp.Expression
Résultat void

Property Details

Elements public_oe property

Maps constants whose type type SwitchType to their SwitchLabels.
public IDictionary Elements
Résultat SwitchLabel>.IDictionary

Expr public_oe property

public Expression,Mono.CSharp Expr
Résultat Mono.CSharp.Expression

Sections public_oe property

public List Sections
Résultat List

SwitchType public_oe property

The governing switch type
public TypeSpec,System SwitchType
Résultat System.TypeSpec