Otawa  0.10
otawa::ast::FunAST Class Reference

This class represents functions in the AST representation. More...

#include <otawa/ast/FunAST.h>

Inheritance diagram for otawa::ast::FunAST:
elm::Lock

Public Member Functions

 FunAST (WorkSpace *ws, Inst *entry, String name="")
 Build a new function AST. More...
 
 FunAST (ASTInfo *info, Inst *entry, String name="")
 Build a new function AST. More...
 
Instentry (void) const
 Get the instruction entry of this function. More...
 
Stringname (void)
 Get the name of the function. More...
 
ASTast (void) const
 Get the AST representing the body of this function. More...
 
void setAst (AST *ast)
 Modify the AST representing the body of this function. More...
 
void setName (const String &name)
 
void lock (void)
 
void unlock ()
 

Private Member Functions

 ~FunAST (void)
 Remove any link with the instruction representation. More...
 

Private Attributes

ASTInfoinfo
 
Instent
 
String _name
 
AST_ast
 

Friends

class ASTInfo
 

Detailed Description

This class represents functions in the AST representation.

It provides the root of the AST.

Constructor & Destructor Documentation

FunAST::~FunAST ( void  )
private

Remove any link with the instruction representation.

FunAST::FunAST ( WorkSpace ws,
Inst entry,
String  name = "" 
)

Build a new function AST.

Parameters
wsworkspace containing the function.
entryFirst instruction of the function.
nameFunction name.

References _name, otawa::ast::ASTInfo::add(), ASTInfo, ent, otawa::ast::FUN, otawa::ast::INFO, info, and otawa::LABEL.

FunAST::FunAST ( ASTInfo info,
Inst entry,
String  name = "" 
)

Build a new function AST.

Parameters
infoAST information.
entryFirst instruction of the function.
nameFunction name.

References _name, otawa::ast::ASTInfo::add(), ent, otawa::ast::FUN, and otawa::LABEL.

Member Function Documentation

AST * FunAST::ast ( void  ) const
inline

Get the AST representing the body of this function.

Returns
Body AST.

References _ast.

Referenced by otawa::ast::ASTProcessor::processFun().

Inst * FunAST::entry ( void  ) const
inline

Get the instruction entry of this function.

Returns
Entry instruction.

References ent.

void FunAST::setAst ( AST ast)

Modify the AST representing the body of this function.

Parameters
astNew body AST.

Referenced by yyparse().

void otawa::ast::FunAST::setName ( const String name)
inline

References _name, and name().

Referenced by yyparse().

Friends And Related Function Documentation

friend class ASTInfo
friend

Referenced by FunAST().

Member Data Documentation

AST* otawa::ast::FunAST::_ast
private

Referenced by ast().

String otawa::ast::FunAST::_name
private

Referenced by FunAST(), name(), and setName().

Inst* otawa::ast::FunAST::ent
private

Referenced by entry(), and FunAST().

ASTInfo* otawa::ast::FunAST::info
private

Referenced by FunAST().


The documentation for this class was generated from the following files: