C# Class Mosa.Compiler.Framework.BaseMethodCompilerStage

Basic base class for method compiler pipeline stages
Inheritance: IMethodCompilerStage
Afficher le fichier Open project: tgiphil/MOSA-Project Class Usage Examples

Protected Properties

Свойство Type Description
instructionCount int

Méthodes publiques

Méthode Description
AddMissingBlocks ( IList blocks, bool cleanUp ) : IList
AllocateVirtualRegisterOrStackSlot ( MosaType type ) : Operand

Allocates the virtual register or stack slot.

CreateTraceLog ( string section ) : TraceLog
GetFormattedStageName ( ) : string
GetInstructionSize ( InstructionSize size, MosaType type ) : InstructionSize

Gets the size of the instruction.

GetInstructionSize ( MosaType type ) : InstructionSize

Gets the size of the instruction.

GetLoadInstruction ( MosaType type ) : BaseIRInstruction
GetMoveInstruction ( MosaType type ) : BaseIRInstruction
GetStoreInstruction ( MosaType type ) : BaseIRInstruction
IsTraceable ( ) : bool
StoreOnStack ( MosaType type ) : bool

Stores the on stack.

UpdateCounter ( string name, int count ) : void

Updates the counter.

Méthodes protégées

Méthode Description
AllocateVirtualRegister ( MosaType type ) : Operand

Allocates the virtual register.

CreateNewBlock ( ) : BasicBlock

Create an empty block.

CreateNewBlock ( int label ) : BasicBlock

Create an empty block.

CreateNewBlockContext ( ) : Context

Create an empty block.

CreateNewBlockContext ( int label ) : Context

Create an empty block.

CreateNewBlockContexts ( int blocks ) : Mosa.Compiler.Framework.Context[]

Creates empty blocks.

CreateNewBlocks ( int blocks ) : Mosa.Compiler.Framework.BasicBlock[]

Creates empty blocks.

CreateTraceLog ( ) : TraceLog
Dump ( bool before ) : void

Dumps this instance.

EmptyBlockOfAllInstructions ( BasicBlock block ) : void

Empties the block of all instructions.

FindFinallyExceptionContext ( InstructionNode node ) : MosaExceptionHandler
FindImmediateExceptionContext ( int label ) : MosaExceptionHandler
FindNextEnclosingFinallyContext ( MosaExceptionHandler exceptionContext ) : MosaExceptionHandler
Finish ( ) : void
IMethodCompilerStage ( ) : void
IMethodCompilerStage ( BaseMethodCompiler compiler ) : void

Setups the specified compiler.

IsEmptyBlockWithSingleJump ( BasicBlock block ) : bool

Determines whether [is empty block with single jump] [the specified block].

IsSourceAndTargetWithinSameTryOrException ( InstructionNode node ) : bool
NewCompilerTraceEvent ( CompilerEvent compileEvent, string message ) : void
RemoveEmptyBlockWithSingleJump ( BasicBlock block ) : void
ReplaceBranchTargets ( BasicBlock block, BasicBlock oldTarget, BasicBlock newTarget ) : void

Replaces the branch targets.

Run ( ) : void
Setup ( ) : void
Split ( InstructionNode node ) : BasicBlock

Splits the block.

Split ( Context ctx ) : Context

Splits the block.

UpdatePhiList ( BasicBlock removedBlock, BasicBlock nextBlocks ) : void

Private Methods

Méthode Description
ITraceFactory ( string section ) : TraceLog
MustSignExtendOnLoad ( MosaType source ) : bool

Determines if the load should sign extend the given source operand.

MustZeroExtendOnLoad ( MosaType source ) : bool

Determines if the load should sign extend the given source operand.

SubmitTraceLog ( TraceLog traceLog ) : void
SubmitTraceLogs ( IList traceLogs ) : void

Method Details

AddMissingBlocks() public méthode

public AddMissingBlocks ( IList blocks, bool cleanUp ) : IList
blocks IList
cleanUp bool
Résultat IList

AllocateVirtualRegister() protected méthode

Allocates the virtual register.
protected AllocateVirtualRegister ( MosaType type ) : Operand
type MosaType The type.
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

CreateNewBlock() protected méthode

Create an empty block.
protected CreateNewBlock ( ) : BasicBlock
Résultat BasicBlock

CreateNewBlock() protected méthode

Create an empty block.
protected CreateNewBlock ( int label ) : BasicBlock
label int The label.
Résultat BasicBlock

CreateNewBlockContext() protected méthode

Create an empty block.
protected CreateNewBlockContext ( ) : Context
Résultat Context

CreateNewBlockContext() protected méthode

Create an empty block.
protected CreateNewBlockContext ( int label ) : Context
label int The label.
Résultat Context

CreateNewBlockContexts() protected méthode

Creates empty blocks.
protected CreateNewBlockContexts ( int blocks ) : Mosa.Compiler.Framework.Context[]
blocks int The Blocks.
Résultat Mosa.Compiler.Framework.Context[]

CreateNewBlocks() protected méthode

Creates empty blocks.
protected CreateNewBlocks ( int blocks ) : Mosa.Compiler.Framework.BasicBlock[]
blocks int The Blocks.
Résultat Mosa.Compiler.Framework.BasicBlock[]

