ooRexx  4.2.0-source
About: ooRexx (Open Object Rexx) is a free implementation of Object Rexx. Object Rexx is an enhancement of the classic Rexx interpreter; a full-featured programming language with a human-oriented syntax.
  Fossies Dox: ooRexx-4.2.0-source.tar.gz  ("inofficial" and yet experimental doxygen-generated source code documentation)  

RexxExpressionStack Class Reference

#include <ExpressionStack.hpp>

Collaboration diagram for RexxExpressionStack:
[legend]

Public Member Functions

void * operator new (size_t size, void *ptr)
 
 RexxExpressionStack (RexxObject **frames, size_t items)
 
 RexxExpressionStack ()
 
void live (size_t)
 
void liveGeneral (int reason)
 
void flatten (RexxEnvelope *)
 
void expandArgs (size_t, size_t, size_t, const char *)
 
RexxStringrequiredStringArg (size_t)
 
RexxStringoptionalStringArg (size_t)
 
RexxIntegerrequiredIntegerArg (size_t, size_t, const char *)
 
RexxIntegeroptionalIntegerArg (size_t, size_t, const char *)
 
RexxObjectrequiredBigIntegerArg (size_t, size_t, const char *)
 
RexxObjectoptionalBigIntegerArg (size_t, size_t, const char *)
 
void migrate (RexxActivity *)
 
void setFrame (RexxObject **frames, size_t items)
 
void send (RexxString *message, RexxObject *scope, size_t count, ProtectedObject &result)
 
void send (RexxString *message, size_t count, ProtectedObject &result)
 
void push (RexxObject *value)
 
RexxObjectpop ()
 
RexxObjectfastPop ()
 
RexxArrayargumentArray (size_t count)
 
RexxObject ** arguments (size_t count)
 
void replace (size_t offset, RexxObject *value)
 
size_t getSize ()
 
RexxObjectgetTop ()
 
void operatorResult (RexxObject *value)
 
void prefixResult (RexxObject *value)
 
void popn (size_t c)
 
void clear ()
 
RexxObjectpeek (size_t v)
 
RexxObject ** pointer (size_t v)
 
size_t location ()
 
void setTop (size_t v)
 
void toss ()
 
RexxObject ** getFrame ()
 

Protected Attributes

size_t size
 
RexxObject ** top
 
RexxObject ** stack
 

Detailed Description

Definition at line 53 of file ExpressionStack.hpp.

Constructor & Destructor Documentation

◆ RexxExpressionStack() [1/2]

RexxExpressionStack::RexxExpressionStack ( RexxObject **  frames,
size_t  items 
)
inline

Definition at line 57 of file ExpressionStack.hpp.

References size, stack, and top.

◆ RexxExpressionStack() [2/2]

RexxExpressionStack::RexxExpressionStack ( )
inline

Definition at line 58 of file ExpressionStack.hpp.

References OREF_NULL, size, stack, and top.

Member Function Documentation

◆ argumentArray()

RexxArray* RexxExpressionStack::argumentArray ( size_t  count)
inline

Definition at line 80 of file ExpressionStack.hpp.

References top.

◆ arguments()

RexxObject** RexxExpressionStack::arguments ( size_t  count)
inline

◆ clear()

void RexxExpressionStack::clear ( )
inline

Definition at line 88 of file ExpressionStack.hpp.

References stack, and top.

Referenced by RexxInstructionGuard::execute(), and RexxActivation::run().

◆ expandArgs()

void RexxExpressionStack::expandArgs ( size_t  argcount,
size_t  min,
size_t  max,
const char *  function 
)

◆ fastPop()

RexxObject* RexxExpressionStack::fastPop ( )
inline

Definition at line 79 of file ExpressionStack.hpp.

References top.

◆ flatten()

void RexxExpressionStack::flatten ( RexxEnvelope envelope)

Definition at line 77 of file ExpressionStack.cpp.

References cleanUpFlatten, flatten_reference, setUpFlatten, stack, and top.

◆ getFrame()

RexxObject** RexxExpressionStack::getFrame ( )
inline

Definition at line 94 of file ExpressionStack.hpp.

References stack.

Referenced by RexxActivation::run(), and RexxActivation::termination().

◆ getSize()

size_t RexxExpressionStack::getSize ( )
inline

Definition at line 83 of file ExpressionStack.hpp.

References size.

◆ getTop()

RexxObject* RexxExpressionStack::getTop ( )
inline

Definition at line 84 of file ExpressionStack.hpp.

References top.

◆ live()

void RexxExpressionStack::live ( size_t  liveMark)

Definition at line 50 of file ExpressionStack.cpp.

References memory_mark, stack, and top.

Referenced by RexxActivation::live().

◆ liveGeneral()

void RexxExpressionStack::liveGeneral ( int  reason)

Definition at line 64 of file ExpressionStack.cpp.

References memory_mark_general, stack, and top.

Referenced by RexxActivation::liveGeneral().

◆ location()

size_t RexxExpressionStack::location ( )
inline

Definition at line 91 of file ExpressionStack.hpp.

References stack, and top.

Referenced by RexxExpressionFunction::evaluate(), and RexxTarget::init().

◆ migrate()

void RexxExpressionStack::migrate ( RexxActivity activity)

Definition at line 97 of file ExpressionStack.cpp.

References RexxActivity::allocateStackFrame(), size, and stack.

Referenced by RexxActivation::run().

◆ operator new()

void* RexxExpressionStack::operator new ( size_t  size,
void *  ptr 
)
inline

Definition at line 56 of file ExpressionStack.hpp.

◆ operatorResult()

void RexxExpressionStack::operatorResult ( RexxObject value)
inline

Definition at line 85 of file ExpressionStack.hpp.

References top.

Referenced by RexxBinaryOperator::evaluate().

◆ optionalBigIntegerArg()

RexxObject * RexxExpressionStack::optionalBigIntegerArg ( size_t  position,
size_t  argcount,
const char *  function 
)

Process an argument and ensure it is a valid integer that can be expressed as a 64-bit value.

Parameters
positionThe argument position for any error messages.
argcountThe number of arguments passed to the function.
functionThe function name
Returns
An object that can be converted to a 64-bit value for pass-on to a native function.

Definition at line 290 of file ExpressionStack.cpp.

References Error_Incorrect_call_whole, Numerics::int64Object(), OREF_NULL, peek(), replace(), and reportException().

◆ optionalIntegerArg()

RexxInteger * RexxExpressionStack::optionalIntegerArg ( size_t  position,
size_t  argcount,
const char *  function 
)

◆ optionalStringArg()

RexxString * RexxExpressionStack::optionalStringArg ( size_t  position)

Definition at line 168 of file ExpressionStack.cpp.

References isOfClass, OREF_NULL, peek(), replace(), and RexxObject::requestString().

◆ peek()

RexxObject* RexxExpressionStack::peek ( size_t  v)
inline

◆ pointer()

RexxObject** RexxExpressionStack::pointer ( size_t  v)
inline

Definition at line 90 of file ExpressionStack.hpp.

References top.

Referenced by expandArgs().

◆ pop()

RexxObject* RexxExpressionStack::pop ( )
inline

◆ popn()

void RexxExpressionStack::popn ( size_t  c)
inline

◆ prefixResult()

void RexxExpressionStack::prefixResult ( RexxObject value)
inline

Definition at line 86 of file ExpressionStack.hpp.

References top.

Referenced by RexxExpressionMessage::evaluate(), and RexxUnaryOperator::evaluate().

◆ push()

◆ replace()

void RexxExpressionStack::replace ( size_t  offset,
RexxObject value 
)
inline

◆ requiredBigIntegerArg()

RexxObject * RexxExpressionStack::requiredBigIntegerArg ( size_t  position,
size_t  argcount,
const char *  function 
)

Process an argument and ensure it is a valid integer that can be expressed as a 64-bit value.

Parameters
positionThe argument position for any error messages.
argcountThe number of arguments passed to the function.
functionThe function name
Returns
An object that can be converted to a 64-bit value for pass-on to a native function.

Definition at line 261 of file ExpressionStack.cpp.

References Error_Incorrect_call_whole, Numerics::int64Object(), OREF_NULL, peek(), replace(), and reportException().

◆ requiredIntegerArg()

RexxInteger * RexxExpressionStack::requiredIntegerArg ( size_t  position,
size_t  argcount,
const char *  function 
)

◆ requiredStringArg()

RexxString * RexxExpressionStack::requiredStringArg ( size_t  position)

Definition at line 149 of file ExpressionStack.cpp.

References isOfClass, peek(), replace(), and RexxObject::requestString().

◆ send() [1/2]

void RexxExpressionStack::send ( RexxString message,
RexxObject scope,
size_t  count,
ProtectedObject result 
)
inline

◆ send() [2/2]

void RexxExpressionStack::send ( RexxString message,
size_t  count,
ProtectedObject result 
)
inline

Definition at line 75 of file ExpressionStack.hpp.

References top.

◆ setFrame()

void RexxExpressionStack::setFrame ( RexxObject **  frames,
size_t  items 
)
inline

Definition at line 71 of file ExpressionStack.hpp.

References OREF_NULL, size, stack, and top.

Referenced by RexxActivity::allocateStackFrame().

◆ setTop()

void RexxExpressionStack::setTop ( size_t  v)
inline

Definition at line 92 of file ExpressionStack.hpp.

References stack, and top.

Referenced by RexxExpressionFunction::evaluate(), and RexxTarget::next().

◆ toss()

Member Data Documentation

◆ size

size_t RexxExpressionStack::size
protected

Definition at line 98 of file ExpressionStack.hpp.

Referenced by getSize(), migrate(), RexxExpressionStack(), and setFrame().

◆ stack

RexxObject** RexxExpressionStack::stack
protected

◆ top


The documentation for this class was generated from the following files: