runtime: allow custom-gc SetFinalizer and clarify KeepAlive

This commit is contained in:
Anuraag Agrawal
2023-02-17 08:51:51 +09:00
committed by GitHub
parent e0a5fc2555
commit f6df276118
5 changed files with 19 additions and 4 deletions
+3 -4
View File
@@ -89,11 +89,10 @@ func UnlockOSThread() {
}
func KeepAlive(x interface{}) {
// Unimplemented. Only required with SetFinalizer().
}
func SetFinalizer(obj interface{}, finalizer 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.
}
var godebugUpdate func(string, string)