anchor.diff: -///
  +/// This library implements the target architecture of the minic compiler,
  +/// consisting of the [instruction set architecture][1] and a [virtual machine]
  +/// [2] that implements these instructions.
  +///
  +/// The [VM] provides a 16-bit address space; code segment and runtime data
  +/// share 2^16B ≈ 65kB. All opcodes have a size of 4 bytes, where the two lower
  +/// bytes are reserved for one immediate argument. Because the VM has no
  +/// general-purpose registers, the instruction set is implemented as a stack
  +/// machine.
  +///
  +/// [1]: https://en.wikipedia.org/wiki/Instruction_set
  +/// [2]: https://en.wikipedia.org/wiki/Virtual_machine
   library minic.src.cmachine;
   
  +import 'dart:math' show pow;
   import '../ast.dart' show AstNode;
   import '../memory.dart';
   import '../scanner.dart' show Token;
   
  +/// This library works with a static size of 4 bytes for all opcodes.
  +const NumberType instructionSize = NumberType.uint32;
  +
  +/// If an immediate argument is encoded in an opcode, its size is 2 bytes.
  +const NumberType addressSize = NumberType.uint16;
  +
  +/// This class serves as the context to a program execution by providing the
  +/// memory to store runtime data. This includes the organizational registers and
  +/// random access memory.
  +///
  +/// The following diagram describes the structure of the memory block:
  +///
  +///          stack          -- address: stackPointer..max
  +///            ⋮
  +///     <unused segment>
  +///            ⋮
  +///          heap           -- address: codeSegmentSize..<property not implemented>
  +///            ⋮
  +///          code           -- address: 0..codeSegmentSize - 1
   class VM {
     /// Combined stack and heap in a continuous block of memory.
     ///
  
positive.code:   /// Insert value into [memory] at the specified address, encoded as the
    /// specified number type.
    void setMemoryValue(int address, NumberType numberType, num value) {
      memory.setValue(address, numberType, value);
    }
  
    /// Encode value as the specified number type, increase the stack pointer by
  
negative.code:   ///   * `null` if the implementation takes no argument
    ///   * `int` if the value can be directly resolved
    ///   * An [AstNode] if the value can't be determined at the time when this
    ///     object is created. This happens when a flow control instruction jumps
    ///     "forward", targeting an instruction with a higher address that itself.
    var immediateValue;
  
  