fix:minor optimization fixes

Unique only comparison for equals led to strange results
Fixed by interning in a different spot
This commit is contained in:
Kasey White
2023-02-01 22:03:50 -05:00
committed by Lucas
parent fdf89b7326
commit 9dc2bac2c3
3 changed files with 22 additions and 11 deletions

View File

@@ -13,6 +13,7 @@ use uplc::{
},
builtins::DefaultFunction,
machine::cost_model::ExBudget,
optimize::aiken_optimize_and_intern,
parser::interner::Interner,
};
@@ -112,9 +113,11 @@ impl<'a> CodeGenerator<'a> {
term,
};
let mut interner = Interner::new();
println!("{}", program.to_pretty());
interner.program(&mut program);
program = aiken_optimize_and_intern(program);
println!("{}", program.to_pretty());
program
}