mirror of
https://github.com/odin-lang/Odin.git
synced 2026-07-22 15:32:35 +00:00
- Definition order: Module.defs records the exact type/constant/global interleaving (SPIR-V's single 'types, constants, global variables' section must be dependency-ordered -- a length constant before the array type that uses it, etc.). decode records it; encode replays it for byte-exact, spec-valid output (empty defs falls back to all-types, then -constants, then -globals). emit_one_type/constant/global factored out for the replay; no encoder alloc. - OpTypeRuntimeArray: ARRAY with len_ref == ID_NONE (vs OpTypeArray's <id> length). Tests: bool_and_array sets defs so OpConstant precedes OpTypeArray (verified in disasm); runtime_array added -> 7 passed.