github.com/tinygo-org/tinygo@v0.31.3-0.20240404173401-90b0bf646c27/src/internal/task/gc_stack_chain.go (about) 1 //go:build (gc.conservative || gc.custom || gc.precise) && tinygo.wasm 2 3 package task 4 5 import "unsafe" 6 7 //go:linkname swapStackChain runtime.swapStackChain 8 func swapStackChain(dst *unsafe.Pointer) 9 10 type gcData struct { 11 stackChain unsafe.Pointer 12 } 13 14 func (gcd *gcData) swap() { 15 swapStackChain(&gcd.stackChain) 16 }