C# Class Mosa.Compiler.Framework.BaseCodeEmitter

Base code emitter.
Inheritance: IDisposable, ICodeEmitter
Afficher le fichier Open project: tgiphil/MOSA-Project Class Usage Examples

Protected Properties

Свойство Type Description
codeStream Stream
linker Mosa.Compiler.Linker.BaseLinker
patches List

Méthodes publiques

Méthode Description
Emit ( OpcodeEncoder opcode ) : void

Emits the specified opcode.

Emit ( OpcodeEncoder opcode, Operand symbolOperand, int patchOffset, int referenceOffset ) : void
GetPosition ( int label ) : int

Gets the position.

Initialize ( string methodName, BaseLinker linker, Stream codeStream ) : void

Initializes a new instance of BaseCodeEmitter.

Label ( int label ) : void

Emits a label into the code stream.

ResolvePatches ( ) : void
Write ( byte buffer, int offset, int count ) : void

Writes the byte.

WriteByte ( byte data ) : void

Writes the byte.

Méthodes protégées

Méthode Description
AddPatch ( int label, int position ) : void
TryGetLabel ( int label, int &position ) : bool

Method Details

AddPatch() protected méthode

protected AddPatch ( int label, int position ) : void
label int
position int
Résultat void

Emit() public méthode

Emits the specified opcode.
public Emit ( OpcodeEncoder opcode ) : void
opcode OpcodeEncoder The opcode.
Résultat void

Emit() public méthode

public Emit ( OpcodeEncoder opcode, Operand symbolOperand, int patchOffset, int referenceOffset ) : void
opcode OpcodeEncoder
symbolOperand Operand
patchOffset int
referenceOffset int
Résultat void

GetPosition() public méthode

Gets the position.
public GetPosition ( int label ) : int
label int The label.
Résultat int

Initialize() public méthode

Initializes a new instance of BaseCodeEmitter.
public Initialize ( string methodName, BaseLinker linker, Stream codeStream ) : void
methodName string Name of the method.
linker Mosa.Compiler.Linker.BaseLinker The linker.
codeStream Stream The stream the machine code is written to.
Résultat void

Label() public méthode

Emits a label into the code stream.
public Label ( int label ) : void
label int The label name to emit.
Résultat void

ResolvePatches() public abstract méthode

public abstract ResolvePatches ( ) : void
Résultat void

TryGetLabel() protected méthode

protected TryGetLabel ( int label, int &position ) : bool
label int
position int
Résultat bool

Write() public méthode

Writes the byte.
public Write ( byte buffer, int offset, int count ) : void
buffer byte The buffer.
offset int The offset.
count int The count.
Résultat void

WriteByte() public méthode

Writes the byte.
public WriteByte ( byte data ) : void
data byte The data.
Résultat void

Property Details

codeStream protected_oe property

The stream used to write machine code bytes to.
protected Stream codeStream
Résultat Stream

linker protected_oe property

Holds the linker used to resolve externals.
protected BaseLinker,Mosa.Compiler.Linker linker
Résultat Mosa.Compiler.Linker.BaseLinker

patches protected_oe property

Patches we need to perform.
protected List patches
Résultat List