fixed rc for debug/expect

This commit is contained in:
J.Teeuwissen 2023-05-10 12:23:25 +02:00 committed by Folkert
parent f5feec1e6c
commit 9e74a2cc8c
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C

View file

@ -648,20 +648,13 @@ fn insert_refcount_operations_stmt<'v, 'a>(
} => {
let new_remainder = insert_refcount_operations_stmt(arena, environment, remainder);
let new_expect = arena.alloc(Stmt::Expect {
arena.alloc(Stmt::Expect {
condition: *condition,
region: *region,
lookups,
variables,
remainder: new_remainder,
});
consume_and_insert_inc_stmts(
arena,
environment,
environment.owned_usages(lookups.iter().copied()),
new_expect,
)
})
}
Stmt::ExpectFx {
condition,
@ -672,20 +665,13 @@ fn insert_refcount_operations_stmt<'v, 'a>(
} => {
let new_remainder = insert_refcount_operations_stmt(arena, environment, remainder);
let new_expectfx = arena.alloc(Stmt::ExpectFx {
arena.alloc(Stmt::ExpectFx {
condition: *condition,
region: *region,
lookups,
variables,
remainder: new_remainder,
});
consume_and_insert_inc_stmts(
arena,
environment,
environment.owned_usages(lookups.iter().copied()),
new_expectfx,
)
})
}
Stmt::Dbg {
symbol,
@ -694,20 +680,11 @@ fn insert_refcount_operations_stmt<'v, 'a>(
} => {
let new_remainder = insert_refcount_operations_stmt(arena, environment, remainder);
let new_debug = arena.alloc(Stmt::Dbg {
arena.alloc(Stmt::Dbg {
symbol: *symbol,
variable: *variable,
remainder: new_remainder,
});
// TODO this assumes the debug statement to consume the variable. I'm not sure if that is (always) the case.
// But the old inc_dec pass passes variables
consume_and_insert_inc_stmts(
arena,
environment,
environment.owned_usages([*symbol]),
new_debug,
)
})
}
Stmt::Join {
id: joinpoint_id,