-
-
Notifications
You must be signed in to change notification settings - Fork 292
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Reuse into tag #5625
Reuse into tag #5625
Conversation
crates/compiler/mono/src/inc_dec.rs
Outdated
@@ -1093,7 +1093,7 @@ fn insert_refcount_operations_binding<'a>( | |||
} | |||
} | |||
} | |||
Expr::Reuse { .. } | Expr::Reset { .. } | Expr::ResetRef { .. } => { | |||
Expr::Reset { .. } | Expr::ResetRef { .. } => { | |||
unreachable!("Reset(ref) and reuse should not exist at this point") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unreachable!("Reset(ref) and reuse should not exist at this point") | |
unreachable!("Reset(ref) should not exist at this point") |
crates/compiler/mono/src/ir.rs
Outdated
@@ -7560,7 +7582,7 @@ fn substitute_in_expr<'a>( | |||
|
|||
NullPointer => None, | |||
|
|||
Reuse { .. } | Reset { .. } | ResetRef { .. } => { | |||
Reset { .. } | ResetRef { .. } => { | |||
unreachable!("reset/resetref/reuse have not been introduced yet") |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
unreachable!("reset/resetref/reuse have not been introduced yet") | |
unreachable!("reset(ref) has not been introduced yet") |
@@ -1098,9 +1102,6 @@ fn expr_contains_symbol(expr: &Expr, needle: Symbol) -> bool { | |||
}), |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Don't forget to update Expr::Tag { arguments, .. } => arguments.contains(&needle),
to check if the reuse token contains the symbol.
544b41b
to
0308e02
Compare
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Not sure if I'm supposed to approve merges, but here you go 👍
removes the
Reuse
expr and instead uses areuse
field onTag { .. }