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

@ -907,12 +907,11 @@ impl<'a> TrmcEnv<'a> {
reuse: None,
};
let index = vec![in env.arena; recursive_field_index as u64].into_bump_slice();
let index = vec![in env.arena; cons_info.tag_id as u64, recursive_field_index as u64].into_bump_slice();
let let_tag = |next| Stmt::Let(*symbol, tag_expr, *layout, next);
let get_reference_expr = Expr::UnionFieldPtrAtIndex {
structure: *symbol,
tag_id: cons_info.tag_id,
union_layout: cons_info.tag_layout,
index,
};