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)  

RexxActivity Class Reference

#include <RexxActivity.hpp>

Inheritance diagram for RexxActivity:
[legend]
Collaboration diagram for RexxActivity:
[legend]

Public Member Functions

void * operator new (size_t)
 
void * operator new (size_t size, void *ptr)
 
void operator delete (void *)
 
void operator delete (void *, void *)
 
 RexxActivity (RESTORETYPE restoreType)
 
 RexxActivity ()
 
 RexxActivity (bool)
 
void reset ()
 
void runThread ()
 
wholenumber_t error ()
 
wholenumber_t error (RexxActivationBase *, RexxDirectory *errorInfo)
 
wholenumber_t errorNumber (RexxDirectory *conditionObject)
 
wholenumber_t displayCondition (RexxDirectory *conditionObject)
 
bool raiseCondition (RexxString *, RexxObject *, RexxString *, RexxObject *, RexxObject *)
 
bool raiseCondition (RexxDirectory *)
 
RexxDirectorycreateConditionObject (RexxString *, RexxObject *, RexxString *, RexxObject *, RexxObject *)
 
void raiseException (wholenumber_t, RexxString *, RexxArray *, RexxObject *)
 
RexxDirectorycreateExceptionObject (wholenumber_t, RexxString *, RexxArray *, RexxObject *)
 
void generateProgramInformation (RexxDirectory *exObj)
 
void reportAnException (wholenumber_t, const char *)
 
void reportAnException (wholenumber_t, const char *, const char *)
 
void reportAnException (wholenumber_t, RexxObject *, const char *)
 
void reportAnException (wholenumber_t, RexxObject *, wholenumber_t)
 
void reportAnException (wholenumber_t, const char *, RexxObject *)
 
void reportAnException (wholenumber_t, const char *, wholenumber_t)
 
void reportAnException (wholenumber_t, const char *, wholenumber_t, RexxObject *)
 
void reportAnException (wholenumber_t, const char *, RexxObject *, wholenumber_t)
 
void reportAnException (wholenumber_t, wholenumber_t)
 
void reportAnException (wholenumber_t, wholenumber_t, wholenumber_t)
 
void reportAnException (wholenumber_t, wholenumber_t, RexxObject *)
 
void reportAnException (wholenumber_t)
 
void reportAnException (wholenumber_t, RexxObject *)
 
void reportAnException (wholenumber_t, RexxObject *, RexxObject *)
 
void reportAnException (wholenumber_t, RexxObject *, RexxObject *, RexxObject *)
 
void reportAnException (wholenumber_t, RexxObject *, RexxObject *, RexxObject *, RexxObject *)
 
void reportAnException (wholenumber_t, const char *, RexxObject *, const char *, RexxObject *)
 
void reraiseException (RexxDirectory *)
 
void raisePropagate (RexxDirectory *)
 
RexxObjectdisplay (RexxDirectory *)
 
RexxObjectdisplayDebug (RexxDirectory *)
 
RexxStringbuildMessage (wholenumber_t, RexxArray *)
 
RexxStringmessageSubstitution (RexxString *, RexxArray *)
 
void live (size_t)
 
void liveGeneral (int reason)
 
void flatten (RexxEnvelope *)
 
void run ()
 
void run (RexxMessage *target)
 
void checkActivationStack ()
 
void updateFrameMarkers ()
 
void pushStackFrame (RexxActivationBase *new_activation)
 
void createNewActivationStack ()
 
void popStackFrame (bool reply)
 
void popStackFrame (RexxActivationBase *)
 
void unwindStackFrame ()
 
void unwindToDepth (size_t depth)
 
void unwindToFrame (RexxActivation *frame)
 
void cleanupStackFrame (RexxActivationBase *poppedStackFrame)
 
RexxArraygenerateStackFrames (bool skipFirst)
 
RexxActivityspawnReply ()
 
void exitKernel ()
 
void enterKernel ()
 
RexxObjectprevious ()
 
void waitReserve (RexxObject *)
 
void guardWait ()
 
void guardPost ()
 
void guardSet ()
 
void checkDeadLock (RexxActivity *)
 
void postDispatch ()
 
void kill (RexxDirectory *)
 
void joinKernelQueue ()
 
void relinquish ()
 
bool halt (RexxString *)
 
bool setTrace (bool)
 
void yieldControl ()
 
void yield ()
 
void releaseAccess ()
 
void requestAccess ()
 
void checkStackSpace ()
 
void cleanupActivityResources ()
 
void terminatePoolActivity ()
 
thread_id_t threadIdMethod ()
 
bool isThread (thread_id_t id)
 
bool isClauseExitUsed ()
 
void queryTrcHlt ()
 
bool callExit (RexxActivation *activation, const char *exitName, int function, int subfunction, void *exitbuffer)
 
void callInitializationExit (RexxActivation *)
 
void callTerminationExit (RexxActivation *)
 
bool callSayExit (RexxActivation *, RexxString *)
 
bool callTraceExit (RexxActivation *, RexxString *)
 
bool callTerminalInputExit (RexxActivation *, RexxString *&)
 
bool callDebugInputExit (RexxActivation *, RexxString *&)
 
bool callObjectFunctionExit (RexxActivation *, RexxString *, RexxObject *, ProtectedObject &, RexxObject **, size_t)
 
bool callFunctionExit (RexxActivation *, RexxString *, RexxObject *, ProtectedObject &, RexxObject **, size_t)
 
bool callScriptingExit (RexxActivation *, RexxString *, RexxObject *, ProtectedObject &, RexxObject **, size_t)
 
bool callCommandExit (RexxActivation *, RexxString *, RexxString *, ProtectedObject &result, ProtectedObject &condition)
 
bool callPullExit (RexxActivation *, RexxString *&)
 
bool callPushExit (RexxActivation *, RexxString *, int)
 
bool callQueueSizeExit (RexxActivation *, RexxInteger *&)
 
bool callQueueNameExit (RexxActivation *, RexxString *&)
 
bool callHaltTestExit (RexxActivation *)
 
bool callHaltClearExit (RexxActivation *)
 
bool callTraceTestExit (RexxActivation *, bool)
 
bool callNovalueExit (RexxActivation *, RexxString *, RexxObject *&)
 
bool callValueExit (RexxActivation *, RexxString *, RexxString *, RexxObject *, RexxObject *&)
 
void traceOutput (RexxActivation *, RexxString *)
 
void sayOutput (RexxActivation *, RexxString *)
 
void queue (RexxActivation *, RexxString *, int)
 
RexxStringtraceInput (RexxActivation *)
 
RexxStringpullInput (RexxActivation *)
 
RexxObjectlineOut (RexxString *)
 
RexxStringlineIn (RexxActivation *)
 
void generateRandomNumberSeed ()
 
void setupAttachedActivity (InterpreterInstance *interpreter)
 
void addToInstance (InterpreterInstance *interpreter)
 
void detachInstance ()
 
void detachThread ()
 
InterpreterInstancegetInstance ()
 
void nestAttach ()
 
bool isNestedAttach ()
 
void returnAttach ()
 
void activate ()
 
void deactivate ()
 
bool isActive ()
 
bool isInactive ()
 
size_t getActivationLevel ()
 
void restoreActivationLevel (size_t l)
 
bool isSuspended ()
 
void setSuspended (bool s)
 
bool isInterpreterRoot ()
 
void setInterpreterRoot ()
 
void setNestedActivity (RexxActivity *a)
 
RexxActivitygetNestedActivity ()
 
bool isAttached ()
 
void validateThread ()
 
SecurityManagergetEffectiveSecurityManager ()
 
SecurityManagergetInstanceSecurityManager ()
 
void inheritSettings (RexxActivity *parent)
 
void setupExits ()
 
void enterCurrentThread ()
 
void exitCurrentThread ()
 
void run (ActivityDispatcher &target)
 
void run (CallbackDispatcher &target)
 
void run (TrappingDispatcher &target)
 
RexxActivationgetCurrentRexxFrame ()
 
RexxActivationBasegetTopStackFrame ()
 
size_t getActivationDepth ()
 
NumericSettingsgetNumericSettings ()
 
RexxObjectrunningRequires (RexxString *program)
 
void addRunningRequires (RexxString *program)
 
void removeRunningRequires (RexxObject *program)
 
void resetRunningRequires ()
 
bool checkRequires (RexxString *n)
 
void waitForDispatch ()
 
void clearWait ()
 
uint64_t getRandomSeed ()
 
void setRandomSeed (uint64_t seed)
 
RexxStringgetLastMessageName ()
 
RexxMethodgetLastMethod ()
 
RexxThreadContextgetThreadContext ()
 
RexxNativeActivationgetApiContext ()
 
void allocateStackFrame (RexxExpressionStack *stack, size_t entries)
 
RexxObject ** allocateFrame (size_t entries)
 
void releaseStackFrame (RexxObject **frame)
 
void allocateLocalVariableFrame (RexxLocalVariables *locals)
 
RexxDirectorygetCurrentCondition ()
 
void clearCurrentCondition ()
 
void setExitHandler (int exitNum, REXXPFN e)
 
void setExitHandler (int exitNum, const char *e)
 
void setExitHandler (RXSYSEXIT &e)
 
RexxStringresolveProgramName (RexxString *, RexxString *, RexxString *)
 
void createMethodContext (MethodContext &context, RexxNativeActivation *owner)
 
void createCallContext (CallContext &context, RexxNativeActivation *owner)
 
void createExitContext (ExitContext &context, RexxNativeActivation *owner)
 
RexxObjectgetLocalEnvironment (RexxString *name)
 
RexxDirectorygetLocal ()
 
CommandHandlerresolveCommandHandler (RexxString *)
 
- Public Member Functions inherited from RexxInternalObject
void * operator new (size_t, RexxClass *)
 
void * operator new (size_t, RexxClass *, RexxObject **, size_t)
 
void * operator new (size_t size, void *ptr)
 
void operator delete (void *)
 
void operator delete (void *p, void *ptr)
 
 RexxInternalObject ()
 
 RexxInternalObject (RESTORETYPE restoreType)
 
virtual ~RexxInternalObject ()
 
 operator RexxObject * ()
 
size_t getObjectSize ()
 
void setObjectSize (size_t s)
 
size_t getObjectDataSize ()
 
void * getObjectDataSpace ()
 
void clearObject ()
 
void clearObject (size_t l)
 
void setVirtualFunctions (void *t)
 
void setInitHeader (size_t s, size_t markword)
 
void setInitHeader (size_t markword)
 
void setObjectLive (size_t markword)
 
void setHasReferences ()
 
void setHasNoReferences ()
 
bool hasReferences ()
 
bool hasNoReferences ()
 
void setPrimitive ()
 
void setNonPrimitive ()
 
bool isPrimitive ()
 
bool isNonPrimitive ()
 
bool isObjectMarked (size_t markword)
 
void setObjectMark (size_t markword)
 
void clearObjectMark ()
 
bool isObjectLive (size_t mark)
 
bool isObjectDead (size_t mark)
 
bool isOldSpace ()
 
bool isNewSpace ()
 
void setNewSpace ()
 
void setOldSpace ()
 
void makeProxiedObject ()
 
bool isProxyObject ()
 
bool isSubClassOrEnhanced ()
 
bool isBaseClass ()
 
size_t getObjectTypeNumber ()
 
RexxBehaviourgetObjectType ()
 
bool isObjectType (RexxBehaviour *b)
 
bool isObjectType (size_t t)
 
bool isSameType (RexxInternalObject *o)
 
void setBehaviour (RexxBehaviour *b)
 
virtual RexxObjectmakeProxy (RexxEnvelope *)
 
virtual RexxObjectcopy ()
 
virtual RexxObjectevaluate (RexxActivation *, RexxExpressionStack *)
 
virtual RexxObjectgetValue (RexxActivation *)
 
virtual RexxObjectgetValue (RexxVariableDictionary *)
 
virtual RexxObjectgetRealValue (RexxActivation *)
 
virtual RexxObjectgetRealValue (RexxVariableDictionary *)
 
virtual void uninit ()
 
virtual HashCode hash ()
 
virtual HashCode getHashValue ()
 
HashCode identityHash ()
 
virtual bool truthValue (int)
 
virtual bool logicalValue (logical_t &)
 
virtual RexxStringmakeString ()
 
virtual void copyIntoTail (RexxCompoundTail *buffer)
 
virtual RexxStringprimitiveMakeString ()
 
virtual RexxArraymakeArray ()
 
virtual RexxStringstringValue ()
 
virtual RexxIntegerintegerValue (size_t)
 
virtual bool numberValue (wholenumber_t &result, size_t precision)
 
virtual bool numberValue (wholenumber_t &result)
 
virtual bool unsignedNumberValue (stringsize_t &result, size_t precision)
 
virtual bool unsignedNumberValue (stringsize_t &result)
 
virtual bool doubleValue (double &result)
 
virtual RexxNumberStringnumberString ()
 
virtual bool isEqual (RexxObject *)
 
virtual bool isInstanceOf (RexxClass *)
 
virtual RexxMethodinstanceMethod (RexxString *)
 
virtual RexxSupplierinstanceMethods (RexxClass *)
 
void hasUninit ()
 
void removedUninit ()
 
void printObject ()
 
RexxObjectclone ()
 
- Public Member Functions inherited from RexxVirtualBase
virtual RexxObjectunflatten (RexxEnvelope *)
 

Static Public Member Functions

static void initializeThreadContext ()
 
- Static Public Member Functions inherited from RexxInternalObject
static size_t getObjectHeaderSize ()
 

Protected Member Functions

ExitHandlergetExitHandler (int exitNum)
 
bool isExitEnabled (int exitNum)
 
void disableExit (int exitNum)
 
- Protected Member Functions inherited from RexxVirtualBase
virtual ~RexxVirtualBase ()
 
virtual void baseVirtual ()
 

Protected Attributes

InterpreterInstanceinstance
 
ActivityContext threadContext
 
RexxActivityoldActivity
 
RexxActivationStack frameStack
 
RexxDirectoryconditionobj
 
RexxTablerequiresTable
 
RexxMessagedispatchMessage
 
RexxInternalStackactivations
 
size_t activationStackSize
 
size_t stackFrameDepth
 
RexxActivationcurrentRexxFrame
 
RexxActivationBasetopStackFrame
 
RexxStringcurrentExit
 
RexxObjectwaitingObject
 
SysSemaphore runsem
 
SysSemaphore guardsem
 
SysActivity currentThread
 
NumericSettingsnumericSettings
 
bool stackcheck
 
bool exit
 
bool requestingString
 
bool suspended
 
bool interpreterRoot
 
bool attached
 
size_t nestedCount
 
size_t attachCount
 
char * stackBase
 
bool clauseExitUsed
 
uint64_t randomSeed
 
ExitHandler sysexits [(RXNOOFEXITS - 1)]
 
ProtectedObjectprotectedObjects
 
ActivationFrameactivationFrames
 
RexxActivitynestedActivity
 

Static Protected Attributes

static RexxThreadInterface threadContextFunctions
 
static MethodContextInterface methodContextFunctions
 
static CallContextInterface callContextFunctions
 
static ExitContextInterface exitContextFunctions
 

Friends

class ProtectedObject
 
class ActivationFrame
 

Additional Inherited Members

- Public Attributes inherited from RexxInternalObject
ObjectHeader header
 
RexxBehaviourbehaviour
 

Detailed Description

Definition at line 127 of file RexxActivity.hpp.

Constructor & Destructor Documentation

◆ RexxActivity() [1/3]

RexxActivity::RexxActivity ( RESTORETYPE  restoreType)
inline

Definition at line 136 of file RexxActivity.hpp.

◆ RexxActivity() [2/3]

RexxActivity::RexxActivity ( )

◆ RexxActivity() [3/3]

Member Function Documentation

◆ activate()

void RexxActivity::activate ( )
inline

◆ addRunningRequires()

void RexxActivity::addRunningRequires ( RexxString program)
inline

Definition at line 285 of file RexxActivity.hpp.

References requiresTable, and RexxTable::stringAdd().

Referenced by InterpreterInstance::runRequires().

◆ addToInstance()

void RexxActivity::addToInstance ( InterpreterInstance interpreter)

Set up an activity as a root activity used either for a main interpreter thread or an attached thread.

Parameters
interpreterThe interpreter instance this thread belongs to.

Definition at line 1667 of file RexxActivity.cpp.

References RexxThreadContext_::functions, InterpreterInstance::getInstanceContext(), instance, RexxThreadContext_::instance, ActivityContext::owningActivity, setupExits(), ActivityContext::threadContext, threadContext, and threadContextFunctions.

Referenced by setupAttachedActivity(), and InterpreterInstance::spawnActivity().

