public void Write(BytecodeWriter writer) { if (Operands.Count == 0) { return; } Operands[0].Write(writer); foreach (var operand in Operands.Skip(1)) { writer.Write(operand.FirstValue); operand.Write(writer); } }
private int[] GenerateBytecode(int bytecodeLength) { var writer = new BytecodeWriter(bytecodeLength); foreach (var instruction in AllInstructions()) { #if DEBUG //instruction.Print(); if (instruction.Offset != writer.Offset) { throw new InvalidOperationException("Writer is not at the correct position for instruction."); } #endif instruction.Write(writer); } return(writer.GetBuffer()); }
public void Write(BytecodeWriter writer) { _lazy.Value.Write(writer); }
public void Write(BytecodeWriter writer) => throw new NotSupportedException();
public void Write(BytecodeWriter writer) { }
public void Write(BytecodeWriter writer) => writer.Write(Id);