RexxActivity Class Reference

#include <RexxActivity.hpp>

Inheritance 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, const char *, const char *, wholenumber_t)
 
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 *, RexxObject *, RexxObject *)
 
void reportAnException (wholenumber_t, const char *, RexxObject *, RexxObject *, const char *, RexxObject *)
 
void reportAnException (wholenumber_t, const char *, RexxObject *, RexxObject *, wholenumber_t)
 
void reportAnException (wholenumber_t, const char *, RexxObject *, RexxObject *, RexxObject *)
 
void reportAnException (wholenumber_t, const char *, RexxObject *, RexxObject *, RexxObject *, wholenumber_t)
 
void reportAnException (wholenumber_t, const char *, RexxObject *, RexxObject *, RexxObject *, RexxObject *)
 
void reportAnException (wholenumber_t, const char *, wholenumber_t)
 
void reportAnException (wholenumber_t, const char *, wholenumber_t, RexxObject *)
 
void reportAnException (wholenumber_t, RexxObject *, wholenumber_t, RexxObject *)
 
void reportAnException (wholenumber_t, const char *, RexxObject *, wholenumber_t)
 
void reportAnException (wholenumber_t, const char *, RexxObject *, wholenumber_t, RexxObject *)
 
void reportAnException (wholenumber_t, RexxObject *, const char *, 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 *, wholenumber_t)
 
void reportAnException (wholenumber_t, RexxObject *, RexxObject *, const char *)
 
void reportAnException (wholenumber_t, RexxObject *, RexxObject *, RexxObject *)
 
void reportAnException (wholenumber_t, RexxObject *, RexxObject *, RexxObject *, RexxObject *)
 
