mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-04 19:10:32 +00:00
fix alignment calculation in wasm reset
This commit is contained in:
parent
af3c4f01da
commit
cabbfa52d5
1 changed files with 4 additions and 6 deletions
|
@ -439,12 +439,10 @@ pub fn refcount_resetref_proc_body<'a>(
|
|||
// Reset structure is unique. Return a pointer to the allocation.
|
||||
let then_stmt = {
|
||||
let alignment = root.create_symbol(ident_ids, "alignment");
|
||||
let alignment_expr = Expr::Literal(Literal::Int(
|
||||
(layout_interner
|
||||
.get(layout)
|
||||
.alignment_bytes(layout_interner, root.target_info) as i128)
|
||||
.to_ne_bytes(),
|
||||
));
|
||||
let alignment_int = layout_interner
|
||||
.get(layout)
|
||||
.allocation_alignment_bytes(layout_interner, root.target_info);
|
||||
let alignment_expr = Expr::Literal(Literal::Int((alignment_int as i128).to_ne_bytes()));
|
||||
let alloc_addr = root.create_symbol(ident_ids, "alloc_addr");
|
||||
let alloc_addr_expr = Expr::Call(Call {
|
||||
call_type: CallType::LowLevel {
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue