/* * Mark all terms and types in the domain of tbl to preserve them from * deletion in the next call to term_table_gc. * * Term index i is present if tbl->type[i] is not NULL_TYPE */ void intern_tbl_gc_mark(intern_tbl_t *tbl) { uint32_t i, n; type_t tau; n = tbl->type.top; for (i=0; i<n; i++) { tau = tbl->type.map[i]; if (tau != NULL_TYPE) { term_table_set_gc_mark(tbl->terms, i); type_table_set_gc_mark(tbl->types, tau); } } }
/* * Marker for records in a model's alias_map: every record * is a pair <key, value> where both key and value are terms * - aux is the term table */ static void mdl_mark_alias(void *aux, const int_hmap_pair_t *r) { assert(r->val >= 0); term_table_set_gc_mark(aux, index_of(r->key)); term_table_set_gc_mark(aux, index_of(r->val)); }
/* * Marker for records in a model's map: every record * is a pair <key, value> where key is a term. * - aux is the term table where key is defined */ static void mdl_mark_map(void *aux, const int_hmap_pair_t *r) { term_table_set_gc_mark(aux, index_of(r->key)); }