mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 14:24:45 +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
|
@ -10,18 +10,12 @@ use roc_module::symbol::Symbol;
|
|||
use roc_mono::ir::{CallType, Expr, JoinPointId, Literal, Proc, Stmt};
|
||||
use roc_mono::layout::{Builtin, Layout, UnionLayout};
|
||||
|
||||
use crate::*;
|
||||
|
||||
// Don't allocate any constant data at address zero or near it. Would be valid, but bug-prone.
|
||||
// Follow Emscripten's example by using 1kB (4 bytes would probably do)
|
||||
const UNUSED_DATA_SECTION_BYTES: u32 = 1024;
|
||||
|
||||
const PTR_SIZE: u32 = 4;
|
||||
const PTR_TYPE: ValueType = ValueType::I32;
|
||||
|
||||
const ALIGN_1: u32 = 0;
|
||||
const ALIGN_2: u32 = 1;
|
||||
const ALIGN_4: u32 = 2;
|
||||
const ALIGN_8: u32 = 3;
|
||||
|
||||
#[derive(Clone, Copy, Debug)]
|
||||
struct LocalId(u32);
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue