fix: don't reset the used special functions

This commit is contained in:
microproofs 2023-10-07 16:52:12 -04:00 committed by Kasey
parent 8964675670
commit 4649a5a9d2
2 changed files with 6 additions and 7 deletions

View File

@ -89,7 +89,6 @@ impl<'a> CodeGenerator<'a> {
pub fn reset(&mut self) { pub fn reset(&mut self) {
self.code_gen_functions = IndexMap::new(); self.code_gen_functions = IndexMap::new();
self.zero_arg_functions = IndexMap::new(); self.zero_arg_functions = IndexMap::new();
self.special_functions = CodeGenSpecialFuncs::new();
self.defined_functions = IndexMap::new(); self.defined_functions = IndexMap::new();
self.cyclic_functions = IndexMap::new(); self.cyclic_functions = IndexMap::new();
self.id_gen = IdGenerator::new(); self.id_gen = IdGenerator::new();

View File

@ -36,12 +36,12 @@ pub type Params = Vec<String>;
pub type CycleFunctionNames = Vec<String>; pub type CycleFunctionNames = Vec<String>;
pub const TOO_MANY_ITEMS: &str = "TOO_MANY_ITEMS"; pub const TOO_MANY_ITEMS: &str = "__TOO_MANY_ITEMS";
pub const LIST_NOT_EMPTY: &str = "LIST_NOT_EMPTY"; pub const LIST_NOT_EMPTY: &str = "__LIST_NOT_EMPTY";
pub const CONSTR_NOT_EMPTY: &str = "CONSTR_NOT_EMPTY"; pub const CONSTR_NOT_EMPTY: &str = "__CONSTR_NOT_EMPTY";
pub const INCORRECT_BOOLEAN: &str = "INCORRECT_BOOLEAN"; pub const INCORRECT_BOOLEAN: &str = "__INCORRECT_BOOLEAN";
pub const INCORRECT_CONSTR: &str = "INCORRECT_CONSTR"; pub const INCORRECT_CONSTR: &str = "__INCORRECT_CONSTR";
pub const CONSTR_INDEX_MISMATCH: &str = "CONSTR_INDEX_MISMATCH"; pub const CONSTR_INDEX_MISMATCH: &str = "__CONSTR_INDEX_MISMATCH";
#[derive(Clone, Debug)] #[derive(Clone, Debug)]
pub enum CodeGenFunction { pub enum CodeGenFunction {