libffi: support wasm32

This commit is contained in:
visualfc
2025-06-11 09:10:46 +08:00
parent 900ae67369
commit ce984d44a0
4 changed files with 6 additions and 34 deletions

View File

@@ -1,4 +1,4 @@
//go:build !amd64
//go:build !amd64 && !wasm
package ffi

View File

@@ -0,0 +1,5 @@
package ffi
const (
DefaultAbi = 2
)

View File

@@ -1,5 +1,3 @@
//go:build !wasm
package ffi
import (

View File

@@ -1,31 +0,0 @@
package ffi
import (
"unsafe"
c "github.com/goplus/llgo/runtime/internal/clite"
)
func PrepCif(cif *Cif, abi c.Uint, nargs c.Uint, rtype *Type, atype **Type) c.Uint {
panic("not implemented")
}
func PrepCifVar(cif *Cif, abi c.Uint, nfixedargs c.Uint, ntotalargs c.Uint, rtype *Type, atype **Type) c.Uint {
panic("not implemented")
}
func Call(cif *Cif, fn unsafe.Pointer, rvalue unsafe.Pointer, avalue *unsafe.Pointer) {
panic("not implemented")
}
func ClosureAlloc(code *unsafe.Pointer) unsafe.Pointer {
panic("not implemented")
}
func ClosureFree(unsafe.Pointer) {
panic("not implemented")
}
func PreClosureLoc(closure unsafe.Pointer, cif *Cif, fn ClosureFunc, userdata unsafe.Pointer, codeloc unsafe.Pointer) c.Uint {
panic("not implemented")
}