Vm Struct Reference

#include <vm.h>

Collaboration diagram for Vm:

Collaboration graph
[legend]

List of all members.


Detailed Description

virtual machine with its environment

Definition at line 344 of file vm.h.


Public Member Functions

 Vm (std::string fileName_)

Public Attributes

const std::string fileName
 input file name (useful for error/info messages)
VarSet glVars
 global variables
FncSet fncSet
 all function declarations/definitions
ValueStack vmStack
 common value stack (the workspace for commands)
CalleeSet calleeSet
 container for function names being called (and occurrences of their calls)
int callDepth
 current function call depth (make sense in run-time)
int maxCallDepth
 function call depth limit - feel free to change it to any (positive) number

Static Public Attributes

static const int DEF_MAX_CALL_DEPTH = 1024

Constructor & Destructor Documentation

Vm ( std::string  fileName_  )  [inline]

Definition at line 354 of file vm.h.


Member Data Documentation

const std::string fileName

input file name (useful for error/info messages)

Definition at line 345 of file vm.h.

Referenced by Builder::assign(), Builder::chkBlockStack(), VmRunner::Private::chkFncRefs(), Builder::chkTypeOnTop(), chkUnused(), VmRunner::Private::chkUnusedFncs(), VmRunner::Private::chkUnusedGlVars(), CmdFactory::createAssign(), CmdFactory::createBinary(), CmdFactory::createPrint(), CmdFactory::createPush(), CmdFactory::createUnary(), Builder::createVar(), Builder::evalBinOp(), Builder::evalUnOp(), CallCmd::exec(), InputCmd::exec(), WhileCmd::exec(), IfCmd::exec(), BinaryCmd::exec(), UnaryCmd::exec(), Builder::fncCall(), Builder::fncDecl(), Builder::fncDeclArg(), Builder::fncDeclInit(), Builder::fncDef(), Builder::fncDefArg(), Builder::fncDefBody(), Builder::fncDefInit(), Builder::fncDefVar(), Builder::glVar(), ValueStack::pop(), ValueStack::popToVar(), Builder::popTypeFromStack(), ValueStack::push(), ValueStack::pushFromVar(), Builder::pushToken(), and VmRunner::Private::run().

VarSet glVars

global variables

Definition at line 346 of file vm.h.

Referenced by CmdFactory::createAssign(), CmdFactory::createPush(), and GlVarCmd::exec().

FncSet fncSet

all function declarations/definitions

Definition at line 347 of file vm.h.

Referenced by FncFactory::Private::addDefinition(), CallCmd::exec(), Builder::fncCall(), and FncFactory::initVm().

ValueStack vmStack

common value stack (the workspace for commands)

Definition at line 348 of file vm.h.

Referenced by CallCmd::exec(), InputCmd::exec(), PrintCmd::exec(), WhileCmd::exec(), IfCmd::exec(), BinaryCmd::exec(), UnaryCmd::exec(), ArgCmd::exec(), LcVarCmd::exec(), GlVarCmd::exec(), ReturnCmd::exec(), PushValueCmd::exec(), ValueStack::pop(), ValueStack::push(), and VmRunner::Private::run().

CalleeSet calleeSet

container for function names being called (and occurrences of their calls)

Definition at line 349 of file vm.h.

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

int callDepth

current function call depth (make sense in run-time)

Definition at line 350 of file vm.h.

Referenced by CallCmd::exec().

int maxCallDepth

function call depth limit - feel free to change it to any (positive) number

Definition at line 351 of file vm.h.

Referenced by CallCmd::exec().

const int DEF_MAX_CALL_DEPTH = 1024 [static]

Definition at line 352 of file vm.h.


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