RexxActivation.hpp
Go to the documentation of this file.
1 /*----------------------------------------------------------------------------*/
2 /* */
3 /* Copyright (c) 1995, 2004 IBM Corporation. All rights reserved. */
4 /* Copyright (c) 2005-2009 Rexx Language Association. All rights reserved. */
5 /* */
6 /* This program and the accompanying materials are made available under */
7 /* the terms of the Common Public License v1.0 which accompanies this */
8 /* distribution. A copy is also available at the following address: */
9 /* http://www.oorexx.org/license.html */
10 /* */
11 /* Redistribution and use in source and binary forms, with or */
12 /* without modification, are permitted provided that the following */
13 /* conditions are met: */
14 /* */
15 /* Redistributions of source code must retain the above copyright */
16 /* notice, this list of conditions and the following disclaimer. */
17 /* Redistributions in binary form must reproduce the above copyright */
18 /* notice, this list of conditions and the following disclaimer in */
19 /* the documentation and/or other materials provided with the distribution. */
20 /* */
21 /* Neither the name of Rexx Language Association nor the names */
22 /* of its contributors may be used to endorse or promote products */
23 /* derived from this software without specific prior written permission. */
24 /* */
25 /* THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS */
26 /* "AS IS" AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT */
27 /* LIMITED TO, THE IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS */
28 /* FOR A PARTICULAR PURPOSE ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT */
29 /* OWNER OR CONTRIBUTORS BE LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, */
30 /* SPECIAL, EXEMPLARY, OR CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED */
31 /* TO, PROCUREMENT OF SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, */
32 /* OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY */
33 /* OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING */
34 /* NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE OF THIS */
35 /* SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. */
36 /* */
37 /*----------------------------------------------------------------------------*/
38 /******************************************************************************/
39 /* REXX Kernel RexxActivation.hpp */
40 /* */
41 /* Primitive Activation Class Definitions */
42 /* */
43 /******************************************************************************/
44 #ifndef Included_RexxActivation
45 #define Included_RexxActivation
46 
47 #include "ExpressionStack.hpp" /* needs expression stack */
48 #include "DoBlock.hpp" /* need do block definition */
49  /* various activation settings */
50 #include "RexxLocalVariables.hpp" /* local variable cache definitions */
51 #include "RexxDateTime.hpp"
52 #include "RexxCode.hpp"
53 #include "ActivityManager.hpp"
54 #include "RexxCompoundTail.hpp"
55 #include "ContextClass.hpp"
56 
57 
59 class ProtectedObject;
60 class RexxSupplier;
61 class PackageClass;
62 class StackFrameClass;
63 
64 
65 /******************************************************************************/
66 /* Random number generation constants */
67 /******************************************************************************/
68 
69 const uint64_t RANDOM_FACTOR = 25214903917LL; /* random multiplication factor */
70 const uint64_t RANDOM_ADDER = 11LL;
71  /* randomize a seed number */
72 inline uint64_t RANDOMIZE(uint64_t seed) { return (seed * RANDOM_FACTOR + RANDOM_ADDER); }
73  // size of a size_t value in bits
74 const size_t SIZE_BITS = sizeof(void *) * 8;
75 
76 /* execution_state values */
77 #define ACTIVE 0
78 #define REPLIED 1
79 #define RETURNED 2
80 
81 #define RETURN_STATUS_NORMAL 0
82 #define RETURN_STATUS_ERROR 1
83 #define RETURN_STATUS_FAILURE -1
84 
85 
86 #define MS_PREORDER 0x01 /* Macro Space Pre-Search */
87 #define MS_POSTORDER 0x02 /* Macro Space Post-Search */
88 
89 
90 
91  /* NOTE: a template structure for */
92  /* the following is created in */
93  /* OKACTIVA.C to allow quick */
94  /* initialization of new activations.*/
95  /* That template MUST be updated */
96  /* whenever the settings structure */
97  /* changes */
98 
100 {
101  public:
102  inline ActivationSettings() {}
103 
104  RexxDirectory * traps; /* enabled condition traps */
105  RexxDirectory * conditionObj; /* current condition object */
106  RexxArray * parent_arguments; /* protect parent_arglist against GC */
107  RexxObject ** parent_arglist; /* arguments to top level program */
108  size_t parent_argcount; /* number of positional arguments to the top level program */
109  size_t parent_named_argcount; /* number of named arguments to the top level program */
110  RexxMethod * parent_method; /* method object for top level */
111  RexxCode * parent_code; /* source of the parent method */
112  RexxString * current_env; /* current address environment */
113  RexxString * alternate_env; /* alternate address environment */
114  RexxString * msgname; /* message sent to the receiver */
115  /* object variable dictionary */
117  RexxString * calltype; /* (COMMAND/METHOD/FUNCTION/ROUTINE) */
118  RexxDirectory * streams; /* Directory of openned streams */
119  RexxString * halt_description; /* description from a HALT condition */
120  SecurityManager * securityManager; /* security manager object */
121  RexxObject * scope; // scope of the method call
122  size_t traceOption; /* current active trace option */
123  size_t flags; /* trace/numeric and other settings */
124  size_t externalTraceOption; /* trace option set with RXTRACE */
125  size_t externalTraceFlags; /* trace flags set with RXTRACE */
126  size_t externalTraceDepth; /* trace depth set with RXTRACE */
127  wholenumber_t trace_skip; /* count of trace events to skip */
128  int return_status; /* command return status */
129  size_t traceindent; /* trace indentation */
130  NumericSettings numericSettings; /* globally effective settings */
131  bool propagateNumericSettings; /* are current numeric settings reused by called activations ? */
132  bool enableCommands; /* are commands enabled ? */
133  bool enableMacrospace; /* is macrospace enabled ? */
134  int64_t elapsed_time; /* elapsed time clock */
135  RexxDateTime timestamp; /* current timestamp */
136  bool intermediate_trace; /* very quick test for intermediate trace */
137  RexxLocalVariables local_variables; /* the local variables for this activation */
138 };
139 
140  /* activation_context values */
141  /* these are done as bit settings to */
142  /* allow multiple potential values */
143  /* to be checked with a single test */
144 #define DEBUGPAUSE 0x00000001
145 #define METHODCALL 0x00000002
146 #define INTERNALCALL 0x00000004
147 #define INTERPRET 0x00000008
148 #define PROGRAMCALL 0x00000010
149 #define EXTERNALCALL 0x00000020
150 
151  /* check for top level execution */
152 #define TOP_LEVEL_CALL (PROGRAMCALL | METHODCALL | EXTERNALCALL)
153  /* non-method top level execution */
154 #define PROGRAM_LEVEL_CALL (PROGRAMCALL | EXTERNALCALL)
155  /* non-method top level execution */
156 #define PROGRAM_OR_METHOD (PROGRAMCALL | METHODCALL)
157  /* call is within an activation */
158 #define INTERNAL_LEVEL_CALL (INTERNALCALL | INTERPRET)
159 
160 /* object_scope values */
161 #define SCOPE_RESERVED 1
162 #define SCOPE_RELEASED 0
163 
165  friend class RexxSource;
166  public:
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 *) { ; }
171 
172  inline RexxActivation(RESTORETYPE restoreType) { ; };
173  RexxActivation();
174  RexxActivation(RexxActivity* _activity, RexxActivation *_parent, RexxMethod *_method, RexxCode *_code);
175  RexxActivation(RexxActivity *_activity, RexxActivation *_parent, RoutineClass *_routine, RexxCode *_code, RexxString *calltype, RexxString *env, int context);
176  RexxActivation(RexxActivity *_activity, RexxActivation *_parent, RexxCode *_code, int context);
177 
178  void live(size_t);
179  void liveGeneral(int reason);
180  RexxObject * dispatch();
181  size_t digits();
182  size_t fuzz();
183  bool form();
185  bool enableCommands();
186  bool enableMacrospace();
187  void setDigits(size_t);
188  void setFuzz(size_t);
189  void setForm(bool);
190  void enableCommands(bool);
191  void enableMacrospace(bool);
192  void setDigits();
193  void setFuzz();
194  void setForm();
195  void propagateNumericSettings(bool);
196  bool trap(RexxString *, RexxDirectory *);
197  void setObjNotify(RexxMessage *);
198  void termination();
199  inline void guardOff()
200  {
201  /* currently locked? */
202  if (this->object_scope == SCOPE_RESERVED) {
203  /* release the variable dictionary */
205  /* set the state to released */
207  }
208  }
209 
210 
211  inline bool isInterpret() { return activation_context == INTERPRET; }
212  inline bool isInternalCall() { return activation_context == INTERNALCALL; }
213  inline bool isMethod() { return activation_context == METHODCALL; }
214  inline bool isRoutine() { return activation_context == EXTERNALCALL; }
215  inline bool isProgram() { return activation_context == PROGRAMCALL; }
216  inline bool isTopLevelCall() { return (activation_context & TOP_LEVEL_CALL) != 0; }
217  inline bool isProgramLevelCall() { return (activation_context & PROGRAM_LEVEL_CALL) != 0; }
218  inline bool isInternalLevelCall() { return (activation_context & INTERNAL_LEVEL_CALL) != 0; }
219  inline bool isProgramOrMethod() { return (activation_context & PROGRAM_OR_METHOD) != 0; }
220  inline bool isMethodOrRoutine() { return isMethod() || isRoutine(); }
221 
222  /*
223  In the next 2 declarations, the parameter 'RexxArray *_arguments' is not existing in official ooRexx.
224  Needed for Executor because of RexxContext::setArgs which allows to redefine the arguments of an activation during its execution
225  (this is a new functionality for the coactivities).
226  The following ooRexx code, when run from ooRexxShell, makes the interpreter crash during a GC:
227  do 1000000; .context~setargs(.array~new, namedarguments:.nil); end
228  Reason:
229  This code is executed by an interpret instruction.
230  #0 0x000000010031e564 in RexxContext::setArgs(RexxObject*, RexxString*, RexxObject*) at /local/rexx/oorexx/executor/sandbox/jlf/trunk/interpreter/classes/ContextClass.cpp:301
231  #1 0x000000010038c36c in CPPCode::run(RexxActivity*, RexxMethod*, RexxObject*, RexxString*, RexxObject**, unsigned long, ProtectedObject&) at /local/rexx/oorexx/executor/sandbox/jlf/trunk/interpreter/execution/CPPCode.cpp:240
232  #2 0x000000010032a96d in RexxMethod::run(RexxActivity*, RexxObject*, RexxString*, RexxObject**, unsigned long, ProtectedObject&) at /local/rexx/oorexx/executor/sandbox/jlf/trunk/interpreter/classes/MethodClass.cpp:324
233  #3 0x000000010033fa0a in RexxObject::messageSend(RexxString*, RexxObject**, unsigned long, ProtectedObject&, bool) at /local/rexx/oorexx/executor/sandbox/jlf/trunk/interpreter/classes/ObjectClass.cpp:810
234  #4 0x00000001003dffc8 in RexxExpressionStack::send(RexxString*, unsigned long, unsigned long, ProtectedObject&) at /local/rexx/oorexx/executor/sandbox/jlf/trunk/interpreter/expression/ExpressionStack.hpp:69
235  #5 0x00000001003ef191 in RexxInstructionMessage::execute(RexxActivation*, RexxExpressionStack*) at /local/rexx/oorexx/executor/sandbox/jlf/trunk/interpreter/instructions/MessageInstruction.cpp:248
236  #6 0x000000010038fd3f in RexxActivation::run(RexxObject*, RexxString*, RexxObject**, unsigned long, RexxInstruction*, ProtectedObject&) at /local/rexx/oorexx/executor/sandbox/jlf/trunk/interpreter/execution/RexxActivation.cpp:595
237  #7 0x00000001003951f6 in RexxActivation::interpret(RexxString*) at /local/rexx/oorexx/executor/sandbox/jlf/trunk/interpreter/execution/RexxActivation.cpp:2496
238  In frame #7, a new activation is created for the interpret, which is executed with the arguments of the parent activation:
239  newActivation->run(OREF_NULL, OREF_NULL, arglist, argcount, OREF_NULL, r);
240  The arglist of the parent activation is stored on the new activation in frame #6.
241  In frame #0, the arguments of the parent activation are replaced by new arguments.
242  At this moment, the arglist stored on the new activation is no longer protected against GC.
243  By passing the parent activity's array of arguments in the parameter 'RexxArray *arguments',
244  it's possible to store this array on the new activation, which protects its arglist against GC
245  even when the parent activity's array of arguments is replaced by a new array.
246  */
247  RexxObject *run(RexxObject *_receiver, RexxString *msgname, RexxArray *_arguments, RexxObject **_arglist,
248  size_t _argcount, size_t _named_argcount, RexxInstruction * start, ProtectedObject &resultObj);
249  inline RexxObject *run(RexxArray *_arguments, RexxObject **_arglist, size_t _argcount, size_t _named_argcount, ProtectedObject &_result)
250  {
251  return run(OREF_NULL, OREF_NULL, _arguments, _arglist, _argcount, _named_argcount, OREF_NULL, _result);
252  }
253 
254  void reply(RexxObject *);
255  RexxObject * forward(RexxObject *, RexxString *, RexxObject *, RexxObject **, size_t, size_t, bool);
257  void exitFrom(RexxObject *);
258  void procedureExpose(RexxVariableBase **variables, size_t count);
259  void expose(RexxVariableBase **variables, size_t count);
260  void setTrace(size_t, size_t);
261  void setTrace(RexxString *, bool externalTrace=false, size_t depth=0);
262  static size_t processTraceSetting(size_t traceSetting);
263  void raise(RexxString *, RexxObject *, RexxString *, RexxObject *, RexxObject *, RexxDirectory *);
264  void toggleAddress();
265  void guardOn();
269  void interpret(RexxString *);
270  void signalTo(RexxInstruction *);
271  void guardWait();
272  void debugSkip(wholenumber_t, bool);
274  void iterate(RexxString *);
275  void leaveLoop(RexxString *);
277  void trapOff(RexxString *);
278  void setAddress(RexxString *);
279  void signalValue(RexxString *);
281  void trapDelay(RexxString *);
282  void trapUndelay(RexxString *);
283  bool callExternalRexx(RexxString *, RexxObject **, size_t, size_t, RexxString *, ProtectedObject &);
287  bool callMacroSpaceFunction(RexxString *, RexxObject **, size_t, size_t, RexxString *, int, ProtectedObject &);
288  static RoutineClass* getMacroCode(RexxString *macroName);
292  void command(RexxString *, RexxString *);
296  size_t currentLine();
297  void traceValue(RexxObject *, int);
298  void traceCompoundValue(int prefix, RexxString *stemName, RexxObject **tails, size_t tailCount, RexxCompoundTail *tail);
299  void traceCompoundValue(int prefix, RexxString *stem, RexxObject **tails, size_t tailCount, const char *marker, RexxObject * value, bool quoteValue=true);
300  void traceTaggedValue(int prefix, const char *tagPrefix, bool quoteTag, RexxString *tag, const char *marker, RexxObject * value, bool quoteValue =true);
301  void traceOperatorValue(int prefix, const char *tag, RexxObject *value);
302  void traceSourceString();
303  void traceClause(RexxInstruction *, int);
304  void traceEntry();
305  void resetElapsed();
310  RexxArray * getStackFrames(bool skipFirst);
311  inline void implicitExit()
312  {
313  /* at a main program level or completing an INTERPRET */
314  /* instruction? */
316  /* real program call? */
318  {
319  /* run termination exit */
320  this->activity->callTerminationExit(this);
321  }
322  this->execution_state = RETURNED;/* this is an EXIT for real */
323  return; /* we're finished here */
324  }
325  this->exitFrom(OREF_NULL); /* we've had a nested exit, we need to process this more fully */
326  }
327 
328  void unwindTrap(RexxActivation *);
330  void addLocalRoutine(RexxString *name, RexxMethod *method);
332  void debugInterpret(RexxString *);
333  bool debugPause(RexxInstruction * instr=OREF_NULL);
334  void processClauseBoundary();
335  bool halt(RexxString *);
336  void externalTraceOn();
337  void externalTraceOff();
338  void yield();
345  void pushEnvironment(RexxObject *);
347  void processTraps();
348  void mergeTraps(RexxQueue *, RexxQueue *);
356  void closeStreams();
357  void checkTrapTable();
358  RexxObject *resolveStream(RexxString *name, bool input, RexxString **fullName, bool *added);
363  RexxObject *handleNovalueEvent(RexxString *name, RexxObject *defaultValue, RexxVariable *variable);
367  }
368 #if 0
369  PackageClass *getPackageObject() { return packageObject; } // ooRexx5
370 #else
371  PackageClass *getPackageObject() { return sourceObject->getPackage(); } // ooRexx5 with adaptation
372 #endif
373 #if 0
374  inline PackageClass *getEffectivePackageObject() // ooRexx5
375  {
376  return isInterpret() ? executable->getPackageObject() : packageObject;
377  }
378 #else
379  inline PackageClass *getEffectivePackageObject() // ooRexx5 with adaptation
380  {
382  }
383 #endif
387  void setReturnStatus(int status);
388 
389  inline void setCallType(RexxString *type) {this->settings.calltype = type; }
390  inline void pushBlock(RexxDoBlock *block) { block->setPrevious(this->dostack); this->dostack = block; }
391  inline void popBlock() { RexxDoBlock *temp; temp = this->dostack; this->dostack = temp->getPrevious(); temp->setHasNoReferences(); }
392  inline RexxDoBlock * topBlock() { return this->dostack; }
393  inline void terminateBlock(size_t _indent) { this->popBlock(); this->blockNest--; this->settings.traceindent = _indent; }
394  inline void terminateBlock() { this->settings.traceindent = this->dostack->getIndent(); this->popBlock(); this->blockNest--; }
395  inline void newDo(RexxDoBlock *block) { this->pushBlock(block); this->blockNest++; this->settings.traceindent++;}
396  inline void removeBlock() { this->blockNest--; unindent(); };
397  inline void addBlock() { this->blockNest++; indent(); };
398  inline bool hasActiveBlocks() { return blockNest != 0; }
399  inline bool inMethod() {return this->activation_context == METHODCALL; }
400  inline void indent() {this->settings.traceindent++; };
401  inline void unindent() {if (this->settings.traceindent > 0) this->settings.traceindent--; };
402  inline void setIndent(size_t v) {this->settings.traceindent=(v); };
403  inline size_t getIndent() {return this->settings.traceindent;};
404  inline bool tracingIntermediates() {return this->settings.intermediate_trace;};
406  inline bool tracingResults() {return (this->settings.flags&trace_results) != 0; }
407  inline RexxActivity * getActivity() {return this->activity;};
408  inline RexxString * getMessageName() {return this->settings.msgname;};
409  inline RexxString * getCallname() {return this->settings.msgname;};
410  inline RexxInstruction * getCurrent() {return this->current;};
411  inline void getSettings(ActivationSettings &s) {this->settings = s;};
412  inline void putSettings(ActivationSettings &s) {s = this->settings;};
413  inline RexxString * getAddress() {return this->settings.current_env;};
416  inline RexxInstruction * getNext() {return this->next;};
417  inline void setNext(RexxInstruction * v) {this->next=v;};
418  inline void setCurrent(RexxInstruction * v) {this->current=v;};
419  inline bool inDebug() { return ((this->settings.flags&trace_debug) != 0) && !this->debug_pause;}
420 
421  inline RexxExpressionStack * getStack() {return &this->stack; };
422 
424  virtual RexxActivation *getRexxContext();
425  virtual RexxActivation *findRexxContext();
426  virtual RexxObject *getReceiver();
427  virtual bool isRexxContext();
428 
429  inline void traceIntermediate(RexxObject * v, int p) { if (this->settings.intermediate_trace) this->traceValue(v, p); };
430  inline void traceVariable(RexxString *n, RexxObject *v)
431  { if (this->settings.intermediate_trace) { this->traceTaggedValue(TRACE_PREFIX_VARIABLE, NULL, false, n, VALUE_MARKER, v); } };
433  { if (this->settings.intermediate_trace) { this->traceTaggedValue(TRACE_PREFIX_DOTVARIABLE, ".", false, n, VALUE_MARKER, v); } };
434  inline void traceFunction(RexxString *n, RexxObject *v)
435  { if (this->settings.intermediate_trace) { this->traceTaggedValue(TRACE_PREFIX_FUNCTION, NULL, false, n, VALUE_MARKER, v); } };
436  inline void traceMessage(RexxString *n, RexxObject *v)
437  { if (this->settings.intermediate_trace) { this->traceTaggedValue(TRACE_PREFIX_MESSAGE, NULL, true, n, VALUE_MARKER, v); } };
438  inline void traceOperator(const char *n, RexxObject *v)
439  { if (this->settings.intermediate_trace) { this->traceOperatorValue(TRACE_PREFIX_OPERATOR, n, v); } };
440  inline void tracePrefix(const char *n, RexxObject *v)
441  { if (this->settings.intermediate_trace) { this->traceOperatorValue(TRACE_PREFIX_PREFIX, n, v); } };
442  inline void traceAssignment(RexxString *n, RexxObject *v, bool quoteValue =true)
443  { if (this->settings.intermediate_trace) { this->traceTaggedValue(TRACE_PREFIX_ASSIGNMENT, NULL, false, n, ASSIGNMENT_MARKER, v, quoteValue); } };
444  inline void traceCompoundName(RexxString *stemVar, RexxObject **tails, size_t tailCount, RexxCompoundTail *tail) { if (this->settings.intermediate_trace) this->traceCompoundValue(TRACE_PREFIX_COMPOUND, stemVar, tails, tailCount, VALUE_MARKER, tail->createCompoundName(stemVar)); };
445  inline void traceCompoundName(RexxString *stemVar, RexxObject **tails, size_t tailCount, RexxString *tail) { if (this->settings.intermediate_trace) this->traceCompoundValue(TRACE_PREFIX_COMPOUND, stemVar, tails, tailCount, VALUE_MARKER, stemVar->concat(tail)); };
446  inline void traceCompound(RexxString *stemVar, RexxObject **tails, size_t tailCount, RexxObject *value) { if (this->settings.intermediate_trace) this->traceCompoundValue(TRACE_PREFIX_VARIABLE, stemVar, tails, tailCount, VALUE_MARKER, value); };
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); };
448  inline void traceResult(RexxObject * v) { if ((this->settings.flags&trace_results)) this->traceValue(v, TRACE_PREFIX_RESULT); };
449  inline bool tracingInstructions(void) { return (this->settings.flags&trace_all) != 0; }
450  inline bool tracingErrors(void) { return (this->settings.flags&trace_errors) != 0; }
451  inline bool tracingFailures(void) { return (this->settings.flags&trace_failures) != 0; }
453  inline void traceLabel(RexxInstruction * v) { if ((this->settings.flags&trace_labels) != 0) this->traceClause(v, TRACE_PREFIX_CLAUSE); };
454  inline bool tracingLabels(void) { return (this->settings.flags&trace_labels) != 0; }
455  inline void traceCommand(RexxInstruction * v) { if ((this->settings.flags&trace_commands) != 0) this->traceClause(v, TRACE_PREFIX_CLAUSE); }
456  inline bool tracingCommands(void) { return (this->settings.flags&trace_commands) != 0; }
457  inline bool tracingAll(void) { return (this->settings.flags&trace_all) != 0; }
458  inline void pauseInstruction() { if ((this->settings.flags&(trace_all | trace_debug)) == (trace_all | trace_debug)) this->debugPause(); };
459  inline int conditionalPauseInstruction() { return (((this->settings.flags&(trace_all | trace_debug)) == (trace_all | trace_debug)) ? this->debugPause(): false); };
460  inline void pauseLabel() { if ((this->settings.flags&(trace_labels | trace_debug)) == (trace_labels | trace_debug)) this->debugPause(); };
461  inline void pauseCommand() { if ((this->settings.flags&(trace_commands | trace_debug)) == (trace_commands | trace_debug)) this->debugPause(); };
462 
465  inline bool isTopLevel() { return (this->activation_context&TOP_LEVEL_CALL) != 0; }
466  inline bool isForwarded() { return (this->settings.flags&forwarded) != 0; }
467  inline bool isGuarded() { return (this->settings.flags&guarded_method) != 0; }
468  inline void setGuarded() { this->settings.flags |= guarded_method; }
469  inline bool isObjectScopeLocked() { return this->object_scope == SCOPE_RESERVED; } // for trace
470  //unsigned short getReserveCount() { return this->settings.object_variables ? this->settings.object_variables->getReserveCount() : 0; } // for trace
471  unsigned short getReserveCount() { RexxVariableDictionary *ovd = this->getVariableDictionary(); return ovd ? ovd->getReserveCount() : 0; } // for trace. Try to get the ovd counter, even if not yet assigned to current activation.
472  //RexxVariableDictionary * getVariableDictionary() { return this->settings.object_variables; } // for trace
473  RexxVariableDictionary * getVariableDictionary() { return this->receiver ? this->receiver->getObjectVariables(this->scope) : NULL; } // for trace. Try to get the ovd, even if not yet assigned to current activation.
474 
475  inline bool isExternalTraceOn() { return (this->settings.flags&trace_on) != 0; }
476  inline void setExternalTraceOn() { this->settings.flags |= trace_on; }
477  inline void setExternalTraceOff() { this->settings.flags &= ~trace_on; }
478  void enableExternalTrace(const char *option);
479 
480  inline bool isElapsedTimerReset() { return (this->settings.flags&elapsed_reset) != 0; }
482  inline void setElapsedTimerValid() { this->settings.flags &= ~elapsed_reset; }
483 
484  inline RexxObject ** getMethodArgumentList() {return this->arglist;};
485  inline size_t getMethodArgumentCount() { return argcount; }
486  inline size_t getMethodNamedArgumentCount() { return named_argcount; }
487  inline RexxObject * getMethodArgument(size_t position) {
489  return OREF_NULL;
490  }
491  else {
492  return arglist[position-1];
493  }
494  }
495 
496  void setArguments(RexxArray *positionalArguments, RexxDirectory *namedArguments);
498 
502 
503  inline RexxObject * getProgramArgument(size_t position) {
505  return OREF_NULL;
506  }
507  else {
508  return settings.parent_arglist[position-1];
509  }
510  }
511 
514  size_t getContextLineNumber();
518 
520  {
522  }
523 
525  {
527  }
528 
529  inline RexxVariable *getLocalVariable(RexxString *name, size_t index)
530  {
531  RexxVariable *target = settings.local_variables.get(index);
532  if (target == OREF_NULL) {
533  target = settings.local_variables.lookupVariable(name, index);
534  }
535  return target;
536  }
537 
538  inline RexxVariable *getLocalStemVariable(RexxString *name, size_t index)
539  {
540  RexxVariable *target = settings.local_variables.get(index);
541  if (target == OREF_NULL) {
542  target = settings.local_variables.lookupStemVariable(name, index);
543  }
544  return target;
545  }
546 
547  inline RexxStem *getLocalStem(RexxString *name, size_t index)
548  {
549  return (RexxStem *)getLocalStemVariable(name, index)->getVariableValue();
550  }
551 
552  inline void dropLocalStem(RexxString *name, size_t index)
553  {
554  RexxVariable *stemVar = getLocalStemVariable(name, index);
555  /* create a new stem element and set this */
556  stemVar->set(new RexxStem(name));
557  }
558 
559  inline bool localStemVariableExists(RexxString *stemName, size_t index)
560  {
561  /* get the stem entry from this dictionary */
562  RexxVariable *variable = settings.local_variables.find(stemName, index);
563  /* The stem exists if the stem variable has ever been used. */
564  return variable != OREF_NULL;
565  }
566 
567  inline bool localVariableExists(RexxString *name, size_t index)
568  {
569  /* get the stem entry from this dictionary */
570  RexxVariable *variable = settings.local_variables.find(name, index);
571  /* The stem exists if the stem variable has ever been used. */
572  return variable != OREF_NULL && variable->getVariableValue() != OREF_NULL;
573  }
574 
575  inline void putLocalVariable(RexxVariable *variable, size_t index)
576  {
577  settings.local_variables.putVariable(variable, index);
578  }
579 
580  inline void updateLocalVariable(RexxVariable *variable)
581  {
583  }
584 
585  inline void setLocalVariable(RexxString *name, size_t index, RexxObject *value)
586  {
587  RexxVariable *variable = getLocalVariable(name, index);
588  variable->set(value);
589  }
590 
591  inline void dropLocalVariable(RexxString *name, size_t index)
592  {
593  RexxVariable *variable = getLocalVariable(name, index);
594  variable->drop();
595  }
596 
597  RexxObject *evaluateLocalCompoundVariable(RexxString *stemName, size_t index, RexxObject **tail, size_t tailCount);
598  RexxObject *getLocalCompoundVariableValue(RexxString *stemName, size_t index, RexxObject **tail, size_t tailCount);
599  RexxObject *getLocalCompoundVariableRealValue(RexxString *localstem, size_t index, RexxObject **tail, size_t tailCount);
600  RexxCompoundElement *getLocalCompoundVariable(RexxString *stemName, size_t index, RexxObject **tail, size_t tailCount);
601  RexxCompoundElement *exposeLocalCompoundVariable(RexxString *stemName, size_t index, RexxObject **tail, size_t tailCount);
602  bool localCompoundVariableExists(RexxString *stemName, size_t index, RexxObject **tail, size_t tailCount);
603  void assignLocalCompoundVariable(RexxString *stemName, size_t index, RexxObject **tail, size_t tailCount, RexxObject *value);
604  void setLocalCompoundVariable(RexxString *stemName, size_t index, RexxObject **tail, size_t tailCount, RexxObject *value);
605  void dropLocalCompoundVariable(RexxString *stemName, size_t index, RexxObject **tail, size_t tailCount);
606 
607  inline bool novalueEnabled() { return settings.local_variables.getNovalue(); }
608 
609  /* The following methods be rights should be implemented by the */
610  /* RexxMemory class, but aren't because of the difficulties of */
611  /* making them inline methods that use the RexxVariable class. */
612  /* Therefore, we're going to break the encapsulation rules */
613  /* slightly and allow the activation class to manipulate that */
614  /* chain directly. */
616  {
617  RexxVariable *newVariable = memoryObject.variableCache;
618  if (newVariable != OREF_NULL) {
619  memoryObject.variableCache = newVariable->getNext();
620  newVariable->reset(name);
621  }
622  else {
623  newVariable = new_variable(name);
624  }
625  newVariable->setCreator(this);
626  return newVariable;
627  }
628 
630  {
633  }
634 
635  inline void cleanupLocalVariables()
636  {
637  /* if we're nested, we need to make sure that any variable */
638  /* dictionary created at this level is propagated back to */
639  /* the caller. */
641  {
643  }
644  else
645  {
646  // we need to cleanup the local variables and return them to the
647  // cache.
648  for (size_t i = 0; i < settings.local_variables.size; i++)
649  {
651  if (var != OREF_NULL && var->isLocal(this))
652  {
653  cacheLocalVariable(var);
654  }
655  }
656  }
657  }
658 
660 
661 
662  protected:
663 
664  ActivationSettings settings; /* inherited REXX settings */
665  RexxExpressionStack stack; /* current evaluation stack */
666  RexxCode *code; /* rexx method object */
667  RexxSource *sourceObject; // the source object associated with this instance
668  RexxClass *scope; // scope of any active method call
669  RexxObject *receiver; /* target of a message invocation */
670  RexxActivity *activity; /* current running activation */
671  RexxActivation *parent; // previous running activation for internal call/interpret
672  RexxArray *arguments; /* user-redefined, GC protected */
673 
674  // Positional arguments from arglist[0] to arglist[argcount-1]
675  // namedArgcount = arglist[argcount]
676  // Named arguments from arglist[argcount+1] to arglist[argcount+1 + (2*namedArgcount)-1]
677  RexxObject **arglist; /* activity argument list */
678 
679  size_t argcount; /* the count of positional arguments */
681  RexxDoBlock *dostack; /* stack of DO loops */
682  RexxInstruction *current; /* current execution pointer */
683  RexxInstruction *next; /* next instruction to execute */
684  bool debug_pause; /* executing a debug pause */
685  int object_scope; /* reserve/release state of variables*/
686  RexxObject *result; /* result of execution */
687  RexxArray *trapinfo; /* current trap handler */
688  RexxContext *contextObject; // the context object representing the execution context
689  /* current activation state */
691  /* type of activation activity */
693  RexxMessage *objnotify; /* an object to notify if excep occur*/
694  /* LIst of Saved Local environments */
696  size_t pending_count; /* number of pending conditions */
697  RexxQueue *handler_queue; /* queue of trapped condition handler*/
698  /* queue of trapped conditions */
700  uint64_t random_seed; /* random number seed */
701  bool random_set; /* random seed has been set */
702  size_t blockNest; /* block instruction nesting level */
703  size_t lookaside_size;/* size of the lookaside table */
704 
705  // constants
706 
707  static const size_t trace_off; /* no tracing */
708  static const size_t trace_debug; /* interactive trace mode flag */
709  static const size_t trace_all; /* trace all instructions */
710  static const size_t trace_results; /* trace all results */
711  static const size_t trace_intermediates; /* trace all instructions */
712  static const size_t trace_commands; /* trace all commands */
713  static const size_t trace_labels; /* trace all labels */
714  static const size_t trace_errors; /* trace all command errors */
715  static const size_t trace_failures; /* trace all command failures */
716  static const size_t trace_suppress; /* tracing is suppressed during skips*/
717  static const size_t trace_flags; /* all tracing flags (EXCEPT debug) */
718  static const size_t default_trace_flags;
719  static const size_t trace_all_flags; // flag set for trace all
720  static const size_t trace_results_flags; // flag set for trace results
721  static const size_t trace_intermediates_flags; // flag set for trace intermediates
722 
723  static const bool default_enable_commands;
724  static const bool default_enable_macrospace;
725 
726  static const size_t single_step; /* we are single stepping execution */
727  static const size_t single_step_nested; /* this is a nested stepping */
728  static const size_t debug_prompt_issued; /* debug prompt already issued */
729  static const size_t debug_bypass; /* skip next debug pause */
730  static const size_t procedure_valid; /* procedure instruction is valid */
731  static const size_t clause_boundary; /* work required at clause boundary */
732  static const size_t halt_condition; /* a HALT condition occurred */
733  static const size_t trace_on; /* external trace condition occurred */
734  static const size_t source_traced; /* source string has been traced */
735  static const size_t clause_exits; /* need to call clause boundary exits*/
736  static const size_t external_yield; /* activity wants us to yield */
737  static const size_t forwarded; /* forward instruction active */
738  static const size_t reply_issued; /* reply has already been issued */
739  static const size_t set_trace_on; /* trace turned on externally */
740  static const size_t set_trace_off; /* trace turned off externally */
741  static const size_t traps_copied; /* copy of trap info has been made */
742  static const size_t return_status_set; /* had our first host command */
743  static const size_t transfer_failed; /* transfer of variable lock failure */
744 
745  static const size_t elapsed_reset; // The elapsed time stamp was reset via time('r')
746  static const size_t guarded_method; // this is a guarded method
747  };
748  #endif
RexxArray * new_array(size_t s)
Definition: ArrayClass.hpp:259
RESTORETYPE
Definition: ObjectClass.hpp:82
#define INTERNAL_LEVEL_CALL
#define INTERPRET
#define TOP_LEVEL_CALL
#define RETURNED
#define INTERNALCALL
const size_t SIZE_BITS
#define EXTERNALCALL
#define METHODCALL
const uint64_t RANDOM_FACTOR
uint64_t RANDOMIZE(uint64_t seed)
#define PROGRAM_LEVEL_CALL
#define PROGRAM_OR_METHOD
#define PROGRAMCALL
const uint64_t RANDOM_ADDER
#define SCOPE_RESERVED
#define SCOPE_RELEASED
@ TRACE_PREFIX_CLAUSE
@ TRACE_PREFIX_PREFIX
@ TRACE_PREFIX_OPERATOR
@ TRACE_PREFIX_COMPOUND
@ TRACE_PREFIX_RESULT
@ TRACE_PREFIX_DOTVARIABLE
@ TRACE_PREFIX_ASSIGNMENT
@ TRACE_PREFIX_FUNCTION
@ TRACE_PREFIX_MESSAGE
@ TRACE_PREFIX_VARIABLE
#define VALUE_MARKER
#define ASSIGNMENT_MARKER
#define OREF_NULL
Definition: RexxCore.h:61
RexxMemory memoryObject
Definition: RexxMemory.cpp:86
RexxVariable * new_variable(RexxString *n)
RexxMethod * parent_method
RexxObject ** parent_arglist
RexxDateTime timestamp
RexxDirectory * streams
RexxLocalVariables local_variables
RexxString * current_env
RexxDirectory * traps
NumericSettings numericSettings
RexxArray * parent_arguments
RexxString * alternate_env
RexxVariableDictionary * object_variables
wholenumber_t trace_skip
SecurityManager * securityManager
RexxDirectory * conditionObj
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)
RexxInstruction * next
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)
bool internalMethod()
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()
RexxArray * arguments
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)
RexxMessage * objnotify
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)
RexxArray * trapinfo
SecurityManager * getEffectiveSecurityManager()
RexxObject * result
bool tracingCommands(void)
static const size_t trace_intermediates
virtual RexxObject * getReceiver()
void pushEnvironment(RexxObject *)
RexxString * traceSetting()
bool tracingLabels(void)
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 *)
RexxActivity * activity
RexxVariableDictionary * getLocalVariables()
bool localVariableExists(RexxString *name, size_t index)
void raiseExit(RexxString *, RexxObject *, RexxString *, RexxObject *, RexxObject *, RexxDirectory *)
void liveGeneral(int reason)
static const size_t trace_errors
void processClauseBoundary()
RexxObject * getLocalEnvironment(RexxString *name)
RexxObject * receiver
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)
RexxClass * scope
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()
void live(size_t)
ActivationSettings settings
virtual RexxActivation * getRexxContext()
RexxDirectory * getThreadLocal()
RexxDateTime getTime()
RexxObject * getLocalCompoundVariableValue(RexxString *stemName, size_t index, RexxObject **tail, size_t tailCount)
RexxVariableDictionary * getVariableDictionary()
virtual RexxActivation * findRexxContext()
PackageClass * loadRequires(RexxString *, RexxInstruction *)
RexxObject * getContextObject()
bool tracingAll(void)
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 setIndent(size_t v)
void getSettings(ActivationSettings &s)
void traceCompound(RexxString *stemVar, RexxObject **tails, size_t tailCount, RexxObject *value)
bool tracingErrors(void)
void mergeTraps(RexxQueue *, RexxQueue *)
bool callMacroSpaceFunction(RexxString *, RexxObject **, size_t, size_t, RexxString *, int, ProtectedObject &)
RexxDirectory * local()
static const size_t return_status_set
static RoutineClass * getMacroCode(RexxString *macroName)
RexxInstruction * current
RexxObject ** arglist
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
bool halt(RexxString *)
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 reply(RexxObject *)
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
RexxObject * dispatch()
RexxDoBlock * topBlock()
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)
RexxDoBlock * dostack
RexxVariable * newLocalVariable(RexxString *name)
bool propagateNumericSettings()
RexxDirectory * getStreams()
void cacheLocalVariable(RexxVariable *var)
PackageClass * getEffectivePackageObject()
size_t getContextLineNumber()
RexxActivation * parent
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()
Definition: DoBlock.hpp:75
void setPrevious(RexxDoBlock *block)
Definition: DoBlock.hpp:74
size_t getIndent()
Definition: DoBlock.hpp:73
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
Definition: RexxMemory.hpp:306
RexxVariableDictionary * getObjectVariables(RexxObject *)
static int condition(RexxToken *)
RexxInstruction * instruction()
void position(size_t, size_t)
Definition: SourceFile.cpp:518
PackageClass * getPackage()
RexxDirectory * variables
Definition: SourceFile.hpp:526
RexxString * concat(RexxString *)
void cache(RexxVariable *next)
void reset(RexxString *name)
bool isLocal(RexxActivation *act)
void set(RexxObject *value)
RexxObject * getVariableValue()
void setCreator(RexxActivation *creatorActivation)
RexxVariable * getNext()
int type
Definition: cmdparse.cpp:1888
ssize_t wholenumber_t
Definition: rexx.h:230
UINT_PTR uintptr_t
signed __int64 int64_t
unsigned __int64 uint64_t