CreateTraceLog() protected méthode

protected CreateTraceLog ( ) : TraceLog
Résultat TraceLog

CreateTraceLog() public méthode

public CreateTraceLog ( string section ) : TraceLog
section string
Résultat TraceLog

Dump() protected méthode

Dumps this instance.
protected Dump ( bool before ) : void
before bool
Résultat void

EmptyBlockOfAllInstructions() protected méthode

Empties the block of all instructions.
protected EmptyBlockOfAllInstructions ( BasicBlock block ) : void
block BasicBlock The block.
Résultat void

FindFinallyExceptionContext() protected méthode

protected FindFinallyExceptionContext ( InstructionNode node ) : MosaExceptionHandler
node InstructionNode
Résultat Mosa.Compiler.MosaTypeSystem.MosaExceptionHandler

FindImmediateExceptionContext() protected méthode

protected FindImmediateExceptionContext ( int label ) : MosaExceptionHandler
label int
Résultat Mosa.Compiler.MosaTypeSystem.MosaExceptionHandler

FindNextEnclosingFinallyContext() protected méthode

protected FindNextEnclosingFinallyContext ( MosaExceptionHandler exceptionContext ) : MosaExceptionHandler
exceptionContext Mosa.Compiler.MosaTypeSystem.MosaExceptionHandler
Résultat Mosa.Compiler.MosaTypeSystem.MosaExceptionHandler

Finish() protected méthode

protected Finish ( ) : void
Résultat void

GetFormattedStageName() public méthode

public GetFormattedStageName ( ) : string
Résultat string

GetInstructionSize() public static méthode

Gets the size of the instruction.
public static GetInstructionSize ( InstructionSize size, MosaType type ) : InstructionSize
size InstructionSize The size.
type MosaType The type.
Résultat InstructionSize

GetInstructionSize() public static méthode

Gets the size of the instruction.
public static GetInstructionSize ( MosaType type ) : InstructionSize
type MosaType The type.
Résultat InstructionSize

GetLoadInstruction() public static méthode

public static GetLoadInstruction ( MosaType type ) : BaseIRInstruction
type MosaType
Résultat Mosa.Compiler.Framework.IR.BaseIRInstruction

GetMoveInstruction() public static méthode

public static GetMoveInstruction ( MosaType type ) : BaseIRInstruction
type MosaType
Résultat Mosa.Compiler.Framework.IR.BaseIRInstruction

GetStoreInstruction() public static méthode

public static GetStoreInstruction ( MosaType type ) : BaseIRInstruction
type MosaType
Résultat Mosa.Compiler.Framework.IR.BaseIRInstruction

IMethodCompilerStage() protected méthode

protected IMethodCompilerStage ( ) : void
Résultat void

IMethodCompilerStage() protected méthode

Setups the specified compiler.
protected IMethodCompilerStage ( BaseMethodCompiler compiler ) : void
compiler BaseMethodCompiler The compiler.
Résultat void

IsEmptyBlockWithSingleJump() protected méthode

Determines whether [is empty block with single jump] [the specified block].
protected IsEmptyBlockWithSingleJump ( BasicBlock block ) : bool
block BasicBlock The block.
Résultat bool

IsSourceAndTargetWithinSameTryOrException() protected méthode

protected IsSourceAndTargetWithinSameTryOrException ( InstructionNode node ) : bool
node InstructionNode
Résultat bool

IsTraceable() public méthode

public IsTraceable ( ) : bool
Résultat bool

NewCompilerTraceEvent() protected méthode

protected NewCompilerTraceEvent ( CompilerEvent compileEvent, string message ) : void
compileEvent CompilerEvent
message string
Résultat void

RemoveEmptyBlockWithSingleJump() protected méthode

protected RemoveEmptyBlockWithSingleJump ( BasicBlock block ) : void
block BasicBlock
Résultat void

ReplaceBranchTargets() protected méthode

Replaces the branch targets.
protected ReplaceBranchTargets ( BasicBlock block, BasicBlock oldTarget, BasicBlock newTarget ) : void
block BasicBlock The current from block.
oldTarget BasicBlock The current destination block.
newTarget BasicBlock The new target block.
Résultat void

Run() protected méthode

protected Run ( ) : void
Résultat void

Setup() protected méthode

protected Setup ( ) : void
Résultat void

Split() protected méthode

Splits the block.
protected Split ( InstructionNode node ) : BasicBlock
node InstructionNode The node.
Résultat BasicBlock

Split() protected méthode

Splits the block.
protected Split ( Context ctx ) : Context
ctx Context The context.
Résultat Context

StoreOnStack() public méthode

Stores the on stack.
public StoreOnStack ( MosaType type ) : bool
type MosaType The type.
Résultat bool

UpdateCounter() public méthode

Updates the counter.
public UpdateCounter ( string name, int count ) : void
name string The name.
count int The count.
Résultat void

UpdatePhiList() protected static méthode

protected static UpdatePhiList ( BasicBlock removedBlock, BasicBlock nextBlocks ) : void
removedBlock BasicBlock
nextBlocks BasicBlock
Résultat void

Property Details

instructionCount protected_oe property

protected int instructionCount
Résultat int