C# Class Mosa.Compiler.Framework.InstructionNode

Datei anzeigen Open project: tgiphil/MOSA-Project Class Usage Examples

Public Methods

Method Description
AddBranchTarget ( BasicBlock block ) : void

Sets the branch target.

AddOperand ( Operand operand ) : void

Adds the operand.

Empty ( ) : void

Empties this context.

GetAdditionalOperand ( int index ) : Operand

Gets the additional operand.

GetOperand ( int opIndex ) : Operand

Gets the operand by index.

GetResult ( int index ) : Operand

Gets the result.

GoBackwardsToNonEmpty ( ) : InstructionNode

Returns the 1st non empty node (including the current) by traversing the instructions backwards

GoForwardToNonEmpty ( ) : InstructionNode

Returns the 1st non empty node (including the current) by traversing the instructions forward

Insert ( InstructionNode node ) : void
InstructionNode ( ) : System
InstructionNode ( BaseInstruction instruction ) : System

Sets the instruction.

InstructionNode ( BaseInstruction instruction, BasicBlock block ) : System

Sets the instruction.

InstructionNode ( BaseInstruction instruction, BasicBlock block1, BasicBlock block2 ) : System

Sets the instruction.

InstructionNode ( BaseInstruction instruction, ConditionCode condition ) : System

Sets the instruction.

InstructionNode ( BaseInstruction instruction, ConditionCode condition, BasicBlock block ) : System

Sets the instruction.

InstructionNode ( BaseInstruction instruction, MosaMethod target ) : System

Sets the instruction.

InstructionNode ( BaseInstruction instruction, Operand result ) : System

Sets the instruction.

InstructionNode ( BaseInstruction instruction, Operand result, Operand operand1 ) : System

Sets the instruction.

InstructionNode ( BaseInstruction instruction, bool updateStatus, Operand result ) : System

Sets the instruction.

InstructionNode ( BaseInstruction instruction, int operandCount, byte resultCount ) : System

Sets the instruction.

Replace ( InstructionNode node ) : void

Replaces the specified node with the given node, the existing node is invalid afterwards

ReplaceInstructionOnly ( BaseInstruction instruction ) : void

Replaces the instruction only.

SetAdditionalOperand ( int index, Operand operand ) : void

Sets the additional operand.

SetInstruction ( BaseInstruction instruction ) : void

Sets the instruction.

SetInstruction ( BaseInstruction instruction, BasicBlock block ) : void

Sets the instruction.

SetInstruction ( BaseInstruction instruction, BasicBlock block1, BasicBlock block2 ) : void

Sets the instruction.

SetInstruction ( BaseInstruction instruction, ConditionCode condition ) : void

Sets the instruction.

SetInstruction ( BaseInstruction instruction, ConditionCode condition, BasicBlock block ) : void

Sets the instruction.

SetInstruction ( BaseInstruction instruction, ConditionCode condition, Operand result ) : void

Sets the instruction.

SetInstruction ( BaseInstruction instruction, ConditionCode condition, Operand result, Operand operand1 ) : void

Sets the instruction.

SetInstruction ( BaseInstruction instruction, ConditionCode condition, Operand result, Operand operand1, Operand operand2 ) : void

Sets the instruction.

SetInstruction ( BaseInstruction instruction, ConditionCode condition, Operand result, Operand operand1, Operand operand2, BasicBlock block ) : void

Sets the instruction.

SetInstruction ( BaseInstruction instruction, ConditionCode condition, bool updateStatus, Operand result, Operand operand1 ) : void

Sets the instruction.

SetInstruction ( BaseInstruction instruction, ConditionCode condition, bool updateStatus, Operand result, Operand operand1, Operand operand2 ) : void

Sets the instruction.

SetInstruction ( BaseInstruction instruction, InstructionSize size, Operand result, Operand operand1 ) : void

Sets the instruction.

SetInstruction ( BaseInstruction instruction, InstructionSize size, Operand result, Operand operand1, Operand operand2 ) : void

Sets the instruction.

