/* * Mark all types present in eterm table * - types = the relevant type table */ static void eterm_table_gc_mark(eterm_table_t *tbl, type_table_t *types) { uint32_t i, n; type_t tau; n = tbl->nterms; for (i=0; i<n; i++) { tau = tbl->real_type[i]; if (tau != NULL_TYPE) { // not sure this test is necessary type_table_set_gc_mark(types, tau); } } }
/* * 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); } } }
/* * Mark all types present in lambda tag table * - types = relevant type table */ static void ltag_table_gc_mark(ltag_table_t *tbl, type_table_t *types) { ltag_desc_t *d; uint32_t i, ntags; uint32_t j ,n; ntags = tbl->ntags; for (i=0; i<ntags; i++) { d = tbl->data[i]; n = d->arity; for (j=0; j<n; j++) { type_table_set_gc_mark(types, d->dom[j]); } } }