C# Class Mono.CSharp.EmitContext

An Emit Context is created for each body of code (from methods, properties bodies, indexer bodies or constructor bodies)
Inheritance: BuilderContext
Afficher le fichier Open project: kumpera/mono Class Usage Examples

Méthodes publiques

Свойство Type Description
CurrentAnonymousMethod AnonymousExpression
DefaultTarget System.Reflection.Emit.Label
HasReturnLabel bool
LoopBegin System.Reflection.Emit.Label
MemberContext IMemberContext
ReturnLabel System.Reflection.Emit.Label
Switch Switch
ig System.Reflection.Emit.ILGenerator
return_value System.Reflection.Emit.LocalBuilder

Private Properties

Свойство Type Description

Méthodes publiques

Méthode Description
BeginCatchBlock ( System.TypeSpec type ) : void
BeginExceptionBlock ( ) : void
BeginFinallyBlock ( ) : void
BeginScope ( ) : void
CreateDynamicSite ( ) : DynamicSiteClass
DeclareLocal ( System.TypeSpec type, bool pinned ) : LocalBuilder
DefineLabel ( ) : Label
DefineLocalVariable ( string name, LocalBuilder builder ) : void
Emit ( OpCode opcode ) : void
Emit ( OpCode opcode, FieldSpec field ) : void
Emit ( OpCode opcode, Label label ) : void
Emit ( OpCode opcode, LocalBuilder local ) : void
Emit ( OpCode opcode, MethodInfo method ) : void
Emit ( OpCode opcode, MethodSpec method ) : void
Emit ( OpCode opcode, MethodSpec method, Type vargs ) : void
Emit ( OpCode opcode, System.TypeSpec type ) : void
Emit ( OpCode opcode, byte arg ) : void
Emit ( OpCode opcode, double arg ) : void
Emit ( OpCode opcode, float arg ) : void
Emit ( OpCode opcode, int arg ) : void
Emit ( OpCode opcode, string arg ) : void
EmitArrayAddress ( ArrayContainer ac ) : void
EmitArrayLoad ( ArrayContainer ac ) : void
EmitArrayNew ( ArrayContainer ac ) : void
EmitArrayStore ( ArrayContainer ac ) : void
EmitContext ( IMemberContext rc, ILGenerator ig, System.TypeSpec return_type ) : System
EmitInt ( int i ) : void
EmitLoadFromPtr ( System.TypeSpec t ) : void
EmitLong ( long l ) : void
EmitStoreFromPtr ( System.TypeSpec type ) : void
EndExceptionBlock ( ) : void
EndScope ( ) : void
FreeTemporaryLocal ( LocalBuilder b, System.TypeSpec t ) : void
GetTemporaryLocal ( System.TypeSpec t ) : LocalBuilder

Returns a temporary storage for a variable of type t as a local variable in the current body.

Mark ( Mono.CSharp.Location loc ) : void

This is called immediately before emitting an IL opcode to tell the symbol writer to which source line this opcode belongs.

MarkLabel ( Label label ) : void
TemporaryReturn ( ) : LocalBuilder

ReturnValue creates on demand the LocalBuilder for the return value from the function. By default this is not used. This is only required when returns are found inside Try or Catch statements. This method is typically invoked from the Emit phase, so we allow the creation of a return label if it was not requested during the resolution phase. Could be cleaned up, but it would replicate a lot of logic in the Emit phase of the code that uses it.

Method Details

BeginCatchBlock() public méthode

public BeginCatchBlock ( System.TypeSpec type ) : void
type System.TypeSpec
Résultat void

BeginExceptionBlock() public méthode

public BeginExceptionBlock ( ) : void
Résultat void

BeginFinallyBlock() public méthode

public BeginFinallyBlock ( ) : void
Résultat void

BeginScope() public méthode

public BeginScope ( ) : void
Résultat void

CreateDynamicSite() public méthode

public CreateDynamicSite ( ) : DynamicSiteClass
Résultat DynamicSiteClass

DeclareLocal() public méthode

public DeclareLocal ( System.TypeSpec type, bool pinned ) : LocalBuilder
type System.TypeSpec
pinned bool
Résultat System.Reflection.Emit.LocalBuilder

DefineLabel() public méthode

public DefineLabel ( ) : Label
Résultat System.Reflection.Emit.Label

DefineLocalVariable() public méthode

public DefineLocalVariable ( string name, LocalBuilder builder ) : void
name string
builder System.Reflection.Emit.LocalBuilder
Résultat void

Emit() public méthode

public Emit ( OpCode opcode ) : void
opcode OpCode
Résultat void

Emit() public méthode

public Emit ( OpCode opcode, FieldSpec field ) : void
opcode OpCode
field FieldSpec
Résultat void

Emit() public méthode

public Emit ( OpCode opcode, Label label ) : void
opcode OpCode
label System.Reflection.Emit.Label
Résultat void

Emit() public méthode

public Emit ( OpCode opcode, LocalBuilder local ) : void
opcode OpCode
local System.Reflection.Emit.LocalBuilder
Résultat void

Emit() public méthode

public Emit ( OpCode opcode, MethodInfo method ) : void
opcode OpCode
method MethodInfo
Résultat void

Emit() public méthode