SetInstruction ( BaseInstruction instruction, InstructionSize size, Operand result, Operand operand1, Operand operand2, Operand operand3 ) : void

Sets the instruction.

SetInstruction ( BaseInstruction instruction, InstructionSize size, Operand result, Operand operand1, Operand operand2, Operand operand3, Operand operand4 ) : void

Sets the instruction.

SetInstruction ( BaseInstruction instruction, MosaMethod target ) : void

Sets the instruction.

SetInstruction ( BaseInstruction instruction, Operand result ) : void

Sets the instruction.

SetInstruction ( BaseInstruction instruction, Operand result, Operand operand1 ) : void

Sets the instruction.

SetInstruction ( BaseInstruction instruction, Operand result, Operand operand1, Operand operand2 ) : void

Sets the instruction.

SetInstruction ( BaseInstruction instruction, Operand result, Operand operand1, Operand operand2, Operand operand3 ) : void

Sets the instruction.

SetInstruction ( BaseInstruction instruction, Operand result, Operand operand1, Operand operand2, Operand operand3, Operand operand4 ) : void

Sets the instruction.

SetInstruction ( BaseInstruction instruction, bool updateStatus, Operand result ) : void

Sets the instruction.

SetInstruction ( BaseInstruction instruction, bool updateStatus, Operand result, Operand operand1 ) : void

Sets the instruction.

SetInstruction ( BaseInstruction instruction, bool updateStatus, Operand result, Operand operand1, Operand operand2 ) : void

Sets the instruction.

SetInstruction ( BaseInstruction instruction, int operandCount, byte resultCount ) : void

Sets the instruction.

SetInstruction2 ( BaseInstruction instruction, Operand result, Operand result2 ) : void

Sets the instruction.

SetInstruction2 ( BaseInstruction instruction, Operand result, Operand result2, Operand operand1 ) : void

Sets the instruction.

SetInstruction2 ( BaseInstruction instruction, Operand result, Operand result2, Operand operand1, Operand operand2 ) : void

Sets the instruction.

SetInstruction2 ( BaseInstruction instruction, Operand result, Operand result2, Operand operand1, Operand operand2, Operand operand3 ) : void

Sets the instruction.

SetOperand ( int index, Operand operand ) : void

Sets the operand by index.

SetResult ( int index, Operand operand ) : void

Sets the result by index.

Split ( BasicBlock newblock ) : void

Splits the node list by moving the next instructions into the new block.

ToString ( ) : string

Returns a System.String that represents this instance.

UpdateBranchTarget ( int index, BasicBlock block ) : void

Private Methods

Method Description
CheckAddition ( ) : void
Clear ( ) : void

Clears this instance.

ClearOperands ( ) : void
ReplaceOperands ( Operand target, Operand replacement ) : void
SizeAdditionalOperands ( int index ) : void

Method Details

AddBranchTarget() public method

Sets the branch target.
public AddBranchTarget ( BasicBlock block ) : void
block BasicBlock The basic block.
return void

AddOperand() public method

Adds the operand.
public AddOperand ( Operand operand ) : void
operand Operand The operand.
return void

Empty() public method

Empties this context.
public Empty ( ) : void
return void

GetAdditionalOperand() public method

Gets the additional operand.
public GetAdditionalOperand ( int index ) : Operand
index int The index.
return Operand

GetOperand() public method

Gets the operand by index.
public GetOperand ( int opIndex ) : Operand
opIndex int The index.
return Operand

GetResult() public method

Gets the result.
public GetResult ( int index ) : Operand
index int The index.
return Operand

GoBackwardsToNonEmpty() public method

Returns the 1st non empty node (including the current) by traversing the instructions backwards
public GoBackwardsToNonEmpty ( ) : InstructionNode
return InstructionNode

GoForwardToNonEmpty() public method

Returns the 1st non empty node (including the current) by traversing the instructions forward
public GoForwardToNonEmpty ( ) : InstructionNode
return InstructionNode

Insert() public method

public Insert ( InstructionNode node ) : void
node InstructionNode
return void

InstructionNode() public method

