sail::Variable Class Reference

Represents a variable, which can be either an actual program variable or a temporary introduced by SAIL. More...

#include <Variable.h>

Inheritance diagram for sail::Variable:
sail::Symbol

List of all members.

Public Member Functions

 Variable (il::node *original, il::type *t)
 Variable (il::node *original, string alias_name, il::type *t)
 Variable (string alias_name, il::type *t)
 Variable (string special_temp_name, il::type *var_type, bool unused)
Variableclone ()
void set_alias_name (string alias_name)
virtual string to_string () const
virtual string to_string (bool pretty_print) const
virtual il::nodeget_original_node ()
string get_unique_id ()
virtual bool is_temp ()
virtual bool is_removable_temp ()
virtual void set_removable (bool removable)
bool is_loop_exit_var ()
virtual bool is_constant ()
virtual bool is_variable ()
il::typeget_type ()
bool is_anonymous ()
bool is_local ()
bool is_argument ()
int get_arg_number ()
bool is_global ()
bool is_return_variable ()
string get_var_name ()
const il::namespace_contextget_namespace () const
void set_original (il::node *orig)
bool operator== (const sail::Variable &other)
il::variable_declarationget_declaration ()
bool is_static ()
bool is_synthesised_var ()

Static Public Member Functions

static Variableget_return_variable (il::type *t)
static string get_temp_name ()
static void clear_maps ()

Protected Member Functions

 Variable (il::type *t)

Friends

class boost::serialization::access

Detailed Description

Represents a variable, which can be either an actual program variable or a temporary introduced by SAIL.


Constructor & Destructor Documentation

sail::Variable::Variable ( il::type t  )  [protected]

Private constructor to make return variables.


Member Function Documentation

int sail::Variable::get_arg_number (  ) 

If this variable is an argument, which argument is it?

const il::namespace_context & sail::Variable::get_namespace (  )  const
Returns:
namespace associated with this variable
Variable * sail::Variable::get_return_variable ( il::type t  )  [static]

Factory method to make return variables.

string sail::Variable::get_var_name (  ) 
Returns:
the name of this variable
bool sail::Variable::is_anonymous (  ) 

Is this an anonymous variable introduced by il or gcc?

bool sail::Variable::is_argument (  ) 

Is this variable a function argument?

bool sail::Variable::is_constant (  )  [virtual]

Implements abstract method defined by Symbol

Implements sail::Symbol.

bool sail::Variable::is_global (  ) 

Is this a global variable?

bool sail::Variable::is_local (  ) 

Is this a local variable?

bool sail::Variable::is_loop_exit_var (  ) 

Is this variable introduced to mark which exit point was taken to leave a loop if super blocks are constructed? (see Cfg documentation)

bool sail::Variable::is_removable_temp (  )  [virtual]

Category 2 only.

bool sail::Variable::is_return_variable (  ) 

Does this variable hold the return value? Such variables are introduced by SAIL.

bool sail::Variable::is_synthesised_var (  ) 
Returns:
Any variable that is not a program variable.
bool sail::Variable::is_temp (  )  [virtual]

Is this variable a temporary introduced by SAIL?

Reimplemented from sail::Symbol.

bool sail::Variable::is_variable (  )  [virtual]

Implements abstract method defined by Symbol

Implements sail::Symbol.


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