remove Reuse

This commit is contained in:
Folkert 2023-06-28 22:02:02 +02:00
parent 1daf975391
commit f27cb83a02
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
11 changed files with 33 additions and 125 deletions

View file

@ -138,7 +138,13 @@ impl<'a> LastSeenMap<'a> {
Expr::Call(call) => self.scan_ast_call(call, stmt),
Expr::Tag { arguments, .. } => {
Expr::Tag {
arguments, reuse, ..
} => {
if let Some(ru) = reuse {
self.set_last_seen(ru.symbol, stmt);
}
for sym in *arguments {
self.set_last_seen(*sym, stmt);
}
@ -173,14 +179,6 @@ impl<'a> LastSeenMap<'a> {
}
}
}
Expr::Reuse {
symbol, arguments, ..
} => {
self.set_last_seen(*symbol, stmt);
for sym in *arguments {
self.set_last_seen(*sym, stmt);
}
}
Expr::Reset { symbol, .. } | Expr::ResetRef { symbol, .. } => {
self.set_last_seen(*symbol, stmt);
}
@ -862,16 +860,6 @@ trait Backend<'a> {
Expr::NullPointer => {
self.load_literal_i64(sym, 0);
}
Expr::Reuse {
tag_layout,
tag_id,
symbol: reused,
arguments,
..
} => {
self.load_literal_symbols(arguments);
self.tag(sym, arguments, tag_layout, *tag_id, Some(*reused));
}
Expr::Reset { symbol, .. } => {
let layout = *self.layout_map().get(symbol).unwrap();