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

Function typeToValType

func.go:217–239  ·  view source on GitHub ↗
(ty reflect.Type)

Source from the content-addressed store, hash-verified

215}
216
217func typeToValType(ty reflect.Type) *ValType {
218 var a int32
219 if ty == reflect.TypeOf(a) {
220 return NewValType(KindI32)
221 }
222 var b int64
223 if ty == reflect.TypeOf(b) {
224 return NewValType(KindI64)
225 }
226 var c float32
227 if ty == reflect.TypeOf(c) {
228 return NewValType(KindF32)
229 }
230 var d float64
231 if ty == reflect.TypeOf(d) {
232 return NewValType(KindF64)
233 }
234 var f *Func
235 if ty == reflect.TypeOf(f) {
236 return NewValType(KindFuncref)
237 }
238 return NewValType(KindExternref)
239}
240
241//export goTrampolineWrap
242func goTrampolineWrap(

Callers 1

inferFuncTypeFunction · 0.85

Calls 1

NewValTypeFunction · 0.85

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…