This is the heart of Nitro. A debuggable IL stream that all nitro outputs IL into. It is essentially a wrapper for the ILGenerator class, enabling the output to be logged. It will automatically log its content by setting defining an 'ildebug' compile time variable.
Public Member Functions | |
| NitroIL (ILGenerator generator) | |
| Creates a new Nitro IL generator with the given system ILGenerator. More... | |
| void | Output (string line) |
| Outputs the given textual string to the DebugOutput variable, appending a line number. More... | |
| Label | DefineLabel () |
| Defines a label that marks a position in the IL. More... | |
| void | MarkLabel (Label label) |
| Marks the location of the given label in the IL. More... | |
| void | Emit (OpCode opcode) |
| Adds the specified instruction into the IL. More... | |
| void | Emit (OpCode opcode, LocalBuilder builder) |
| Adds the specified instruction and the local field into the IL. More... | |
| void | Emit (OpCode opcode, ConstructorInfo constructor) |
| Adds the specified instruction and the given constructor to call into the IL. More... | |
| void | Emit (OpCode opcode, MethodInfo method) |
| Adds the specified instruction and the given method to call into the IL. More... | |
| void | Emit (OpCode opcode, FieldInfo field) |
| Adds the specified instruction and the given field into the IL. More... | |
| void | Emit (OpCode opcode, byte value) |
| Adds the specified instruction and numerical argument into the IL. More... | |
| void | Emit (OpCode opcode, sbyte value) |
| Adds the specified instruction and numerical argument into the IL. More... | |
| void | Emit (OpCode opcode, double value) |
| Adds the specified instruction and numerical argument into the IL. More... | |
| void | Emit (OpCode opcode, float value) |
| Adds the specified instruction and numerical argument into the IL. More... | |
| void | Emit (OpCode opcode, short value) |
| Adds the specified instruction and numerical argument into the IL. More... | |
| void | Emit (OpCode opcode, int value) |
| Adds the specified instruction and numerical argument into the IL. More... | |
| void | Emit (OpCode opcode, long value) |
| Adds the specified instruction and numerical argument into the IL. More... | |
| void | Emit (OpCode opcode, string value) |
| Adds the specified instruction and textual argument into the IL. More... | |
| void | Emit (OpCode opcode, Type type) |
| Adds the specified instruction and system type argument into the IL. More... | |
| void | Emit (OpCode opcode, Label label) |
| Adds the specified instruction and label argument into the IL. E.g. for jump operations. More... | |
| LocalBuilder | DeclareLocal (Type localType) |
| Creates a new local variable with the specified system type. More... | |
| void | Done (string message) |
| Done is called when this IL stream is completed. When debug is active, it automatically logs the DebugOutput. More... | |
Public Attributes | |
| int | ILLine |
| If debugging is active, this is simply a counter used to track the line number. More... | |
| string | DebugOutput |
| The debugging output as a string, if debugging is active. More... | |
| ILGenerator | Generator |
| The internal ILGenerator that all IL will actually be emitted to. More... | |
|
inline |
Creates a new Nitro IL generator with the given system ILGenerator.
| generator | The system ILGenerator that this class will output all IL to. |
|
inline |
Creates a new local variable with the specified system type.
| localType | The type of the value this variable will hold. |
|
inline |
Defines a label that marks a position in the IL.
|
inline |
Done is called when this IL stream is completed. When debug is active, it automatically logs the DebugOutput.
| message | An extra message to add to the output. |
|
inline |
Adds the specified instruction into the IL.
| opcode | The instruction to add. |
|
inline |
Adds the specified instruction and the local field into the IL.
| opcode | The instruction to add. |
| builder | The local builder that should be outputted into the IL. |
|
inline |
Adds the specified instruction and the given constructor to call into the IL.
| opcode | The instruction to add. |
| constructor | The constructor info that should be outputted into the IL. |
|
inline |
Adds the specified instruction and the given method to call into the IL.
| opcode | The instruction to add. |
| method | The method info that should be outputted into the IL. |
|
inline |
Adds the specified instruction and the given field into the IL.
| opcode | The instruction to add. |
| field | The field that should be outputted into the IL. |
|
inline |
Adds the specified instruction and numerical argument into the IL.
| opcode | The instruction to add. |
| value | A numerical argument to add into the IL. |
|
inline |
Adds the specified instruction and numerical argument into the IL.
| opcode | The instruction to add. |
| value | A numerical argument to add into the IL. |
|
inline |
Adds the specified instruction and numerical argument into the IL.
| opcode | The instruction to add. |
| value | A numerical argument to add into the IL. |
|
inline |
Adds the specified instruction and numerical argument into the IL.
| opcode | The instruction to add. |
| value | A numerical argument to add into the IL. |
|
inline |
Adds the specified instruction and numerical argument into the IL.
| opcode | The instruction to add. |
| value | A numerical argument to add into the IL. |
|
inline |
Adds the specified instruction and numerical argument into the IL.
| opcode | The instruction to add. |
| value | A numerical argument to add into the IL. |
|
inline |
Adds the specified instruction and numerical argument into the IL.
| opcode | The instruction to add. |
| value | A numerical argument to add into the IL. |
|
inline |
Adds the specified instruction and textual argument into the IL.
| opcode | The instruction to add. |
| value | A textual argument to add into the IL. |
|
inline |
Adds the specified instruction and system type argument into the IL.
| opcode | The instruction to add. |
| value | A system type argument to add into the IL. |
|
inline |
Adds the specified instruction and label argument into the IL. E.g. for jump operations.
| opcode | The instruction to add. |
| value | A label argument to add into the IL. |
|
inline |
Marks the location of the given label in the IL.
| label | The label to locate. |
|
inline |
Outputs the given textual string to the DebugOutput variable, appending a line number.
| line | The line of text to add to the output. |
| string Nitro.NitroIL.DebugOutput |
The debugging output as a string, if debugging is active.
| ILGenerator Nitro.NitroIL.Generator |
The internal ILGenerator that all IL will actually be emitted to.
| int Nitro.NitroIL.ILLine |
If debugging is active, this is simply a counter used to track the line number.