Holds most fields as slice of values, not ptrs in wasm.Module (#1221)

Signed-off-by: Takeshi Yoneda <takeshi@tetrate.io>
This commit is contained in:
Takeshi Yoneda
2023-03-12 20:50:36 -07:00
committed by GitHub
parent 6243091dc2
commit 7466f0e7bd
52 changed files with 963 additions and 956 deletions

View File

@@ -356,19 +356,19 @@ func Test888(t *testing.T) {
run(t, func(t *testing.T, r wazero.Runtime) {
imported := binaryencoding.EncodeModule(&wasm.Module{
MemorySection: &wasm.Memory{Min: 0, Max: 5, IsMaxEncoded: true},
GlobalSection: []*wasm.Global{
GlobalSection: []wasm.Global{
{
Type: &wasm.GlobalType{
Type: wasm.GlobalType{
ValType: wasm.ValueTypeFuncref,
Mutable: false,
},
Init: &wasm.ConstantExpression{
Init: wasm.ConstantExpression{
Opcode: wasm.OpcodeRefNull,
Data: []byte{wasm.ValueTypeFuncref},
},
},
},
ExportSection: []*wasm.Export{
ExportSection: []wasm.Export{
{Name: "", Type: wasm.ExternTypeGlobal, Index: 0},
{Name: "s", Type: wasm.ExternTypeMemory, Index: 0},
},