move wasm_module out of gen_wasm

This commit is contained in:
Brian Carroll 2022-11-13 09:01:50 +00:00
parent b907f01f1f
commit 63d9187343
No known key found for this signature in database
GPG key ID: 5C7B2EC4101703C0
17 changed files with 43 additions and 21 deletions

View file

@ -7,8 +7,8 @@ use roc_module::symbol::Symbol;
use roc_mono::layout::{Layout, STLayoutInterner};
use crate::layout::{CallConv, ReturnMethod, StackMemoryFormat, WasmLayout};
use crate::wasm_module::{Align, CodeBuilder, LocalId, ValueType, VmSymbolState};
use crate::{copy_memory, round_up_to_alignment, CopyMemoryConfig, PTR_TYPE};
use roc_wasm_module::{Align, CodeBuilder, LocalId, ValueType, VmSymbolState};
pub enum StoredVarKind {
Variable,
@ -592,7 +592,7 @@ impl<'a> Storage<'a> {
| StoredValue::Local {
value_type, size, ..
} => {
use crate::wasm_module::Align::*;
use roc_wasm_module::Align::*;
code_builder.get_local(to_ptr);
self.load_symbols(code_builder, &[from_symbol]);
match (value_type, size) {
@ -666,7 +666,7 @@ impl<'a> Storage<'a> {
| StoredValue::Local {
value_type, size, ..
} => {
use crate::wasm_module::Align::*;
use roc_wasm_module::Align::*;
if let AddressValue::NotLoaded(from_ptr) = from_addr {
code_builder.get_local(from_ptr);