LRDE Tiger Compiler
1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
|
Handling of generic, oriented or undirected, graph. More...
Classes | |
class | Deref |
class | endo_map |
A renaming mapping defaulting to identity: Mapping a class with itself (endomorphism). Unless a value is already mapped onto another, map it to itself if nonstrict. This is a special case of std::map. More... | |
class | error |
Handle errors in the whole project. More... | |
class | escaped |
class | file_library |
Manage search path. More... | |
class | generic_variant |
class | graph |
struct | empty |
class | directed_graph |
class | undirected_graph |
class | list |
class | map |
Wrapper around std::map providing syntactic sugar for any mapping of types manipulation. More... | |
struct | pair |
class | path |
Helper for handling paths. More... | |
class | ref |
class | scoped_map |
struct | constify_traits |
Return T constified. More... | |
struct | id_traits |
Return T as is. More... | |
struct | select_iterator |
The iterator over a non const structure is plain iterator. More... | |
struct | select_iterator< const T > |
The iterator over a const structure is a const_iterator. More... | |
class | separator |
class | set |
The class misc::set is wrapper around std::set. More... | |
class | symbol |
Define symbol class. More... | |
class | timer |
Timing nested tasks. More... | |
class | unique |
Define unique class. More... | |
class | variant |
struct | iomanipulator |
Defines the operator() for the classes get_type, set_type and swap_type. More... | |
class | xalloc |
Allocate slots in std::ostreams. More... |
Typedefs | |
typedef boost::property < boost::graph_name_t, std::string > | name_prop_type |
Graph property: name. |
Enumerations | |
enum | deref_e { deref } |
Functions | |
template<typename Container > | |
void | deep_clear (Container &c) |
Invoke delete on all the members of c, and clear it. | |
template<typename Container > | |
Container::const_iterator | find (const Container &c, const typename Container::value_type &v) |
Find v in the whole c. | |
template<typename Container > | |
Container::iterator | find (Container &c, const typename Container::value_type &v) |
Find v in the whole c. | |
template<typename Container , typename Functor > | |
Functor & | for_each (Container &c, Functor &v) |
Apply f to all the members of c, and return it. | |
template<typename Container > | |
bool | has (const Container &c, const typename Container::value_type &v) |
Is v member of c? | |
template<typename Map > | |
Map::iterator | put (Map &map, const typename Map::key_type &key, const typename Map::mapped_type &value) |
Insert or update key -> value in map, return iterator to it. | |
Deref | operator<< (std::ostream &ostr, deref_e) |
std::ostream & | operator<< (std::ostream &o, const error &e) |
Display the error message on the given ostream. | |
template<class T > | |
escaped | escape (const T &) |
std::ostream & | operator<< (std::ostream &o, const escaped &) |
std::string | basename (const std::string &file) |
path | basedir (const std::string &file) |
bool | file_exists (const std::string &file) |
std::ostream & | operator<< (std::ostream &ostr, const file_library &l) |
BOOST_PP_REPEAT_FROM_TO (1, BOOST_VARIANT_LIMIT_TYPES, MISC_GENERIC_VARIANT_CONVERSION_OPERATOR_DEF, T) template< MISC_GENERIC_VARIANT_PARAMS > MISC_GENERIC_VARIANT_TYPE | |
template<typename Orientation , typename VertexLabel , typename EdgeLabel > | |
std::ostream & | operator<< (std::ostream &ostr, const graph< Orientation, VertexLabel, EdgeLabel > &g) |
std::ostream & | operator<< (std::ostream &ostr, empty) |
std::ostream & | incindent (std::ostream &o) |
Increment the indentation. | |
std::ostream & | decindent (std::ostream &o) |
Decrement the indentation. | |
std::ostream & | resetindent (std::ostream &o) |
Reset the indentation. | |
std::ostream & | iendl (std::ostream &o) |
Print an end of line, then set the indentation. | |
std::ostream & | incendl (std::ostream &o) |
Increment the indentation, print an end of line, and set the indentation. | |
std::ostream & | decendl (std::ostream &o) |
Decrement the indentation, print an end of line, and set the indentation. | |
template<class Ident_ > | |
std::ostream & | operator<< (std::ostream &ostr, const list< Ident_ > &l) |
Output l onto ostr. | |
template<typename Ident_ > | |
bool | operator% (const Ident_ &data, const list< Ident_ > &l) |
Shortcut for misc::list::has. | |
template<class T > | |
std::ostream & | operator<< (std::ostream &ostr, const list< T > &l) |
template<class T > | |
bool | operator% (const T &data, const list< T > &l) |
template<class T , class N > | |
std::ostream & | operator<< (std::ostream &ostr, const map< T, N > &m) |
Output m onto ostr. | |
template<class Fst , typename Snd > | |
pair< Fst, Snd > | make_pair (Fst fst, Snd snd) |
Shorthand to create pair (fst, snd). | |
template<class Fst , typename Snd > | |
std::ostream & | operator<< (std::ostream &ostr, const pair< Fst, Snd > &p) |
Output the pair object s on ostr. | |
std::ostream & | operator<< (std::ostream &ostr, const path &p) |
template<typename Key , typename Data > | |
std::ostream & | operator<< (std::ostream &ostr, const scoped_map< Key, Data > &tbl) |
template<class C , typename S > | |
separator< C, S > | separate (const C &c, const S &s) |
Shorthand to create separator(c, s). | |
template<class C > | |
separator< C, char > | separate (const C &c) |
Shorthand to create separator(c, ' '). | |
template<class C , typename S > | |
std::ostream & | operator<< (std::ostream &ostr, const separator< C, S > &s) |
Output the separator object s on ostr. | |
template<typename K , typename C , typename A > | |
set< K, C, A > | set_difference (const set< K, C, A > &s1, const set< K, C, A > &s2) |
template<typename K , typename C , typename A > | |
set< K, C, A > | set_intersection (const set< K, C, A > &s1, const set< K, C, A > &s2) |
template<typename K , typename C , typename A > | |
set< K, C, A > | set_union (const set< K, C, A > &s1, const set< K, C, A > &s2) |
template<typename K , typename C , typename A > | |
std::ostream & | operator<< (std::ostream &ostr, const set< K, C, A > &s) |
template<typename K , typename C , typename A > | |
bool | operator% (const K &k, const set< K, C, A > &s) |
std::ostream & | operator<< (std::ostream &ostr, const symbol &the) |
Intercept output stream redirection. | |
template<typename T , class C > | |
std::ostream & | operator<< (std::ostream &ostr, const unique< T, C > &u) |
Intercept output stream redirection. | |
std::ostream & | operator<< (std::ostream &o, const iomanipulator &g) |
Launch the iomanipulator action on o. | |
MAYBE_EXTERN template std::ostream & | operator<< (std::ostream &ostr, const map< temp::Label, temp::Label > &m) |
MAYBE_EXTERN template std::ostream & | operator<< (std::ostream &ostr, const list< temp::Label > &l) |
MAYBE_EXTERN template bool | operator% (const temp::Label &t, const list< temp::Label > &l) |
Handling of generic, oriented or undirected, graph.
A set of handy C++ tools.
typedef boost::property<boost::graph_name_t, std::string> misc::name_prop_type |
Graph property: name.
enum misc::deref_e |
path misc::basedir | ( | const std::string & | file | ) |
Referenced by misc::file_library::find_file(), and parse::parse().
std::string misc::basename | ( | const std::string & | file | ) |
Referenced by misc::file_library::find_file(), and parse::TigerParser::parse_import().
misc::BOOST_PP_REPEAT_FROM_TO | ( | 1 | , |
BOOST_VARIANT_LIMIT_TYPES | , | ||
MISC_GENERIC_VARIANT_CONVERSION_OPERATOR_DEF | , | ||
T | |||
) |
std::ostream & misc::decendl | ( | std::ostream & | o | ) |
Decrement the indentation, print an end of line, and set the indentation.
References decindent(), and iendl().
Referenced by canon::Canon::canon(), tree::Call::dump(), parse::Tweast::dump(), tree::Seq::dump(), target::Cpu::dump(), canon::Traces::operator()(), canon::Canon::operator()(), and type::TypeChecker::type_mismatch().
std::ostream & misc::decindent | ( | std::ostream & | o | ) |
Decrement the indentation.
References precondition.
Referenced by canon::Canon::canon(), decendl(), tree::Eseq::dump(), canon::BasicBlock::dump(), tree::Tree::dump(), translate::Level::dump(), canon::Canon::operator()(), ast::PrettyPrinter::operator()(), and tree::Tree::parent_get_assert().
void misc::deep_clear | ( | Container & | c | ) |
Invoke delete on all the members of c, and clear it.
Referenced by ast::DecsList::~DecsList(), assem::Fragments::~Fragments(), tree::Fragments::~Fragments(), frame::Frame::~Frame(), assem::Instrs::~Instrs(), and translate::Level::~Level().
escaped misc::escape | ( | const T & | obj | ) |
bool misc::file_exists | ( | const std::string & | file | ) |
Referenced by misc::file_library::find_file(), and misc::file_library::find_in_directory().
|
inline |
Find v in the whole c.
Referenced by target::mips::Cpu::Cpu(), find(), misc::list< Ident_ >::has(), misc::set< K, C, A >::has(), misc::endo_map< T >::operator()(), misc::list< Ident_ >::operator-=(), tree::Tree::replace_by(), and misc::map< T, N >::xfind().
|
inline |
Find v in the whole c.
References find().
|
inline |
Apply f to all the members of c, and return it.
Referenced by tree::GenVisitor< Const >::operator()(), assem::GenVisitor< Const >::operator()(), object::Renamer::operator()(), and ast::GenDefaultVisitor< Const >::operator()().
|
inline |
Is v member of c?
Referenced by misc::list< Ident_ >::operator-=(), and task::TaskRegister::resolve_dependencies().
std::ostream & misc::iendl | ( | std::ostream & | o | ) |
Print an end of line, then set the indentation.
Referenced by canon::Canon::canon(), decendl(), tree::Eseq::dump(), incendl(), canon::Canon::operator()(), tree::operator<<(), misc::map< T, N >::print(), and type::TypeChecker::type_mismatch().
std::ostream & misc::incendl | ( | std::ostream & | o | ) |
Increment the indentation, print an end of line, and set the indentation.
References iendl(), and incindent().
Referenced by canon::Canon::canon(), tree::Call::dump(), tree::Eseq::dump(), canon::BasicBlock::dump(), parse::Tweast::dump(), tree::Seq::dump(), tree::Tree::dump(), translate::Level::dump(), target::Cpu::dump(), canon::Traces::operator()(), canon::Canon::operator()(), tree::Tree::parent_get_assert(), and type::TypeChecker::type_mismatch().
std::ostream & misc::incindent | ( | std::ostream & | o | ) |
Increment the indentation.
Referenced by incendl(), and ast::PrettyPrinter::operator()().
pair< Fst, Snd > misc::make_pair | ( | Fst | fst, |
Snd | snd | ||
) |
Shorthand to create pair (fst, snd).
Referenced by overload::bind(), and parse::parse().
MAYBE_EXTERN template bool misc::operator% | ( | const temp::Label & | t, |
const list< temp::Label > & | l | ||
) |
bool misc::operator% | ( | const Ident_ & | data, |
const list< Ident_ > & | l | ||
) |
Shortcut for misc::list::has.
bool misc::operator% | ( | const T & | data, |
const list< T > & | l | ||
) |
References misc::list< Ident_ >::has().
|
inline |
References misc::set< K, C, A >::has().
|
inline |
Launch the iomanipulator action on o.
Call the operator() of g(so set, get or swap the xalloced data with data_).
|
inline |
Output the pair object s on ostr.
|
inline |
|
inline |
|
inline |
Output the separator object s on ostr.
|
inline |
References misc::escaped::print().
MAYBE_EXTERN template std::ostream & misc::operator<< | ( | std::ostream & | ostr, |
const map< temp::Label, temp::Label > & | m | ||
) |
MAYBE_EXTERN template std::ostream & misc::operator<< | ( | std::ostream & | ostr, |
const list< temp::Label > & | l | ||
) |
std::ostream& misc::operator<< | ( | std::ostream & | ostr, |
const list< Ident_ > & | l | ||
) |
Output l onto ostr.
|
inline |
References misc::path::dump().
|
inline |
Intercept output stream redirection.
ostr | the destination output stream |
the | a reference to the unique to redirect |
std::ostream& misc::operator<< | ( | std::ostream & | ostr, |
const symbol & | the | ||
) |
Intercept output stream redirection.
ostr | the destination output stream |
the | a reference to the symbol to redirect |
|
inline |
References misc::file_library::dump().
|
inline |
std::ostream& misc::operator<< | ( | std::ostream & | ostr, |
const list< T > & | l | ||
) |
References misc::file_library::dump(), and parse::tasks::l.
|
inline |
std::ostream & misc::operator<< | ( | std::ostream & | o, |
const error & | e | ||
) |
Display the error message on the given ostream.
References misc::error::stream_get().
std::ostream & misc::operator<< | ( | std::ostream & | ostr, |
const map< T, N > & | m | ||
) |
Output m onto ostr.
|
inline |
Map::iterator misc::put | ( | Map & | map, |
const typename Map::key_type & | key, | ||
const typename Map::mapped_type & | value | ||
) |
Insert or update key -> value in map, return iterator to it.
Referenced by object::DesugarVisitor::cast_function(), object::DesugarVisitor::operator()(), object::Renamer::Renamer(), and translate::Translator::visit_function_dec_header().
std::ostream & misc::resetindent | ( | std::ostream & | o | ) |
Reset the indentation.
separator< C, S > misc::separate | ( | const C & | c, |
const S & | s | ||
) |
Shorthand to create separator(c, s).
Referenced by tree::operator<<(), translate::operator<<(), and separate().
separator< C, char > misc::separate | ( | const C & | c | ) |
Shorthand to create separator(c, '
').
References separate().
|
inline |
Referenced by misc::set< K, C, A >::operator-().
|
inline |
Referenced by liveness::Liveness::Liveness(), and misc::set< K, C, A >::operator&().
|
inline |
Referenced by misc::set< K, C, A >::operator+().