public InstructionNode ( ) : System
return System

InstructionNode() public method

Sets the instruction.
public InstructionNode ( BaseInstruction instruction ) : System
instruction BaseInstruction The instruction.
return System

InstructionNode() public method

Sets the instruction.
public InstructionNode ( BaseInstruction instruction, BasicBlock block ) : System
instruction BaseInstruction The instruction.
block BasicBlock The block.
return System

InstructionNode() public method

Sets the instruction.
public InstructionNode ( BaseInstruction instruction, BasicBlock block1, BasicBlock block2 ) : System
instruction BaseInstruction The instruction.
block1 BasicBlock The block1.
block2 BasicBlock The block2.
return System

InstructionNode() public method

Sets the instruction.
public InstructionNode ( BaseInstruction instruction, ConditionCode condition ) : System
instruction BaseInstruction The instruction.
condition ConditionCode The condition.
return System

InstructionNode() public method

Sets the instruction.
public InstructionNode ( BaseInstruction instruction, ConditionCode condition, BasicBlock block ) : System
instruction BaseInstruction The instruction.
condition ConditionCode The condition.
block BasicBlock The block.
return System

InstructionNode() public method

Sets the instruction.
public InstructionNode ( BaseInstruction instruction, MosaMethod target ) : System
instruction BaseInstruction The instruction.
target MosaMethod The target.
return System

InstructionNode() public method

Sets the instruction.
public InstructionNode ( BaseInstruction instruction, Operand result ) : System
instruction BaseInstruction The instruction.
result Operand The result.
return System

InstructionNode() public method

Sets the instruction.
public InstructionNode ( BaseInstruction instruction, Operand result, Operand operand1 ) : System
instruction BaseInstruction The instruction.
result Operand The result.
operand1 Operand The operand1.
return System

InstructionNode() public method

Sets the instruction.
public InstructionNode ( BaseInstruction instruction, bool updateStatus, Operand result ) : System
instruction BaseInstruction The instruction.
updateStatus bool if set to true [update status].
result Operand The result.
return System

InstructionNode() public method

Sets the instruction.
public InstructionNode ( BaseInstruction instruction, int operandCount, byte resultCount ) : System
instruction BaseInstruction The instruction.
operandCount int The operand count.
resultCount byte The result count.
return System

Replace() public method

Replaces the specified node with the given node, the existing node is invalid afterwards
public Replace ( InstructionNode node ) : void
node InstructionNode The node.
return void

ReplaceInstructionOnly() public method

Replaces the instruction only.
public ReplaceInstructionOnly ( BaseInstruction instruction ) : void
instruction BaseInstruction The instruction.
return void

SetAdditionalOperand() public method

Sets the additional operand.
public SetAdditionalOperand ( int index, Operand operand ) : void
index int The index.
operand Operand The operand.
return void

SetInstruction() public method

Sets the instruction.
public SetInstruction ( BaseInstruction instruction ) : void
instruction BaseInstruction The instruction.
return void

SetInstruction() public method

Sets the instruction.
public SetInstruction ( BaseInstruction instruction, BasicBlock block ) : void
instruction BaseInstruction The instruction.
block BasicBlock The block.
return void

SetInstruction() public method

Sets the instruction.
public SetInstruction ( BaseInstruction instruction, BasicBlock block1, BasicBlock block2 ) : void
instruction BaseInstruction The instruction.
block1 BasicBlock The block1.
block2 BasicBlock The block2.
return void

SetInstruction() public method

Sets the instruction.
public SetInstruction ( BaseInstruction instruction, ConditionCode condition ) : void
instruction BaseInstruction The instruction.
condition ConditionCode The condition.
return void

SetInstruction() public method

Sets the instruction.
public SetInstruction ( BaseInstruction instruction, ConditionCode condition, BasicBlock block ) : void
instruction BaseInstruction The instruction.
condition ConditionCode The condition.
block BasicBlock The block.
return void

SetInstruction() public method

Sets the instruction.
public SetInstruction ( BaseInstruction instruction, ConditionCode condition, Operand result ) : void
instruction BaseInstruction The instruction.
condition ConditionCode The condition.
result Operand The result.
return void

