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

Function insertFuncWrap

store.go:197–212  ·  view source on GitHub ↗
(data *storeData, callback reflect.Value)

Source from the content-addressed store, hash-verified

195}
196
197func insertFuncWrap(data *storeData, callback reflect.Value) int {
198 var idx int
199 entry := funcWrapEntry{callback}
200 if data == nil {
201 gEngineFuncLock.Lock()
202 defer gEngineFuncLock.Unlock()
203 idx = gEngineFuncWrapSlab.allocate()
204 gEngineFuncWrap[idx] = &entry
205 idx = (idx << 1)
206 } else {
207 idx = len(data.funcWrap)
208 data.funcWrap = append(data.funcWrap, entry)
209 idx = (idx << 1) | 1
210 }
211 return idx
212}
213
214func (data *storeData) getFuncWrap(idx int) *funcWrapEntry {
215 if idx&1 == 0 {

Callers 2

WrapFuncFunction · 0.85
FuncWrapMethod · 0.85

Calls 1

allocateMethod · 0.80

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…