public Emit ( OpCode opcode, MethodSpec method ) : void
opcode OpCode
method MethodSpec
Résultat void

Emit() public méthode

public Emit ( OpCode opcode, MethodSpec method, Type vargs ) : void
opcode OpCode
method MethodSpec
vargs IKVM.Reflection.Type
Résultat void

Emit() public méthode

public Emit ( OpCode opcode, System.TypeSpec type ) : void
opcode OpCode
type System.TypeSpec
Résultat void

Emit() public méthode

public Emit ( OpCode opcode, byte arg ) : void
opcode OpCode
arg byte
Résultat void

Emit() public méthode

public Emit ( OpCode opcode, double arg ) : void
opcode OpCode
arg double
Résultat void

Emit() public méthode

public Emit ( OpCode opcode, float arg ) : void
opcode OpCode
arg float
Résultat void

Emit() public méthode

public Emit ( OpCode opcode, int arg ) : void
opcode OpCode
arg int
Résultat void

Emit() public méthode

public Emit ( OpCode opcode, string arg ) : void
opcode OpCode
arg string
Résultat void

EmitArrayAddress() public méthode

public EmitArrayAddress ( ArrayContainer ac ) : void
ac ArrayContainer
Résultat void

EmitArrayLoad() public méthode

public EmitArrayLoad ( ArrayContainer ac ) : void
ac ArrayContainer
Résultat void

EmitArrayNew() public méthode

public EmitArrayNew ( ArrayContainer ac ) : void
ac ArrayContainer
Résultat void

EmitArrayStore() public méthode

public EmitArrayStore ( ArrayContainer ac ) : void
ac ArrayContainer
Résultat void

EmitContext() public méthode

public EmitContext ( IMemberContext rc, ILGenerator ig, System.TypeSpec return_type ) : System
rc IMemberContext
ig System.Reflection.Emit.ILGenerator
return_type System.TypeSpec
Résultat System

EmitInt() public méthode

public EmitInt ( int i ) : void
i int
Résultat void

EmitLoadFromPtr() public méthode

public EmitLoadFromPtr ( System.TypeSpec t ) : void
t System.TypeSpec
Résultat void

EmitLong() public méthode

public EmitLong ( long l ) : void
l long
Résultat void

EmitStoreFromPtr() public méthode

public EmitStoreFromPtr ( System.TypeSpec type ) : void
type System.TypeSpec
Résultat void

EndExceptionBlock() public méthode

public EndExceptionBlock ( ) : void
Résultat void

EndScope() public méthode

public EndScope ( ) : void
Résultat void

FreeTemporaryLocal() public méthode

public FreeTemporaryLocal ( LocalBuilder b, System.TypeSpec t ) : void
b System.Reflection.Emit.LocalBuilder
t System.TypeSpec
Résultat void

GetTemporaryLocal() public méthode

Returns a temporary storage for a variable of type t as a local variable in the current body.
public GetTemporaryLocal ( System.TypeSpec t ) : LocalBuilder
t System.TypeSpec
Résultat System.Reflection.Emit.LocalBuilder

Mark() public méthode

This is called immediately before emitting an IL opcode to tell the symbol writer to which source line this opcode belongs.
public Mark ( Mono.CSharp.Location loc ) : void
loc Mono.CSharp.Location
Résultat void

MarkLabel() public méthode

public MarkLabel ( Label label ) : void
label System.Reflection.Emit.Label
Résultat void

TemporaryReturn() public méthode

ReturnValue creates on demand the LocalBuilder for the return value from the function. By default this is not used. This is only required when returns are found inside Try or Catch statements. This method is typically invoked from the Emit phase, so we allow the creation of a return label if it was not requested during the resolution phase. Could be cleaned up, but it would replicate a lot of logic in the Emit phase of the code that uses it.
public TemporaryReturn ( ) : LocalBuilder
Résultat System.Reflection.Emit.LocalBuilder

Property Details

CurrentAnonymousMethod public_oe property

Whether we are inside an anonymous method.
public AnonymousExpression,Mono.CSharp CurrentAnonymousMethod
Résultat AnonymousExpression

DefaultTarget public_oe property

Default target in a switch statement. Only valid if InSwitch is true
public Label,System.Reflection.Emit DefaultTarget
Résultat System.Reflection.Emit.Label

HasReturnLabel public_oe property

If we already defined the ReturnLabel
public bool HasReturnLabel
Résultat bool

LoopBegin public_oe property

Current loop begin and end labels.
public Label,System.Reflection.Emit LoopBegin
Résultat System.Reflection.Emit.Label

MemberContext public_oe property

public IMemberContext MemberContext
Résultat IMemberContext

ReturnLabel public_oe property

The location where return has to jump to return the value
public Label,System.Reflection.Emit ReturnLabel
Résultat System.Reflection.Emit.Label

Switch public_oe property

If this is non-null, points to the current switch statement
public Switch Switch
Résultat Switch

ig public_oe property

public ILGenerator,System.Reflection.Emit ig
Résultat System.Reflection.Emit.ILGenerator

return_value public_oe property

The location where we store the return value.
public LocalBuilder,System.Reflection.Emit return_value
Résultat System.Reflection.Emit.LocalBuilder