wasm: use precise GC for WebAssembly (including WASI)

With a few small modifications, all the problems with `-gc=precise` in
WebAssembly seem to have been fixed.

I didn't do any performance measurements, but this is supposed to
improve GC performance.
This commit is contained in:
Ayke van Laethem
2024-10-22 15:53:57 +02:00
committed by Ron Evans
parent 24c11d4ba5
commit 0f95b4102d
6 changed files with 25 additions and 14 deletions
+3
View File
@@ -30,3 +30,6 @@ type Task struct {
// the given function and falls back to the default stack size. It is replaced
// with a load from a special section just before codegen.
func getGoroutineStackSize(fn uintptr) uintptr
//go:linkname runtime_alloc runtime.alloc
func runtime_alloc(size uintptr, layout unsafe.Pointer) unsafe.Pointer