LRDE Tiger Compiler  1.34a $Id: 7fef12e1f5fa43449d667a0eec1d837c40fc1202 $
 All Classes Namespaces Files Functions Variables Typedefs Enumerations Enumerator Friends Macros
overload Namespace Reference

Perform type checking, allowing function overloading. More...

Namespaces

namespace  tasks

Classes

class  Binder
 Computing bindings with support for overloaded functions. More...
class  OverTable
class  TypeChecker

Typedefs

typedef std::map< ast::CallExp
*, std::list< ast::FunctionDec * > > 
overfun_bindings_type
 Type of the dictionary of potential function bindings.

Functions

std::pair
< overfun_bindings_type
*, misc::error
bind (ast::Ast &tree)
 Bind identifier uses to their definition, allowing function overloading, and return a list of potential definition sites for each function call.
misc::error types_check (ast::Ast &tree, overload::overfun_bindings_type *overfun_bindings)
 Check types allowing function overloading.

Detailed Description

Perform type checking, allowing function overloading.

Typedef Documentation

typedef std::map<ast::CallExp*, std::list<ast::FunctionDec*> > overload::overfun_bindings_type

Type of the dictionary of potential function bindings.

Function Documentation

std::pair< overload::overfun_bindings_type *, misc::error > overload::bind ( ast::Ast tree)

Bind identifier uses to their definition, allowing function overloading, and return a list of potential definition sites for each function call.

Parameters
treeAST to bind.
Returns
a pair whose first element is the potential function bindings, and the second element the error status.

References bind::Binder::error_get(), misc::make_pair(), and overload::Binder::overfun_bindings_get().

Referenced by desugar::bind_and_types_check(), and overload::tasks::overfun_bindings_compute().

misc::error overload::types_check ( ast::Ast tree,
overload::overfun_bindings_type overfun_bindings 
)

Check types allowing function overloading.

Parameters
treeabstract syntax tree's root.
overfun_bindingspotential function bindings.
Returns
success of the type-checking.

References type::TypeChecker::error_get().

Referenced by overload::tasks::overfun_types_compute().