pigmeo-compiler : Pigmeo.Compiler.BackendPIC14 Namespace

CompileToAsm.CompiledStaticFunction Class

Represents a function/method already compiled into assembly language

public class CompileToAsm.CompiledStaticFunction


Remarks

To be added.

Members

See Also: Inherited members from object.

Constructors

Fields

OriginalMethod
readonly
Mono.Cecil.MethodDefinition . The original MethodDefinition of this function

Protected Fields

_pos
int . To be added.
instr
System.Collections.Generic.Dictionary<System.Int32,Mono.Cecil.Cil.Instruction> . A collection of instructions containing from the current instruction to the end of the method's body. instr[0] is the current instruction, instr[1] is the next instruction, instr[2] follows instr[1] and so on

Properties

AsmCode [read-only]
Asm . Gets the compiled code of this funcion
AsmName [read-only]
string . Normalized name of the function that will be used to call it in assembly language

Protected Properties

pos
int . The current position when parsing the instructions of the method

Protected Methods

Compile ()
Compiles this method to assembly language
CopyRegister (Mono.Cecil.Cil.Instruction, Mono.Cecil.Cil.Instruction) : System.Collections.Generic.List<Pigmeo.Compiler.BackendPIC14.AsmInstruction>
Copies a static variable to another static variable
DecrStatVar (Mono.Cecil.Cil.Instruction, Mono.Cecil.Cil.Instruction) : System.Collections.Generic.List<Pigmeo.Compiler.BackendPIC14.AsmInstruction>
Decrements a static variable by a constant
GetAsmLabel (Mono.Cecil.Cil.Instruction) : string
Gets the label of an assembly language instruction based on the position of the first CIL instruction in the block of instruction from where it was generated
IncrStatVar (Mono.Cecil.Cil.Instruction, Mono.Cecil.Cil.Instruction) : System.Collections.Generic.List<Pigmeo.Compiler.BackendPIC14.AsmInstruction>
Increments a static variable by a constant
IncrStatVarWOvrflwChck (Mono.Cecil.Cil.Instruction, Mono.Cecil.Cil.Instruction) : System.Collections.Generic.List<Pigmeo.Compiler.BackendPIC14.AsmInstruction>
Increments a static variable and then checks if it overflowed
StoreCnstInStatVar (Mono.Cecil.Cil.Instruction, Mono.Cecil.Cil.Instruction) : System.Collections.Generic.List<Pigmeo.Compiler.BackendPIC14.AsmInstruction>
A constant must be stored in a registers. It is a 'ldc' followed by a stsfld

Member Details

CompileToAsm.CompiledStaticFunction Constructor

public CompileToAsm.CompiledStaticFunction (Mono.Cecil.MethodDefinition method)

To be added.

Parameters

method
To be added.

Remarks

To be added.

Required Assembly Versions:

  • pigmeo-compiler 0.0.0.0

_pos Field

protected int _pos

To be added.

Remarks

To be added.

Required Assembly Versions:

  • pigmeo-compiler 0.0.0.0

AsmCode Property

public Asm AsmCode { get; }

Gets the compiled code of this funcion

Value

To be added.

Remarks

To be added.

Required Assembly Versions:

  • pigmeo-compiler 0.0.0.0

AsmName Property

public string AsmName { get; }

Normalized name of the function that will be used to call it in assembly language

Value

To be added.

Remarks

To be added.

Required Assembly Versions:

  • pigmeo-compiler 0.0.0.0

Compile Method

protected void Compile ()

Compiles this method to assembly language

Remarks

To be added.

Required Assembly Versions:

  • pigmeo-compiler 0.0.0.0

CopyRegister Method

Copies a static variable to another static variable

Parameters

origin
Origin static variable
dest
Destination static variable

Returns

To be added.

Remarks

To be added.

Required Assembly Versions:

  • pigmeo-compiler 0.0.0.0

DecrStatVar Method

Decrements a static variable by a constant

Parameters

LoadVar
Instruction which loads the current value
LdcInstr
Instruction which loads a constant on top of the stack and will be substracted from the variable

Returns

To be added.

Remarks

To be added.

Required Assembly Versions:

  • pigmeo-compiler 0.0.0.0

GetAsmLabel Method

protected string GetAsmLabel (Mono.Cecil.Cil.Instruction instr)

Gets the label of an assembly language instruction based on the position of the first CIL instruction in the block of instruction from where it was generated

Parameters

instr
Original CIL instruction

Returns

To be added.

Remarks

To be added.

Required Assembly Versions:

  • pigmeo-compiler 0.0.0.0

IncrStatVar Method

Increments a static variable by a constant

Parameters

LoadVar
Instruction which loads the current value
LdcInstr
Instruction which loads a constant on top of the stack and will be added to the variable

Returns

To be added.

Remarks

To be added.

Required Assembly Versions:

  • pigmeo-compiler 0.0.0.0

IncrStatVarWOvrflwChck Method

Increments a static variable and then checks if it overflowed

Parameters

LoadVar
Instruction which loads the current value
LdcInstr
Instruction which loads a constant on top of the stack and will be added to the variable

Returns

To be added.

Remarks

To be added.

Required Assembly Versions:

  • pigmeo-compiler 0.0.0.0

instr Field

A collection of instructions containing from the current instruction to the end of the method's body. instr[0] is the current instruction, instr[1] is the next instruction, instr[2] follows instr[1] and so on

Remarks

To be added.

Required Assembly Versions:

  • pigmeo-compiler 0.0.0.0

OriginalMethod Field

public readonly Mono.Cecil.MethodDefinition OriginalMethod

The original MethodDefinition of this function

Remarks

To be added.

Required Assembly Versions:

  • pigmeo-compiler 0.0.0.0

pos Property

protected int pos { set; get; }

The current position when parsing the instructions of the method

Value

To be added.

Remarks

To be added.

Required Assembly Versions:

  • pigmeo-compiler 0.0.0.0

StoreCnstInStatVar Method

A constant must be stored in a registers. It is a 'ldc' followed by a stsfld

Parameters

ldc
To be added.
stsfld
To be added.

Returns

To be added.

Remarks

To be added.

Required Assembly Versions:

  • pigmeo-compiler 0.0.0.0