CalleeSet Class Reference

#include <vm.h>

Collaboration diagram for CalleeSet:

Collaboration graph
[legend]

List of all members.


Detailed Description

container for function names being called related to all places where are they called from
Note:
there is some effort to sort calls by occurrence

Definition at line 313 of file vm.h.


Public Types

typedef std::string * TStringList
typedef TokenTTokenList

Public Member Functions

 CalleeSet ()
 ~CalleeSet ()
void add (std::string name, Token tCall)
bool isCalled (std::string name)
 return true if given function is called somewhere
void getNames (TStringList &)
 dump all names of function being called to vector of strings
bool getCalls (std::string name, TTokenList &)
 dump all call occurrences for function with given name

Private Attributes

Privated

Classes

struct  Private

Member Typedef Documentation

typedef std::string* TStringList

Definition at line 315 of file vm.h.

typedef Token* TTokenList

Definition at line 316 of file vm.h.


Constructor & Destructor Documentation

CalleeSet (  ) 

Definition at line 538 of file vm.cc.

~CalleeSet (  ) 

Definition at line 542 of file vm.cc.

References d.


Member Function Documentation

void add ( std::string  name,
Token  tCall 
)

add function call to container

Parameters:
name name of function being called
tCall token corresponding to function call

Definition at line 545 of file vm.cc.

References d, ETOKEN_NULL, CalleeSet::Private::map, and Token::type.

Referenced by FncFactory::Private::addDefinition(), VmRunner::Private::chkUnusedFncs(), Builder::fncCall(), and FncFactory::initVm().

Here is the caller graph for this function:

bool isCalled ( std::string  name  ) 

return true if given function is called somewhere

Definition at line 565 of file vm.cc.

References d, and CalleeSet::Private::map.

Referenced by VmRunner::Private::chkUnusedFncs().

Here is the caller graph for this function:

void getNames ( TStringList list  ) 

dump all names of function being called to vector of strings

Definition at line 569 of file vm.cc.

References d, and CalleeSet::Private::map.

Referenced by VmRunner::Private::chkFncRefs().

Here is the caller graph for this function:

bool getCalls ( std::string  name,
TTokenList list 
)

dump all call occurrences for function with given name

Definition at line 577 of file vm.cc.

References d, CalleeSet::Private::map, and CalleeSet::Private::SortableToken::t.

Referenced by VmRunner::Private::chkFncRefs(), and VmRunner::Private::chkUnusedFncs().

Here is the caller graph for this function:


Member Data Documentation

Private* d [private]

Definition at line 337 of file vm.h.

Referenced by add(), getCalls(), getNames(), isCalled(), and ~CalleeSet().


The documentation for this class was generated from the following files:
Generated on Sat Jul 4 18:33:09 2009 for vyp08 (compiler and interpreter of VYP08 language) by  doxygen 1.5.4