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.
Этот коммит содержится в:
Ayke van Laethem 2022-12-12 20:16:42 +01:00 коммит произвёл Ron Evans
родитель 398c284480
коммит f3d0195d35
4 изменённых файлов: 8 добавлений и 24 удалений

Просмотреть файл

@ -640,11 +640,3 @@ func dumpHeap() {
}
}
}
func KeepAlive(x interface{}) {
// Unimplemented. Only required with SetFinalizer().
}
func SetFinalizer(obj interface{}, finalizer interface{}) {
// Unimplemented.
}

Просмотреть файл

@ -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

Просмотреть файл

@ -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.
}

Просмотреть файл

@ -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.
}