mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 23:04:49 +00:00
Move some constants from backend to lib
This commit is contained in:
parent
042b175d89
commit
b21155f60b
2 changed files with 13 additions and 9 deletions
|
@ -3,7 +3,7 @@ pub mod from_wasm32_memory;
|
|||
|
||||
use bumpalo::Bump;
|
||||
use parity_wasm::builder;
|
||||
use parity_wasm::elements::Internal;
|
||||
use parity_wasm::elements::{Internal, ValueType};
|
||||
|
||||
use roc_collections::all::{MutMap, MutSet};
|
||||
use roc_module::symbol::{Interns, Symbol};
|
||||
|
@ -12,6 +12,16 @@ use roc_mono::layout::LayoutIds;
|
|||
|
||||
use crate::backend::WasmBackend;
|
||||
|
||||
const PTR_SIZE: u32 = 4;
|
||||
const PTR_TYPE: ValueType = ValueType::I32;
|
||||
|
||||
pub const ALIGN_1: u32 = 0;
|
||||
pub const ALIGN_2: u32 = 1;
|
||||
pub const ALIGN_4: u32 = 2;
|
||||
pub const ALIGN_8: u32 = 3;
|
||||
|
||||
pub const STACK_POINTER_GLOBAL_ID: u32 = 0;
|
||||
|
||||
pub struct Env<'a> {
|
||||
pub arena: &'a Bump, // not really using this much, parity_wasm works with std::vec a lot
|
||||
pub interns: Interns,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue