mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-05 19:43:44 +00:00
runtime: implement KeepAlive using inline assembly
This commit is contained in:
committed by
Ron Evans
parent
361ecf9ea4
commit
c02cc339c5
@@ -88,12 +88,9 @@ func LockOSThread() {
|
||||
func UnlockOSThread() {
|
||||
}
|
||||
|
||||
func KeepAlive(x interface{}) {
|
||||
// Unimplemented.
|
||||
// TODO: This function needs to be implemented in a way that LLVM doesn't optimize away the x
|
||||
// parameter. This will likely need either a volatile operation or calling an assembly stub
|
||||
// that simply returns.
|
||||
}
|
||||
// KeepAlive makes sure the value in the interface is alive until at least the
|
||||
// point of the call.
|
||||
func KeepAlive(x interface{})
|
||||
|
||||
var godebugUpdate func(string, string)
|
||||
|
||||
|
||||
Reference in New Issue
Block a user