Bytecode Format

Artifact contract

  • Header-driven format (BC1)
  • named function sections and a MAIN section
  • explicit END terminators

Section decoding

  • comments/blank lines are ignored
  • each section has fixed semantic boundary
  • malformed boundaries should fail early

Instruction normalization

  • validate opcode family and arity
  • validate numeric and string argument shapes
  • unknown opcodes are hard errors

Strings

  • quote-aware parse
  • decode escapes, preserve raw representation on encode

Determinism

  • encode output must be stable for same AST/bytecode
  • useful for tests and caching

Practice focus

  • header and section errors
  • mixed opcode arg checks
  • comment skipping and strict structural closing
1 / 1
Use arrow keys or click edges to navigate. Press H to toggle help, F for fullscreen.