Bulk lazy initialization of FunctionDefinitions (#1425)

Signed-off-by: Takeshi Yoneda <t.y.mathetake@gmail.com>
Co-authored-by: Edoardo Vacchi <evacchi@users.noreply.github.com>
This commit is contained in:
Takeshi Yoneda
2023-05-12 08:02:40 +10:00
committed by GitHub
parent 78c35acd6e
commit 80452a94c3
17 changed files with 133 additions and 150 deletions

View File

@@ -203,7 +203,7 @@ func (m *ModuleInstance) ExportedFunctionDefinitions() map[string]api.FunctionDe
result := map[string]api.FunctionDefinition{}
for name, exp := range m.Exports {
if exp.Type == ExternTypeFunc {
result[name] = &m.Definitions[exp.Index]
result[name] = m.Source.FunctionDefinition(exp.Index)
}
}
return result