mirror of
https://github.com/tinygo-org/tinygo.git
synced 2026-08-21 21:09:02 +00:00
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:
committed by
Ron Evans
parent
398c284480
commit
f3d0195d35
@@ -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.
|
// No-op.
|
||||||
}
|
}
|
||||||
|
|
||||||
func KeepAlive(x interface{}) {
|
|
||||||
// Unimplemented. Only required with SetFinalizer().
|
|
||||||
}
|
|
||||||
|
|
||||||
func SetFinalizer(obj interface{}, finalizer interface{}) {
|
|
||||||
// Unimplemented.
|
|
||||||
}
|
|
||||||
|
|
||||||
func initHeap() {
|
func initHeap() {
|
||||||
// preinit() may have moved heapStart; reset heapptr
|
// preinit() may have moved heapStart; reset heapptr
|
||||||
heapptr = heapStart
|
heapptr = heapStart
|
||||||
|
|||||||
@@ -27,14 +27,6 @@ func GC() {
|
|||||||
// Unimplemented.
|
// Unimplemented.
|
||||||
}
|
}
|
||||||
|
|
||||||
func KeepAlive(x interface{}) {
|
|
||||||
// Unimplemented. Only required with SetFinalizer().
|
|
||||||
}
|
|
||||||
|
|
||||||
func SetFinalizer(obj interface{}, finalizer interface{}) {
|
|
||||||
// Unimplemented.
|
|
||||||
}
|
|
||||||
|
|
||||||
func initHeap() {
|
func initHeap() {
|
||||||
// Nothing to initialize.
|
// Nothing to initialize.
|
||||||
}
|
}
|
||||||
|
|||||||
@@ -87,3 +87,11 @@ func LockOSThread() {
|
|||||||
// Stub for now
|
// Stub for now
|
||||||
func UnlockOSThread() {
|
func UnlockOSThread() {
|
||||||
}
|
}
|
||||||
|
|
||||||
|
func KeepAlive(x interface{}) {
|
||||||
|
// Unimplemented. Only required with SetFinalizer().
|
||||||
|
}
|
||||||
|
|
||||||
|
func SetFinalizer(obj interface{}, finalizer interface{}) {
|
||||||
|
// Unimplemented.
|
||||||
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user