❯ [I] view ir { if true {echo hey} o> /dev/null } # 2 registers, 17 instructions, 12 bytes of data # 1 file used for redirection 0: load-literal %1, string("/dev/null") 1: open-file file(0), %1, append = false 2: load-literal %1, bool(true) 3: not %1 4: branch-if %1, 13 # if false 5: load-literal %1, string("hey") # label(0) 6: push-positional %1 7: redirect-out file(0) 8: redirect-err caller 9: call decl 12 "echo", %0 10: write-file file(0), %0 11: close-file file(0) 12: jump 14 # end if 13: drop %0 # label(1), from(4:) 14: write-file file(0), %0 # label(2), from(12:) 15: close-file file(0) 16: return %0 --- ❯ [I] view ir { if false {echo hey} o> /dev/null } # 2 registers, 17 instructions, 12 bytes of data # 1 file used for redirection 0: load-literal %1, string("/dev/null") 1: open-file file(0), %1, append = false 2: load-literal %1, bool(false) 3: not %1 4: branch-if %1, 13 # if false 5: load-literal %1, string("hey") # label(0) 6: push-positional %1 7: redirect-out file(0) 8: redirect-err caller 9: call decl 12 "echo", %0 10: write-file file(0), %0 11: close-file file(0) 12: jump 14 # end if 13: drop %0 # label(1), from(4:) 14: write-file file(0), %0 # label(2), from(12:) 15: close-file file(0) 16: return %0 --- ❯ [I] view ir { if true {echo hey} else {echo ho} o> /dev/null } # 2 registers, 23 instructions, 14 bytes of data # 1 file used for redirection 0: load-literal %1, string("/dev/null") 1: open-file file(0), %1, append = false 2: load-literal %1, bool(true) 3: not %1 4: branch-if %1, 13 # if false 5: load-literal %1, string("hey") # label(0) 6: push-positional %1 7: redirect-out file(0) 8: redirect-err caller 9: call decl 12 "echo", %0 10: write-file file(0), %0 11: close-file file(0) 12: jump 20 # end if 13: load-literal %1, string("ho") # label(1), from(4:) 14: push-positional %1 15: redirect-out file(0) 16: redirect-err caller 17: call decl 12 "echo", %0 18: write-file file(0), %0 19: close-file file(0) 20: write-file file(0), %0 # label(2), from(12:) 21: close-file file(0) 22: return %0 ---- ❯ [I] view ir { try { 1/0 } catch {echo ho} o> /dev/null } # 2 registers, 25 instructions, 14 bytes of data # 1 file used for redirection 0: load-literal %1, string("/dev/null") 1: open-file file(0), %1, append = false 2: on-error-into 15, %0 # try 3: load-literal %1, glob-pattern("1/0", no_expand = false) 4: push-positional %1 5: redirect-out file(0) 6: redirect-err caller 7: call decl 136 "run-external", %0 8: write-file file(0), %0 9: close-file file(0) 10: redirect-out file(0) 11: redirect-err caller 12: drain-if-end %0 13: pop-error-handler 14: jump 22 15: load-literal %1, string("ho") # label(0), from(2:) 16: push-positional %1 17: redirect-out file(0) 18: redirect-err caller 19: call decl 12 "echo", %0 20: write-file file(0), %0 21: close-file file(0) 22: write-file file(0), %0 # label(1), from(14:) 23: close-file file(0) 24: return %0