This commit is contained in:
Folkert 2022-04-22 15:41:21 +02:00
parent 5d68a00d1c
commit 0c10fa31f5
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C

View file

@ -665,7 +665,7 @@ pub fn canonicalize_defs<'a>(
struct DefId(u32); struct DefId(u32);
#[derive(Debug)] #[derive(Debug)]
struct DefIds { struct DefOrdering {
home: ModuleId, home: ModuleId,
symbol_to_id: Vec<(IdentId, u32)>, symbol_to_id: Vec<(IdentId, u32)>,
@ -679,7 +679,7 @@ struct DefIds {
length: u32, length: u32,
} }
impl DefIds { impl DefOrdering {
fn with_capacity(home: ModuleId, capacity: usize) -> Self { fn with_capacity(home: ModuleId, capacity: usize) -> Self {
use bitvec::vec::BitVec; use bitvec::vec::BitVec;
@ -930,7 +930,8 @@ pub fn sort_can_defs(
defs: CanDefs, defs: CanDefs,
mut output: Output, mut output: Output,
) -> (Result<Vec<Declaration>, RuntimeError>, Output) { ) -> (Result<Vec<Declaration>, RuntimeError>, Output) {
let def_ids = DefIds::from_defs_by_symbol(env, &defs.can_defs_by_symbol, &defs.refs_by_symbol); let def_ids =
DefOrdering::from_defs_by_symbol(env, &defs.can_defs_by_symbol, &defs.refs_by_symbol);
let CanDefs { let CanDefs {
refs_by_symbol, refs_by_symbol,
@ -1214,7 +1215,7 @@ fn recurse_onto(length: usize, bitvec: &bitvec::vec::BitVec<u8>, v: usize, param
} }
fn group_to_declaration( fn group_to_declaration(
def_ids: &DefIds, def_ids: &DefOrdering,
group: &[u32], group: &[u32],
closures: &MutMap<Symbol, References>, closures: &MutMap<Symbol, References>,
can_defs_by_symbol: &mut MutMap<Symbol, Def>, can_defs_by_symbol: &mut MutMap<Symbol, Def>,