wa-lang.org/wazero@v1.0.2/internal/engine/compiler/arch.go (about) 1 package compiler 2 3 import "wa-lang.org/wazero/internal/asm" 4 5 // newArchContext returns a new archContext which is architecture-specific type to be embedded in callEngine. 6 // This must be initialized in init() function in architecture-specific arch_*.go file which is guarded by build tag. 7 var newArchContext func() archContext 8 9 // nativecall is used by callEngine.execWasmFunction and the entrypoint to enter the compiled native code. 10 // codeSegment is the pointer to the initial instruction of the compiled native code. 11 // ce is "*callEngine" as uintptr. 12 // 13 // Note: this is implemented in per-arch Go assembler file. For example, arch_amd64.s implements this for amd64. 14 func nativecall(codeSegment, ce uintptr, moduleInstanceAddress uintptr) 15 16 // registerNameFn is used for debugging purpose to have register symbols in the string of runtimeValueLocation. 17 var registerNameFn func(register asm.Register) string