mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-05 11:37:46 +00:00
Add runtime support for the nRF52
This commit is contained in:
@@ -1,16 +1,13 @@
|
||||
|
||||
package runtime
|
||||
|
||||
// #include <stdlib.h>
|
||||
import "C"
|
||||
|
||||
const Compiler = "tgo"
|
||||
|
||||
func _panic(message interface{}) {
|
||||
printstring("panic: ")
|
||||
printitf(message)
|
||||
printnl()
|
||||
C.exit(1)
|
||||
abort()
|
||||
}
|
||||
|
||||
func boundsCheck(outOfRange bool) {
|
||||
@@ -18,6 +15,6 @@ func boundsCheck(outOfRange bool) {
|
||||
// printstring() here is safe as this function is excluded from bounds
|
||||
// checking.
|
||||
printstring("panic: runtime error: index out of range\n")
|
||||
C.exit(1)
|
||||
abort()
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user