Commit Graph

6 Commits

Author SHA1 Message Date
Ayke van Laethem 98d55ab070 compiler, runtime: make slice lookup panics recoverable 2025-02-26 12:57:26 +01:00
Ayke van Laethem 88d273da97 compiler, runtime: implement recoverable divide-by-zero panic
This gets the math/bits and go/constant package tests to pass.

Unfortunately, this also has a binary size impact of around 150-200
bytes in many cases. I'm a bit on the edge on whether this is worth it,
since it's mostly used for getting package tests to work. But at the
same time, having working package tests is very valuable.
2025-02-26 12:56:19 +01:00
Ayke van Laethem 31f7214156 test: make tests deterministic with -scheduler=threads 2024-12-06 11:55:34 +01:00
Ayke van Laethem aed555d858 runtime: implement Goexit
This is needed for full support for the testing package
2024-11-30 11:55:22 +01:00
Ayke van Laethem 449eefdb19 compiler: allow deferred panic
This is rare, but apparently some programs do this:

    defer panic("...")

This is emitted in the IR as a builtin function.
2024-11-01 09:11:38 +01:00
Ayke van Laethem 8d6b210c09 compiler: implement recover() built-in function 2022-06-16 07:59:21 +02:00