Wasm: Convert remaining sections to store bytes, and add .size() methods

This commit is contained in:
Brian Carroll 2022-01-08 18:23:09 +00:00
parent f4ac5bffa3
commit 5d5e0eca96
5 changed files with 154 additions and 54 deletions

View file

@ -109,11 +109,9 @@ impl<'a> WasmBackend<'a> {
import: ImportSection::new(arena),
function: FunctionSection::new(arena, num_procs),
table: OpaqueSection::default(),
memory: MemorySection::new(MEMORY_INIT_SIZE),
global: GlobalSection {
entries: bumpalo::vec![in arena; stack_pointer],
},
export: ExportSection { entries: exports },
memory: MemorySection::new(arena, MEMORY_INIT_SIZE),
global: GlobalSection::new(arena, &[stack_pointer]),
export: ExportSection::new(arena, &exports),
start: OpaqueSection::default(),
element: OpaqueSection::default(),
code: CodeSection {