disable gc: llgo -tags nogc

This commit is contained in:
xushiwei
2024-06-08 23:06:55 +08:00
parent a057db8756
commit fb7ea7810e
11 changed files with 200 additions and 41 deletions

View File

@@ -1,27 +0,0 @@
package runtime
type errorString string
func (e errorString) RuntimeError() {}
func (e errorString) Error() string {
return "runtime error: " + string(e)
}
func AssertRuntimeError(b bool, msg string) {
if b {
panic(errorString(msg).Error())
}
}
func AssertNegativeShift(b bool) {
if b {
panic(errorString("negative shift amount").Error())
}
}
func AssertIndexRange(b bool) {
if b {
panic(errorString("index out of range").Error())
}
}