code wiki / (root) / nx_nxa_gpu_wasm_gate.nx

nx_nxa_gpu_wasm_gate.nx source

↩ module page · 13 lines · 770 B

1// Cross-backend regression: compiler data semantics plus the real NXA conversion workload. 2import "nx_nxa_gpu_lib.nx" 3static wdg_value: i64 4 5func wdg_read() -> i64 { return wdg_value } 6func wdg_write(value: i64) -> i64 { wdg_value=value; return wdg_read() } 7func wdg_empty() -> i64 { let s: *u8="" as *u8; return s[0] as i64 } 8func wdg_terminated() -> i64 { let s: *u8="NXANIM01" as *u8; return s[8] as i64 } 9func wdg_literal() -> i64 { return nxa_tag4("VERT" as *u8) } 10func wdg_other_literal() -> i64 { return nxa_tag4("TRIS" as *u8) } 11func wdg_escaped() -> i64 { let s: *u8="\n\t\\\"" as *u8; return nxa_tag4(s) } 12func wdg_utf8_first() -> i64 { let s: *u8="é" as *u8; return s[0] as i64 } 13func wdg_utf8_second() -> i64 { let s: *u8="é" as *u8; return s[1] as i64 }