Class VmState
Unveränderliche Momentaufnahme des VM-Zustands. / Immutable snapshot of VM state.
public sealed record VmState : IEquatable<VmState>
- Inheritance
-
VmState
- Implements
- Inherited Members
Constructors
VmState(int, int, int, int[], Instruction?)
Erstellt die bisherige Zustandsform. / Creates the previous state shape.
public VmState(int P, int B, int T, int[] Stack, Instruction? CurrentInstruction)
Parameters
PintBefehlszeiger. / Program counter.
BintBasiszeiger. / Base pointer.
TintStackzeiger. / Stack pointer.
Stackint[]Zu kopierender Stack. / Stack to copy.
CurrentInstructionInstruction?Nächste Instruktion. / Next instruction.
VmState(int, int, int, int[], Instruction?, int)
Erstellt einen Zustand mit Zähler. / Creates a state with a counter.
public VmState(int P, int B, int T, int[] Stack, Instruction? CurrentInstruction, int ExecutedInstructions)
Parameters
PintBefehlszeiger. / Program counter.
BintBasiszeiger. / Base pointer.
TintStackzeiger. / Stack pointer.
Stackint[]Zu kopierender Stack. / Stack to copy.
CurrentInstructionInstruction?Nächste Instruktion. / Next instruction.
ExecutedInstructionsintBegonnene Instruktionen. / Started instructions.
Fields
stack
private readonly int[] stack
Field Value
- int[]
Properties
B
Ruft B ab. / Gets B.
public int B { get; }
Property Value
BasePointer
Ruft den Basiszeiger unter beschreibendem Namen ab. / Gets the base pointer by its descriptive name.
public int BasePointer { get; }
Property Value
CurrentInstruction
Ruft die nächste Instruktion ab. / Gets the next instruction.
public Instruction? CurrentInstruction { get; }
Property Value
ExecutedInstructions
Ruft den Instruktionszähler ab. / Gets the instruction counter.
public int ExecutedInstructions { get; }
Property Value
P
Ruft P ab. / Gets P.
public int P { get; }
Property Value
ProgramCounter
Ruft den Befehlszeiger unter beschreibendem Namen ab. / Gets the program counter by its descriptive name.
public int ProgramCounter { get; }
Property Value
Stack
Ruft eine defensive Stackkopie ab. / Gets a defensive stack copy.
public int[] Stack { get; }
Property Value
- int[]
StackTop
Ruft den Stackzeiger unter beschreibendem Namen ab. / Gets the stack top by its descriptive name.
public int StackTop { get; }
Property Value
T
Ruft T ab. / Gets T.
public int T { get; }
Property Value
Methods
Deconstruct(out int, out int, out int, out int[], out Instruction?)
Zerlegt die bisherige Zustandsform. / Deconstructs the previous state shape.
public void Deconstruct(out int P, out int B, out int T, out int[] Stack, out Instruction? CurrentInstruction)
Parameters
PintBefehlszeiger. / Program counter.
BintBasiszeiger. / Base pointer.
TintStackzeiger. / Stack pointer.
Stackint[]Defensive Stackkopie. / Defensive stack copy.
CurrentInstructionInstruction?Nächste Instruktion. / Next instruction.