remove tag_id in favor of index

This commit is contained in:
HajagosNorbert 2023-11-13 14:58:31 +01:00
parent 347431d1df
commit 90223022af
No known key found for this signature in database
GPG key ID: 807F4444870DB673
8 changed files with 32 additions and 33 deletions

View file

@ -206,11 +206,11 @@ fn specialize_drops_stmt<'a, 'i>(
environment.symbol_tag.insert(*structure, *tag_id);
}
UnionFieldPtrAtIndex {
structure, tag_id, ..
structure, index, ..
} => {
// Generated code might know the tag of the union without switching on it.
// So if we UnionFieldPtrAtIndex, we must know the tag and we can use it to specialize the drop.
environment.symbol_tag.insert(*structure, *tag_id);
environment.symbol_tag.insert(*structure, index[0] as u16);
}
Array {
elems: children, ..