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

Inlining functions of an ast::Ast. More...

Namespaces

namespace  tasks
 Tasks of the inlining module.

Classes

class  Inliner
 Perform inline expansion of functions. More...
class  Pruner
 Prune useless function declarations within an AST. More...

Functions

template<typename A >
A * inline_expand (const A &tree)
template ast::DecsListinline_expand (const ast::DecsList &)
template<typename A >
A * prune (const A &tree)
template ast::DecsListprune (const ast::DecsList &)

Detailed Description

Inlining functions of an ast::Ast.

Function Documentation

template<typename A >
A * inlining::inline_expand ( const A &  tree)

Perform inline expansion of function bodies.

Parameters
treeabstract syntax tree's root, whose bindings and types have been computed. Each identifier must also be unique within the AST to avoid name capture (
See Also
inlining::rename).
Returns
the AST where the bodies of non recursive functions have been expanded (inlined), with bindings and type-checked.

References assertion, desugar::bind_and_types_check(), and astclone::Cloner::result_get().

Referenced by inlining::tasks::inline_expand().

template ast::DecsList* inlining::inline_expand ( const ast::DecsList )
template<typename A >
A * inlining::prune ( const A &  tree)

Prune unused function from the AST.

Parameters
treeabstract syntax tree's root, whose bindings and types have been computed, and whose identifiers are all unique.
Returns
the AST whose unused functions have been removed, with bindings and type-checked.

References assertion, desugar::bind_and_types_check(), and astclone::Cloner::result_get().

Referenced by inlining::tasks::prune().

template ast::DecsList* inlining::prune ( const ast::DecsList )