Get long string literals working in gen_wasm

This commit is contained in:
Brian Carroll 2021-11-15 12:11:36 +00:00
parent a5c3809290
commit 7ac1c7a72f
3 changed files with 18 additions and 16 deletions

View file

@ -626,8 +626,8 @@ impl<'a> WasmBackend<'a> {
self.lookup_string_constant(string, sym, layout);
self.code_builder.get_local(local_id);
self.code_builder.insert_memory_relocation(linker_sym_index);
self.code_builder.i32_const(elements_addr as i32);
self.code_builder
.i32_const_mem_addr(elements_addr, linker_sym_index);
self.code_builder.i32_store(Align::Bytes4, offset);
self.code_builder.get_local(local_id);