From 4649a5a9d2cdd1df07c3849ae3c7a8a31e4bd90c Mon Sep 17 00:00:00 2001 From: microproofs Date: Sat, 7 Oct 2023 16:52:12 -0400 Subject: [PATCH] fix: don't reset the used special functions --- crates/aiken-lang/src/gen_uplc.rs | 1 - crates/aiken-lang/src/gen_uplc/builder.rs | 12 ++++++------ 2 files changed, 6 insertions(+), 7 deletions(-) diff --git a/crates/aiken-lang/src/gen_uplc.rs b/crates/aiken-lang/src/gen_uplc.rs index 2d1644aa..7093ce58 100644 --- a/crates/aiken-lang/src/gen_uplc.rs +++ b/crates/aiken-lang/src/gen_uplc.rs @@ -89,7 +89,6 @@ impl<'a> CodeGenerator<'a> { pub fn reset(&mut self) { self.code_gen_functions = IndexMap::new(); self.zero_arg_functions = IndexMap::new(); - self.special_functions = CodeGenSpecialFuncs::new(); self.defined_functions = IndexMap::new(); self.cyclic_functions = IndexMap::new(); self.id_gen = IdGenerator::new(); diff --git a/crates/aiken-lang/src/gen_uplc/builder.rs b/crates/aiken-lang/src/gen_uplc/builder.rs index f899173e..7a341dde 100644 --- a/crates/aiken-lang/src/gen_uplc/builder.rs +++ b/crates/aiken-lang/src/gen_uplc/builder.rs @@ -36,12 +36,12 @@ pub type Params = Vec; pub type CycleFunctionNames = Vec; -pub const TOO_MANY_ITEMS: &str = "TOO_MANY_ITEMS"; -pub const LIST_NOT_EMPTY: &str = "LIST_NOT_EMPTY"; -pub const CONSTR_NOT_EMPTY: &str = "CONSTR_NOT_EMPTY"; -pub const INCORRECT_BOOLEAN: &str = "INCORRECT_BOOLEAN"; -pub const INCORRECT_CONSTR: &str = "INCORRECT_CONSTR"; -pub const CONSTR_INDEX_MISMATCH: &str = "CONSTR_INDEX_MISMATCH"; +pub const TOO_MANY_ITEMS: &str = "__TOO_MANY_ITEMS"; +pub const LIST_NOT_EMPTY: &str = "__LIST_NOT_EMPTY"; +pub const CONSTR_NOT_EMPTY: &str = "__CONSTR_NOT_EMPTY"; +pub const INCORRECT_BOOLEAN: &str = "__INCORRECT_BOOLEAN"; +pub const INCORRECT_CONSTR: &str = "__INCORRECT_CONSTR"; +pub const CONSTR_INDEX_MISMATCH: &str = "__CONSTR_INDEX_MISMATCH"; #[derive(Clone, Debug)] pub enum CodeGenFunction {