rename to GetElementPointer, index -> indices

This commit is contained in:
HajagosNorbert 2023-11-13 15:45:38 +01:00
parent 90223022af
commit 9c21ac1388
No known key found for this signature in database
GPG key ID: 807F4444870DB673
12 changed files with 49 additions and 49 deletions

View file

@ -907,13 +907,13 @@ impl<'a> TrmcEnv<'a> {
reuse: None,
};
let index = vec![in env.arena; cons_info.tag_id as u64, recursive_field_index as u64].into_bump_slice();
let indices = 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 {
let get_reference_expr = Expr::GetElementPointer {
structure: *symbol,
union_layout: cons_info.tag_layout,
index,
indices,
};
let new_hole_symbol = env.named_unique_symbol("newHole");
@ -1091,7 +1091,7 @@ fn expr_contains_symbol(expr: &Expr, needle: Symbol) -> bool {
Expr::StructAtIndex { structure, .. }
| Expr::GetTagId { structure, .. }
| Expr::UnionAtIndex { structure, .. }
| Expr::UnionFieldPtrAtIndex { structure, .. } => needle == *structure,
| Expr::GetElementPointer { structure, .. } => needle == *structure,
Expr::Array { elems, .. } => elems.iter().any(|element| match element {
crate::ir::ListLiteralElement::Literal(_) => false,
crate::ir::ListLiteralElement::Symbol(symbol) => needle == *symbol,