wazeroir: reuses allocated slices for a module (#1342)

Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
This commit is contained in:
Takeshi Yoneda
2023-04-05 04:26:44 -07:00
committed by GitHub
parent 0dc152d672
commit cc28399052
29 changed files with 631 additions and 725 deletions

View File

@@ -507,7 +507,7 @@ func RunTestModuleEngine_Memory(t *testing.T, et EngineTester) {
TypeIDs: []wasm.FunctionTypeID{0, 1},
Definitions: m.FunctionDefinitionSection,
}
var memory api.Memory = module.MemoryInstance
memory := module.MemoryInstance
// To use functions, we need to instantiate them (associate them with a ModuleInstance).
module.Exports = exportMap(m)