stage2 提供sys包装 解决stage1的bug

This commit is contained in:
zzy committed 2026-09-17 17:25:55 +08:00
1 parent 5de4937637
commit 1a6df012cd
5 files changed
+178 -29

No files matched your search

+22
View File
@@ -0,0 +1,22 @@
// Expect retcode = 6
// exit.spl
// usage: type exit = @import("exit.spl"); exit.ok();
#extern(vm) fn vm_exit(code: i32);
fn now(code: i32) {
vm_exit(code);
}
fn ok() {
vm_exit(0);
}
fn fail() {
vm_exit(1);
}
fn main(): void {
now(6);
}