all: add Go 1.24 support

This commit is contained in:
Ayke van Laethem
2025-02-12 16:11:08 +01:00
committed by Ron Evans
parent 66da29e89f
commit 38e3d55e64
13 changed files with 67 additions and 33 deletions
+7
View File
@@ -0,0 +1,7 @@
package abi
type Type struct {
// Intentionally left empty. TinyGo uses a different way to represent types,
// so this is unimplementable. The type definition here is purely for
// compatibility.
}
+4
View File
@@ -271,6 +271,10 @@ func (v Value) Comparable() bool {
}
}
func (v Value) Equal(u Value) bool {
panic("unimplemented: reflect.Value.Equal")
}
func (v Value) Addr() Value {
if !v.CanAddr() {
panic("reflect.Value.Addr of unaddressable value")
+15
View File
@@ -0,0 +1,15 @@
package runtime
// Dummy implementation of synctest functions (we don't support synctest at the
// moment).
//go:linkname synctest_acquire internal/synctest.acquire
func synctest_acquire() any {
// Dummy: we don't support synctest.
return nil
}
//go:linkname synctest_release internal/synctest.release
func synctest_release(sg any) {
// Dummy: we don't support synctest.
}
+13
View File
@@ -1,5 +1,18 @@
package runtime
//go:linkname time_runtimeNano time.runtimeNano
func time_runtimeNano() int64 {
// Note: we're ignoring sync groups here (package testing/synctest).
// See: https://github.com/golang/go/issues/67434
return nanotime()
}
//go:linkname time_runtimeNow time.runtimeNow
func time_runtimeNow() (sec int64, nsec int32, mono int64) {
// Also ignoring the sync group here, like time_runtimeNano above.
return now()
}
// timerNode is an element in a linked list of timers.
type timerNode struct {
next *timerNode