runtime: map; llgo/ssa: MapUpdate

This commit is contained in:
xushiwei
2024-06-14 21:57:34 +08:00
parent 7a54967bee
commit 47b20b01d0
12 changed files with 491 additions and 46 deletions

View File

@@ -30,11 +30,15 @@ type (
FilePtr = unsafe.Pointer
)
type integer interface {
~int | ~uint | ~uintptr | ~int32 | ~uint32 | ~int64 | ~uint64
}
//go:linkname Str llgo.cstr
func Str(string) *Char
// llgo:link Advance llgo.advance
func Advance[PtrT any](ptr PtrT, offset int) PtrT { return ptr }
func Advance[PtrT any, I integer](ptr PtrT, offset I) PtrT { return ptr }
//go:linkname Alloca llgo.alloca
func Alloca(size uintptr) Pointer