MCPcopy Create free account
hub / github.com/bytecodealliance/wasmtime-go / NewValType

Function NewValType

valtype.go:51–54  ·  view source on GitHub ↗

NewValType creates a new `ValType` with the `kind` provided

(kind ValKind)

Source from the content-addressed store, hash-verified

49
50// NewValType creates a new `ValType` with the `kind` provided
51func NewValType(kind ValKind) *ValType {
52 ptr := C.wasm_valtype_new(C.wasm_valkind_t(kind))
53 return mkValType(ptr, nil)
54}
55
56func mkValType(ptr *C.wasm_valtype_t, owner interface{}) *ValType {
57 valtype := &ValType{_ptr: ptr, _owner: owner}

Callers 15

TestTableFunction · 0.85
TestGlobalFunction · 0.85
TestGlobalTypeFunction · 0.85
TestRefTypesTableFunction · 0.85
TestRefTypesGlobalFunction · 0.85
TestGlobalFinalizerFunction · 0.85
TestLinkerFunction · 0.85
TestFuncArgsFunction · 0.85
TestFuncOneRetFunction · 0.85
TestFuncWrongRetFunction · 0.85
TestFuncWrongRet2Function · 0.85
TestFuncTypeFunction · 0.85

Calls 1

mkValTypeFunction · 0.85

Tested by 15

TestTableFunction · 0.68
TestGlobalFunction · 0.68
TestGlobalTypeFunction · 0.68
TestRefTypesTableFunction · 0.68
TestRefTypesGlobalFunction · 0.68
TestGlobalFinalizerFunction · 0.68
TestLinkerFunction · 0.68
TestFuncArgsFunction · 0.68
TestFuncOneRetFunction · 0.68
TestFuncWrongRetFunction · 0.68
TestFuncWrongRet2Function · 0.68
TestFuncTypeFunction · 0.68

Used in the wild real call sites across dependent graphs

searching dependent graphs…