C# Class Mosa.Compiler.Framework.BaseMethodCompiler

Base class of a method compiler.
A method compiler is responsible for compiling a single function of an object. There are various classes derived from BaseMethodCompiler, which provide specific features, such as jit compilation, runtime optimized jitting and others. MethodCompilerBase instances are usually created by invoking CreateMethodCompiler on a specific compiler instance.
Inheritance: IMethodCompiler, IDisposable
Afficher le fichier Open project: tgiphil/MOSA-Project Class Usage Examples

Méthodes publiques

Свойство Type Description
ConstantZero Operand
StackFrame Operand

Méthodes publiques

Méthode Description
AddStackLocal ( MosaType type ) : Operand

Adds the stack local.

AddStackLocal ( MosaType type, bool pinned ) : Operand

Adds the stack local.

AllocateVirtualRegisterOrStackSlot ( MosaType type ) : Operand

Allocates the virtual register or stack slot.

Compile ( ) : void

Compiles the method referenced by this method compiler.

CreateVirtualRegister ( MosaType type ) : Operand

Creates a new virtual register operand.

FormatStageName ( IPipelineStage stage ) : string
GetStage ( Type stageType ) : IPipelineStage

Gets the stage.

SetLocalVariables ( IList locals ) : void

Allocates the local variable virtual registers.

SetProtectedRegions ( IList protectedRegions ) : void

Sets the protected regions.

Stop ( ) : void

Stops the method compiler.

StoreOnStack ( MosaType type ) : bool
ToString ( ) : string

Returns a System.String that represents this instance.

Méthodes protégées

Méthode Description
BaseMethodCompiler ( BaseCompiler compiler, MosaMethod method, BasicBlocks basicBlocks, int threadID ) : System

Initializes a new instance of the BaseMethodCompiler class.

BeginCompile ( ) : void

Called before the method compiler begins compiling the method.

EndCompile ( ) : void

Called after the method compiler has finished compiling the method.

EvaluateParameterOperands ( ) : void

Evaluates the parameter operands.

InitializeType ( ) : void

Initializes the type.

Private Methods

Méthode Description
LayoutParameters ( int offsetOfFirst ) : int
LayoutParameters ( ) : void
SetStackParameter ( int index, MosaType type, string name ) : Operand

Method Details

AddStackLocal() public méthode

Adds the stack local.
public AddStackLocal ( MosaType type ) : Operand
type MosaType The type.
Résultat Operand

AddStackLocal() public méthode

Adds the stack local.
public AddStackLocal ( MosaType type, bool pinned ) : Operand
type MosaType The type.
pinned bool
Résultat Operand

AllocateVirtualRegisterOrStackSlot() public méthode

Allocates the virtual register or stack slot.
public AllocateVirtualRegisterOrStackSlot ( MosaType type ) : Operand
type MosaType The type.
Résultat Operand

BaseMethodCompiler() protected méthode

Initializes a new instance of the BaseMethodCompiler class.
protected BaseMethodCompiler ( BaseCompiler compiler, MosaMethod method, BasicBlocks basicBlocks, int threadID ) : System
compiler BaseCompiler The assembly compiler.
method MosaMethod The method to compile by this instance.
basicBlocks BasicBlocks The basic blocks.
threadID int The thread identifier.
Résultat System

BeginCompile() protected méthode

Called before the method compiler begins compiling the method.
protected BeginCompile ( ) : void
Résultat void

Compile() public méthode

Compiles the method referenced by this method compiler.
public Compile ( ) : void
Résultat void

CreateVirtualRegister() public méthode

Creates a new virtual register operand.
public CreateVirtualRegister ( MosaType type ) : Operand
type MosaType The signature type of the virtual register.
Résultat Operand

EndCompile() protected méthode

Called after the method compiler has finished compiling the method.
protected EndCompile ( ) : void
Résultat void

EvaluateParameterOperands() protected méthode

Evaluates the parameter operands.
protected EvaluateParameterOperands ( ) : void
Résultat void

FormatStageName() public méthode

public FormatStageName ( IPipelineStage stage ) : string
stage IPipelineStage
Résultat string

GetStage() public méthode

Gets the stage.
public GetStage ( Type stageType ) : IPipelineStage
stageType System.Type Type of the stage.
Résultat IPipelineStage

InitializeType() protected méthode

Initializes the type.
protected InitializeType ( ) : void
Résultat void

SetLocalVariables() public méthode

Allocates the local variable virtual registers.
public SetLocalVariables ( IList locals ) : void
locals IList The locals.
Résultat void

SetProtectedRegions() public méthode

Sets the protected regions.
public SetProtectedRegions ( IList protectedRegions ) : void
protectedRegions IList The protected regions.
Résultat void

Stop() public méthode

Stops the method compiler.
public Stop ( ) : void
Résultat void

StoreOnStack() public méthode

public StoreOnStack ( MosaType type ) : bool
type MosaType
Résultat bool

ToString() public méthode

Returns a System.String that represents this instance.
public ToString ( ) : string
Résultat string

Property Details

ConstantZero public_oe property

The constant zero
public Operand ConstantZero
Résultat Operand

StackFrame public_oe property

The stack frame
public Operand StackFrame
Résultat Operand