Module emit

Module emit 

Source
Expand description

Bytecode emission from compiled queries.

Converts the compiled IR into the binary bytecode format. This module handles:

  • String table construction and interning
  • Type table building with field resolution
  • Cache-aligned instruction layout
  • Section assembly and header generation

Entry points:

  • emit: Emit bytecode without language linking
  • emit_linked: Emit bytecode with node type/field validation

Modules§

layout
Cache-aligned instruction layout.

Structs§

StringTableBuilder
Builds the string table, remapping query Symbols to bytecode StringIds.
TypeTableBuilder
Builds the type metadata, remapping query TypeIds to bytecode BytecodeTypeIds.

Enums§

EmitError
Error during bytecode emission.

Functions§

emit
Emit bytecode from type context only (no node validation).
emit_linked
Emit bytecode from a LinkedQuery (includes node type/field validation info).