aboutsummaryrefslogtreecommitdiffhomepage
path: root/src/runtime/runtime.go
diff options
context:
space:
mode:
authorAnuraag Agrawal <[email protected]>2023-02-17 08:51:51 +0900
committerGitHub <[email protected]>2023-02-17 00:51:51 +0100
commitf6df2761187f1975e35eb43461d735d6e325df85 (patch)
treefd75b6995b6e8448cedd17972891881b9b70929b /src/runtime/runtime.go
parente0a5fc255522933f651a89c071ebd531ad634e7b (diff)
downloadtinygo-f6df2761187f1975e35eb43461d735d6e325df85.tar.gz
tinygo-f6df2761187f1975e35eb43461d735d6e325df85.zip
runtime: allow custom-gc SetFinalizer and clarify KeepAlive
Diffstat (limited to 'src/runtime/runtime.go')
-rw-r--r--src/runtime/runtime.go7
1 files changed, 3 insertions, 4 deletions
diff --git a/src/runtime/runtime.go b/src/runtime/runtime.go
index a9778eaeb..586a610ae 100644
--- a/src/runtime/runtime.go
+++ b/src/runtime/runtime.go
@@ -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)