v5 Bytecode

Module as executable artifact

  • module name, imports, exports, and init bytecode in one value
  • compile each module into deterministic unit

Module init pattern

  • ENTER_SCOPE
  • import binding
  • body lowering
  • export collection
  • MAKE_MAP N
  • DEFINE_CONST <moduleName>
  • EXIT_SCOPE

Imports

  • import m => alias defaults to m
  • import m as a => alias a
  • import bindings happen in module scope before dependent uses

Exports

  • declaration order preserved
  • zero-export modules still emit MAKE_MAP 0

Member access

  • alias.name -> LOAD alias, PUSH_STR "name", GET_INDEX
  • call on member becomes read + CALL

Determinism checks

  • stable map entry order
  • stable module init shape
  • stable bytecode diff behavior
1 / 1
Use arrow keys or click edges to navigate. Press H to toggle help, F for fullscreen.