mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-26 21:39:07 +00:00
rename to GetElementPointer, index -> indices
This commit is contained in:
parent
90223022af
commit
9c21ac1388
12 changed files with 49 additions and 49 deletions
|
@ -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,
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue