Make collections::soa use the soa crate

This commit is contained in:
Richard Feldman 2024-10-13 11:08:28 -04:00
parent 44d00e1f13
commit e589923ae8
No known key found for this signature in database
GPG key ID: DAC334802F365236
6 changed files with 59 additions and 244 deletions

View file

@ -12,7 +12,7 @@ use crate::pattern::{canonicalize_pattern, BindingsFromPattern, Pattern, PermitS
use crate::procedure::{QualifiedReference, References};
use crate::scope::{Scope, SymbolLookup};
use crate::traverse::{walk_expr, Visitor};
use roc_collections::soa::Index;
use roc_collections::soa::{index_push_new, Index};
use roc_collections::{SendMap, VecMap, VecSet};
use roc_error_macros::internal_error;
use roc_module::called_via::CalledVia;
@ -2850,7 +2850,7 @@ impl Declarations {
let loc_function_def = Loc::at(loc_closure_data.region, function_def);
let function_def_index = Index::push_new(&mut self.function_bodies, loc_function_def);
let function_def_index = index_push_new(&mut self.function_bodies, loc_function_def);
let tag = match loc_closure_data.value.recursive {
Recursive::NotRecursive | Recursive::Recursive => {
@ -2901,7 +2901,7 @@ impl Declarations {
let loc_function_def = Loc::at(loc_closure_data.region, function_def);
let function_def_index = Index::push_new(&mut self.function_bodies, loc_function_def);
let function_def_index = index_push_new(&mut self.function_bodies, loc_function_def);
if let Some(annotation) = host_annotation {
self.host_exposed_annotations
@ -3007,7 +3007,7 @@ impl Declarations {
pattern_vars,
};
let destructure_def_index = Index::push_new(&mut self.destructs, destruct_def);
let destructure_def_index = index_push_new(&mut self.destructs, destruct_def);
self.declarations
.push(DeclarationTag::Destructure(destructure_def_index));
@ -3079,7 +3079,7 @@ impl Declarations {
let loc_function_def = Loc::at(def.loc_expr.region, function_def);
let function_def_index =
Index::push_new(&mut self.function_bodies, loc_function_def);
index_push_new(&mut self.function_bodies, loc_function_def);
self.declarations[index] = DeclarationTag::Function(function_def_index);
self.expressions[index] = *closure_data.loc_body;
@ -3131,7 +3131,7 @@ impl Declarations {
let loc_function_def = Loc::at(region, function_def);
let function_def_index =
Index::push_new(&mut self.function_bodies, loc_function_def);
index_push_new(&mut self.function_bodies, loc_function_def);
if let Some(annotation) = &mut self.annotations[index] {
annotation.convert_to_fn(new_args_len, var_store);