SubroutineSymbol Class Referencea Symbol of class SUBROUTINE_CLASS
More...
#include <SubroutineSymbol.h>
Inheritance diagram for SubroutineSymbol:
[legend]List of all members.
|
Public Member Functions |
| | SubroutineSymbol (const char *name, EXTERNAL_BOOL external, INTRINSIC_BOOL intrinsic, FORMAL_BOOL formal, Statement *entry=0) |
| | Constructor.
|
| | SubroutineSymbol (const SubroutineSymbol &rsym) |
| SubroutineSymbol & | operator= (const SubroutineSymbol &rsym) |
| virtual Symbol * | clone () const |
| | Clone constructor -- returns base pointer to a new clone of the correct derived class of this Symbol.
|
| virtual Symbol * | clone_all () const |
| | Clone constructor -- returns base pointer to a new clone of the correct derived class of this Symbol.
|
| virtual | ~SubroutineSymbol () |
| virtual EXTERNAL_BOOL | external () const |
| virtual void | external (EXTERNAL_BOOL ourbool) |
| virtual INTRINSIC_BOOL | intrinsic () const |
| virtual void | intrinsic (INTRINSIC_BOOL ourbool) |
| virtual FORMAL_BOOL | formal () const |
| virtual void | formal (FORMAL_BOOL ourbool) |
| virtual const Statement * | entry_ref () const |
| virtual Statement * | entry_ref () |
| virtual void | entry (Statement *entry) |
| virtual const Type & | type () const |
| | (aborts if called for a symbol that doesn't use a type)
|
| virtual int | is_entry () |
| | Returns 1 if this is an alternate entry.
|
| virtual void | print (ostream &o) const |
| | Print onto stream 'o'.
|
| virtual void | fill_in (const BinRep &binstr, ExprTable &exprs, const Dictionary< VoidPtrDef > &stmts, const Dictionary< VoidPtrDef > &commons, const Dictionary< VoidPtrDef > &equivalences) |
| | Fill in all relevant info from a binstr object.
|
| virtual int | structures_OK () const |
| | Check the structure of the data for errors or inconsistency Abort with error message if problems found, else continue without message.
|
| virtual void | exchange_convert (VDL &vdl) |
| | Convert the Symbol into the exchange format.
|
| virtual void | relink_dptrs (ProgramUnit &p) |
| | Change all pointers found in a SubroutineSymbol element to point into the given ProgramUnit.
|
Protected Attributes |
| unsigned | _external:1 |
| unsigned | _intrinsic:1 |
| unsigned | _formal:1 |
| | if both _external and _intrinsic are zero, it is the routine or program itself or an alternate ENTRY
|
| Statement * | _entry |
| | == 0 if none
|
Detailed Description
a Symbol of class SUBROUTINE_CLASS
Polaris C++ VDL - See also:
- Symbol.h
Symbol.h
SubroutineSymbol.h
Symbol.cc
A SubroutineSymbol is a Symbol representing the identifier for a program unit which begins with the Fortran keyword SUBROUTINE or an alternate entry of it.
The additional fields it adds to Symbol's fields are the entry, external, intrinsic and formal fields.
The entry field is a pointer to the entry statement for this symbol.
The external field indicates whether or not this symbol was declared EXTERNAL.
The intrinsic field indicates whether or not this symbol was recognized as or declared INTRINSIC.
The formal field indicates whether or not this symbol is a formal parameter (i.e. dummy procedure) of a function or subroutine.
The only virtual methods inherited from Symbol which are valid for this class (which will not give errors messages, with the exception of Symbol::is_array()) are those which are explicitly overridden here.
See Symbol for more information.
Note: The FunctionSymbol and SubroutineSymbol classes are both represented by the single ISETL SUBROUTINE class data structure.
Definition at line 56 of file SubroutineSymbol.h.
Constructor & Destructor Documentation
|
|
Constructor.
entry should normally be 0 if external or intrinsic is true.
Referenced by clone(), and clone_all(). |
|
|
... nothing to do (_entry should NOT be deleted)
Definition at line 1221 of file Symbol.cc. |
Member Function Documentation
| Symbol * SubroutineSymbol::clone |
( |
|
) |
const [virtual] |
|
| Symbol * SubroutineSymbol::clone_all |
( |
|
) |
const [virtual] |
|
| void SubroutineSymbol::external |
( |
EXTERNAL_BOOL |
ourbool |
) |
[virtual] |
|
| FORMAL_BOOL SubroutineSymbol::formal |
( |
|
) |
const [virtual] |
|
| void SubroutineSymbol::formal |
( |
FORMAL_BOOL |
ourbool |
) |
[virtual] |
|
| const Statement * SubroutineSymbol::entry_ref |
( |
|
) |
const [virtual] |
|
| Statement * SubroutineSymbol::entry_ref |
( |
|
) |
[virtual] |
|
| void SubroutineSymbol::entry |
( |
Statement * |
entry |
) |
[virtual] |
|
| const Type & SubroutineSymbol::type |
( |
|
) |
const [virtual] |
|
| int SubroutineSymbol::is_entry |
( |
|
) |
[virtual] |
|
| void SubroutineSymbol::print |
( |
ostream & |
o |
) |
const [virtual] |
|
|
|
Fill in all relevant info from a binstr object.
Implements Symbol. |
| int SubroutineSymbol::structures_OK |
( |
|
) |
const [virtual] |
|
|
|
Check the structure of the data for errors or inconsistency Abort with error message if problems found, else continue without message.
Reimplemented from Symbol.
Definition at line 1430 of file Symbol.cc.
References _entry. |
| void SubroutineSymbol::exchange_convert |
( |
VDL & |
vdl |
) |
[virtual] |
|
| void SubroutineSymbol::relink_dptrs |
( |
ProgramUnit & |
p |
) |
[virtual] |
|
Member Data Documentation
The documentation for this class was generated from the following files:
|