SetInstruction() public method

Sets the instruction.
public SetInstruction ( BaseInstruction instruction, ConditionCode condition, Operand result, Operand operand1 ) : void
instruction BaseInstruction The instruction.
condition ConditionCode The condition.
result Operand The result.
operand1 Operand The operand1.
return void

SetInstruction() public method

Sets the instruction.
public SetInstruction ( BaseInstruction instruction, ConditionCode condition, Operand result, Operand operand1, Operand operand2 ) : void
instruction BaseInstruction The instruction.
condition ConditionCode The condition.
result Operand The result.
operand1 Operand The operand1.
operand2 Operand The operand2.
return void

SetInstruction() public method

Sets the instruction.
public SetInstruction ( BaseInstruction instruction, ConditionCode condition, Operand result, Operand operand1, Operand operand2, BasicBlock block ) : void
instruction BaseInstruction The instruction.
condition ConditionCode The condition.
result Operand The result.
operand1 Operand The operand1.
operand2 Operand The operand2.
block BasicBlock The block.
return void

SetInstruction() public method

Sets the instruction.
public SetInstruction ( BaseInstruction instruction, ConditionCode condition, bool updateStatus, Operand result, Operand operand1 ) : void
instruction BaseInstruction The instruction.
condition ConditionCode The condition.
updateStatus bool if set to true [update status].
result Operand The result.
operand1 Operand The operand1.
return void

SetInstruction() public method

Sets the instruction.
public SetInstruction ( BaseInstruction instruction, ConditionCode condition, bool updateStatus, Operand result, Operand operand1, Operand operand2 ) : void
instruction BaseInstruction The instruction.
condition ConditionCode The condition.
updateStatus bool if set to true [update status].
result Operand The result.
operand1 Operand The operand1.
operand2 Operand The operand2.
return void

SetInstruction() public method

Sets the instruction.
public SetInstruction ( BaseInstruction instruction, InstructionSize size, Operand result, Operand operand1 ) : void
instruction BaseInstruction The instruction.
size InstructionSize The size.
result Operand The result.
operand1 Operand The operand1.
return void

SetInstruction() public method

Sets the instruction.
public SetInstruction ( BaseInstruction instruction, InstructionSize size, Operand result, Operand operand1, Operand operand2 ) : void
instruction BaseInstruction The instruction.
size InstructionSize The size.
result Operand The result.
operand1 Operand The operand1.
operand2 Operand The operand2.
return void

SetInstruction() public method

Sets the instruction.
public SetInstruction ( BaseInstruction instruction, InstructionSize size, Operand result, Operand operand1, Operand operand2, Operand operand3 ) : void
instruction BaseInstruction The instruction.
size InstructionSize The size.
result Operand The result.
operand1 Operand The operand1.
operand2 Operand The operand2.
operand3 Operand The operand3.
return void

SetInstruction() public method

Sets the instruction.
public SetInstruction ( BaseInstruction instruction, InstructionSize size, Operand result, Operand operand1, Operand operand2, Operand operand3, Operand operand4 ) : void
instruction BaseInstruction The instruction.
size InstructionSize The size.
result Operand The result.
operand1 Operand The operand1.
operand2 Operand The operand2.
operand3 Operand The operand3.
operand4 Operand The operand4.
return void

SetInstruction() public method

Sets the instruction.
public SetInstruction ( BaseInstruction instruction, MosaMethod target ) : void
instruction BaseInstruction The instruction.
target MosaMethod The target.
return void

SetInstruction() public method

Sets the instruction.
public SetInstruction ( BaseInstruction instruction, Operand result ) : void
instruction BaseInstruction The instruction.
result Operand The result.
return void

SetInstruction() public method

Sets the instruction.
public SetInstruction ( BaseInstruction instruction, Operand result, Operand operand1 ) : void
instruction BaseInstruction The instruction.
result Operand The result.
operand1 Operand The operand1.
return void

SetInstruction() public method

Sets the instruction.
public SetInstruction ( BaseInstruction instruction, Operand result, Operand operand1, Operand operand2 ) : void
instruction BaseInstruction The instruction.
result Operand The result.
operand1 Operand The operand1.
operand2 Operand The operand2.
return void

SetInstruction() public method

Sets the instruction.
public SetInstruction ( BaseInstruction instruction, Operand result, Operand operand1, Operand operand2, Operand operand3 ) : void
instruction BaseInstruction The instruction.
result Operand The result.
operand1 Operand The operand1.
operand2 Operand The operand2.
operand3 Operand The operand3.
return void

SetInstruction() public method

Sets the instruction.
public SetInstruction ( BaseInstruction instruction, Operand result, Operand operand1, Operand operand2, Operand operand3, Operand operand4 ) : void
instruction BaseInstruction The instruction.
result Operand The result.
operand1 Operand The operand1.
operand2 Operand The operand2.
operand3 Operand The operand3.
operand4 Operand
return void

SetInstruction() public method

Sets the instruction.
public SetInstruction ( BaseInstruction instruction, bool updateStatus, Operand result ) : void
instruction BaseInstruction The instruction.
updateStatus bool if set to true [update status].
result Operand The result.
return void

SetInstruction() public method

Sets the instruction.
public SetInstruction ( BaseInstruction instruction, bool updateStatus, Operand result, Operand operand1 ) : void
instruction BaseInstruction The instruction.
updateStatus bool
result Operand The result.
operand1 Operand The operand1.
return void

SetInstruction() public method

Sets the instruction.
public SetInstruction ( BaseInstruction instruction, bool updateStatus, Operand result, Operand operand1, Operand operand2 ) : void
instruction BaseInstruction The instruction.
updateStatus bool if set to true [update status].
result Operand The result.
operand1 Operand The operand1.
operand2 Operand The operand2.
return void

SetInstruction() public method

Sets the instruction.
public SetInstruction ( BaseInstruction instruction, int operandCount, byte resultCount ) : void
instruction BaseInstruction The instruction.
operandCount int The operand count.
resultCount byte The result count.
return void

SetInstruction2() public method

Sets the instruction.
public SetInstruction2 ( BaseInstruction instruction, Operand result, Operand result2 ) : void
instruction BaseInstruction The instruction.
result Operand The result.
result2 Operand The result2.
return void

SetInstruction2() public method

Sets the instruction.
public SetInstruction2 ( BaseInstruction instruction, Operand result, Operand result2, Operand operand1 ) : void
instruction BaseInstruction The instruction.
result Operand The result.
result2 Operand The result2.
operand1 Operand The operand1.
return void

SetInstruction2() public method

Sets the instruction.
public SetInstruction2 ( BaseInstruction instruction, Operand result, Operand result2, Operand operand1, Operand operand2 ) : void
instruction BaseInstruction The instruction.
result Operand The result.
result2 Operand The result2.
operand1 Operand The operand1.
operand2 Operand The operand2.
return void

SetInstruction2() public method

Sets the instruction.
public SetInstruction2 ( BaseInstruction instruction, Operand result, Operand result2, Operand operand1, Operand operand2, Operand operand3 ) : void
instruction BaseInstruction The instruction.
result Operand The result.
result2 Operand The result2.
operand1 Operand The operand1.
operand2 Operand The operand2.
operand3 Operand The operand3.
return void

SetOperand() public method

Sets the operand by index.
public SetOperand ( int index, Operand operand ) : void
index int The index.
operand Operand The operand.
return void

SetResult() public method

Sets the result by index.
public SetResult ( int index, Operand operand ) : void
index int The index.
operand Operand The operand.
return void

Split() public method

Splits the node list by moving the next instructions into the new block.
public Split ( BasicBlock newblock ) : void
newblock BasicBlock The newblock.
return void

ToString() public method

Returns a System.String that represents this instance.
public ToString ( ) : string
return string

UpdateBranchTarget() public method

public UpdateBranchTarget ( int index, BasicBlock block ) : void
index int
block BasicBlock
return void