void reportAnException (wholenumber_t, RexxObject *, 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, 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 ()
 
RexxDirectorygetThreadLocal ()
 
CommandHandlerresolveCommandHandler (RexxString *)
 
- Public Member Functions inherited from RexxInternalObject
void * operator new (size_t, RexxClass *)
 
void * operator new (size_t, RexxClass *, RexxObject **, size_t, 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 wholenumber_t requestAccessCounter ()
 
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
 
RexxDirectorythreadLocalEnvironment
 
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 [LAST_EXIT]
 
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 128 of file RexxActivity.hpp.

Constructor & Destructor Documentation

◆ RexxActivity() [1/3]

RexxActivity::RexxActivity ( RESTORETYPE  restoreType)
inline

Definition at line 137 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 300 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 1987 of file RexxActivity.cpp.

References RexxThreadContext_::functions, InterpreterInstance::getInstanceContext(), RexxThreadContext_::instance, 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 319 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 1297 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 2376 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 3008 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 2400 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 
)

◆ 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 1734 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 173 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 335 of file RexxActivity.hpp.

References conditionobj, and OREF_NULL.

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

◆ clearWait()

void RexxActivity::clearWait ( )
inline

Definition at line 305 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 3519 of file RexxActivity.cpp.

References callContextFunctions, CallContext::context, RexxCallContext_::functions, RexxCallContext_::threadContext, ActivityContext::threadContext, CallContext::threadContext, and 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 499 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 1099 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 3527 of file RexxActivity.cpp.

References ExitContext::context, exitContextFunctions, RexxExitContext_::functions, RexxExitContext_::threadContext, ActivityContext::threadContext, ExitContext::threadContext, and 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 3504 of file RexxActivity.cpp.

References MethodContext::context, RexxMethodContext_::functions, methodContextFunctions, RexxMethodContext_::threadContext, ActivityContext::threadContext, MethodContext::threadContext, and 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 1806 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 271 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 2043 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 2034 of file RexxActivity.cpp.

References InterpreterInstance::detachThread(), and instance.

Referenced by DetachThread().

◆ disableExit()

void RexxActivity::disableExit ( int  exitNum)
inlineprotected

Definition at line 354 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 387 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 203 of file RexxActivity.cpp.

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

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

◆ enterKernel()

void RexxActivity::enterKernel ( )

Definition at line 2077 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 419 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 1689 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 1262 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 297 of file RexxActivity.hpp.

References stackFrameDepth.

◆ getActivationLevel()

size_t RexxActivity::getActivationLevel ( )
inline

◆ getApiContext()

RexxNativeActivation* RexxActivity::getApiContext ( )
inline

Definition at line 312 of file RexxActivity.hpp.

References topStackFrame.

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

◆ getCurrentCondition()

RexxDirectory* RexxActivity::getCurrentCondition ( )
inline

Definition at line 334 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 3129 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 352 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 3150 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 3605 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 3616 of file RexxActivity.cpp.

References activationFrames, and ActivationFrame::method().

Referenced by lastMethod().

◆ getLocal()

RexxDirectory * RexxActivity::getLocal ( )

Definition at line 2318 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 3566 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 281 of file RexxActivity.hpp.

References nestedActivity.

◆ getNumericSettings()

NumericSettings* RexxActivity::getNumericSettings ( )
inline

Definition at line 298 of file RexxActivity.hpp.

References numericSettings.

Referenced by ActivityManager::addWaitingActivity().

◆ getRandomSeed()

uint64_t RexxActivity::getRandomSeed ( )
inline

Definition at line 306 of file RexxActivity.hpp.

References randomSeed.

Referenced by RexxActivation::RexxActivation().

◆ getThreadContext()

RexxThreadContext* RexxActivity::getThreadContext ( )
inline

◆ getThreadLocal()

RexxDirectory * RexxActivity::getThreadLocal ( )

Definition at line 2326 of file RexxActivity.cpp.

References threadLocalEnvironment.

Referenced by RexxActivation::getThreadLocal().

◆ getTopStackFrame()

◆ guardPost()

void RexxActivity::guardPost ( )

Definition at line 2137 of file RexxActivity.cpp.

References guardsem, and SysSemaphore::post().

◆ guardSet()

void RexxActivity::guardSet ( )

Definition at line 2145 of file RexxActivity.cpp.

References guardsem, and SysSemaphore::reset().

Referenced by RexxInstructionGuard::execute().

◆ guardWait()

void RexxActivity::guardWait ( )

Definition at line 2127 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 2206 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 3487 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 2022 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 282 of file RexxActivity.hpp.

References attached.

Referenced by InterpreterInstance::detachThread().

◆ isClauseExitUsed()

bool RexxActivity::isClauseExitUsed ( )
inline

Definition at line 231 of file RexxActivity.hpp.

References clauseExitUsed.

◆ isExitEnabled()

◆ isInactive()

bool RexxActivity::isInactive ( )
inline

Definition at line 273 of file RexxActivity.hpp.

References nestedCount.

Referenced by exitCurrentThread().

◆ isInterpreterRoot()

bool RexxActivity::isInterpreterRoot ( )
inline

Definition at line 278 of file RexxActivity.hpp.

References interpreterRoot.

◆ isNestedAttach()

bool RexxActivity::isNestedAttach ( )
inline

Definition at line 268 of file RexxActivity.hpp.

References attachCount.

Referenced by InterpreterInstance::detachThread().

◆ isSuspended()

bool RexxActivity::isSuspended ( )
inline

Definition at line 276 of file RexxActivity.hpp.

References suspended.

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

◆ isThread()

bool RexxActivity::isThread ( thread_id_t  id)
inline

◆ joinKernelQueue()

void RexxActivity::joinKernelQueue ( )

◆ kill()

void RexxActivity::kill ( RexxDirectory conditionObj)

Definition at line 2163 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 3286 of file RexxActivity.cpp.

References IntegerZero, line, and size_v.

Referenced by sayOutput(), and traceOutput().

◆ live()

◆ liveGeneral()

◆ messageSubstitution()

◆ nestAttach()

void RexxActivity::nestAttach ( )
inline

Definition at line 267 of file RexxActivity.hpp.

References attachCount.

Referenced by InterpreterInstance::attachThread().

◆ operator delete() [1/2]

void RexxActivity::operator delete ( void *  )
inline

Definition at line 134 of file RexxActivity.hpp.

◆ operator delete() [2/2]

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

Definition at line 135 of file RexxActivity.hpp.

◆ operator new() [1/2]

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

Definition at line 133 of file RexxActivity.hpp.

◆ operator new() [2/2]

void * RexxActivity::operator new ( size_t  size)

Definition at line 215 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 1874 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 2342 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 462 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 445 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 1026 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 301 of file RexxActivity.hpp.

References RexxHashTableCollection::remove(), and requiresTable.

Referenced by InterpreterInstance::runRequires().

◆ reportAnException() [1/30]

void RexxActivity::reportAnException ( wholenumber_t  errcode)

Definition at line 528 of file RexxActivity.cpp.

References OREF_NULL, and raiseException().

◆ reportAnException() [2/30]

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

Definition at line 659 of file RexxActivity.cpp.

References new_string().

Referenced by reportAnException(), and reportException().

◆ reportAnException() [3/30]

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

Definition at line 672 of file RexxActivity.cpp.

References new_string(), and reportAnException().

◆ reportAnException() [4/30]

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

Definition at line 689 of file RexxActivity.cpp.

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

◆ reportAnException() [5/30]

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

Definition at line 845 of file RexxActivity.cpp.

References new_string(), and reportAnException().

◆ reportAnException() [6/30]

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

Definition at line 640 of file RexxActivity.cpp.

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

◆ reportAnException() [7/30]

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

Definition at line 860 of file RexxActivity.cpp.

References new_string(), and reportAnException().

◆ reportAnException() [8/30]

void RexxActivity::reportAnException ( wholenumber_t  errcode,
const char *  string1,
RexxObject obj1,
RexxObject obj2,
const char *  string2,
RexxObject obj3 
)

Definition at line 876 of file RexxActivity.cpp.

References new_string(), and reportAnException().

◆ reportAnException() [9/30]

void RexxActivity::reportAnException ( wholenumber_t  errcode,
const char *  string,
RexxObject obj1,
RexxObject obj2,
RexxObject obj3 
)

Definition at line 915 of file RexxActivity.cpp.

References new_string(), and reportAnException().

◆ reportAnException() [10/30]

void RexxActivity::reportAnException ( wholenumber_t  errcode,
const char *  string,
RexxObject obj1,
RexxObject obj2,
RexxObject obj3,
RexxObject obj4 
)

Definition at line 952 of file RexxActivity.cpp.

References new_string(), and reportAnException().

◆ reportAnException() [11/30]

void RexxActivity::reportAnException ( wholenumber_t  errcode,
const char *  string,
RexxObject obj1,
RexxObject obj2,
RexxObject obj3,
wholenumber_t  integer 
)

Definition at line 932 of file RexxActivity.cpp.

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

◆ reportAnException() [12/30]

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

Definition at line 896 of file RexxActivity.cpp.

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

◆ reportAnException() [13/30]

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

Definition at line 760 of file RexxActivity.cpp.

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

◆ reportAnException() [14/30]

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

Definition at line 778 of file RexxActivity.cpp.

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

◆ reportAnException() [15/30]

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

Definition at line 709 of file RexxActivity.cpp.

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

◆ reportAnException() [16/30]

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

Definition at line 726 of file RexxActivity.cpp.

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

◆ reportAnException() [17/30]

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

Definition at line 538 of file RexxActivity.cpp.

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

◆ reportAnException() [18/30]

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

Definition at line 830 of file RexxActivity.cpp.

References new_string(), and reportAnException().

◆ reportAnException() [19/30]

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

Definition at line 797 of file RexxActivity.cpp.

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

◆ reportAnException() [20/30]

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

Definition at line 550 of file RexxActivity.cpp.

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

◆ reportAnException() [21/30]

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

Definition at line 579 of file RexxActivity.cpp.

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

◆ reportAnException() [22/30]

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

Definition at line 595 of file RexxActivity.cpp.

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

◆ reportAnException() [23/30]

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

Definition at line 609 of file RexxActivity.cpp.

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

◆ reportAnException() [24/30]

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

Definition at line 624 of file RexxActivity.cpp.

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

◆ reportAnException() [25/30]

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

Definition at line 563 of file RexxActivity.cpp.

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

◆ reportAnException() [26/30]

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

Definition at line 815 of file RexxActivity.cpp.

References new_integer(), and reportAnException().

◆ reportAnException() [27/30]

void RexxActivity::reportAnException ( wholenumber_t  errcode,
RexxObject obj1,
wholenumber_t  integer,
RexxObject obj2 
)

Definition at line 744 of file RexxActivity.cpp.

References new_integer(), and reportAnException().

◆ reportAnException() [28/30]

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

Definition at line 970 of file RexxActivity.cpp.

References new_integer(), and reportAnException().

◆ reportAnException() [29/30]

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

Definition at line 1001 of file RexxActivity.cpp.

References new_integer(), and reportAnException().

◆ reportAnException() [30/30]

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

Definition at line 984 of file RexxActivity.cpp.

References new_integer(), and reportAnException().

◆ requestAccess()

◆ requestAccessCounter()

wholenumber_t RexxActivity::requestAccessCounter ( )
static

Definition at line 2267 of file RexxActivity.cpp.

References requestAccessCount.

Referenced by RexxActivation::rexxVariable().

◆ reraiseException()

◆ reset()

void RexxActivity::reset ( void  )

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

Definition at line 289 of file RexxActivity.cpp.

References resetRunningRequires().

Referenced by ActivityManager::createNewActivity().

◆ resetRunningRequires()

void RexxActivity::resetRunningRequires ( )
inline

Definition at line 302 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 3581 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 3553 of file RexxActivity.cpp.

References instance, and InterpreterInstance::resolveProgramName().

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

◆ restoreActivationLevel()

void RexxActivity::restoreActivationLevel ( size_t  l)
inline

◆ returnAttach()

void RexxActivity::returnAttach ( )
inline

Definition at line 269 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 3445 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 1721 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 3468 of file RexxActivity.cpp.

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

◆ runningRequires()

RexxObject* RexxActivity::runningRequires ( RexxString program)
inline

Definition at line 299 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 337 of file RexxActivity.hpp.

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

◆ setExitHandler() [2/3]

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

Definition at line 336 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 279 of file RexxActivity.hpp.

References interpreterRoot.

Referenced by ActivityManager::getRootActivity().

◆ setNestedActivity()

void RexxActivity::setNestedActivity ( RexxActivity a)
inline

Definition at line 280 of file RexxActivity.hpp.

References nestedActivity.

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

◆ setRandomSeed()

void RexxActivity::setRandomSeed ( uint64_t  seed)
inline

Definition at line 307 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 2229 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 1967 of file RexxActivity.cpp.

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

Referenced by InterpreterInstance::attachThread(), and InterpreterInstance::initialize().

◆ setupExits()

void RexxActivity::setupExits ( )

Process for copying the exit definitions from the hosting instance.

Definition at line 2005 of file RexxActivity.cpp.

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

Referenced by addToInstance(), and InterpreterInstance::initialize().

◆ spawnReply()

RexxActivity * RexxActivity::spawnReply ( )

Create a new activity for processing a method reply instruction.

Returns
The newly created activity.

Definition at line 303 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 2334 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 1924 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 1947 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 3590 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 304 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 2185 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 130 of file RexxActivity.hpp.

◆ ProtectedObject

friend class ProtectedObject
friend

Definition at line 129 of file RexxActivity.hpp.

Member Data Documentation

◆ activationFrames

◆ activations

◆ activationStackSize

size_t RexxActivity::activationStackSize
protected

Definition at line 371 of file RexxActivity.hpp.

Referenced by checkActivationStack(), and RexxActivity().

◆ attachCount

size_t RexxActivity::attachCount
protected

Definition at line 398 of file RexxActivity.hpp.

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

◆ attached

bool RexxActivity::attached
protected

Definition at line 396 of file RexxActivity.hpp.

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

◆ callContextFunctions

CallContextInterface RexxActivity::callContextFunctions
staticprotected
Initial value:
=
{
}
RexxObjectPtr RexxEntry GetCallerContext(RexxCallContext *c)
void RexxEntry InvalidRoutine(RexxCallContext *c)
RexxDirectoryObject RexxEntry GetAllContextVariables(RexxCallContext *c)
RexxStemObject RexxEntry ResolveStemVariable(RexxCallContext *c, RexxObjectPtr s)
RexxObjectPtr RexxEntry GetContextVariable(RexxCallContext *c, CSTRING n)
RexxClassObject RexxEntry FindCallContextClass(RexxCallContext *c, CSTRING n)
CSTRING RexxEntry GetRoutineName(RexxCallContext *c)
void RexxEntry DropContextVariable(RexxCallContext *c, CSTRING n)
stringsize_t RexxEntry GetContextDigits(RexxCallContext *c)
RexxRoutineObject RexxEntry GetCurrentRoutine(RexxCallContext *c)
RexxObjectPtr RexxEntry GetCallArgument(RexxCallContext *c, stringsize_t i)
RexxArrayObject RexxEntry GetCallArguments(RexxCallContext *c)
logical_t RexxEntry GetContextForm(RexxCallContext *c)
stringsize_t RexxEntry GetContextFuzz(RexxCallContext *c)
void RexxEntry SetContextVariable(RexxCallContext *c, CSTRING n, RexxObjectPtr v)
#define CALL_INTERFACE_VERSION
Definition: oorexxapi.h:644

Definition at line 410 of file RexxActivity.hpp.

Referenced by createCallContext().

◆ clauseExitUsed

bool RexxActivity::clauseExitUsed
protected

Definition at line 400 of file RexxActivity.hpp.

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

◆ conditionobj

RexxDirectory* RexxActivity::conditionobj
protected

◆ currentExit

RexxString* RexxActivity::currentExit
protected

Definition at line 383 of file RexxActivity.hpp.

◆ currentRexxFrame

RexxActivation* RexxActivity::currentRexxFrame
protected

◆ currentThread

SysActivity RexxActivity::currentThread
protected

◆ dispatchMessage

RexxMessage* RexxActivity::dispatchMessage
protected

Definition at line 363 of file RexxActivity.hpp.

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

◆ exit

bool RexxActivity::exit
protected

Definition at line 392 of file RexxActivity.hpp.

Referenced by runThread(), and terminatePoolActivity().

◆ exitContextFunctions

ExitContextInterface RexxActivity::exitContextFunctions
staticprotected
Initial value:
=
{
}
RexxObjectPtr RexxEntry GetExitContextVariable(RexxExitContext *c, CSTRING n)
RexxDirectoryObject RexxEntry GetAllExitContextVariables(RexxExitContext *c)
void RexxEntry SetExitContextVariable(RexxExitContext *c, CSTRING n, RexxObjectPtr v)
RexxObjectPtr RexxEntry GetExitCallerContext(RexxExitContext *c)
void RexxEntry DropExitContextVariable(RexxExitContext *c, CSTRING n)
#define EXIT_INTERFACE_VERSION
Definition: oorexxapi.h:667

Definition at line 411 of file RexxActivity.hpp.

Referenced by createExitContext().

◆ frameStack

◆ guardsem

SysSemaphore RexxActivity::guardsem
protected

◆ instance

◆ interpreterRoot

bool RexxActivity::interpreterRoot
protected

Definition at line 395 of file RexxActivity.hpp.

Referenced by isInterpreterRoot(), and setInterpreterRoot().

◆ methodContextFunctions

MethodContextInterface RexxActivity::methodContextFunctions
staticprotected
Initial value:
=
{
}
void RexxEntry SetObjectVariable(RexxMethodContext *c, CSTRING n, RexxObjectPtr v)
void RexxEntry SetGuardOff(RexxMethodContext *c)
RexxObjectPtr RexxEntry GetScope(RexxMethodContext *c)
RexxObjectPtr RexxEntry GetSelf(RexxMethodContext *c)
void RexxEntry SetGuardOn(RexxMethodContext *c)
RexxObjectPtr RexxEntry GetObjectVariable(RexxMethodContext *c, CSTRING n)
POINTER RexxEntry GetCSelf(RexxMethodContext *c)
RexxMethodObject RexxEntry GetCurrentMethod(RexxMethodContext *c)
RexxObjectPtr RexxEntry GetMethodArgument(RexxMethodContext *c, stringsize_t i)
void RexxEntry DropObjectVariable(RexxMethodContext *c, CSTRING n)
RexxObjectPtr RexxEntry ForwardMessage(RexxMethodContext *c, RexxObjectPtr o, CSTRING n, RexxClassObject clazz, RexxArrayObject a, RexxDirectoryObject d)
RexxClassObject RexxEntry GetSuper(RexxMethodContext *c)
RexxArrayObject RexxEntry GetMethodArguments(RexxMethodContext *c)
CSTRING RexxEntry GetMessageName(RexxMethodContext *c)
RexxClassObject RexxEntry FindContextClass(RexxMethodContext *c, CSTRING n)
#define METHOD_INTERFACE_VERSION
Definition: oorexxapi.h:621

Definition at line 409 of file RexxActivity.hpp.

Referenced by createMethodContext().

◆ nestedActivity

RexxActivity* RexxActivity::nestedActivity
protected

Definition at line 405 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 359 of file RexxActivity.hpp.

◆ protectedObjects

ProtectedObject* RexxActivity::protectedObjects
protected

◆ randomSeed

uint64_t RexxActivity::randomSeed
protected

Definition at line 401 of file RexxActivity.hpp.

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

◆ requestingString

bool RexxActivity::requestingString
protected

Definition at line 393 of file RexxActivity.hpp.

Referenced by messageSubstitution(), and raiseException().

◆ requiresTable

RexxTable* RexxActivity::requiresTable
protected

◆ runsem

◆ stackBase

char* RexxActivity::stackBase
protected

Definition at line 399 of file RexxActivity.hpp.

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

◆ stackcheck

bool RexxActivity::stackcheck
protected

Definition at line 391 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 394 of file RexxActivity.hpp.

Referenced by isSuspended(), and setSuspended().

◆ sysexits

ExitHandler RexxActivity::sysexits[LAST_EXIT]
protected

Definition at line 402 of file RexxActivity.hpp.

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

◆ threadContext

ActivityContext RexxActivity::threadContext
protected

◆ threadContextFunctions

RexxThreadInterface RexxActivity::threadContextFunctions
staticprotected

Definition at line 408 of file RexxActivity.hpp.

Referenced by addToInstance(), and initializeThreadContext().

◆ threadLocalEnvironment

RexxDirectory* RexxActivity::threadLocalEnvironment
protected

Definition at line 388 of file RexxActivity.hpp.

Referenced by getThreadLocal(), live(), liveGeneral(), and RexxActivity().

◆ topStackFrame

◆ waitingObject

RexxObject* RexxActivity::waitingObject
protected

Definition at line 384 of file RexxActivity.hpp.

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


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