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

@@ -376,8 +376,9 @@ func TestModule_validateStartSection(t *testing.T) {
t.Run("imported valid func", func(t *testing.T) {
index := Index(1)
m := Module{
StartSection: &index,
TypeSection: []FunctionType{{}, {Results: []ValueType{ValueTypeI32}}},
StartSection: &index,
TypeSection: []FunctionType{{}, {Results: []ValueType{ValueTypeI32}}},
ImportFunctionCount: 2,
ImportSection: []Import{
{Type: ExternTypeFunc, DescFunc: 1},
// import with index 1 is global but this should be skipped when searching imported functions.