mirror of
https://github.com/roc-lang/roc.git
synced 2025-09-29 06:44:46 +00:00
fix for re-used DEV_TMP symbol
This commit is contained in:
parent
ce36069d57
commit
ac64e4ab87
2 changed files with 9 additions and 3 deletions
|
@ -252,7 +252,11 @@ impl<
|
|||
/// Claims a general reg for a specific symbol.
|
||||
/// They symbol should not already have storage.
|
||||
pub fn claim_general_reg(&mut self, buf: &mut Vec<'a, u8>, sym: &Symbol) -> GeneralReg {
|
||||
debug_assert_eq!(self.symbol_storage_map.get(sym), None);
|
||||
debug_assert_eq!(
|
||||
self.symbol_storage_map.get(sym),
|
||||
None,
|
||||
"Symbol {sym:?} is already in the storage map!"
|
||||
);
|
||||
let reg = self.get_general_reg(buf);
|
||||
self.general_used_regs.push((reg, *sym));
|
||||
self.symbol_storage_map.insert(*sym, Reg(General(reg)));
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue