runtime: move KeepAlive/SetFinalizer to common code

We don't support these yet so let's just put them in a central location.
Once these functions are supported we can think about how to structure
the code again.
This commit is contained in:
Ayke van Laethem
2022-12-12 20:16:42 +01:00
committed by Ron Evans
parent 398c284480
commit f3d0195d35
4 changed files with 8 additions and 24 deletions
-8
View File
@@ -640,11 +640,3 @@ func dumpHeap() {
}
}
}
func KeepAlive(x interface{}) {
// Unimplemented. Only required with SetFinalizer().
}
func SetFinalizer(obj interface{}, finalizer interface{}) {
// Unimplemented.
}
-8
View File
@@ -69,14 +69,6 @@ func GC() {
// No-op.
}
func KeepAlive(x interface{}) {
// Unimplemented. Only required with SetFinalizer().
}
func SetFinalizer(obj interface{}, finalizer interface{}) {
// Unimplemented.
}
func initHeap() {
// preinit() may have moved heapStart; reset heapptr
heapptr = heapStart
-8
View File
@@ -27,14 +27,6 @@ func GC() {
// Unimplemented.
}
func KeepAlive(x interface{}) {
// Unimplemented. Only required with SetFinalizer().
}
func SetFinalizer(obj interface{}, finalizer interface{}) {
// Unimplemented.
}
func initHeap() {
// Nothing to initialize.
}
+8
View File
@@ -87,3 +87,11 @@ func LockOSThread() {
// Stub for now
func UnlockOSThread() {
}
func KeepAlive(x interface{}) {
// Unimplemented. Only required with SetFinalizer().
}
func SetFinalizer(obj interface{}, finalizer interface{}) {
// Unimplemented.
}