* src/misc/freelist.hh (free_list::remove, free_list::insert): New
methods. * src/misc/freelist.cc (free_list::register_n, free_list::releases_n): Rewrite using free_list::remove and free_list::insert. (free_list::remove, free_list::insert): New methods. * src/tgba/bdddict.hh (bdd_dict::register_anonymous_variables): New method. (bdd_dict::annon_free_list): New subclass. (bdd_dict::free_annonymous_list_of_type_of): New attribute. * src/tgba/bdddict.cc (bdd_dict::register_all_variables_of, bdd_dict::unregister_all_my_variables): Handle anonymous variables too. (bdd_dict::register_anonymous_variables, bdd_dict::annon_free_list::annon_free_list, bdd_dict::annon_free_list::extend): New methods.
This commit is contained in:
parent
aba2dc75d7
commit
784ccafb1b
5 changed files with 213 additions and 33 deletions
|
|
@ -47,6 +47,13 @@ namespace spot
|
|||
|
||||
/// Dump the list to \a os for debugging.
|
||||
std::ostream& dump_free_list(std::ostream& os) const;
|
||||
|
||||
/// Extend the list by inserting a new pos-lenght pair.
|
||||
void insert(int base, int n);
|
||||
|
||||
/// Remove \a n consecutive entries from the list, starting at \a base.
|
||||
void remove(int base, int n = 0);
|
||||
|
||||
protected:
|
||||
|
||||
/// Allocate \a n integer.
|
||||
|
|
@ -62,6 +69,9 @@ namespace spot
|
|||
typedef std::pair<int, int> pos_lenght_pair;
|
||||
typedef std::list<pos_lenght_pair> free_list_type;
|
||||
free_list_type fl; ///< Tracks unused BDD variables.
|
||||
|
||||
/// Remove \a n consecutive entries from the list, starting at \a base.
|
||||
void remove(free_list_type::iterator i, int base, int n);
|
||||
};
|
||||
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue