aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/runtime/runtime.go
blob: 92d1a2edff666b23f7ed5f0ab0e5d9901dd13abc (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20

package runtime

const Compiler = "tgo"

func _panic(message interface{}) {
	printstring("panic: ")
	printitf(message)
	printnl()
	abort()
}

func boundsCheck(outOfRange bool) {
	if outOfRange {
		// printstring() here is safe as this function is excluded from bounds
		// checking.
		printstring("panic: runtime error: index out of range\n")
		abort()
	}
}