all: support [noreturn] fn abc() { for{} }, mark panic/1 and exit/1with it too. (#10654)

This commit is contained in:
Delyan Angelov 2021-07-04 20:24:19 +03:00 committed by GitHub
parent b0b4b8e65b
commit 6aecda3be8
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
23 changed files with 318 additions and 22 deletions

View file

@ -140,6 +140,7 @@ pub fn write(fd i64, buf &byte, count u64) i64 {
return x
}
[noreturn]
fn bare_panic(msg string) {
println('V panic' + msg)
exit(1)
@ -150,6 +151,7 @@ fn bare_backtrace() string {
}
[export: 'exit']
[noreturn]
fn __exit(code int) {
sys_exit(code)
}