mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
expect as borrowed
This commit is contained in:
parent
797da23f17
commit
99dae2fd80
1 changed files with 16 additions and 2 deletions
|
@ -648,12 +648,19 @@ fn insert_refcount_operations_stmt<'v, 'a>(
|
||||||
} => {
|
} => {
|
||||||
let new_remainder = insert_refcount_operations_stmt(arena, environment, remainder);
|
let new_remainder = insert_refcount_operations_stmt(arena, environment, remainder);
|
||||||
|
|
||||||
|
let newer_remainder = consume_and_insert_dec_stmts(
|
||||||
|
arena,
|
||||||
|
environment,
|
||||||
|
environment.borrowed_usages(lookups.iter().copied()),
|
||||||
|
new_remainder,
|
||||||
|
);
|
||||||
|
|
||||||
arena.alloc(Stmt::Expect {
|
arena.alloc(Stmt::Expect {
|
||||||
condition: *condition,
|
condition: *condition,
|
||||||
region: *region,
|
region: *region,
|
||||||
lookups,
|
lookups,
|
||||||
variables,
|
variables,
|
||||||
remainder: new_remainder,
|
remainder: newer_remainder,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
Stmt::ExpectFx {
|
Stmt::ExpectFx {
|
||||||
|
@ -665,12 +672,19 @@ fn insert_refcount_operations_stmt<'v, 'a>(
|
||||||
} => {
|
} => {
|
||||||
let new_remainder = insert_refcount_operations_stmt(arena, environment, remainder);
|
let new_remainder = insert_refcount_operations_stmt(arena, environment, remainder);
|
||||||
|
|
||||||
|
let newer_remainder = consume_and_insert_dec_stmts(
|
||||||
|
arena,
|
||||||
|
environment,
|
||||||
|
environment.borrowed_usages(lookups.iter().copied()),
|
||||||
|
new_remainder,
|
||||||
|
);
|
||||||
|
|
||||||
arena.alloc(Stmt::ExpectFx {
|
arena.alloc(Stmt::ExpectFx {
|
||||||
condition: *condition,
|
condition: *condition,
|
||||||
region: *region,
|
region: *region,
|
||||||
lookups,
|
lookups,
|
||||||
variables,
|
variables,
|
||||||
remainder: new_remainder,
|
remainder: newer_remainder,
|
||||||
})
|
})
|
||||||
}
|
}
|
||||||
Stmt::Dbg {
|
Stmt::Dbg {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue