- src/interp/machine.zig: format-0 interpreter on the air64 target; checked/wrapping arithmetic, shifts, casts, aggregates, calls with a 1024-frame limit, traps as records with T0xxx codes - aji run: prints one JSON run record; exit code 4 on trap - conformance runner: `expect: run` with `result:`/`trap:`, every run executed twice and compared byte-for-byte; header keys must be single lowercase words - Phase 0 corpus: 3 accept, 19 reject, 15 run tests (41 total)
17 lines
265 B
LLVM
17 lines
265 B
LLVM
; Checked cast of 300 to u8 traps.
|
|
; expect: run
|
|
; trap: T0006
|
|
; phase: 0
|
|
; spec: docs/spec/02-types-and-values.md
|
|
module test.checked_cast
|
|
air 0
|
|
lang 0.1
|
|
features []
|
|
|
|
fn @main() -> u8
|
|
effects []
|
|
entry:
|
|
%a = const.u32 300
|
|
%b = cast.checked.u8 %a
|
|
ret %b
|