mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-30 07:14:46 +00:00
Use is_zero_sized to remove lots of ptr_bytes
This commit is contained in:
parent
7869311c7b
commit
c8e647ccfc
7 changed files with 56 additions and 112 deletions
|
@ -137,14 +137,14 @@ pub fn gen(
|
|||
fpm.initialize();
|
||||
|
||||
// Compute main_fn_type before moving subs to Env
|
||||
let ptr_bytes = target.pointer_width().unwrap().bytes() as u32;
|
||||
let layout = Layout::new(&arena, content, &subs, ptr_bytes).unwrap_or_else(|err| {
|
||||
let layout = Layout::new(&arena, content, &subs).unwrap_or_else(|err| {
|
||||
panic!(
|
||||
"Code gen error in Program: could not convert to layout. Err was {:?}",
|
||||
err
|
||||
)
|
||||
});
|
||||
|
||||
let ptr_bytes = target.pointer_width().unwrap().bytes() as u32;
|
||||
let main_fn_type =
|
||||
basic_type_from_layout(&arena, &context, &layout, ptr_bytes).fn_type(&[], false);
|
||||
let main_fn_name = "$main";
|
||||
|
@ -169,7 +169,6 @@ pub fn gen(
|
|||
problems: &mut mono_problems,
|
||||
home,
|
||||
ident_ids: &mut ident_ids,
|
||||
pointer_size: ptr_bytes,
|
||||
jump_counter: arena.alloc(0),
|
||||
};
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue