Holds wasm.Code as values on wasm.Module (#1243)

Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
This commit is contained in:
Takeshi Yoneda
2023-03-14 22:45:54 -07:00
committed by GitHub
parent 12e80b4bc5
commit e17a85146a
36 changed files with 302 additions and 298 deletions

View File

@@ -73,7 +73,7 @@ func NewModuleBinary(moduleName string, proxyTarget wazero.CompiledModule) []byt
body = append(body, wasm.OpcodeCall)
body = append(body, leb128.EncodeUint32(cnt)...)
body = append(body, wasm.OpcodeEnd)
proxyModule.CodeSection = append(proxyModule.CodeSection, &wasm.Code{Body: body})
proxyModule.CodeSection = append(proxyModule.CodeSection, wasm.Code{Body: body})
proxyFuncIndex := cnt + funcNum
// Assigns the same params name as the imported one.