LRDE Tiger Compiler
1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
|
Namespaces | |
namespace | tasks |
The Tasks of the object module. |
Classes | |
class | Binder |
Computing bindings with support for objects. More... | |
class | DesugarVisitor |
Desugar some object structures while duplicating an Ast. More... | |
class | Renamer |
Perform identifier renaming within an AST (in place), with support for objects. More... | |
class | TypeChecker |
Typedefs | |
typedef misc::map< const type::Class *, misc::symbol > | class_names_type |
Names associated to class types. |
Functions | |
template<> | |
void | Binder::visit_dec_header< ast::FunctionDec > (ast::FunctionDec &e) |
template<> | |
void | Binder::visit_dec_body< ast::FunctionDec > (ast::FunctionDec &e) |
misc::error | types_check (ast::Ast &tree) |
Check types allowing objects. | |
class_names_type * | rename (ast::Ast &tree) |
template<typename A > | |
A * | raw_desugar (const A &tree, const class_names_type &class_names) |
Remove objects constructs from an AST without recomputing its bindings nor its types. | |
template<typename A > | |
A * | desugar (const A &tree, const class_names_type &class_names) |
Remove objects constructs from an AST. | |
template ast::DecsList * | raw_desugar (const ast::DecsList &, const class_names_type &) |
Explicit instantiations. | |
template ast::DecsList * | desugar (const ast::DecsList &, const class_names_type &) |
typedef misc::map<const type::Class*, misc::symbol> object::class_names_type |
Names associated to class types.
void object::Binder::visit_dec_body< ast::FunctionDec > | ( | ast::FunctionDec & | e | ) |
void object::Binder::visit_dec_header< ast::FunctionDec > | ( | ast::FunctionDec & | e | ) |
A * object::desugar | ( | const A & | tree, |
const class_names_type & | class_names | ||
) |
Remove objects constructs from an AST.
tree | abstract syntax tree's root, whose bindings and types have been computed, and whose identifiers are all unique. |
class_names | the names of the class types of the AST |
References assertion, desugar::bind_and_types_check(), and raw_desugar().
Referenced by object::tasks::object_desugar(), and raw_desugar().
template ast::DecsList* object::desugar | ( | const ast::DecsList & | , |
const class_names_type & | |||
) |
A * object::raw_desugar | ( | const A & | tree, |
const class_names_type & | class_names | ||
) |
Remove objects constructs from an AST without recomputing its bindings nor its types.
This function acts like object::object_desugar, but stops just after the desugaring step (in fact, object::desugar is built upon this function). It is meant to be used as a test of DesugarVisitor (i.e., even if the desugared tree is badly bound or typed, it can still be pretty-printed).
tree | AST to desugar. |
class_names | the names of the class types of the AST |
References desugar(), and astclone::Cloner::result_get().
Referenced by desugar(), and object::tasks::raw_object_desugar().
template ast::DecsList* object::raw_desugar | ( | const ast::DecsList & | , |
const class_names_type & | |||
) |
Explicit instantiations.
class_names_type * object::rename | ( | ast::Ast & | tree | ) |
Rename the variables of an AST so that they each have a unique name, with support for objects.
tree | abstract syntax tree's root, whose bindings and types have been computed. |
References object::Renamer::class_names_get().
Referenced by object::tasks::object_rename().
misc::error object::types_check | ( | ast::Ast & | tree | ) |
Check types allowing objects.
tree | abstract syntax tree's root. |
References type::TypeChecker::error_get().
Referenced by desugar::bind_and_types_check(), and object::tasks::object_types_compute().