scope_function Class Reference

#include <function.h>

Inheritance diagram for scope_function:

scope scope_function_compile scope_function_pretty List of all members.

Public Member Functions

virtual ~scope_function ()
 scope_function (const rcstring &name)

Protected Member Functions

void attach_function_arguments (name_type_list *ntlp)
void attach_return_type (const type::pointer &tp)
bool was_forward () const
void set_forward ()
void drop_locals ()

Private Member Functions

 scope_function ()
 scope_function (const scope_function &)
scope_functionoperator= (const scope_function &)

Private Attributes

type::pointer return_type

Detailed Description

The scope_function class is used to represent a function scope, where local symbols are declared.

Definition at line 32 of file function.h.


Constructor & Destructor Documentation

virtual scope_function::~scope_function (  )  [virtual]

The destructor.

scope_function::scope_function ( const rcstring name  ) 

The constructor.

scope_function::scope_function (  )  [private]

The default constructor. Do not use.

scope_function::scope_function ( const scope_function  )  [private]

The copy constructor. Do not use.


Member Function Documentation

void scope_function::attach_function_arguments ( name_type_list ntlp  )  [protected, virtual]

The attach_function_arguments method is used to remember the function argument names and types, once translator::attach_function_arguments has taken care of routine checks and allocations.

The remembered types are used to validate (and in some cases auto promote) arguments to functions calls, and the names give us better error messages.

Parameters:
ntlp The names and their types.

Reimplemented from scope.

void scope_function::attach_return_type ( const type::pointer tp  )  [protected]

bool scope_function::was_forward (  )  const [protected, virtual]

The was_forward method is used to test if this scope was a function, and was a forward declared function. This is used by the grammar to determine whether or not the function return type is required.

Reimplemented from scope.

void scope_function::set_forward (  )  [protected, virtual]

The set_forward method is used to tell a function symbol that it is the subject of a forward declaration.

Reimplemented from scope.

void scope_function::drop_locals (  )  [protected, virtual]

The drop_locals method is used to tell a function symbol that it may safely discard its local scope, as those symbols are no longer needed.

Reimplemented from scope.

scope_function& scope_function::operator= ( const scope_function  )  [private]

The assignment operator. Do not use.


Member Data Documentation

type::pointer scope_function::return_type [private]

The return_type instance variable is used to remember the return type of this function.

Definition at line 67 of file function.h.


The documentation for this class was generated from the following file:
Generated on Sun Feb 25 01:27:13 2007 for UCSDp-SystemCrossCompiler by  doxygen 1.5.1