mirror of
https://github.com/superseriousbusiness/gotosocial
synced 2025-06-05 21:59:39 +02:00
update go-ffmpreg to v0.3.1 (pulls in latest wazero too) (#3398)
This commit is contained in:
2
vendor/github.com/tetratelabs/wazero/internal/engine/interpreter/interpreter.go
generated
vendored
2
vendor/github.com/tetratelabs/wazero/internal/engine/interpreter/interpreter.go
generated
vendored
@ -487,7 +487,7 @@ func (e *engine) setLabelAddress(op *uint64, label label, labelAddressResolution
|
||||
}
|
||||
|
||||
// ResolveImportedFunction implements wasm.ModuleEngine.
|
||||
func (e *moduleEngine) ResolveImportedFunction(index, indexInImportedModule wasm.Index, importedModuleEngine wasm.ModuleEngine) {
|
||||
func (e *moduleEngine) ResolveImportedFunction(index, descFunc, indexInImportedModule wasm.Index, importedModuleEngine wasm.ModuleEngine) {
|
||||
imported := importedModuleEngine.(*moduleEngine)
|
||||
e.functions[index] = imported.functions[indexInImportedModule]
|
||||
}
|
||||
|
28
vendor/github.com/tetratelabs/wazero/internal/engine/wazevo/module_engine.go
generated
vendored
28
vendor/github.com/tetratelabs/wazero/internal/engine/wazevo/module_engine.go
generated
vendored
@ -237,7 +237,7 @@ func (m *moduleEngine) putLocalMemory() {
|
||||
}
|
||||
|
||||
// ResolveImportedFunction implements wasm.ModuleEngine.
|
||||
func (m *moduleEngine) ResolveImportedFunction(index, indexInImportedModule wasm.Index, importedModuleEngine wasm.ModuleEngine) {
|
||||
func (m *moduleEngine) ResolveImportedFunction(index, descFunc, indexInImportedModule wasm.Index, importedModuleEngine wasm.ModuleEngine) {
|
||||
executableOffset, moduleCtxOffset, typeIDOffset := m.parent.offsets.ImportedFunctionOffset(index)
|
||||
importedME := importedModuleEngine.(*moduleEngine)
|
||||
|
||||
@ -245,12 +245,12 @@ func (m *moduleEngine) ResolveImportedFunction(index, indexInImportedModule wasm
|
||||
indexInImportedModule -= wasm.Index(len(importedME.importedFunctions))
|
||||
} else {
|
||||
imported := &importedME.importedFunctions[indexInImportedModule]
|
||||
m.ResolveImportedFunction(index, imported.indexInModule, imported.me)
|
||||
m.ResolveImportedFunction(index, descFunc, imported.indexInModule, imported.me)
|
||||
return // Recursively resolve the imported function.
|
||||
}
|
||||
|
||||
offset := importedME.parent.functionOffsets[indexInImportedModule]
|
||||
typeID := getTypeIDOf(indexInImportedModule, importedME.module)
|
||||
typeID := m.module.TypeIDs[descFunc]
|
||||
executable := &importedME.parent.executable[offset]
|
||||
// Write functionInstance.
|
||||
binary.LittleEndian.PutUint64(m.opaque[executableOffset:], uint64(uintptr(unsafe.Pointer(executable))))
|
||||
@ -261,28 +261,6 @@ func (m *moduleEngine) ResolveImportedFunction(index, indexInImportedModule wasm
|
||||
m.importedFunctions[index] = importedFunction{me: importedME, indexInModule: indexInImportedModule}
|
||||
}
|
||||
|
||||
func getTypeIDOf(funcIndex wasm.Index, m *wasm.ModuleInstance) wasm.FunctionTypeID {
|
||||
source := m.Source
|
||||
|
||||
var typeIndex wasm.Index
|
||||
if funcIndex >= source.ImportFunctionCount {
|
||||
funcIndex -= source.ImportFunctionCount
|
||||
typeIndex = source.FunctionSection[funcIndex]
|
||||
} else {
|
||||
var cnt wasm.Index
|
||||
for i := range source.ImportSection {
|
||||
if source.ImportSection[i].Type == wasm.ExternTypeFunc {
|
||||
if cnt == funcIndex {
|
||||
typeIndex = source.ImportSection[i].DescFunc
|
||||
break
|
||||
}
|
||||
cnt++
|
||||
}
|
||||
}
|
||||
}
|
||||
return m.TypeIDs[typeIndex]
|
||||
}
|
||||
|
||||
// ResolveImportedMemory implements wasm.ModuleEngine.
|
||||
func (m *moduleEngine) ResolveImportedMemory(importedModuleEngine wasm.ModuleEngine) {
|
||||
importedME := importedModuleEngine.(*moduleEngine)
|
||||
|
Reference in New Issue
Block a user