Implemented liveness analysis
All checks were successful
/ test (push) Successful in 15s

This commit is contained in:
Eduard Urbach 2025-07-04 19:06:47 +02:00
parent f357285045
commit 0ece1b092e
Signed by: akyoto
GPG key ID: 49226B848C78F6C8
23 changed files with 274 additions and 113 deletions

View file

@ -1,12 +0,0 @@
init() {
main.main()
exit()
}
exit() {
syscall(93, 0)
}
crash() {
syscall(93, 1)
}

View file

@ -1,12 +0,0 @@
init() {
main.main()
exit()
}
exit() {
syscall(60, 0)
}
crash() {
syscall(60, 1)
}

View file

@ -1,12 +0,0 @@
init() {
main.main()
exit()
}
exit() {
syscall(0x2000001, 0)
}
crash() {
syscall(0x2000001, 1)
}

3
lib/os/os_linux_arm.q Normal file
View file

@ -0,0 +1,3 @@
exit(code int) {
syscall(93, code)
}

3
lib/os/os_linux_x86.q Normal file
View file

@ -0,0 +1,3 @@
exit(code int) {
syscall(60, code)
}

3
lib/os/os_mac.q Normal file
View file

@ -0,0 +1,3 @@
exit(code int) {
syscall(0x2000001, code)
}

9
lib/os/os_windows.q Normal file
View file

@ -0,0 +1,9 @@
exit(code int) {
kernel32.ExitProcess(code)
}
extern {
kernel32 {
ExitProcess(code uint)
}
}

10
lib/run/run_unix.q Normal file
View file

@ -0,0 +1,10 @@
import os
init() {
main.main()
os.exit(0)
}
crash() {
os.exit(1)
}

View file

@ -1,23 +1,20 @@
import os
init() {
utf8 := 65001
kernel32.SetConsoleCP(utf8)
kernel32.SetConsoleOutputCP(utf8)
main.main()
exit()
}
exit() {
kernel32.ExitProcess(0)
os.exit(0)
}
crash() {
kernel32.ExitProcess(1)
os.exit(1)
}
extern {
kernel32 {
SetConsoleCP(cp uint)
SetConsoleOutputCP(cp uint)
ExitProcess(code uint)
}
}