diff --git a/compiler/mono/src/borrow.rs b/compiler/mono/src/borrow.rs index 8046d1e0e4..11faa80aa7 100644 --- a/compiler/mono/src/borrow.rs +++ b/compiler/mono/src/borrow.rs @@ -410,7 +410,6 @@ impl<'a> BorrowInfState<'a> { LowLevel { op, opt_closure_layout, - .. } => { use roc_module::low_level::LowLevel::*; match op { diff --git a/compiler/mono/src/inc_dec.rs b/compiler/mono/src/inc_dec.rs index 25c4dba0c8..c1df450e84 100644 --- a/compiler/mono/src/inc_dec.rs +++ b/compiler/mono/src/inc_dec.rs @@ -1,4 +1,4 @@ -use crate::borrow::{ParamMap, BORROWED}; +use crate::borrow::{ParamMap, BORROWED, OWNED}; use crate::ir::{Expr, JoinPointId, ModifyRc, Param, Proc, Stmt}; use crate::layout::Layout; use bumpalo::collections::Vec; @@ -471,11 +471,10 @@ impl<'a> Context<'a> { let mut b = Stmt::Let(z, v, l, b); if !ps[1].borrow { - // b = Stmt::Refcounting( - // ModifyRc::Inc(arguments[2], 2), - // self.arena.alloc(b), - // ) - todo!(); + b = Stmt::Refcounting( + ModifyRc::Inc(arguments[2], 2), + self.arena.alloc(b), + ) } &*self.arena.alloc(b) @@ -800,7 +799,10 @@ impl<'a> Context<'a> { use crate::ir::CallType; let stmt = match &call.call_type { - CallType::LowLevel { op, .. } => { + CallType::LowLevel { + op, + opt_closure_layout: _, + } => { let ps = crate::borrow::lowlevel_borrow_signature(self.arena, *op); self.add_dec_after_lowlevel(call.arguments, ps, cont, &invoke_live_vars) } diff --git a/compiler/mono/src/ir.rs b/compiler/mono/src/ir.rs index 23eec4c9fe..7c8f62980a 100644 --- a/compiler/mono/src/ir.rs +++ b/compiler/mono/src/ir.rs @@ -1061,7 +1061,10 @@ impl<'a> Call<'a> { .text("CallByPointer ") .append(alloc.intersperse(it, " ")) } - LowLevel { op: lowlevel, .. } => { + LowLevel { + op: lowlevel, + opt_closure_layout: _, + } => { let it = arguments.iter().map(|s| symbol_to_doc(alloc, *s)); alloc @@ -2665,9 +2668,7 @@ macro_rules! match_on_closure_argument { lambda_set, $closure_data_symbol, |top_level_function, closure_data, function_layout| self::Call { - call_type: CallType::LowLevel { - op: $op, opt_closure_layout: Some(function_layout), - }, + call_type: CallType::LowLevel { op: $op, opt_closure_layout: Some(function_layout) }, arguments: arena.alloc([$($x,)* top_level_function, closure_data]), }, arena.alloc(top_level).full(),