◆ allocateFrame()

RexxObject** RexxActivity::allocateFrame ( size_t  entries)
inline

Definition at line 304 of file RexxActivity.hpp.

References RexxActivationStack::allocateFrame(), and frameStack.

Referenced by RexxActivation::run().

◆ allocateLocalVariableFrame()

◆ allocateStackFrame()

void RexxActivity::allocateStackFrame ( RexxExpressionStack stack,
size_t  entries 
)
inline

◆ buildMessage()

RexxString * RexxActivity::buildMessage ( wholenumber_t  messageCode,
RexxArray substitutions 
)

Build a message and perform the indicated substitutions.

Parameters
messageCodeThe target message code
substitutionsAn array of substitution values
Returns
The message with the substitution values inserted.

Definition at line 1011 of file RexxActivity.cpp.

References Error_Execution_error_condition, SystemInterpreter::getMessageText(), messageSubstitution(), OREF_NULL, and reportException().

Referenced by createExceptionObject(), InternalActivationFrame::createStackFrame(), RexxNativeActivation::createStackFrame(), RexxActivation::formatSourcelessTraceLine(), RexxSource::traceBack(), and RexxActivation::traceEntry().

◆ callCommandExit()

◆ callDebugInputExit()

bool RexxActivity::callDebugInputExit ( RexxActivation activation,
RexxString *&  inputstring 
)

◆ callExit()

bool RexxActivity::callExit ( RexxActivation activation,
const char *  exitName,
int  function,
int  subfunction,
void *  exitbuffer 
)

Call an individual exit handler.

Parameters
activationThe activation this is in the context of.
exitNameThe logical name of the handler.
functionThe exit function.
subfunctionThe exit subfunction.
exitbufferThe parameter structure for the exit in question.
Returns
The exit handling state.

Definition at line 2030 of file RexxActivity.cpp.

References ExitHandler::call(), disableExit(), Error_System_service_service, getExitHandler(), reportException(), RXEXIT_HANDLED, RXEXIT_RAISE_ERROR, and RXSIO.

Referenced by callCommandExit(), callDebugInputExit(), callFunctionExit(), callHaltClearExit(), callHaltTestExit(), callInitializationExit(), callNovalueExit(), callObjectFunctionExit(), callPullExit(), callPushExit(), callQueueNameExit(), callQueueSizeExit(), callSayExit(), callScriptingExit(), callTerminalInputExit(), callTerminationExit(), callTraceExit(), callTraceTestExit(), and callValueExit().

◆ callFunctionExit()

◆ callHaltClearExit()

bool RexxActivity::callHaltClearExit ( RexxActivation activation)

Definition at line 2661 of file RexxActivity.cpp.

References callExit(), isExitEnabled(), RXHLT, and RXHLTCLR.

Referenced by RexxActivation::trap().

◆ callHaltTestExit()

bool RexxActivity::callHaltTestExit ( RexxActivation activation)

◆ callInitializationExit()

void RexxActivity::callInitializationExit ( RexxActivation activation)

Definition at line 2054 of file RexxActivity.cpp.

References callExit(), isExitEnabled(), RXINI, and RXINIEXT.

Referenced by RexxActivation::run().

◆ callNovalueExit()

bool RexxActivity::callNovalueExit ( RexxActivation activation,
RexxString variableName,
RexxObject *&  value 
)

◆ callObjectFunctionExit()

◆ callPullExit()

bool RexxActivity::callPullExit ( RexxActivation activation,
RexxString *&  inputstring 
)

◆ callPushExit()

bool RexxActivity::callPushExit ( RexxActivation activation,
RexxString inputstring,
int  lifo_flag 
)

◆ callQueueNameExit()

◆ callQueueSizeExit()

bool RexxActivity::callQueueSizeExit ( RexxActivation activation,
RexxInteger *&  returnsize 
)

Definition at line 2573 of file RexxActivity.cpp.

References callExit(), isExitEnabled(), new_integer(), RXMSQ, and RXMSQSIZ.

◆ callSayExit()

bool RexxActivity::callSayExit ( RexxActivation activation,
RexxString sayoutput 
)

◆ callScriptingExit()

◆ callTerminalInputExit()

bool RexxActivity::callTerminalInputExit ( RexxActivation activation,
RexxString *&  inputstring 
)

◆ callTerminationExit()

void RexxActivity::callTerminationExit ( RexxActivation activation)

◆ callTraceExit()

bool RexxActivity::callTraceExit ( RexxActivation activation,
RexxString traceoutput 
)

◆ callTraceTestExit()

bool RexxActivity::callTraceTestExit ( RexxActivation activation,
bool  currentsetting 
)

◆ callValueExit()

bool RexxActivity::callValueExit ( RexxActivation activation,
RexxString selector,
RexxString variableName,
RexxObject newValue,
RexxObject *&  value 
)

◆ checkActivationStack()

void RexxActivity::checkActivationStack ( )

Check the activation stack to see if we need to expand the size.

Definition at line 1414 of file RexxActivity.cpp.

References ACT_STACK_SIZE, activations, activationStackSize, new_internalstack(), RexxInternalStack::peek(), RexxInternalStack::push(), and stackFrameDepth.

Referenced by createNewActivationStack(), and pushStackFrame().

◆ checkDeadLock()

void RexxActivity::checkDeadLock ( RexxActivity targetActivity)

◆ checkRequires()

bool RexxActivity::checkRequires ( RexxString n)
inline

◆ checkStackSpace()

◆ cleanupActivityResources()

void RexxActivity::cleanupActivityResources ( )

Do cleanup of activity resources when an activity is completely shutdown and discarded.

Definition at line 172 of file RexxActivity.cpp.

References SysSemaphore::close(), SysActivity::close(), currentThread, guardsem, and runsem.

Referenced by ActivityManager::poolActivity(), and ActivityManager::returnRootActivity().

◆ cleanupStackFrame()

void RexxActivity::cleanupStackFrame ( RexxActivationBase poppedStackFrame)

◆ clearCurrentCondition()

void RexxActivity::clearCurrentCondition ( )
inline

Definition at line 320 of file RexxActivity.hpp.

References conditionobj, and OREF_NULL.

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

◆ clearWait()

void RexxActivity::clearWait ( )
inline

Definition at line 290 of file RexxActivity.hpp.

References SysSemaphore::reset(), and runsem.

Referenced by ActivityManager::addWaitingActivity().

◆ createCallContext()

void RexxActivity::createCallContext ( CallContext context,
RexxNativeActivation owner 
)

Set up a call context for use before a call out.

Parameters
contextThe method context to initialize.
ownerThe native activation that owns this context.

Definition at line 3153 of file RexxActivity.cpp.

References callContextFunctions, CallContext::context, RexxCallContext_::functions, ActivityContext::threadContext, CallContext::threadContext, threadContext, and RexxCallContext_::threadContext.

Referenced by RexxNativeActivation::callNativeRoutine().

◆ createConditionObject()

RexxDirectory * RexxActivity::createConditionObject ( RexxString condition,
RexxObject rc,
RexxString description,
RexxObject additional,
RexxObject result 
)

Create a condition object from the provided information.

Parameters
conditionThe name of the raised condition.
rcThe rc value (can be null)
descriptionThe description string.
additionalAdditional information.
resultresult information.
Returns
The constructed condition object (a directory).

Definition at line 488 of file RexxActivity.cpp.

References generateProgramInformation(), new_directory(), OREF_NULL, RexxDirectory::put(), and TheFalseObject.

Referenced by callCommandExit(), SecurityManager::checkCommand(), RexxActivation::command(), CommandHandlerDispatcher::complete(), and raiseCondition().

◆ createExceptionObject()

RexxDirectory * RexxActivity::createExceptionObject ( wholenumber_t  errcode,
RexxString description,
RexxArray additional,
RexxObject result 
)

Create a new error exception object.

Parameters
errcodeThe error code to raise.
descriptionThe description string.
additionalMessage substitution information.
resultThe result object.
Returns
The created exception dictionary.

Definition at line 813 of file RexxActivity.cpp.

References buildMessage(), Error_Execution_error_condition, generateProgramInformation(), SystemInterpreter::getMessageText(), new_array(), new_directory(), new_integer(), new_string(), OREF_NULL, RexxDirectory::put(), reportException(), TheFalseObject, TheNilObject, and work.

Referenced by raiseException().

◆ createExitContext()

void RexxActivity::createExitContext ( ExitContext context,
RexxNativeActivation owner 
)

Set up an exit context for use before a call out.

Parameters
contextThe method context to initialize.
ownerThe native activation that owns this context.

Definition at line 3161 of file RexxActivity.cpp.

References ExitContext::context, exitContextFunctions, RexxExitContext_::functions, ActivityContext::threadContext, ExitContext::threadContext, threadContext, and RexxExitContext_::threadContext.

Referenced by ContextCommandHandlerDispatcher::run(), and ContextExitHandlerDispatcher::run().

◆ createMethodContext()

void RexxActivity::createMethodContext ( MethodContext context,
RexxNativeActivation owner 
)

Set up a method context for use before a call out.

Parameters
contextThe method context to initialize.
ownerThe native activation that owns this context.

Definition at line 3138 of file RexxActivity.cpp.

References MethodContext::context, RexxMethodContext_::functions, methodContextFunctions, ActivityContext::threadContext, MethodContext::threadContext, threadContext, and RexxMethodContext_::threadContext.

Referenced by RexxNativeActivation::run().

◆ createNewActivationStack()

void RexxActivity::createNewActivationStack ( )

Create a new set of activation stack frames on this activity. The new frame will have a RexxNativeActivation that's marked as a stack base frame. Additional call frames are pushed on top of that activation. Any operations that unwind the stack frames will stop when they hit the activation stack base.

Definition at line 1486 of file RexxActivity.cpp.

References activations, checkActivationStack(), ActivityManager::newNativeActivation(), RexxInternalStack::push(), RexxNativeActivation::setStackBase(), stackFrameDepth, and updateFrameMarkers().

Referenced by RexxMemory::createImage(), RexxActivity(), run(), and setupAttachedActivity().

◆ deactivate()

void RexxActivity::deactivate ( )
inline

Definition at line 256 of file RexxActivity.hpp.

References nestedCount.

Referenced by Interpreter::createInstance(), exitCurrentThread(), and runThread().

◆ detachInstance()

void RexxActivity::detachInstance ( )

Cleanup the resources for a detached activity, including removing the suspended state from a pushed activity nest.

Definition at line 1723 of file RexxActivity.cpp.

References attached, instance, nestedActivity, OREF_NULL, and setSuspended().

Referenced by InterpreterInstance::poolActivity(), and ActivityManager::returnRootActivity().

◆ detachThread()

void RexxActivity::detachThread ( )

Detach a thread from the interpreter instance,

Definition at line 1714 of file RexxActivity.cpp.

References InterpreterInstance::detachThread(), and instance.

Referenced by DetachThread().

◆ disableExit()

void RexxActivity::disableExit ( int  exitNum)
inlineprotected

Definition at line 338 of file RexxActivity.hpp.

References ExitHandler::disable(), and getExitHandler().

Referenced by callExit().

◆ display()

◆ displayCondition()

wholenumber_t RexxActivity::displayCondition ( RexxDirectory errorInfo)

Display error information and traceback lines for a Syntax condition.

Parameters
errorInfoThe condition object with the error information
Returns
The major error code for the syntax error, if this is indeed a syntax conditon.

Definition at line 376 of file RexxActivity.cpp.

References RexxDirectory::at(), display(), Error_Interpretation, RexxString::isEqual(), RexxObject::numberValue(), and OREF_NULL.

Referenced by DisplayCondition(), and error().

◆ displayDebug()

◆ enterCurrentThread()

void RexxActivity::enterCurrentThread ( )

Enter the current thread for an API call.

Definition at line 201 of file RexxActivity.cpp.

References activate(), ActivityManager::currentActivity, and requestAccess().

Referenced by ApiContext::ApiContext(), and ActivityManager::getActivity().

◆ enterKernel()

void RexxActivity::enterKernel ( )

Definition at line 1757 of file RexxActivity.cpp.

References popStackFrame(), and requestAccess().

Referenced by CalloutBlock::~CalloutBlock().

◆ error() [1/2]

◆ error() [2/2]

wholenumber_t RexxActivity::error ( RexxActivationBase activation,
RexxDirectory errorInfo 
)

◆ errorNumber()

wholenumber_t RexxActivity::errorNumber ( RexxDirectory conditionObject)

Extract an error number from a syntax condition object.

Parameters
conditionObjectThe condition object for the extract.
Returns
The RC value associated with the condition.

Definition at line 408 of file RexxActivity.cpp.

References RexxDirectory::at(), Error_Interpretation, RexxObject::numberValue(), and OREF_NULL.

Referenced by ActivityDispatcher::handleError().

◆ exitCurrentThread()

void RexxActivity::exitCurrentThread ( )

◆ exitKernel()

◆ flatten()

void RexxActivity::flatten ( RexxEnvelope envelope)
virtual

Reimplemented from RexxVirtualBase.

Definition at line 1369 of file RexxActivity.cpp.

◆ generateProgramInformation()

void RexxActivity::generateProgramInformation ( RexxDirectory exobj)

◆ generateRandomNumberSeed()

void RexxActivity::generateRandomNumberSeed ( )

◆ generateStackFrames()

RexxArray * RexxActivity::generateStackFrames ( bool  skipFirst)

Generate a list of stack frames for an Exception object.

Parameters
skipFirstDetermines if we should skip the first frame. Used primarily for the RexxContext stackFrames() method to avoid returning the stackframes method as the first item.
Returns
An array of the stack frames in the call context.

Definition at line 976 of file RexxActivity.cpp.

References activationFrames, RexxArray::append(), ActivationFrame::createStackFrame(), new_array(), and ActivationFrame::next.

Referenced by RexxActivation::getStackFrames().

◆ getActivationDepth()

size_t RexxActivity::getActivationDepth ( )
inline

Definition at line 282 of file RexxActivity.hpp.

References stackFrameDepth.

◆ getActivationLevel()

size_t RexxActivity::getActivationLevel ( )
inline

◆ getApiContext()

RexxNativeActivation* RexxActivity::getApiContext ( )
inline

Definition at line 297 of file RexxActivity.hpp.

References topStackFrame.

Referenced by ApiContext::ApiContext(), contextToActivation(), and run().

◆ getCurrentCondition()

RexxDirectory* RexxActivity::getCurrentCondition ( )
inline

Definition at line 319 of file RexxActivity.hpp.

References conditionobj.

◆ getCurrentRexxFrame()

◆ getEffectiveSecurityManager()

SecurityManager * RexxActivity::getEffectiveSecurityManager ( )

Retrieve the current security manager instance.

Returns
the security manager instance in effect for the activity.

Definition at line 2782 of file RexxActivity.cpp.

References InterpreterInstance::getSecurityManager(), RexxActivationBase::getSecurityManager(), instance, OREF_NULL, and topStackFrame.

Referenced by RexxDirectory::atRexx(), PackageManager::loadRequires(), and RexxObject::processProtectedMethod().

◆ getExitHandler()

ExitHandler& RexxActivity::getExitHandler ( int  exitNum)
inlineprotected

Definition at line 336 of file RexxActivity.hpp.

References sysexits.

Referenced by callExit(), disableExit(), isExitEnabled(), and setExitHandler().

◆ getInstance()

◆ getInstanceSecurityManager()

SecurityManager * RexxActivity::getInstanceSecurityManager ( )

Return the security manager in effect for this instance.

Returns
The globally defined security manager.

Definition at line 2803 of file RexxActivity.cpp.

References InterpreterInstance::getSecurityManager(), and instance.

Referenced by RexxNativeActivation::callNativeRoutine(), RexxNativeActivation::callRegisteredRoutine(), RexxActivation::getEffectiveSecurityManager(), RexxActivation::RexxActivation(), and RexxNativeActivation::run().

◆ getLastMessageName()

RexxString * RexxActivity::getLastMessageName ( )

Get the name of the last message invocation.

Returns
The last message name.

Definition at line 3239 of file RexxActivity.cpp.

References activationFrames, and ActivationFrame::messageName().

Referenced by lastMessageName().

◆ getLastMethod()

RexxMethod * RexxActivity::getLastMethod ( )

Get the method for the last method invocation.

Returns
The last message name.

Definition at line 3250 of file RexxActivity.cpp.

References activationFrames, and ActivationFrame::method().

Referenced by lastMethod().

◆ getLocal()

RexxDirectory * RexxActivity::getLocal ( )

Definition at line 1980 of file RexxActivity.cpp.

References InterpreterInstance::getLocal(), and instance.

Referenced by ActivityManager::getLocal(), and GetLocalEnvironment().

◆ getLocalEnvironment()

RexxObject * RexxActivity::getLocalEnvironment ( RexxString name)

Retrieve a value from the instance local environment.

Parameters
nameThe name of the .local object.
Returns
The object stored at the given name.

Definition at line 3200 of file RexxActivity.cpp.

References InterpreterInstance::getLocalEnvironment(), and instance.

Referenced by ActivityManager::getLocalEnvironment(), RexxActivation::getLocalEnvironment(), lineIn(), pullInput(), queue(), sayOutput(), traceInput(), and traceOutput().

◆ getNestedActivity()

RexxActivity* RexxActivity::getNestedActivity ( )
inline

Definition at line 266 of file RexxActivity.hpp.

References nestedActivity.

◆ getNumericSettings()

NumericSettings* RexxActivity::getNumericSettings ( )
inline

Definition at line 283 of file RexxActivity.hpp.

References numericSettings.

Referenced by ActivityManager::addWaitingActivity().

◆ getRandomSeed()

uint64_t RexxActivity::getRandomSeed ( )
inline

Definition at line 291 of file RexxActivity.hpp.

References randomSeed.

Referenced by RexxActivation::RexxActivation().

◆ getThreadContext()

RexxThreadContext* RexxActivity::getThreadContext ( )
inline

◆ getTopStackFrame()

◆ guardPost()

void RexxActivity::guardPost ( )

Definition at line 1817 of file RexxActivity.cpp.

References guardsem, and SysSemaphore::post().

◆ guardSet()

void RexxActivity::guardSet ( )

Definition at line 1825 of file RexxActivity.cpp.

References guardsem, and SysSemaphore::reset().

Referenced by RexxInstructionGuard::execute().

◆ guardWait()

void RexxActivity::guardWait ( )

Definition at line 1807 of file RexxActivity.cpp.

References guardsem, releaseAccess(), requestAccess(), and SysSemaphore::wait().

Referenced by RexxActivation::guardWait().

◆ halt()

bool RexxActivity::halt ( RexxString d)

Tap the current running activation on this activity to halt as soon as possible.

Parameters
dThe description string for the halt.
Returns
true if we have an activation to tell to stop, false if the activity's not really working.

Definition at line 1886 of file RexxActivity.cpp.

References currentRexxFrame, and RexxActivation::halt().

Referenced by ActivityManager::haltActivity(), InterpreterInstance::haltAllActivities(), and HaltThread().

◆ inheritSettings()

void RexxActivity::inheritSettings ( RexxActivity parent)

Inherit all activity-specific settings from a parent activity.

Parameters
parentThe source of the setting information.

Definition at line 3121 of file RexxActivity.cpp.

References clauseExitUsed, LAST_EXIT, and sysexits.

Referenced by ActivityManager::createNewActivity().

◆ initializeThreadContext()

void RexxActivity::initializeThreadContext ( )
static

Complete initialization of the thread context function vector by filling in the constant objects.

Definition at line 1702 of file RexxActivity.cpp.

References RexxThreadInterface::RexxFalse, RexxThreadInterface::RexxNil, RexxThreadInterface::RexxNullString, RexxThreadInterface::RexxTrue, TheFalseObject, TheNilObject, TheTrueObject, and threadContextFunctions.

Referenced by RexxMemory::createImage(), and RexxMemory::restoreImage().

◆ isActive()

◆ isAttached()

bool RexxActivity::isAttached ( )
inline

Definition at line 267 of file RexxActivity.hpp.

References attached.

Referenced by InterpreterInstance::detachThread().

◆ isClauseExitUsed()

bool RexxActivity::isClauseExitUsed ( )
inline

Definition at line 216 of file RexxActivity.hpp.

References clauseExitUsed.

Referenced by RexxActivation::run().

◆ isExitEnabled()

◆ isInactive()

bool RexxActivity::isInactive ( )
inline

Definition at line 258 of file RexxActivity.hpp.

References nestedCount.

Referenced by exitCurrentThread().

◆ isInterpreterRoot()

bool RexxActivity::isInterpreterRoot ( )
inline

Definition at line 263 of file RexxActivity.hpp.

References interpreterRoot.

◆ isNestedAttach()

bool RexxActivity::isNestedAttach ( )
inline

Definition at line 253 of file RexxActivity.hpp.

References attachCount.

Referenced by InterpreterInstance::detachThread().

◆ isSuspended()

bool RexxActivity::isSuspended ( )
inline

Definition at line 261 of file RexxActivity.hpp.

References suspended.

Referenced by ActivityManager::findActivity(), and InterpreterInstance::findActivity().

◆ isThread()

bool RexxActivity::isThread ( thread_id_t  id)
inline

◆ joinKernelQueue()

void RexxActivity::joinKernelQueue ( )

◆ kill()

void RexxActivity::kill ( RexxDirectory conditionObj)

Definition at line 1843 of file RexxActivity.cpp.

References conditionobj, and UnhandledCondition.

Referenced by raisePropagate().

◆ lineIn()

RexxString * RexxActivity::lineIn ( RexxActivation activation)

◆ lineOut()

RexxObject * RexxActivity::lineOut ( RexxString line)

Definition at line 2921 of file RexxActivity.cpp.

References IntegerZero, and line.

Referenced by sayOutput(), and traceOutput().

◆ live()

◆ liveGeneral()

◆ messageSubstitution()

◆ nestAttach()

void RexxActivity::nestAttach ( )
inline

Definition at line 252 of file RexxActivity.hpp.

References attachCount.

Referenced by InterpreterInstance::attachThread().

◆ operator delete() [1/2]

void RexxActivity::operator delete ( void *  )
inline

Definition at line 133 of file RexxActivity.hpp.

◆ operator delete() [2/2]

void RexxActivity::operator delete ( void *  ,
void *   
)
inline

Definition at line 134 of file RexxActivity.hpp.

◆ operator new() [1/2]

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

Definition at line 132 of file RexxActivity.hpp.

◆ operator new() [2/2]

void * RexxActivity::operator new ( size_t  size)

Definition at line 213 of file RexxActivity.cpp.

References new_object(), and T_Activity.

◆ popStackFrame() [1/2]

void RexxActivity::popStackFrame ( bool  reply)

◆ popStackFrame() [2/2]

void RexxActivity::popStackFrame ( RexxActivationBase target)

Pop entries off the stack frame upto and including the target activation.

Parameters
targetThe target for the pop operation.

Definition at line 1554 of file RexxActivity.cpp.

References activations, cleanupStackFrame(), RexxInternalStack::fastPop(), stackFrameDepth, and updateFrameMarkers().

◆ postDispatch()

void RexxActivity::postDispatch ( )

◆ previous()

RexxObject* RexxActivity::previous ( )

◆ pullInput()

RexxString * RexxActivity::pullInput ( RexxActivation activation)

◆ pushStackFrame()

◆ queryTrcHlt()

void RexxActivity::queryTrcHlt ( )

Definition at line 1996 of file RexxActivity.cpp.

References clauseExitUsed, isExitEnabled(), RXHLT, and RXTRC.

Referenced by setupExits().

◆ queue()

void RexxActivity::queue ( RexxActivation activation,
RexxString line,
int  order 
)

◆ raiseCondition() [1/2]

bool RexxActivity::raiseCondition ( RexxDirectory conditionObj)

Process condition trapping for a condition or syntax error.

Parameters
conditionObjThe condition object that describes the condition.
Returns
true if this was trapped, false otherwise. If trapped via a SIGNAL ON, this will NOT return to here.

Definition at line 451 of file RexxActivity.cpp.

References RexxDirectory::at(), getTopStackFrame(), isOfClass, and RexxActivationBase::isStackBase().

◆ raiseCondition() [2/2]

bool RexxActivity::raiseCondition ( RexxString condition,
RexxObject rc,
RexxString description,
RexxObject additional,
RexxObject result 
)

Raise a condition, with potential trapping.

Parameters
conditionThe condition name.
rcThe rc value
descriptionThe description value.
additionalthe exception additional information.
resultThe condition result info.
Returns
true if this was trapped via CALL ON, false for untrapped conditions.

Definition at line 434 of file RexxActivity.cpp.

References createConditionObject().

Referenced by RexxActivation::command(), RexxActivation::processClauseBoundary(), RexxNativeActivation::raiseCondition(), RaiseCondition(), raiseException(), reportCondition(), and RexxObject::requestString().

◆ raiseException()

void RexxActivity::raiseException ( wholenumber_t  errcode,
RexxString description,
RexxArray additional,
RexxObject result 
)

Raise an exception on the current activity.

Parameters
errcodeThe syntax error code.
descriptionThe associated description string.
additionalThe message substitution parameters.
resultThe message result.

Definition at line 740 of file RexxActivity.cpp.

References conditionobj, createExceptionObject(), getCurrentRexxFrame(), getTopStackFrame(), RexxActivation::isForwarded(), OREF_NULL, popStackFrame(), RexxDirectory::put(), raiseCondition(), raisePropagate(), RecursiveStringError, requestingString, TheTrueObject, and unwindToFrame().

Referenced by RexxSource::error(), RexxSource::errorLine(), RexxSource::errorPosition(), RexxSource::errorToken(), RexxActivation::raise(), reportAnException(), and reportException().

◆ raisePropagate()

◆ releaseAccess()

◆ releaseStackFrame()

void RexxActivity::releaseStackFrame ( RexxObject **  frame)
inline

◆ relinquish()

void RexxActivity::relinquish ( )

◆ removeRunningRequires()

void RexxActivity::removeRunningRequires ( RexxObject program)
inline

Definition at line 286 of file RexxActivity.hpp.

References RexxHashTableCollection::remove(), and requiresTable.

Referenced by InterpreterInstance::runRequires().

◆ reportAnException() [1/17]

void RexxActivity::reportAnException ( wholenumber_t  errcode)

Definition at line 517 of file RexxActivity.cpp.

References OREF_NULL, and raiseException().

◆ reportAnException() [2/17]

void RexxActivity::reportAnException ( wholenumber_t  errcode,
const char *  string 
)

Definition at line 586 of file RexxActivity.cpp.

References new_string().

Referenced by reportAnException(), and reportException().

◆ reportAnException() [3/17]

void RexxActivity::reportAnException ( wholenumber_t  errcode,
const char *  string1,
const char *  string2 
)

Definition at line 599 of file RexxActivity.cpp.

References new_string(), and reportAnException().

◆ reportAnException() [4/17]

void RexxActivity::reportAnException ( wholenumber_t  errcode,
const char *  string,
RexxObject obj 
)

Definition at line 679 of file RexxActivity.cpp.

References new_string(), and reportAnException().

◆ reportAnException() [5/17]

void RexxActivity::reportAnException ( wholenumber_t  errcode,
const char *  substitution1,
RexxObject substitution2,
const char *  substitution3,
RexxObject substitution4 
)

Definition at line 573 of file RexxActivity.cpp.

References new_array(), new_string(), OREF_NULL, and raiseException().

◆ reportAnException() [6/17]

void RexxActivity::reportAnException ( wholenumber_t  errcode,
const char *  string,
RexxObject obj,
wholenumber_t  integer 
)

Definition at line 639 of file RexxActivity.cpp.

References new_integer(), new_string(), and reportAnException().

◆ reportAnException() [7/17]

void RexxActivity::reportAnException ( wholenumber_t  errcode,
const char *  string,
wholenumber_t  integer 
)

Definition at line 612 of file RexxActivity.cpp.

References new_integer(), new_string(), and reportAnException().

◆ reportAnException() [8/17]

void RexxActivity::reportAnException ( wholenumber_t  errcode,
const char *  string,
wholenumber_t  integer,
RexxObject obj 
)

Definition at line 625 of file RexxActivity.cpp.

References new_integer(), new_string(), and reportAnException().

◆ reportAnException() [9/17]

void RexxActivity::reportAnException ( wholenumber_t  errcode,
RexxObject substitution1 
)

Definition at line 527 of file RexxActivity.cpp.

References new_array(), OREF_NULL, and raiseException().

◆ reportAnException() [10/17]

void RexxActivity::reportAnException ( wholenumber_t  errcode,
RexxObject obj,
const char *  string 
)

Definition at line 666 of file RexxActivity.cpp.

References new_string(), and reportAnException().

◆ reportAnException() [11/17]

void RexxActivity::reportAnException ( wholenumber_t  errcode,
RexxObject substitution1,
RexxObject substitution2 
)

Definition at line 537 of file RexxActivity.cpp.

References new_array(), OREF_NULL, and raiseException().

◆ reportAnException() [12/17]

void RexxActivity::reportAnException ( wholenumber_t  errcode,
RexxObject substitution1,
RexxObject substitution2,
RexxObject substitution3 
)

Definition at line 548 of file RexxActivity.cpp.

References new_array(), OREF_NULL, and raiseException().

◆ reportAnException() [13/17]

void RexxActivity::reportAnException ( wholenumber_t  errcode,
RexxObject substitution1,
RexxObject substitution2,
RexxObject substitution3,
RexxObject substitution4 
)

Definition at line 560 of file RexxActivity.cpp.

References new_array(), OREF_NULL, and raiseException().

◆ reportAnException() [14/17]

void RexxActivity::reportAnException ( wholenumber_t  errcode,
RexxObject obj,
wholenumber_t  integer 
)

Definition at line 653 of file RexxActivity.cpp.

References new_integer(), and reportAnException().

◆ reportAnException() [15/17]

void RexxActivity::reportAnException ( wholenumber_t  errcode,
wholenumber_t  integer 
)

Definition at line 692 of file RexxActivity.cpp.

References new_integer(), and reportAnException().

◆ reportAnException() [16/17]

void RexxActivity::reportAnException ( wholenumber_t  errcode,
wholenumber_t  a1,
RexxObject a2 
)

Definition at line 717 of file RexxActivity.cpp.

References new_integer(), and reportAnException().

◆ reportAnException() [17/17]

void RexxActivity::reportAnException ( wholenumber_t  errcode,
wholenumber_t  integer,
wholenumber_t  integer2 
)

Definition at line 704 of file RexxActivity.cpp.

References new_integer(), and reportAnException().

◆ requestAccess()

◆ reraiseException()

◆ reset()

void RexxActivity::reset ( void  )

Initialize an Activity object that's being recycled for another use.

Definition at line 278 of file RexxActivity.cpp.

References resetRunningRequires().

Referenced by ActivityManager::createNewActivity().

◆ resetRunningRequires()

void RexxActivity::resetRunningRequires ( )
inline

Definition at line 287 of file RexxActivity.hpp.

References requiresTable, and RexxTable::reset().

Referenced by reset().

◆ resolveCommandHandler()

CommandHandler * RexxActivity::resolveCommandHandler ( RexxString name)

Resolve a command handler from the interpreter instance.

Parameters
nameThe name of the command environment.
Returns
A configured command environment, or OREF_NULL if the target environment is not found.

Definition at line 3215 of file RexxActivity.cpp.

References instance, and InterpreterInstance::resolveCommandHandler().

Referenced by RexxActivation::command().

◆ resolveProgramName()

RexxString * RexxActivity::resolveProgramName ( RexxString name,
RexxString dir,
RexxString ext 
)

Resolve a program using the activity context information.

Parameters
nameThe name we're interested in.
dirA parent directory to use as part of the search.
extAny parent extension name.
Returns
The fully resolved file name, if it exists. Returns OREF_NULL for non-located files.

Definition at line 3187 of file RexxActivity.cpp.

References instance, and InterpreterInstance::resolveProgramName().

Referenced by RexxMemory::createImage(), TranslateDispatcher::run(), RexxStartDispatcher::run(), and CallProgramDispatcher::run().

◆ restoreActivationLevel()

void RexxActivity::restoreActivationLevel ( size_t  l)
inline

◆ returnAttach()

void RexxActivity::returnAttach ( )
inline

Definition at line 254 of file RexxActivity.hpp.

References attachCount.

Referenced by InterpreterInstance::detachThread().

◆ run() [1/5]

◆ run() [2/5]

void RexxActivity::run ( ActivityDispatcher target)

◆ run() [3/5]

void RexxActivity::run ( CallbackDispatcher target)

Run a task under the context of an activity. This will be a task that calls out from the interpreter, which the kernel lock released during the call.

Parameters
targetThe dispatcher object that implements the call out.

Definition at line 3079 of file RexxActivity.cpp.

References currentRexxFrame, RexxNativeActivation::enableVariablepool(), ActivityManager::newNativeActivation(), popStackFrame(), pushStackFrame(), and RexxNativeActivation::run().

◆ run() [4/5]

void RexxActivity::run ( RexxMessage target)

Run a message object on a spawned thread.

Parameters
targetThe target message object.

Definition at line 1401 of file RexxActivity.cpp.

References dispatchMessage, guardsem, SysSemaphore::post(), runsem, and SysActivity::yield().

◆ run() [5/5]

void RexxActivity::run ( TrappingDispatcher target)

Run a task under the context of an activity. This will be a task that runs with a nested error trapping without releasing the kernel lock.

Parameters
targetThe dispatcher object that implements the call out.

Definition at line 3102 of file RexxActivity.cpp.

References currentRexxFrame, ActivityManager::newNativeActivation(), popStackFrame(), pushStackFrame(), and RexxNativeActivation::run().

◆ runningRequires()

RexxObject* RexxActivity::runningRequires ( RexxString program)
inline

Definition at line 284 of file RexxActivity.hpp.

References requiresTable, and RexxTable::stringGet().

Referenced by checkRequires().

◆ runThread()

◆ sayOutput()

void RexxActivity::sayOutput ( RexxActivation activation,
RexxString line 
)

◆ setExitHandler() [1/3]

void RexxActivity::setExitHandler ( int  exitNum,
const char *  e 
)
inline

Definition at line 322 of file RexxActivity.hpp.

References getExitHandler(), and ExitHandler::resolve().

◆ setExitHandler() [2/3]

void RexxActivity::setExitHandler ( int  exitNum,
REXXPFN  e 
)
inline

Definition at line 321 of file RexxActivity.hpp.

References getExitHandler(), and ExitHandler::setEntryPoint().

◆ setExitHandler() [3/3]

void RexxActivity::setExitHandler ( RXSYSEXIT e)
inline

◆ setInterpreterRoot()

void RexxActivity::setInterpreterRoot ( )
inline

Definition at line 264 of file RexxActivity.hpp.

References interpreterRoot.

Referenced by ActivityManager::getRootActivity().

◆ setNestedActivity()

void RexxActivity::setNestedActivity ( RexxActivity a)
inline

Definition at line 265 of file RexxActivity.hpp.

References nestedActivity.

Referenced by ActivityManager::attachThread(), and ActivityManager::getRootActivity().

◆ setRandomSeed()

void RexxActivity::setRandomSeed ( uint64_t  seed)
inline

Definition at line 292 of file RexxActivity.hpp.

References randomSeed.

Referenced by RexxActivation::getRandomSeed().

◆ setSuspended()

void RexxActivity::setSuspended ( bool  s)
inline

◆ setTrace()

bool RexxActivity::setTrace ( bool  on)

Tap the current running activation on this activity to halt as soon as possible.

Parameters
dThe description string for the halt.
Returns
true if we have an activation to tell to stop, false if the activity's not really working.

Definition at line 1909 of file RexxActivity.cpp.

References currentRexxFrame, RexxActivation::externalTraceOff(), and RexxActivation::externalTraceOn().

Referenced by ActivityManager::setActivityTrace(), SetThreadTrace(), and InterpreterInstance::traceAllActivities().

◆ setupAttachedActivity()

void RexxActivity::setupAttachedActivity ( InterpreterInstance interpreter)

Set up an activity as a root activity used either for a main interpreter thread or an attached thread.

Parameters
interpreterThe interpreter instance this thread belongs to.

Definition at line 1647 of file RexxActivity.cpp.

References addToInstance(), attached, and createNewActivationStack().

◆ setupExits()

void RexxActivity::setupExits ( )

Process for copying the exit definitions from the hosting instance.

Definition at line 1685 of file RexxActivity.cpp.

References InterpreterInstance::getExitHandler(), instance, LAST_EXIT, queryTrcHlt(), and sysexits.

Referenced by addToInstance().

◆ spawnReply()

RexxActivity * RexxActivity::spawnReply ( )

Create a new activity for processing a method reply instruction.

Returns
The newly created activity.

Definition at line 292 of file RexxActivity.cpp.

References instance, and InterpreterInstance::spawnActivity().

Referenced by RexxActivation::run(), and RexxMessage::start().

◆ terminatePoolActivity()

void RexxActivity::terminatePoolActivity ( )

◆ threadIdMethod()

thread_id_t RexxActivity::threadIdMethod ( )

Definition at line 1988 of file RexxActivity.cpp.

References currentThread, and SysActivity::getThreadID().

◆ traceInput()

RexxString * RexxActivity::traceInput ( RexxActivation activation)

◆ traceOutput()

◆ unwindStackFrame()

◆ unwindToDepth()

void RexxActivity::unwindToDepth ( size_t  depth)

Definition at line 1604 of file RexxActivity.cpp.

References activations, RexxInternalStack::fastPop(), stackFrameDepth, and updateFrameMarkers().

Referenced by run().

◆ unwindToFrame()

void RexxActivity::unwindToFrame ( RexxActivation frame)

Unwind to a particular stack frame, terminating each frame in turn;

Parameters
frameThe target frame

Definition at line 1627 of file RexxActivity.cpp.

References getTopStackFrame(), popStackFrame(), and RexxActivationBase::termination().

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

◆ updateFrameMarkers()

void RexxActivity::updateFrameMarkers ( )

◆ validateThread()

void RexxActivity::validateThread ( )

Validate that an API call is occuring on the correct thread.

Definition at line 3224 of file RexxActivity.cpp.

References currentThread, Error_Execution_invalid_thread, reportException(), and SysActivity::validateThread().

Referenced by ApiContext::ApiContext().

◆ waitForDispatch()

void RexxActivity::waitForDispatch ( )
inline

Definition at line 289 of file RexxActivity.hpp.

References runsem, and SysSemaphore::wait().

Referenced by ActivityManager::addWaitingActivity().

◆ waitReserve()

void RexxActivity::waitReserve ( RexxObject resource)

◆ yield()

void RexxActivity::yield ( )

Tap the current running activation on this activity to give up control at the next reasonsable boundary.

Definition at line 1865 of file RexxActivity.cpp.

References currentRexxFrame, and RexxActivation::yield().

Referenced by ActivityManager::yieldCurrentActivity().

◆ yieldControl()

void RexxActivity::yieldControl ( )

Friends And Related Function Documentation

◆ ActivationFrame

friend class ActivationFrame
friend

Definition at line 129 of file RexxActivity.hpp.

◆ ProtectedObject

friend class ProtectedObject
friend

Definition at line 128 of file RexxActivity.hpp.

Member Data Documentation

◆ activationFrames

◆ activations

◆ activationStackSize

size_t RexxActivity::activationStackSize
protected

Definition at line 355 of file RexxActivity.hpp.

Referenced by checkActivationStack(), and RexxActivity().

◆ attachCount

size_t RexxActivity::attachCount
protected

Definition at line 381 of file RexxActivity.hpp.

Referenced by isNestedAttach(), nestAttach(), and returnAttach().

◆ attached

bool RexxActivity::attached
protected

Definition at line 379 of file RexxActivity.hpp.

Referenced by detachInstance(), isAttached(), and setupAttachedActivity().

◆ callContextFunctions

◆ clauseExitUsed

bool RexxActivity::clauseExitUsed
protected

Definition at line 383 of file RexxActivity.hpp.

Referenced by inheritSettings(), isClauseExitUsed(), and queryTrcHlt().

◆ conditionobj

RexxDirectory* RexxActivity::conditionobj
protected

◆ currentExit

RexxString* RexxActivity::currentExit
protected

Definition at line 367 of file RexxActivity.hpp.

◆ currentRexxFrame

RexxActivation* RexxActivity::currentRexxFrame
protected

◆ currentThread

SysActivity RexxActivity::currentThread
protected

◆ dispatchMessage

RexxMessage* RexxActivity::dispatchMessage
protected

Definition at line 347 of file RexxActivity.hpp.

Referenced by live(), liveGeneral(), run(), and runThread().

◆ exit

bool RexxActivity::exit
protected

Definition at line 375 of file RexxActivity.hpp.

Referenced by runThread(), and terminatePoolActivity().

◆ exitContextFunctions

ExitContextInterface RexxActivity::exitContextFunctions
staticprotected

◆ frameStack

◆ guardsem

SysSemaphore RexxActivity::guardsem
protected

◆ instance

◆ interpreterRoot

bool RexxActivity::interpreterRoot
protected

Definition at line 378 of file RexxActivity.hpp.

Referenced by isInterpreterRoot(), and setInterpreterRoot().

◆ methodContextFunctions

◆ nestedActivity

RexxActivity* RexxActivity::nestedActivity
protected

Definition at line 388 of file RexxActivity.hpp.

Referenced by detachInstance(), getNestedActivity(), and setNestedActivity().

◆ nestedCount

size_t RexxActivity::nestedCount
protected

◆ numericSettings

NumericSettings* RexxActivity::numericSettings
protected

◆ oldActivity

RexxActivity* RexxActivity::oldActivity
protected

Definition at line 343 of file RexxActivity.hpp.

◆ protectedObjects

ProtectedObject* RexxActivity::protectedObjects
protected

◆ randomSeed

uint64_t RexxActivity::randomSeed
protected

Definition at line 384 of file RexxActivity.hpp.

Referenced by generateRandomNumberSeed(), getRandomSeed(), and setRandomSeed().

◆ requestingString

bool RexxActivity::requestingString
protected

Definition at line 376 of file RexxActivity.hpp.

Referenced by messageSubstitution(), and raiseException().

◆ requiresTable

RexxTable* RexxActivity::requiresTable
protected

◆ runsem

◆ stackBase

char* RexxActivity::stackBase
protected

Definition at line 382 of file RexxActivity.hpp.

Referenced by checkStackSpace(), RexxActivity(), run(), and runThread().

◆ stackcheck

bool RexxActivity::stackcheck
protected

Definition at line 374 of file RexxActivity.hpp.

Referenced by checkStackSpace(), messageSubstitution(), RexxActivity(), and runThread().

◆ stackFrameDepth

size_t RexxActivity::stackFrameDepth
protected

◆ suspended

bool RexxActivity::suspended
protected

Definition at line 377 of file RexxActivity.hpp.

Referenced by isSuspended(), and setSuspended().

◆ sysexits

ExitHandler RexxActivity::sysexits[(RXNOOFEXITS - 1)]
protected

Definition at line 385 of file RexxActivity.hpp.

Referenced by getExitHandler(), inheritSettings(), and setupExits().

◆ threadContext

ActivityContext RexxActivity::threadContext
protected

◆ threadContextFunctions

RexxThreadInterface RexxActivity::threadContextFunctions
staticprotected

Definition at line 391 of file RexxActivity.hpp.

Referenced by addToInstance(), and initializeThreadContext().

◆ topStackFrame

◆ waitingObject

RexxObject* RexxActivity::waitingObject
protected

Definition at line 368 of file RexxActivity.hpp.

Referenced by checkDeadLock(), live(), liveGeneral(), postDispatch(), and waitReserve().


The documentation for this class was generated from the following files:
GetSelf
RexxObjectPtr RexxEntry GetSelf(RexxMethodContext *c)
Definition: MethodContextStubs.cpp:104
SetExitContextVariable
void RexxEntry SetExitContextVariable(RexxExitContext *c, CSTRING n, RexxObjectPtr v)
Definition: CallContextStubs.cpp:187
GetCSelf
POINTER RexxEntry GetCSelf(RexxMethodContext *c)
Definition: MethodContextStubs.cpp:117
GetCurrentMethod
RexxMethodObject RexxEntry GetCurrentMethod(RexxMethodContext *c)
Definition: MethodContextStubs.cpp:78
FindContextClass
RexxClassObject RexxEntry FindContextClass(RexxMethodContext *c, CSTRING n)
Definition: MethodContextStubs.cpp:233
GetSuper
RexxClassObject RexxEntry GetSuper(RexxMethodContext *c)
Definition: MethodContextStubs.cpp:130
SetContextVariable
void RexxEntry SetContextVariable(RexxCallContext *c, CSTRING n, RexxObjectPtr v)
Definition: CallContextStubs.cpp:108
METHOD_INTERFACE_VERSION
#define METHOD_INTERFACE_VERSION
Definition: oorexxapi.h:617
SetGuardOff
void RexxEntry SetGuardOff(RexxMethodContext *c)
Definition: MethodContextStubs.cpp:221
DropContextVariable
void RexxEntry DropContextVariable(RexxCallContext *c, CSTRING n)
Definition: CallContextStubs.cpp:133
GetCurrentRoutine
RexxRoutineObject RexxEntry GetCurrentRoutine(RexxCallContext *c)
Definition: CallContextStubs.cpp:95
GetCallArgument
RexxObjectPtr RexxEntry GetCallArgument(RexxCallContext *c, stringsize_t i)
Definition: CallContextStubs.cpp:69
GetMessageName
CSTRING RexxEntry GetMessageName(RexxMethodContext *c)
Definition: MethodContextStubs.cpp:91
GetObjectVariable
RexxObjectPtr RexxEntry GetObjectVariable(RexxMethodContext *c, CSTRING n)
Definition: MethodContextStubs.cpp:168
EXIT_INTERFACE_VERSION
#define EXIT_INTERFACE_VERSION
Definition: oorexxapi.h:663
ForwardMessage
RexxObjectPtr RexxEntry ForwardMessage(RexxMethodContext *c, RexxObjectPtr o, CSTRING n, RexxClassObject clazz, RexxArrayObject a)
Definition: MethodContextStubs.cpp:193
GetContextFuzz
stringsize_t RexxEntry GetContextFuzz(RexxCallContext *c)
Definition: CallContextStubs.cpp:264
ResolveStemVariable
RexxStemObject RexxEntry ResolveStemVariable(RexxCallContext *c, RexxObjectPtr s)
Definition: CallContextStubs.cpp:158
GetAllContextVariables
RexxDirectoryObject RexxEntry GetAllContextVariables(RexxCallContext *c)
Definition: CallContextStubs.cpp:145
GetMethodArgument
RexxObjectPtr RexxEntry GetMethodArgument(RexxMethodContext *c, stringsize_t i)
Definition: MethodContextStubs.cpp:65
GetExitCallerContext
RexxObjectPtr RexxEntry GetExitCallerContext(RexxExitContext *c)
Definition: CallContextStubs.cpp:238
GetContextVariable
RexxObjectPtr RexxEntry GetContextVariable(RexxCallContext *c, CSTRING n)
Definition: CallContextStubs.cpp:120
GetScope
RexxObjectPtr RexxEntry GetScope(RexxMethodContext *c)
Definition: MethodContextStubs.cpp:143
FindCallContextClass
RexxClassObject RexxEntry FindCallContextClass(RexxCallContext *c, CSTRING n)
Definition: CallContextStubs.cpp:304
GetCallArguments
RexxArrayObject RexxEntry GetCallArguments(RexxCallContext *c)
Definition: CallContextStubs.cpp:56
SetGuardOn
void RexxEntry SetGuardOn(RexxMethodContext *c)
Definition: MethodContextStubs.cpp:209
GetCallerContext
RexxObjectPtr RexxEntry GetCallerContext(RexxCallContext *c)
Definition: CallContextStubs.cpp:290
GetMethodArguments
RexxArrayObject RexxEntry GetMethodArguments(RexxMethodContext *c)
Definition: MethodContextStubs.cpp:52
CALL_INTERFACE_VERSION
#define CALL_INTERFACE_VERSION
Definition: oorexxapi.h:640
GetExitContextVariable
RexxObjectPtr RexxEntry GetExitContextVariable(RexxExitContext *c, CSTRING n)
Definition: CallContextStubs.cpp:199
GetContextDigits
stringsize_t RexxEntry GetContextDigits(RexxCallContext *c)
Definition: CallContextStubs.cpp:251
DropExitContextVariable
void RexxEntry DropExitContextVariable(RexxExitContext *c, CSTRING n)
Definition: CallContextStubs.cpp:212
SetObjectVariable
void RexxEntry SetObjectVariable(RexxMethodContext *c, CSTRING n, RexxObjectPtr v)
Definition: MethodContextStubs.cpp:156
GetContextForm
logical_t RexxEntry GetContextForm(RexxCallContext *c)
Definition: CallContextStubs.cpp:277
InvalidRoutine
void RexxEntry InvalidRoutine(RexxCallContext *c)
Definition: CallContextStubs.cpp:174
DropObjectVariable
void RexxEntry DropObjectVariable(RexxMethodContext *c, CSTRING n)
Definition: MethodContextStubs.cpp:181
GetAllExitContextVariables
RexxDirectoryObject RexxEntry GetAllExitContextVariables(RexxExitContext *c)
Definition: CallContextStubs.cpp:224
GetRoutineName
CSTRING RexxEntry GetRoutineName(RexxCallContext *c)
Definition: CallContextStubs.cpp:82