mirror of
https://github.com/roc-lang/roc.git
synced 2025-08-02 19:32:17 +00:00
Stash comment
This commit is contained in:
parent
09809b9bd6
commit
7df9e17be0
1 changed files with 5 additions and 2 deletions
|
@ -215,6 +215,8 @@ impl<'a> VariableRcTypesEnv<'a> {
|
|||
layout: &InLayout,
|
||||
) {
|
||||
// TODO add more checks like *persistent*, consume, and reset.
|
||||
// TODO this currently marks anything that contains a reference counted type as reference counted.
|
||||
// This will reference count the entire struct, even if only one field is reference counted.
|
||||
let contains_refcounted = self.layout_interner.contains_refcounted(*layout);
|
||||
if contains_refcounted {
|
||||
self.variables_rc_type
|
||||
|
@ -321,8 +323,9 @@ impl<'a> VariableUsageEnv<'a> {
|
|||
Expr::EmptyArray => {
|
||||
// Empty arrays have no reference counted elements.
|
||||
}
|
||||
Expr::ExprBox { symbol } => todo!(),
|
||||
Expr::ExprUnbox { symbol } => todo!(),
|
||||
Expr::ExprBox { symbol } | Expr::ExprUnbox { symbol } => {
|
||||
usage_env.insert_variable_usage(*symbol);
|
||||
}
|
||||
Expr::Reuse { .. } | Expr::Reset { .. } => {
|
||||
unreachable!("Reset and reuse should not exist at this point")
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue