44 #ifndef Included_RexxActivation
45 #define Included_RexxActivation
81 #define RETURN_STATUS_NORMAL 0
82 #define RETURN_STATUS_ERROR 1
83 #define RETURN_STATUS_FAILURE -1
86 #define MS_PREORDER 0x01
87 #define MS_POSTORDER 0x02
144 #define DEBUGPAUSE 0x00000001
145 #define METHODCALL 0x00000002
146 #define INTERNALCALL 0x00000004
147 #define INTERPRET 0x00000008
148 #define PROGRAMCALL 0x00000010
149 #define EXTERNALCALL 0x00000020
152 #define TOP_LEVEL_CALL (PROGRAMCALL | METHODCALL | EXTERNALCALL)
154 #define PROGRAM_LEVEL_CALL (PROGRAMCALL | EXTERNALCALL)
156 #define PROGRAM_OR_METHOD (PROGRAMCALL | METHODCALL)
158 #define INTERNAL_LEVEL_CALL (INTERNALCALL | INTERPRET)
161 #define SCOPE_RESERVED 1
162 #define SCOPE_RELEASED 0
167 void *
operator new(size_t);
168 inline void *
operator new(
size_t size,
void *ptr) {
return ptr;};
169 inline void operator delete(
void *) { ; }
170 inline void operator delete(
void *,
void *) { ; }
447 inline void traceCompoundAssignment(
RexxString *stemVar,
RexxObject **tails,
size_t tailCount,
RexxObject *value,
bool quoteValue =
true) {
if (this->
settings.
intermediate_trace) this->
traceCompoundValue(
TRACE_PREFIX_ASSIGNMENT, stemVar, tails, tailCount,
ASSIGNMENT_MARKER, value, quoteValue); };
588 variable->
set(value);
620 newVariable->
reset(name);
RexxArray * new_array(size_t s)
#define INTERNAL_LEVEL_CALL
const uint64_t RANDOM_FACTOR
uint64_t RANDOMIZE(uint64_t seed)
#define PROGRAM_LEVEL_CALL
#define PROGRAM_OR_METHOD
const uint64_t RANDOM_ADDER
@ TRACE_PREFIX_DOTVARIABLE
@ TRACE_PREFIX_ASSIGNMENT
#define ASSIGNMENT_MARKER
RexxVariable * new_variable(RexxString *n)
size_t externalTraceOption
RexxMethod * parent_method
RexxObject ** parent_arglist
RexxLocalVariables local_variables
size_t parent_named_argcount
NumericSettings numericSettings
RexxArray * parent_arguments
RexxString * alternate_env
RexxVariableDictionary * object_variables
bool propagateNumericSettings
SecurityManager * securityManager
RexxDirectory * conditionObj
size_t externalTraceDepth
size_t externalTraceFlags
RexxString * halt_description
RexxSource * getSourceObject()
BaseExecutable * executable
RexxQueue * handler_queue
RexxList * environmentList
RexxString * formatTrace(RexxInstruction *, RexxSource *)
RexxDirectory * getAllLocalVariables()
RexxString * getCallname()
void propagateExit(RexxObject *)
RexxObject * externalCall(RexxString *, RexxObject **, size_t, size_t, RexxString *, ProtectedObject &)
RexxSource * getSourceObject()
size_t getMethodArgumentCount()
RexxObject * internalCall(RexxString *, RexxInstruction *, RexxObject **, size_t, size_t, ProtectedObject &)
RexxVariable * getLocalVariable(RexxString *name, size_t index)
RexxObject * getLocalCompoundVariableRealValue(RexxString *localstem, size_t index, RexxObject **tail, size_t tailCount)
void dropLocalStem(RexxString *name, size_t index)
bool tracingFailures(void)
void pushControl(RexxObject *)
RexxString * getAddress()
void tracePrefix(const char *n, RexxObject *v)
virtual bool isRexxContext()
RexxObject * popControl()
RexxDirectory * getConditionObj()
bool isInternalLevelCall()
RexxArray * getStackFrames(bool skipFirst)
RexxActivation * external()
RexxString * getMessageName()
RexxCompoundElement * getLocalCompoundVariable(RexxString *stemName, size_t index, RexxObject **tail, size_t tailCount)
RexxObject * run(RexxArray *_arguments, RexxObject **_arglist, size_t _argcount, size_t _named_argcount, ProtectedObject &_result)
void iterate(RexxString *)
RexxInstruction * getNext()
void traceClause(RexxInstruction *, int)
void setExternalTraceOn()
void exitFrom(RexxObject *)
RexxActivation(RESTORETYPE restoreType)
RexxObject * getParentContextObject()
void updateLocalVariable(RexxVariable *variable)
bool callExternalRexx(RexxString *, RexxObject **, size_t, size_t, RexxString *, ProtectedObject &)
PackageClass * getPackageObject()
RexxString * sourceString()
void traceCompoundAssignment(RexxString *stemVar, RexxObject **tails, size_t tailCount, RexxObject *value, bool quoteValue=true)
RexxSource * sourceObject
void putLocalVariable(RexxVariable *variable, size_t index)
RexxArray * getArguments()
void signalTo(RexxInstruction *)
RexxVariableBase * directRetriever(RexxString *)
void traceCompoundName(RexxString *stemVar, RexxObject **tails, size_t tailCount, RexxCompoundTail *tail)
void traceTaggedValue(int prefix, const char *tagPrefix, bool quoteTag, RexxString *tag, const char *marker, RexxObject *value, bool quoteValue=true)
static const size_t trace_off
RexxObject ** getProgramArgumentlist()
void debugSkip(wholenumber_t, bool)
bool localStemVariableExists(RexxString *stemName, size_t index)
void loadLibrary(RexxString *target, RexxInstruction *instruction)
static const size_t trace_all_flags
RexxQueue * condition_queue
RexxStem * getLocalStem(RexxString *name, size_t index)
int conditionalPauseInstruction()
bool isElapsedTimerReset()
RexxObject * handleNovalueEvent(RexxString *name, RexxObject *defaultValue, RexxVariable *variable)
static const size_t trace_commands
void traceCompoundName(RexxString *stemVar, RexxObject **tails, size_t tailCount, RexxString *tail)
RexxString * trapState(RexxString *)
RexxActivation * senderActivation()
void traceAssignment(RexxString *n, RexxObject *v, bool quoteValue=true)
RexxVariableDictionary * getObjectVariables()
static const size_t single_step_nested
static const size_t trace_debug
bool isObjectScopeLocked()
void assignLocalCompoundVariable(RexxString *stemName, size_t index, RexxObject **tail, size_t tailCount, RexxObject *value)
SecurityManager * getEffectiveSecurityManager()
bool tracingCommands(void)
static const size_t trace_intermediates
virtual RexxObject * getReceiver()
void pushEnvironment(RexxObject *)
RexxString * traceSetting()
void setReturnStatus(int status)
RexxActivity * getActivity()
void trapOn(RexxString *, RexxInstructionCallBase *)
void traceCommand(RexxInstruction *v)
void dropLocalCompoundVariable(RexxString *stemName, size_t index, RexxObject **tail, size_t tailCount)
void setLocalVariable(RexxString *name, size_t index, RexxObject *value)
RexxClass * findClass(RexxString *name)
RexxString * formatSourcelessTraceLine(RexxString *packageName)
void interpret(RexxString *)
RexxVariableDictionary * getLocalVariables()
bool localVariableExists(RexxString *name, size_t index)
void clearTraceSettings()
void raiseExit(RexxString *, RexxObject *, RexxString *, RexxObject *, RexxObject *, RexxDirectory *)
void liveGeneral(int reason)
static const size_t trace_errors
void processClauseBoundary()
RexxObject * getLocalEnvironment(RexxString *name)
void leaveLoop(RexxString *)
void newDo(RexxDoBlock *block)
static const size_t trace_suppress
void debugInterpret(RexxString *)
static const bool default_enable_macrospace
void setAddress(RexxString *)
RexxObject * evaluateLocalCompoundVariable(RexxString *stemName, size_t index, RexxObject **tail, size_t tailCount)
void setDefaultAddress(RexxString *)
void signalValue(RexxString *)
static const size_t trace_results
static const size_t set_trace_on
void procedureExpose(RexxVariableBase **variables, size_t count)
RexxObject * getContextLine()
void traceResult(RexxObject *v)
static const size_t guarded_method
void setObjNotify(RexxMessage *)
static const size_t set_trace_off
void enableExternalTrace(const char *option)
void setCurrent(RexxInstruction *v)
void setExternalTraceOff()
RexxExpressionStack stack
RexxCompoundElement * exposeLocalCompoundVariable(RexxString *stemName, size_t index, RexxObject **tail, size_t tailCount)
static const size_t debug_bypass
void setTrace(size_t, size_t)
size_t getProgramArgumentCount()
bool tracingInstructions(void)
void traceOperatorValue(int prefix, const char *tag, RexxObject *value)
void traceVariable(RexxString *n, RexxObject *v)
RexxVariableBase * retriever(RexxString *)
void trapDelay(RexxString *)
RexxExpressionStack * getStack()
bool localCompoundVariableExists(RexxString *stemName, size_t index, RexxObject **tail, size_t tailCount)
RexxObject * resolveDotVariable(RexxString *name)
unsigned short getReserveCount()
static const size_t trace_failures
RexxObject * getContextReturnStatus()
RexxObject * getProgramArgument(size_t position)
static const size_t forwarded
bool debugPause(RexxInstruction *instr=OREF_NULL)
static const size_t reply_issued
StackFrameClass * createStackFrame()
ActivationSettings settings
virtual RexxActivation * getRexxContext()
RexxDirectory * getThreadLocal()
RexxObject * getLocalCompoundVariableValue(RexxString *stemName, size_t index, RexxObject **tail, size_t tailCount)
RexxVariableDictionary * getVariableDictionary()
virtual RexxActivation * findRexxContext()
PackageClass * loadRequires(RexxString *, RexxInstruction *)
RexxObject * getContextObject()
void command(RexxString *, RexxString *)
void putSettings(ActivationSettings &s)
RexxObject * internalCallTrap(RexxString *, RexxInstruction *, RexxDirectory *, ProtectedObject &)
static const size_t trace_labels
void traceInstruction(RexxInstruction *v)
void traceCompoundValue(int prefix, RexxString *stemName, RexxObject **tails, size_t tailCount, RexxCompoundTail *tail)
RexxObject * novalueHandler(RexxString *)
void addLocalRoutine(RexxString *name, RexxMethod *method)
static size_t processTraceSetting(size_t traceSetting)
void getSettings(ActivationSettings &s)
void traceCompound(RexxString *stemVar, RexxObject **tails, size_t tailCount, RexxObject *value)
void mergeTraps(RexxQueue *, RexxQueue *)
bool callMacroSpaceFunction(RexxString *, RexxObject **, size_t, size_t, RexxString *, int, ProtectedObject &)
static const size_t return_status_set
static RoutineClass * getMacroCode(RexxString *macroName)
RexxInstruction * current
uint64_t getRandomSeed(RexxInteger *)
static const size_t clause_exits
void unwindTrap(RexxActivation *)
void setElapsedTimerInvalid()
static const size_t default_trace_flags
void trapOff(RexxString *)
RexxDirectory * getLabels()
void setLocalCompoundVariable(RexxString *stemName, size_t index, RexxObject **tail, size_t tailCount, RexxObject *value)
RexxInteger * random(RexxInteger *, RexxInteger *, RexxInteger *)
void pushBlock(RexxDoBlock *block)
static const size_t trace_all
static const size_t clause_boundary
static const size_t elapsed_reset
RexxObject * forward(RexxObject *, RexxString *, RexxObject *, RexxObject **, size_t, size_t, bool)
RexxObject ** getMethodArgumentList()
void setLocalVariableDictionary(RexxVariableDictionary *dict)
void setArguments(RexxArray *positionalArguments, RexxDirectory *namedArguments)
SecurityManager * getSecurityManager()
PackageClass * getPackage()
void setCallType(RexxString *type)
void traceMessage(RexxString *n, RexxObject *v)
RexxDirectory * getPublicRoutines()
void trapUndelay(RexxString *)
RexxContext * contextObject
void returnFrom(RexxObject *result)
static const size_t halt_condition
void traceOperator(const char *n, RexxObject *v)
void traceLabel(RexxInstruction *v)
size_t getMethodNamedArgumentCount()
RexxObject * rexxVariable(RexxString *)
void terminateBlock(size_t _indent)
bool tracingIntermediates()
void dropLocalVariable(RexxString *name, size_t index)
static const size_t debug_prompt_issued
RexxString * resolveProgramName(RexxString *name)
void expose(RexxVariableBase **variables, size_t count)
static const size_t single_step
void setElapsedTimerValid()
bool trap(RexxString *, RexxDirectory *)
RexxString * getTraceBack()
static const size_t trace_results_flags
static const size_t trace_on
RexxObject * getMethodArgument(size_t position)
void setConditionObj(RexxDirectory *condition)
RexxVariable * newLocalVariable(RexxString *name)
bool propagateNumericSettings()
RexxDirectory * getStreams()
void cacheLocalVariable(RexxVariable *var)
PackageClass * getEffectivePackageObject()
size_t getContextLineNumber()
bool isProgramLevelCall()
static const size_t trace_intermediates_flags
static const size_t external_yield
void traceDotVariable(RexxString *n, RexxObject *v)
RexxObject * popEnvironment()
void cleanupLocalVariables()
static const size_t traps_copied
RexxObject * run(RexxObject *_receiver, RexxString *msgname, RexxArray *_arguments, RexxObject **_arglist, size_t _argcount, size_t _named_argcount, RexxInstruction *start, ProtectedObject &resultObj)
static const size_t source_traced
void traceValue(RexxObject *, int)
void setNext(RexxInstruction *v)
RexxObject * resolveStream(RexxString *name, bool input, RexxString **fullName, bool *added)
void traceIntermediate(RexxObject *v, int p)
static const bool default_enable_commands
static const size_t transfer_failed
RexxString * getProgramName()
RexxSource * getEffectiveSourceObject()
static const size_t procedure_valid
static const size_t trace_flags
void traceFunction(RexxString *n, RexxObject *v)
size_t getProgramNamedArgumentCount()
RexxInstruction * getCurrent()
RexxVariable * getLocalStemVariable(RexxString *name, size_t index)
virtual NumericSettings * getNumericSettings()
void callTerminationExit(RexxActivation *)
RexxString * createCompoundName(RexxString *)
RexxDoBlock * getPrevious()
void setPrevious(RexxDoBlock *block)
void setHasNoReferences()
RexxVariable * get(size_t index)
RexxVariableDictionary * getDictionary()
void updateVariable(RexxVariable *)
void putVariable(RexxVariable *variable, size_t index)
void setDictionary(RexxVariableDictionary *dict)
RexxVariable * lookupVariable(RexxString *name, size_t index)
RexxVariable * find(RexxString *name, size_t index)
RexxVariable * lookupStemVariable(RexxString *name, size_t index)
RexxVariableDictionary * getNestedDictionary()
RexxVariable * variableCache
RexxVariableDictionary * getObjectVariables(RexxObject *)
static int condition(RexxToken *)
RexxInstruction * instruction()
void position(size_t, size_t)
PackageClass * getPackage()
RexxDirectory * variables
RexxString * concat(RexxString *)
unsigned short getReserveCount()
void release(RexxActivity *)
RexxDirectory * getAllVariables()
void cache(RexxVariable *next)
void reset(RexxString *name)
bool isLocal(RexxActivation *act)
void set(RexxObject *value)
RexxObject * getVariableValue()
void setCreator(RexxActivation *creatorActivation)
unsigned __int64 uint64_t