Improved IdentIds

This commit is contained in:
Folkert 2022-04-25 23:09:18 +02:00
parent ae04887cb1
commit af6c3231f3
No known key found for this signature in database
GPG key ID: 1F17F6FFD112B97C
16 changed files with 142 additions and 143 deletions

View file

@ -396,7 +396,7 @@ impl<'a> CodeGenHelp<'a> {
}
fn create_symbol(&self, ident_ids: &mut IdentIds, debug_name: &str) -> Symbol {
let ident_id = ident_ids.add(Ident::from(debug_name));
let ident_id = ident_ids.add(&Ident::from(debug_name));
Symbol::new(self.home, ident_id)
}

View file

@ -2774,7 +2774,7 @@ impl LayoutId {
// Returns something like "foo#1" when given a symbol that interns to "foo"
// and a LayoutId of 1.
pub fn to_symbol_string(self, symbol: Symbol, interns: &Interns) -> String {
let ident_string = symbol.ident_str(interns);
let ident_string = symbol.as_str(interns);
let module_string = interns.module_ids.get_name(symbol.module_id()).unwrap();
format!("{}_{}_{}", module_string, ident_string, self.0)
}