sail::Function Class Reference

Representation of a function in the low-level language. Most of the work of translating the high-level language to the low-level language is done here. More...

#include <Function.h>

Inheritance diagram for sail::Function:
Serializable sail::SummaryUnit

List of all members.

Public Member Functions

 Function (il::function_declaration *original, il::file *f, bool cpp)
 Function (vector< il::variable_declaration * > &global_decls, string file, bool cpp, vector< Variable * > &zvg_vars)
virtual string to_string () const
virtual string to_string (bool pretty_print) const
il::function_declarationget_original_declaration ()
vector< Instruction * > * get_body ()
Cfgget_cfg ()
il::function_typeget_signature ()
void get_instructions (vector< Instruction * > &instructions)
virtual Identifier get_identifier ()
il::namespace_context get_namespace ()
bool is_method ()
il::record_typeget_defining_class ()
bool is_virtual_method ()
bool is_abstract_virtual_method ()
bool is_constructor ()
bool is_destructor ()
map< string, Variable * > & get_cxx_zvg_vars ()
virtual bool is_function ()
virtual bool is_superblock ()
virtual BasicBlockget_entry_block ()
virtual BasicBlockget_exit_block ()
virtual BasicBlockget_exception_block ()
int get_first_line ()
bool is_init_function ()
il::typeget_return_type ()
string get_file ()

Friends

class boost::serialization::access

Detailed Description

Representation of a function in the low-level language. Most of the work of translating the high-level language to the low-level language is done here.


Member Function Documentation

vector< Instruction * > * sail::Function::get_body (  ) 
Returns:
instructions forming the body of this function
Cfg * sail::Function::get_cfg (  ) 
Returns:
Control flow graph of this function.
il::record_type * sail::Function::get_defining_class (  ) 
Returns:
The class in which this method is declared if this is a method, otherwise NULL.
BasicBlock * sail::Function::get_entry_block (  )  [virtual]
Returns:
entry_block of this function

Implements sail::SummaryUnit.

BasicBlock * sail::Function::get_exception_block (  )  [virtual]
Returns:
exception block of this function (see Cfg for what this means)

Implements sail::SummaryUnit.

BasicBlock * sail::Function::get_exit_block (  )  [virtual]
Returns:
exit block of this function

Implements sail::SummaryUnit.

int sail::Function::get_first_line (  ) 
Returns:
The first line this function is defined on.
Identifier sail::Function::get_identifier (  )  [virtual]
Returns:
Identifier of the function

Implements sail::SummaryUnit.

void sail::Function::get_instructions ( vector< Instruction * > &  instructions  ) 

Fills the passed in instructions vector with the instructions forming the body of this function.

Parameters:
instructions 
il::namespace_context sail::Function::get_namespace (  ) 
Returns:
namespace in which the function is declared
il::function_declaration * sail::Function::get_original_declaration (  ) 
Returns:
the representation of this function in the high-level language. Important: This function can return NULL for made-up functions that are used to initialize globals in a given file!
il::type * sail::Function::get_return_type (  ) 

Gives the return type of this function

bool sail::Function::is_abstract_virtual_method (  ) 
Returns:
Is this an abstract virtual method?
bool sail::Function::is_constructor (  ) 
Returns:
Is this a constructor?
bool sail::Function::is_destructor (  ) 
Returns:
Is this a destructor?
bool sail::Function::is_function (  )  [virtual]

Implements the abstract is_function() defined by SummaryUnit.

Implements sail::SummaryUnit.

bool sail::Function::is_init_function (  ) 

Is this function introduced to initialize globals?

bool sail::Function::is_method (  ) 
Returns:
Is this a member function of some class?
bool sail::Function::is_superblock (  )  [virtual]

Implements the abstract is_superblock() defined by SummaryUnit.

Implements sail::SummaryUnit.

bool sail::Function::is_virtual_method (  ) 
Returns:
Is this a virtual method?

The documentation for this class was generated from the following files:
Generated on Sun Oct 17 14:01:32 2010 by  doxygen 1.6.3