mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-03 11:52:19 +00:00
fix roc_alloc arg order
This commit is contained in:
parent
29b5e11515
commit
4077edcaec
1 changed files with 7 additions and 7 deletions
|
@ -1104,18 +1104,18 @@ impl<
|
|||
|
||||
let elem_size = elem_layout.stack_size(self.storage_manager.target_info()) as u64;
|
||||
let allocation_size = elem_size * elems.len() as u64 + allocation_alignment /* add space for refcount */;
|
||||
let u32_layout = Layout::Builtin(Builtin::Int(IntWidth::U32));
|
||||
self.load_literal(
|
||||
&Symbol::DEV_TMP,
|
||||
&u32_layout,
|
||||
&Literal::Int((allocation_alignment as i128).to_ne_bytes()),
|
||||
);
|
||||
let u64_layout = Layout::Builtin(Builtin::Int(IntWidth::U64));
|
||||
self.load_literal(
|
||||
&Symbol::DEV_TMP2,
|
||||
&Symbol::DEV_TMP,
|
||||
&u64_layout,
|
||||
&Literal::Int((allocation_size as i128).to_ne_bytes()),
|
||||
);
|
||||
let u32_layout = Layout::Builtin(Builtin::Int(IntWidth::U32));
|
||||
self.load_literal(
|
||||
&Symbol::DEV_TMP2,
|
||||
&u32_layout,
|
||||
&Literal::Int((allocation_alignment as i128).to_ne_bytes()),
|
||||
);
|
||||
|
||||
self.build_fn_call(
|
||||
&Symbol::DEV_TMP3,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue