Interplane page as plain text, for reading tools and agents. English is the reference text: translate it with your own tool. Text in backticks and in ``` blocks (commands, fingerprints, file names) and link targets in <...> are exact: copy them, never translate them. Page: /drakestapleton/omega-mv/blob/main/seed/spirv/traps.unit.om # omega-mv Omega: a language for verified programs, semantic identity and machine realization. Seed-born work and existing implementations have distinct provenance. Brought by drakestapleton Sign in to star 1 stars 0 watching About Files History Releases Proposed changes Issues For developers branch `main` Branches Tags History `omega-mv / seed / spirv / traps.unit.om` 27 lines ยท 352 bytes Raw Blame History 1 note Nested calls must preserve the callee's first trap, not execute the caller's later trap. 2 fn failval x uint to uint 3 if eq x 0 4 trap 5 5 end 6 ret x 7 end 8 fn nestedfail x uint to uint 9 y = failval x 10 if eq y 0 11 trap 9 12 end 13 ret y 14 end 15 fn failvoid x uint to void 16 if eq x 0 17 trap 6 18 end 19 ret 20 end 21 fn nestedvoid x uint to uint 22 failvoid x 23 if eq x 0 24 trap 9 25 end 26 ret x 27 end