mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-28 22:34:45 +00:00
repl: update some static_asserts for 32-bit compiler build
This commit is contained in:
parent
5661d281c6
commit
8e370a32b6
4 changed files with 12 additions and 12 deletions
|
@ -59,7 +59,7 @@ pub enum TagName {
|
||||||
Closure(Symbol),
|
Closure(Symbol),
|
||||||
}
|
}
|
||||||
|
|
||||||
static_assertions::assert_eq_size!([u8; 24], TagName);
|
static_assertions::assert_eq_size!((usize, usize, u64), TagName);
|
||||||
|
|
||||||
impl TagName {
|
impl TagName {
|
||||||
pub fn as_ident_str(&self, interns: &Interns, home: ModuleId) -> IdentStr {
|
pub fn as_ident_str(&self, interns: &Interns, home: ModuleId) -> IdentStr {
|
||||||
|
|
|
@ -38,14 +38,14 @@ pub fn pretty_print_ir_symbols() -> bool {
|
||||||
static_assertions::assert_eq_size!([u8; 4 * 8], Literal);
|
static_assertions::assert_eq_size!([u8; 4 * 8], Literal);
|
||||||
#[cfg(not(target_arch = "aarch64"))]
|
#[cfg(not(target_arch = "aarch64"))]
|
||||||
static_assertions::assert_eq_size!([u8; 3 * 8], Literal);
|
static_assertions::assert_eq_size!([u8; 3 * 8], Literal);
|
||||||
static_assertions::assert_eq_size!([u8; 10 * 8], Expr);
|
static_assertions::assert_eq_size!(([u64; 4], [usize; 6]), Expr);
|
||||||
#[cfg(not(target_arch = "aarch64"))]
|
#[cfg(not(target_arch = "aarch64"))]
|
||||||
static_assertions::assert_eq_size!([u8; 19 * 8], Stmt);
|
static_assertions::assert_eq_size!(([u64; 5], [usize; 14]), Stmt);
|
||||||
#[cfg(target_arch = "aarch64")]
|
#[cfg(target_arch = "aarch64")]
|
||||||
static_assertions::assert_eq_size!([u8; 20 * 8], Stmt);
|
static_assertions::assert_eq_size!([u8; 20 * 8], Stmt);
|
||||||
static_assertions::assert_eq_size!([u8; 6 * 8], ProcLayout);
|
static_assertions::assert_eq_size!([usize; 6], ProcLayout);
|
||||||
static_assertions::assert_eq_size!([u8; 7 * 8], Call);
|
static_assertions::assert_eq_size!(([u64; 3], [usize; 4]), Call);
|
||||||
static_assertions::assert_eq_size!([u8; 5 * 8], CallType);
|
static_assertions::assert_eq_size!(([u64; 3], [usize; 2]), CallType);
|
||||||
|
|
||||||
macro_rules! return_on_layout_error {
|
macro_rules! return_on_layout_error {
|
||||||
($env:expr, $layout_result:expr) => {
|
($env:expr, $layout_result:expr) => {
|
||||||
|
|
|
@ -18,10 +18,10 @@ use ven_pretty::{DocAllocator, DocBuilder};
|
||||||
// if your changes cause this number to go down, great!
|
// if your changes cause this number to go down, great!
|
||||||
// please change it to the lower number.
|
// please change it to the lower number.
|
||||||
// if it went up, maybe check that the change is really required
|
// if it went up, maybe check that the change is really required
|
||||||
static_assertions::assert_eq_size!([u8; 3 * 8], Builtin);
|
static_assertions::assert_eq_size!([usize; 3], Builtin);
|
||||||
static_assertions::assert_eq_size!([u8; 4 * 8], Layout);
|
static_assertions::assert_eq_size!([usize; 4], Layout);
|
||||||
static_assertions::assert_eq_size!([u8; 3 * 8], UnionLayout);
|
static_assertions::assert_eq_size!([usize; 3], UnionLayout);
|
||||||
static_assertions::assert_eq_size!([u8; 3 * 8], LambdaSet);
|
static_assertions::assert_eq_size!([usize; 3], LambdaSet);
|
||||||
|
|
||||||
pub type TagIdIntType = u16;
|
pub type TagIdIntType = u16;
|
||||||
pub const MAX_ENUM_SIZE: usize = (std::mem::size_of::<TagIdIntType>() * 8) as usize;
|
pub const MAX_ENUM_SIZE: usize = (std::mem::size_of::<TagIdIntType>() * 8) as usize;
|
||||||
|
|
|
@ -12,7 +12,7 @@ use ven_ena::unify::{InPlace, Snapshot, UnificationTable, UnifyKey};
|
||||||
static_assertions::assert_eq_size!([u8; 6 * 8], Descriptor);
|
static_assertions::assert_eq_size!([u8; 6 * 8], Descriptor);
|
||||||
static_assertions::assert_eq_size!([u8; 4 * 8], Content);
|
static_assertions::assert_eq_size!([u8; 4 * 8], Content);
|
||||||
static_assertions::assert_eq_size!([u8; 3 * 8], FlatType);
|
static_assertions::assert_eq_size!([u8; 3 * 8], FlatType);
|
||||||
static_assertions::assert_eq_size!([u8; 6 * 8], Problem);
|
static_assertions::assert_eq_size!(([usize; 4], [u64; 2]), Problem);
|
||||||
static_assertions::assert_eq_size!([u8; 12], UnionTags);
|
static_assertions::assert_eq_size!([u8; 12], UnionTags);
|
||||||
static_assertions::assert_eq_size!([u8; 2 * 8], RecordFields);
|
static_assertions::assert_eq_size!([u8; 2 * 8], RecordFields);
|
||||||
|
|
||||||
|
@ -1624,7 +1624,7 @@ impl From<Content> for Descriptor {
|
||||||
}
|
}
|
||||||
|
|
||||||
static_assertions::assert_eq_size!([u8; 4 * 8], Content);
|
static_assertions::assert_eq_size!([u8; 4 * 8], Content);
|
||||||
static_assertions::assert_eq_size!([u8; 4 * 8], (Variable, Option<Lowercase>));
|
static_assertions::assert_eq_size!([usize; 4], (Variable, Option<Lowercase>));
|
||||||
static_assertions::assert_eq_size!([u8; 3 * 8], (Symbol, AliasVariables, Variable));
|
static_assertions::assert_eq_size!([u8; 3 * 8], (Symbol, AliasVariables, Variable));
|
||||||
static_assertions::assert_eq_size!([u8; 8], AliasVariables);
|
static_assertions::assert_eq_size!([u8; 8], AliasVariables);
|
||||||
static_assertions::assert_eq_size!([u8; 3 * 8], FlatType);
|
static_assertions::assert_eq_size!([u8; 3 * 8], FlatType);
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue