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

RexxNativeActivation.cpp
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 RexxNativeActivation.cpp */
40 /* */
41 /* Primitive Native Activation Class */
42 /* */
43 /******************************************************************************/
44 #include "RexxCore.h"
45 #include "StringClass.hpp"
46 #include "ArrayClass.hpp"
47 #include "DirectoryClass.hpp"
48 #include "MethodClass.hpp"
49 #include "RexxNativeCode.hpp"
50 #include "RexxActivation.hpp"
51 #include "RexxNativeActivation.hpp"
52 #include "BufferClass.hpp"
53 #include "MessageClass.hpp"
55 #include "SourceFile.hpp"
56 #include "RexxCode.hpp"
57 #include "RexxInstruction.hpp"
59 #include "ProtectedObject.hpp"
60 #include "PointerClass.hpp"
61 #include "ActivityDispatcher.hpp"
62 #include "CallbackDispatcher.hpp"
63 #include "TrappingDispatcher.hpp"
64 #include "Interpreter.hpp"
65 #include "SystemInterpreter.hpp"
66 #include "ActivationFrame.hpp"
67 #include "StackFrameClass.hpp"
68 #include "MutableBufferClass.hpp"
69 
70 #include <math.h>
71 #include <limits.h>
72 
73 
74 
75 
81 {
82  this->setHasNoReferences(); // nothing referenced from this either
83 }
84 
85 
93 {
94  this->clearObject(); /* start with a fresh object */
95  this->activity = _activity; /* the activity running on */
96  this->activation = _activation; // our parent context
97 }
98 
99 
107 {
108  this->clearObject(); /* start with a fresh object */
109  this->activity = _activity; /* the activity running on */
110 }
111 
112 
113 void RexxNativeActivation::live(size_t liveMark)
114 /******************************************************************************/
115 /* Function: Normal garbage collection live marking */
116 /******************************************************************************/
117 {
118  memory_mark(this->previous);
119  memory_mark(this->executable);
120  memory_mark(this->argArray);
121  memory_mark(this->receiver);
122  memory_mark(this->activity);
123  memory_mark(this->activation);
124  memory_mark(this->msgname);
125  memory_mark(this->savelist);
126  memory_mark(this->result);
127  memory_mark(this->nextstem);
129  memory_mark(this->nextcurrent);
131  memory_mark(this->conditionObj);
133 
134  /* We're hold a pointer back to our arguments directly where they */
135  /* are created. Since in some places, this argument list comes */
136  /* from the C stack, we need to handle the marker ourselves. */
137  size_t i;
138  for (i = 0; i < argcount; i++)
139  {
140  memory_mark(arglist[i]);
141  }
142 }
143 
145 /******************************************************************************/
146 /* Function: Generalized object marking */
147 /******************************************************************************/
148 {
164 
165  /* We're hold a pointer back to our arguments directly where they */
166  /* are created. Since in some places, this argument list comes */
167  /* from the C stack, we need to handle the marker ourselves. */
168  size_t i;
169  for (i = 0; i < argcount; i++)
170  {
172  }
173 }
174 
175 
177 /******************************************************************************/
178 /* Function: Report a method signature error */
179 /******************************************************************************/
180 {
182  {
184  }
185  else
186  {
188  }
189 }
190 
191 
192 void RexxNativeActivation::reportStemError(size_t position, RexxObject *object)
193 /******************************************************************************/
194 /* Function: Report a method signature error */
195 /******************************************************************************/
196 {
198  {
199  reportException(Error_Incorrect_method_nostem, position + 1, object);
200  }
201  else
202  {
203  reportException(Error_Incorrect_call_nostem, position + 1, object);
204  }
205 }
206 
207 
219 void RexxNativeActivation::processArguments(size_t _argcount, RexxObject **_arglist, uint16_t *argumentTypes,
220  ValueDescriptor *descriptors, size_t maximumArgumentCount)
221 {
222  size_t inputIndex = 0; // no arguments used yet */
223  size_t outputIndex = 1; // we start filling in from the second (first is return value)
224  bool usedArglist = false; // if we request the argument list, then there's no requirement
225  // to use up all of the passed arguments individually.
226 
227  // set up the return value descriptor
228  descriptors[0].type = *argumentTypes;
229  descriptors[0].value.value_int64_t = 0;
230  // the first type in the signature is the return value, which we skip for now
231  uint16_t *currentType = argumentTypes + 1;
232  // now loop through the type information. Some of the types are "created"
233  // arguments that don't appear directly in the method/function invocation.
234  // We can't directly do a 1-for-1 mapping
235  for (; *currentType != REXX_ARGUMENT_TERMINATOR; currentType++)
236  {
237  // make sure we don't get a buffer overload
238  if (outputIndex >= maximumArgumentCount)
239  {
241  }
242 
243  uint16_t type = ARGUMENT_TYPE(*currentType);
244  bool isOptional = IS_OPTIONAL_ARGUMENT(*currentType);
245 
246  descriptors[outputIndex].type = type; // fill in the type
247  switch (type)
248  {
249  // reference to the receiver object...if this is a function call,
250  // then this will be OREF NULL.
251  case REXX_VALUE_OSELF: /* reference to SELF */
252  {
253  // this doesn't make any sense for a function call
255  {
257  }
258  // fill in the receiver object and mark it...
259  descriptors[outputIndex].value.value_RexxObjectPtr = (RexxObjectPtr)this->receiver;
260  descriptors[outputIndex].flags = ARGUMENT_EXISTS | SPECIAL_ARGUMENT;
261  break;
262  }
263 
264  // reference to the method scope...if this is a function call,
265  // then this will be OREF NULL.
266  case REXX_VALUE_SCOPE:
267  {
268  // this doesn't make any sense for a function call
270  {
272  }
273  // fill in the receiver object and mark it...
274  descriptors[outputIndex].value.value_RexxObjectPtr = (RexxObjectPtr)this->getScope();
275  descriptors[outputIndex].flags = ARGUMENT_EXISTS | SPECIAL_ARGUMENT;
276  break;
277  }
278 
279  // reference to the superclass scope...if this is a function call,
280  // then this will be OREF NULL.
281  case REXX_VALUE_SUPER:
282  {
283  // this doesn't make any sense for a function call
285  {
287  }
288  // fill in the receiver object and mark it...
289  descriptors[outputIndex].value.value_RexxObjectPtr = (RexxClassObject)this->getSuper();
290  descriptors[outputIndex].flags = ARGUMENT_EXISTS | SPECIAL_ARGUMENT;
291  break;
292  }
293 
294  case REXX_VALUE_CSELF: /* reference to CSELF */
295  {
296  // this doesn't make any sense for a function call
298  {
300  }
301  descriptors[outputIndex].value.value_POINTER = this->cself();
302  descriptors[outputIndex].flags = ARGUMENT_EXISTS | SPECIAL_ARGUMENT;
303  break;
304  }
305 
306  case REXX_VALUE_ARGLIST: /* need the argument list */
307  {
308  descriptors[outputIndex].flags = ARGUMENT_EXISTS | SPECIAL_ARGUMENT;
309  descriptors[outputIndex].value.value_RexxArrayObject = (RexxArrayObject)getArguments();
310  // we've used this
311  usedArglist = true;
312  break;
313  }
314 
315  // This is either the message name used to invoke a method or
316  // the name used to call a function
317  case REXX_VALUE_NAME:
318  {
319  descriptors[outputIndex].flags = ARGUMENT_EXISTS | SPECIAL_ARGUMENT;
320  descriptors[outputIndex].value.value_CSTRING = (CSTRING)this->msgname->getStringData();
321  break;
322  }
323 
324  // this is a real argument taken from the argument list
325  default: /* still within argument bounds? */
326  {
327  if (inputIndex < _argcount && _arglist[inputIndex] != OREF_NULL)
328  {
329  // all of these arguments exist
330  descriptors[outputIndex].flags = ARGUMENT_EXISTS;
331  RexxObject *argument = _arglist[inputIndex]; /* get the next argument */
332  switch (type)
333  { /* process this type */
334 
335  case REXX_VALUE_RexxObjectPtr: /* arbitrary object reference */
336  {
337  descriptors[outputIndex].value.value_RexxObjectPtr = (RexxObjectPtr)argument;
338  break;
339  }
340 
341  case REXX_VALUE_int: /* integer value */
342  {
343  // convert and copy */
344  descriptors[outputIndex].value.value_int = (int)signedIntegerValue(argument, inputIndex, INT_MAX, INT_MIN);
345  break;
346  }
347 
348  case REXX_VALUE_int8_t: /* 8-bit integer value */
349  {
350  descriptors[outputIndex].value.value_int8_t = (int8_t)signedIntegerValue(argument, inputIndex, INT8_MAX, INT8_MIN);
351  break;
352  }
353 
354  case REXX_VALUE_int16_t: /* integer value */
355  {
356  descriptors[outputIndex].value.value_int16_t = (int16_t)signedIntegerValue(argument, inputIndex, INT16_MAX, INT16_MIN);
357  break;
358  }
359 
360  case REXX_VALUE_int32_t: /* integer value */
361  {
362  descriptors[outputIndex].value.value_int32_t = (int32_t)signedIntegerValue(argument, inputIndex, INT32_MAX, INT32_MIN);
363  break;
364  }
365 
366  case REXX_VALUE_int64_t: /* integer value */
367  {
368  descriptors[outputIndex].value.value_int64_t = (int64_t)int64Value(argument, inputIndex);
369  break;
370  }
371 
372  case REXX_VALUE_ssize_t: /* integer value */
373  {
374  descriptors[outputIndex].value.value_ssize_t = (ssize_t)signedIntegerValue(argument, inputIndex, SSIZE_MAX, -SSIZE_MAX - 1);
375  break;
376  }
377 
378  case REXX_VALUE_intptr_t: /* integer value */
379  {
380  descriptors[outputIndex].value.value_intptr_t = (intptr_t)signedIntegerValue(argument, inputIndex, INTPTR_MAX, INTPTR_MIN);
381  break;
382  }
383 
384  case REXX_VALUE_uint8_t: /* 8-bit integer value */
385  {
386  descriptors[outputIndex].value.value_uint8_t = (uint8_t)unsignedIntegerValue(argument, inputIndex, UINT8_MAX);
387  break;
388  }
389 
390  case REXX_VALUE_uint16_t: /* integer value */
391  {
392  descriptors[outputIndex].value.value_uint16_t = (uint16_t)unsignedIntegerValue(argument, inputIndex, UINT16_MAX);
393  break;
394  }
395 
396  case REXX_VALUE_uint32_t: /* integer value */
397  {
398  descriptors[outputIndex].value.value_uint32_t = (uint32_t)unsignedIntegerValue(argument, inputIndex, UINT32_MAX);
399  break;
400  }
401 
402  case REXX_VALUE_uint64_t: /* integer value */
403  {
404  descriptors[outputIndex].value.value_uint64_t = (uint64_t)unsignedInt64Value(argument, inputIndex);
405  break;
406  }
407 
408  case REXX_VALUE_size_t: /* integer value */
409  {
410  descriptors[outputIndex].value.value_size_t = (size_t)unsignedIntegerValue(argument, inputIndex, SIZE_MAX);
411  break;
412  }
413 
414  case REXX_VALUE_uintptr_t: /* integer value */
415  {
416  descriptors[outputIndex].value.value_uintptr_t = (uintptr_t)unsignedIntegerValue(argument, inputIndex, UINTPTR_MAX);
417  break;
418  }
419 
420  case REXX_VALUE_logical_t: /* integer value */
421  {
422  descriptors[outputIndex].value.value_logical_t = argument->truthValue(Error_Logical_value_method);
423  break;
424  }
425 
426  // The Rexx whole number one is checked against the human digits limit
427  case REXX_VALUE_wholenumber_t: /* number value */
428  {
430  break;
431  }
432 
433  // an unsigned string number value
435  {
436  descriptors[outputIndex].value.value_stringsize_t = (stringsize_t)unsignedIntegerValue(argument, inputIndex, Numerics::MAX_STRINGSIZE);
437  break;
438  }
439 
440  case REXX_VALUE_double: /* double value */
441  {
442  descriptors[outputIndex].value.value_double = this->getDoubleValue(argument, inputIndex);
443  break;
444  }
445 
446 
447  case REXX_VALUE_float: /* float value */
448  {
449  descriptors[outputIndex].value.value_float = (float)this->getDoubleValue(argument, inputIndex);
450  break;
451  }
452 
453  case REXX_VALUE_CSTRING: /* ASCII-Z string value */
454  {
455  descriptors[outputIndex].value.value_CSTRING = this->cstring(argument);
456  break;
457  }
458 
459  case REXX_VALUE_RexxStringObject: /* Required STRING object */
460  {
461  /* force to a string value */
462  RexxString *temp = stringArgument(argument, inputIndex + 1) ;
463  // if this forced a string object to be created,
464  // we need to protect it here.
465  if (temp != argument)
466  {
467  /* make it safe */
468  createLocalReference(temp);
469  }
470  /* set the result in */
471  descriptors[outputIndex].value.value_RexxStringObject = (RexxStringObject)temp;
472  break;
473 
474  }
475 
476  case REXX_VALUE_RexxArrayObject: /* Required ARRAY object */
477  {
478  /* force to a string value */
479  RexxArray *temp = arrayArgument(argument, inputIndex + 1) ;
480  // if this forced a string object to be created,
481  // we need to protect it here.
482  if (temp != argument)
483  {
484  /* make it safe */
485  createLocalReference(temp);
486  }
487  /* set the result in */
488  descriptors[outputIndex].value.value_RexxArrayObject = (RexxArrayObject)temp;
489  break;
490 
491  }
492 
493  case REXX_VALUE_RexxStemObject: /* Required Stem object */
494  {
495  // Stem arguments get special handling. If the argument
496  // object is already a stem object, we're done. Otherwise,
497  // we get the string value of the argument and use that
498  // to resolve a stem name in the current context. If the
499  // trailing period is not given on the name, one will be added.
500  // Note that the second form is only available if this is a
501  // call context. This is an error for a method context.
502 
503  // is this a stem already?
504  if (isStem(argument))
505  {
506  /* set the result in */
507  descriptors[outputIndex].value.value_RexxStemObject = (RexxStemObject)argument;
508  break;
509  }
510 
511  // this spesn't make any sense for a function call
513  {
514  reportStemError(inputIndex, argument);
515  }
516 
517  /* force to a string value */
518  RexxString *temp = argument->requestString();
519  if ((RexxObject *)temp == TheNilObject)
520  {
521  reportStemError(inputIndex, argument);
522  }
523  // if this forced a string object to be created,
524  // we need to protect it here.
525  if (temp != argument)
526  {
527  /* make it safe */
528  createLocalReference(temp);
529  }
530 
531  // see if we can retrieve this stem
532  RexxObject *stem = getContextStem(temp);
533  if (stem == OREF_NULL)
534  {
535  reportStemError(inputIndex, argument);
536  }
537  /* set the result in */
538  descriptors[outputIndex].value.value_RexxStemObject = (RexxStemObject)stem;
539  break;
540  }
541 
542  case REXX_VALUE_RexxClassObject: // required class object
543  {
544  // this must be a class object
545  if (!argument->isInstanceOf(TheClassClass))
546  {
548  }
549  /* set the result in */
550  descriptors[outputIndex].value.value_RexxClassObject = (RexxClassObject)argument;
551  break;
552  }
553 
554  case REXX_VALUE_POINTER:
555  {
556  // this must be a pointer object
557  if (!argument->isInstanceOf(ThePointerClass))
558  {
560  }
561  descriptors[outputIndex].value.value_POINTER = this->pointer(argument);
562  break;
563  }
564 
566  {
567  descriptors[outputIndex].value.value_POINTERSTRING = this->pointerString(argument, inputIndex);
568  break;
569  }
570 
572  {
573  // this must be a pointer object
574  if (!argument->isInstanceOf(TheMutableBufferClass))
575  {
577  }
578  descriptors[outputIndex].value.value_RexxMutableBufferObject = (RexxMutableBufferObject)argument;
579  break;
580  }
581 
582  default: /* something messed up */
583  {
585  break;
586  }
587  }
588  }
589  else
590  {
591  // if this was not an option argument
592  if (!isOptional)
593  {
594  /* just raise the error */
596  }
597 
598  // this is a non-specified argument
599  descriptors[outputIndex].flags = 0;
600  switch (type)
601  {
602 
603  case REXX_VALUE_RexxObjectPtr: // no object here
604  case REXX_VALUE_int: // non-integer value
605  case REXX_VALUE_wholenumber_t: // non-existent long
606  case REXX_VALUE_CSTRING: // missing character string
607  case REXX_VALUE_POINTER:
608  case REXX_VALUE_RexxStringObject: // no object here
609  case REXX_VALUE_stringsize_t: // non-existent long
610  case REXX_VALUE_int8_t: // non-integer value
611  case REXX_VALUE_int16_t: // non-integer value
612  case REXX_VALUE_int32_t: // non-integer value
613  case REXX_VALUE_int64_t: // non-integer value
614  case REXX_VALUE_uint8_t: // non-integer value
615  case REXX_VALUE_uint16_t: // non-integer value
616  case REXX_VALUE_uint32_t: // non-integer value
617  case REXX_VALUE_uint64_t: // non-integer value
618  case REXX_VALUE_size_t:
619  case REXX_VALUE_ssize_t:
620  case REXX_VALUE_intptr_t:
622  case REXX_VALUE_logical_t: // this must be a boolean value
623  case REXX_VALUE_RexxArrayObject: // no object here
628  {
629  // set this as a 64-bit value to clear everything out
630  descriptors[outputIndex].value.value_int64_t = 0;
631  break;
632  }
633  case REXX_VALUE_double: /* non-existent double */
634  {
635  descriptors[outputIndex].value.value_double = 0.0;
636  break;
637  }
638  case REXX_VALUE_float: /* non-existent double */
639  {
640  descriptors[outputIndex].value.value_float = 0.0;
641  break;
642  }
643  /* still an error if not there */
644  default: /* something messed up */
645  {
647  break;
648  }
649  }
650  }
651  inputIndex++; // we've used up one more input argument
652  break;
653  }
654  }
655  outputIndex++; /* step to the next argument */
656  argumentTypes++; // and the next output position pointer
657  }
658  if (inputIndex < _argcount && !usedArglist) /* extra, unwanted arguments? */
659  {
660  /* got too many */
662  }
663 }
664 
665 
677 {
678  RexxArray *r = new_array(count);
679  ProtectedObject p(r);
680 
681  for (size_t i = 0; i < count; i++)
682  {
683  // convert each of the values in turn
684  r->put(valueToObject(value++), i);
685  }
686  return r;
687 }
688 
689 
698 {
699  switch (value->type)
700  {
701  case REXX_VALUE_RexxObjectPtr: // object reference. All object types get
702  case REXX_VALUE_RexxStringObject: // returned as a Rexx object
707  {
708  return (RexxObject *)value->value.value_RexxObjectPtr; // just return the object value
709  }
710 
711  case REXX_VALUE_int: /* integer value */
712  {
714  }
715 
716  case REXX_VALUE_int8_t: /* integer value */
717  {
719  }
720 
721  case REXX_VALUE_int16_t: /* integer value */
722  {
724  }
725 
726  case REXX_VALUE_int32_t: /* integer value */
727  {
729  }
730 
731  case REXX_VALUE_int64_t: /* integer value */
732  {
734  }
735 
736  case REXX_VALUE_intptr_t: /* integer value */
737  {
739  }
740 
741  case REXX_VALUE_uint8_t: /* integer value */
742  {
744  }
745 
746  case REXX_VALUE_uint16_t: /* integer value */
747  {
749  }
750 
751  case REXX_VALUE_uint32_t: /* integer value */
752  {
754  }
755 
756  case REXX_VALUE_uint64_t: /* integer value */
757  {
759  }
760 
761  case REXX_VALUE_uintptr_t: /* integer value */
762  {
764  }
765 
766  case REXX_VALUE_logical_t: /* logical value */
767  {
768  return value->value.value_logical_t == 0 ? TheFalseObject : TheTrueObject;
769  }
770 
771  case REXX_VALUE_size_t: /* integer value */
772  {
774  }
775 
776  case REXX_VALUE_ssize_t: /* integer value */
777  {
779  }
780 
781  case REXX_VALUE_wholenumber_t: /* long integer value */
782  {
784  }
785 
786  case REXX_VALUE_stringsize_t: /* long integer value */
787  {
789  }
790 
791  case REXX_VALUE_double: /* double value */
792  {
793  return new_string(value->value.value_double);
794  }
795 
796  case REXX_VALUE_float: /* float value */
797  {
798  return new_string(value->value.value_float);
799  }
800 
801  case REXX_VALUE_CSTRING: /* ASCII-Z string */
802  {
803  const char *string = value->value.value_CSTRING;
804  // return return nothing if a null pointer is returned.
805  if (string == NULL)
806  {
807  return OREF_NULL;
808  }
809  return new_string(string); // make a Rexx string from this
810  }
811 
812  case REXX_VALUE_POINTER:
813  {
814  // just wrap the pointer in a pointer object
815  return new_pointer(value->value.value_POINTER);
816  }
817 
819  {
820  // format this into a chracter string
822  }
823 
824  case 0:
825  {
826  // useful for creating argument lists. This is an omitted value, so just return
827  // a null value
828  return OREF_NULL;
829  }
830 
831  default:
832  {
833  reportSignatureError(); // bad method signature problem
834  break;
835  }
836  }
837  return OREF_NULL;
838 }
839 
840 
850 {
851  switch (value->type)
852  {
853  case REXX_VALUE_RexxObjectPtr: /* Object reference */
854  {
855  // silly, but this always works.
857  return true;
858  }
859  case REXX_VALUE_RexxClassObject: // required class object
860  {
861  // this must be a class object
862  if (!o->isInstanceOf(TheClassClass))
863  {
864  return false;
865  }
866  /* set the result in */
868  return true;
869  }
870  case REXX_VALUE_RexxMutableBufferObject: // required mutablebuffer object
871  {
872  // this must be a mutablebuffer object
874  {
875  return false;
876  }
877  /* set the result in */
879  return true;
880  }
881  case REXX_VALUE_int: /* integer value */
882  {
883  ssize_t temp = 0;
884  // convert and copy */
885  bool success = Numerics::objectToSignedInteger(o, temp, INT_MAX, INT_MIN);
886  value->value.value_int = (int)temp;
887  return success;
888  }
889 
890  case REXX_VALUE_int8_t: /* 8-bit integer value */
891  {
892  ssize_t temp = 0;
893  // convert and copy */
894  bool success = Numerics::objectToSignedInteger(o, temp, INT8_MAX, INT8_MIN);
895  value->value.value_int8_t = (int8_t)temp;
896  return success;
897  }
898 
899  case REXX_VALUE_int16_t: /* integer value */
900  {
901  ssize_t temp = 0;
902  // convert and copy */
903  bool success = Numerics::objectToSignedInteger(o, temp, INT16_MAX, INT16_MIN);
904  value->value.value_int16_t = (int16_t)temp;
905  return success;
906  }
907 
908  case REXX_VALUE_int32_t: /* integer value */
909  {
910  ssize_t temp = 0;
911  // convert and copy */
912  bool success = Numerics::objectToSignedInteger(o, temp, INT32_MAX, INT32_MIN);
913  value->value.value_int32_t = (int32_t)temp;
914  return success;
915  }
916 
917  case REXX_VALUE_intptr_t: /* integer value */
918  {
919  intptr_t temp = 0;
920  // convert and copy */
921  bool success = Numerics::objectToIntptr(o, temp);
922  value->value.value_intptr_t = (intptr_t)temp;
923  return success;
924  }
925 
926  case REXX_VALUE_int64_t: /* integer value */
927  {
928  int64_t temp = 0;
929  // convert and copy */
930  bool success = Numerics::objectToInt64(o, temp);
931  value->value.value_int64_t = (int64_t)temp;
932  return success;
933  }
934 
935  case REXX_VALUE_uint8_t: /* 8-bit integer value */
936  {
937  size_t temp = 0;
938  // convert and copy */
939  bool success = Numerics::objectToUnsignedInteger(o, temp, UINT8_MAX);
940  value->value.value_uint8_t = (uint8_t)temp;
941  return success;
942  }
943 
944  case REXX_VALUE_uint16_t: /* integer value */
945  {
946  size_t temp = 0;
947  // convert and copy */
948  bool success = Numerics::objectToUnsignedInteger(o, temp, UINT16_MAX);
949  value->value.value_uint16_t = (uint16_t)temp;
950  return success;
951  }
952 
953  case REXX_VALUE_uint32_t: /* integer value */
954  {
955  size_t temp = 0;
956  // convert and copy */
957  bool success = Numerics::objectToUnsignedInteger(o, temp, UINT32_MAX);
958  value->value.value_uint32_t = (uint32_t)temp;
959  return success;
960  }
961 
962  case REXX_VALUE_uintptr_t: /* integer value */
963  {
964  uintptr_t temp = 0;
965  // convert and copy */
966  bool success = Numerics::objectToUintptr(o, temp);
967  value->value.value_uintptr_t = (uintptr_t)temp;
968  return success;
969  }
970 
971  case REXX_VALUE_uint64_t: /* integer value */
972  {
973  uint64_t temp = 0;
974  // convert and copy */
975  bool success = Numerics::objectToUnsignedInt64(o, temp);
976  value->value.value_uint64_t = (uint64_t)temp;
977  return success;
978  }
979 
980  case REXX_VALUE_size_t: /* integer value */
981  {
982  size_t temp = 0;
983  // convert and copy */
984  bool success = Numerics::objectToUnsignedInteger(o, temp, SIZE_MAX);
985  value->value.value_size_t = (size_t)temp;
986  return success;
987  }
988 
989  case REXX_VALUE_logical_t: /* integer value */
990  {
991  // this converts without raising an error
992  return o->logicalValue(value->value.value_logical_t);
993  }
994 
995  // The Rexx whole number one is checked against the human digits limit
996  case REXX_VALUE_wholenumber_t: /* number value */
997  {
998  wholenumber_t temp = 0;
999  // convert and copy */
1001  value->value.value_wholenumber_t = (wholenumber_t)temp;
1002  return success;
1003  }
1004 
1005  // The Rexx whole number one is checked against the human digits limit
1006  case REXX_VALUE_ssize_t: /* ssize_t value */
1007  {
1008  ssize_t temp = 0;
1009  // convert and copy */
1010  // NB: SSIZE_MIN appears to be defined as 0 for some bizarre reason on some platforms,
1011  // so we'll make things relative to SIZE_MAX.
1012  bool success = Numerics::objectToSignedInteger(o, temp, SSIZE_MAX, (-SSIZE_MAX) - 1);
1013  value->value.value_wholenumber_t = (wholenumber_t)temp;
1014  return success;
1015  }
1016 
1017  // an unsigned string number value
1019  {
1020  stringsize_t temp = 0;
1021  // convert and copy */
1022  bool success = Numerics::objectToStringSize(o, temp, Numerics::MAX_STRINGSIZE);
1023  value->value.value_stringsize_t = temp;
1024  return success;
1025  }
1026 
1027  case REXX_VALUE_double: /* double value */
1028  {
1029  return o->doubleValue(value->value.value_double);
1030  }
1031 
1032 
1033  case REXX_VALUE_float: /* float value */
1034  {
1035  double temp = 0.0;
1036  bool success = o->doubleValue(temp);
1037  value->value.value_float = (float)temp;
1038  return success;
1039  }
1040 
1041  case REXX_VALUE_CSTRING: /* ASCII-Z string value */
1042  {
1043  value->value.value_CSTRING = this->cstring(o);
1044  return true;
1045  }
1046 
1047  case REXX_VALUE_RexxStringObject: /* Required STRING object */
1048  {
1049  /* force to a string value */
1050  RexxString *temp = stringArgument(o, 1) ;
1051  // if this forced a string object to be created,
1052  // we need to protect it here.
1053  if (temp != o)
1054  {
1055  /* make it safe */
1056  createLocalReference(temp);
1057  }
1058  /* set the result in */
1060  return true;
1061 
1062  }
1063 
1064  case REXX_VALUE_RexxArrayObject: /* Required ARRAY object */
1065  {
1066  /* force to a string value */
1067  RexxArray *temp = arrayArgument(o, 1) ;
1068  // if this forced a string object to be created,
1069  // we need to protect it here.
1070  if (temp != o)
1071  {
1072  /* make it safe */
1073  createLocalReference(temp);
1074  }
1075  /* set the result in */
1077  return true;
1078 
1079  }
1080 
1081  case REXX_VALUE_RexxStemObject: /* Required Stem object */
1082  {
1083  // Stem os get special handling. If the o
1084  // object is already a stem object, we're done. Otherwise,
1085  // we get the string value of the o and use that
1086  // to resolve a stem name in the current context. If the
1087  // trailing period is not given on the name, one will be added.
1088  // Note that the second form is only available if this is a
1089  // call context. This is an error for a method context.
1090 
1091  // is this a stem already?
1092  if (isStem(o))
1093  {
1094  /* set the result in */
1096  return true;
1097  }
1098 
1099  // this doesn't make any sense for a function call
1101  {
1102  return false;
1103  }
1104 
1105  /* force to a string value */
1106  RexxString *temp = stringArgument(o, 1) ;
1107  // if this forced a string object to be created,
1108  // we need to protect it here.
1109  if (temp != o)
1110  {
1111  /* make it safe */
1112  createLocalReference(temp);
1113  }
1114 
1115  // see if we can retrieve this stem
1116  RexxObject *stem = getContextStem(temp);
1117  if (stem == OREF_NULL)
1118  {
1119  return false;
1120  }
1121  /* set the result in */
1122  value->value.value_RexxStemObject = (RexxStemObject)stem;
1123  return true;
1124  }
1125 
1126  case REXX_VALUE_POINTER:
1127  {
1128  value->value.value_POINTER = this->pointer(o);
1129  return true;
1130  }
1131 
1133  {
1134  /* force to a string value */
1135  RexxString *string = o->stringValue();
1136 
1137  void *pointerVal;
1138  if (sscanf(string->getStringData(), "0x%p", &pointerVal) != 1)
1139  {
1140  return false;
1141  }
1142 
1143  value->value.value_POINTER = pointerVal;
1144  return true;
1145  }
1146 
1147  default: /* something messed up */
1148  {
1149  return false;
1150  }
1151  }
1152  return false;
1153 }
1154 
1155 
1163 {
1164  // if we have a real object, then add to the list
1165  if (objr != OREF_NULL)
1166  {
1167  // make sure we protect this from a GC triggered by this table creation.
1168  ProtectedObject p1(objr);
1169  if (this->savelist == OREF_NULL) /* first saved object? */
1170  {
1171  /* create the save list now */
1172  this->savelist = new_identity_table();
1173  }
1174  /* add to the save table */
1175  this->savelist->put(objr, objr);
1176  }
1177 }
1178 
1179 
1186 {
1187  // if the reference is non-null
1188  if (objr != OREF_NULL)
1189  {
1190  // make sure we have a savelist before trying to remove this
1191  if (savelist != OREF_NULL)
1192  {
1193  // NB...this is a special remove that functions using the object
1194  // identify to avoid false positives or potential exceptions caused
1195  // by calling EQUALS methods.
1196  savelist->remove(objr);
1197  }
1198  }
1199 }
1200 
1201 
1212  RexxString *_msgname, RexxObject **_arglist, size_t _argcount, ProtectedObject &resultObj)
1213 {
1214  // add the frame to the execution stack
1215  NativeActivationFrame frame(activity, this);
1216  // anchor the relevant context information
1217  executable = _method;
1218  receiver = _receiver;
1219  msgname = _msgname;
1220  arglist = _arglist;
1221  argcount = _argcount;
1222  activationType = METHOD_ACTIVATION; // this is for running a method
1223 
1225 
1226  MethodContext context; // the passed out method context
1227 
1228  // sort out our active security manager
1230  if (securityManager == OREF_NULL)
1231  {
1233  }
1234 
1235  // build a context pointer to pass out
1236  activity->createMethodContext(context, this);
1237 
1238  context.threadContext.arguments = arguments;
1239 
1240  // get the entry point address of the target method
1241  PNATIVEMETHOD methp = _code->getEntry();
1242 
1243  // retrieve the argument signatures and process them
1244  uint16_t *types = (*methp)((RexxMethodContext *)&context, NULL);
1246 
1247  size_t activityLevel = this->activity->getActivationLevel();
1248  trapErrors = true; // we trap errors from here
1249  try
1250  {
1251  activity->releaseAccess(); /* force this to "safe" mode */
1252  /* process the method call */
1253  (*methp)((RexxMethodContext *)&context, arguments);
1254  activity->requestAccess(); /* now in unsafe mode again */
1255 
1256  // process the returned result
1257  result = valueToObject(arguments);
1258  }
1259  catch (RexxNativeActivation *)
1260  {
1261  }
1262 
1263  // if we're not the current kernel holder when things return, make sure we
1264  // get the lock before we continue
1266  {
1268  }
1269  this->guardOff(); /* release any variable locks */
1270  this->argcount = 0; /* make sure we don't try to mark any arguments */
1271  // the lock holder gets here by longjmp from a kernel reentry. We need to
1272  // make sure the activation count gets reset, else we'll accumulate bogus
1273  // nesting levels that will make it look like this activity is still in use
1274  // when in fact we're done with it.
1275  this->activity->restoreActivationLevel(activityLevel);
1276 
1277  /* give up reference to receiver so that it can be garbage collected */
1278  this->receiver = OREF_NULL;
1279 
1280  checkConditions(); // see if we have conditions to raise now
1281 
1282  // set the return value and get outta here
1283  resultObj = this->result;
1284  this->argcount = 0; /* make sure we don't try to mark any arguments */
1285 
1286 
1287  this->activity->popStackFrame(this); /* pop this from the activity */
1288  this->setHasNoReferences(); /* mark this as not having references in case we get marked */
1289 }
1290 
1291 
1304  RexxObject **list, size_t count, ProtectedObject &resultObj)
1305 {
1306  NativeActivationFrame frame(activity, this);
1307 
1308  // anchor the context stuff
1309  executable = _routine;
1310  msgname = functionName;
1311  arglist = list;
1312  argcount = count;
1313  activationType = FUNCTION_ACTIVATION; // this is for running a method
1314  accessCallerContext(); // we need this to access the caller's context
1315 
1317 
1318  CallContext context; // the passed out method context
1319 
1320  // sort out our active security manager
1322  if (securityManager == OREF_NULL)
1323  {
1325  }
1326 
1327  // build a context pointer to pass out
1328  activity->createCallContext(context, this);
1329 
1330  context.threadContext.arguments = arguments;
1331 
1332  // get the entry point address of the target method
1333  PNATIVEROUTINE methp = _code->getEntry();
1334 
1335  // retrieve the argument signatures and process them
1336  uint16_t *types = (*methp)((RexxCallContext *)&context, NULL);
1338 
1339  size_t activityLevel = this->activity->getActivationLevel();
1340  trapErrors = true; // we trap error conditions now
1341  try
1342  {
1343  enableVariablepool(); // enable the variable pool interface here
1344  activity->releaseAccess(); /* force this to "safe" mode */
1345  /* process the method call */
1346  (*methp)((RexxCallContext *)&context, arguments);
1347  activity->requestAccess(); /* now in unsafe mode again */
1348 
1349  // process the returned result
1350  result = valueToObject(arguments);
1351  }
1352  catch (RexxNativeActivation *)
1353  {
1354  }
1355 
1356  // if we're not the current kernel holder when things return, make sure we
1357  // get the lock before we continue
1359  {
1361  }
1362 
1363  disableVariablepool(); // disable the variable pool from here
1364  // belt and braces...this restores the activity level to whatever
1365  // level we had when we made the callout.
1366  this->activity->restoreActivationLevel(activityLevel);
1367 
1368  /* give up reference to receiver so that it can be garbage collected */
1369  this->receiver = OREF_NULL;
1370 
1371  checkConditions(); // see if we have conditions to raise now
1372 
1373  // set the return value and get outta here.
1374  resultObj = this->result;
1375  this->argcount = 0; /* make sure we don't try to mark any arguments */
1376 
1377  this->activity->popStackFrame(this); /* pop this from the activity */
1378  this->setHasNoReferences(); /* mark this as not having references in case we get marked */
1379 }
1380 
1381 
1391  RexxObject **list, size_t count, ProtectedObject &resultObj)
1392 {
1393  NativeActivationFrame frame(activity, this);
1394 
1395  // anchor the context stuff
1396  msgname = functionName;
1397  executable = _routine;
1398  arglist = list;
1399  argcount = count;
1400  accessCallerContext(); // we need this to access the caller's context
1401 
1402  activationType = FUNCTION_ACTIVATION; // this is for running a method
1403  // use the default security manager
1405 
1406 
1407  // get the entry point address of the target method
1408  RexxRoutineHandler *methp = _code->getEntry();
1409 
1411  CONSTRXSTRING *argPtr = arguments;
1412 
1413  // unlike the other variants, we don't have a cap on arguments. If we have more than the preallocated
1414  // set, then dynamically allocate a buffer object to hold the memory and anchor it in the
1415  // activation saved objects.
1416  if (count > MAX_NATIVE_ARGUMENTS)
1417  {
1418  RexxBuffer *argBuffer = new_buffer(sizeof(CONSTRXSTRING) * count);
1419  // this keeps the buffer alive until the activation is popped.
1420  createLocalReference(argBuffer);
1421  argPtr = (CONSTRXSTRING *)argBuffer->getData();
1422  }
1423 
1424  // all of the arguments now need to be converted to string arguments
1425  for (size_t argindex=0; argindex < count; argindex++)
1426  {
1427  /* get the next argument */
1428  RexxObject *argument = list[argindex];
1429  if (argument != OREF_NULL) /* have an argument? */
1430  {
1431  /* force to string form */
1432  RexxString *stringArgument = argument->stringValue();
1433  // if the string version is not the same, we're going to need to make
1434  // sure the string version is protected from garbage collection until
1435  // the call is finished
1436  if (stringArgument != argument)
1437  {
1438  // make sure this is protected
1440  }
1441  stringArgument->toRxstring(argPtr[argindex]);
1442  }
1443  else /* have an omitted argument */
1444  {
1445  /* give it zero length */
1446  argPtr[argindex].strlength = 0;
1447  /* and a zero pointer */
1448  argPtr[argindex].strptr = NULL;
1449  }
1450  }
1451  /* get the current queue name */
1452  const char *queuename = Interpreter::getCurrentQueue()->getStringData();
1453  RXSTRING funcresult;
1454  int functionrc; /* Return code from function */
1455  /* default return code buffer */
1456  char default_return_buffer[DEFRXSTRING];
1457 
1458  /* make the RXSTRING result */
1459  MAKERXSTRING(funcresult, default_return_buffer, sizeof(default_return_buffer));
1460 
1461  size_t activityLevel = this->activity->getActivationLevel();
1462 
1463  trapErrors = true; // trap errors from here
1464  try
1465  {
1466  enableVariablepool(); // enable the variable pool interface here
1467  activity->releaseAccess(); /* force this to "safe" mode */
1468  // now process the function call
1469  functionrc = (int)(*methp)(functionName->getStringData(), count, argPtr, queuename, &funcresult);
1470  activity->requestAccess(); /* now in unsafe mode again */
1471  }
1472  catch (RexxActivation *)
1473  {
1474  // if we're not the current kernel holder when things return, make sure we
1475  // get the lock before we continue
1477  {
1479  }
1480 
1481  this->argcount = 0; /* make sure we don't try to mark any arguments */
1482  // the lock holder gets here by longjmp from a kernel reentry. We need to
1483  // make sure the activation count gets reset, else we'll accumulate bogus
1484  // nesting levels that will make it look like this activity is still in use
1485  // when in fact we're done with it.
1486  this->activity->restoreActivationLevel(activityLevel);
1487  // IMPORTANT NOTE: We don't pop our activation off the stack. This will be
1488  // handled by the catcher. Attempting to pop the stack when an error or condition has
1489  // occurred can munge the activation stack, resulting bad stuff.
1490  this->setHasNoReferences(); /* mark this as not having references in case we get marked */
1491  // now rethrow the trapped condition so that real target can handle this.
1492  throw;
1493  }
1494  catch (RexxNativeActivation *)
1495  {
1496  // if we're not the current kernel holder when things return, make sure we
1497  // get the lock before we continue
1499  {
1501  }
1502  this->argcount = 0; /* make sure we don't try to mark any arguments */
1503  // the lock holder gets here by longjmp from a kernel reentry. We need to
1504  // make sure the activation count gets reset, else we'll accumulate bogus
1505  // nesting levels that will make it look like this activity is still in use
1506  // when in fact we're done with it.
1507  this->activity->restoreActivationLevel(activityLevel);
1508  this->activity->popStackFrame(this); /* pop this from the activity */
1509  this->setHasNoReferences(); /* mark this as not having references in case we get marked */
1510  // set the return value and get outta here
1511  resultObj = this->result;
1512  return;
1513  }
1514 
1515  trapErrors = false; // no more error trapping
1516  disableVariablepool(); // disable the variable pool from here
1517 
1518  // belt and braces...this restores the activity level to whatever
1519  // level we had when we made the callout.
1520  this->activity->restoreActivationLevel(activityLevel);
1521 
1522  // now process the function return value
1523  if (functionrc == 0) /* If good rc from function */
1524  {
1525  if (funcresult.strptr != NULL) /* If we have a result, return it */
1526  {
1527  /* make a string result */
1528  resultObj = new_string(funcresult);
1529  /* user give us a new buffer? */
1530  if (funcresult.strptr != default_return_buffer )
1531  {
1532  /* free it */
1534  }
1535  }
1536  }
1537  else /* Bad rc from function, signal */
1538  {
1539  /* error */
1541  }
1542 
1543  this->argcount = 0; /* make sure we don't try to mark any arguments */
1544  this->activity->popStackFrame(this); /* pop this from the activity */
1545  this->setHasNoReferences(); /* mark this as not having references in case we get marked */
1546 }
1547 
1548 
1557 {
1558  activationType = DISPATCHER_ACTIVATION; // this is for running a dispatcher
1559  size_t activityLevel = this->activity->getActivationLevel();
1560  // use the default security manager
1562 
1563  // make the activation hookup
1564  dispatcher.setContext(activity, this);
1565  trapErrors = true; // we trap errors from here
1566  try
1567  {
1568  // we run this under a callback trap so that the exceptions get processed.
1569  dispatcher.run();
1570  }
1571  catch (ActivityException)
1572  {
1573  }
1574  catch (RexxNativeActivation *)
1575  {
1576  }
1577  trapErrors = false; // disable the error trapping
1578 
1579  // if we're not the current kernel holder when things return, make sure we
1580  // get the lock before we continue
1582  {
1584  }
1585 
1586  // belt and braces...this restores the activity level to whatever
1587  // level we had when we made the callout.
1588  this->activity->restoreActivationLevel(activityLevel);
1589  if (conditionObj != OREF_NULL)
1590  {
1591  // pass the condition information on to the dispatch unig
1592  dispatcher.handleError(conditionObj);
1593  }
1594 
1595  this->activity->popStackFrame(this); /* pop this from the activity */
1596  this->setHasNoReferences(); /* mark this as not having references in case we get marked */
1597  return; /* and finished */
1598 }
1599 
1600 
1609 {
1610  activationType = CALLBACK_ACTIVATION; // we're handling a callback
1611  // use the default security manager
1613  size_t activityLevel = this->activity->getActivationLevel();
1614  trapErrors = true; // trap errors on
1615  try
1616  {
1617  // make the activation hookup
1618  dispatcher.setContext(activity, this);
1619  activity->releaseAccess(); /* force this to "safe" mode */
1620  dispatcher.run();
1621  activity->requestAccess(); /* now in unsafe mode again */
1622  }
1623  catch (ActivityException)
1624  {
1625  }
1626  catch (RexxNativeActivation *)
1627  {
1628  }
1629  // if we're not the current kernel holder when things return, make sure we
1630  // get the lock before we continue
1632  {
1634  }
1635 
1636  trapErrors = false; // back to normal mode for error trapping
1637 
1638  // belt and braces...this restores the activity level to whatever
1639  // level we had when we made the callout.
1640  this->activity->restoreActivationLevel(activityLevel);
1641  // make sure we handle the error notifications
1642  if (conditionObj != OREF_NULL)
1643  {
1644  // pass the condition information on to the dispatch unig
1645  dispatcher.handleError(conditionObj);
1646  }
1647  return; /* and finished */
1648 }
1649 
1650 
1660 {
1661  activationType = TRAPPING_ACTIVATION; // we're handling a callback
1662  size_t activityLevel = this->activity->getActivationLevel();
1663  trapErrors = true; // trap errors on
1664  try
1665  {
1666  // make the activation hookup and run it. Note that this
1667  // version does not release the kernel lock
1668  dispatcher.setContext(activity, this);
1669  dispatcher.run();
1670  }
1671  catch (ActivityException)
1672  {
1673  }
1674  catch (RexxNativeActivation *)
1675  {
1676  }
1677  // if we're not the current kernel holder when things return, make sure we
1678  // get the lock before we continue
1680  {
1682  }
1683 
1684  trapErrors = false; // back to normal mode for error trapping
1685 
1686  // belt and braces...this restores the activity level to whatever
1687  // level we had when we made the callout.
1688  this->activity->restoreActivationLevel(activityLevel);
1689  // make sure we handle the error notifications
1690  if (conditionObj != OREF_NULL)
1691  {
1692  // pass the condition information on to the dispatch unig
1693  dispatcher.handleError(conditionObj);
1694  }
1695  return; /* and finished */
1696 }
1697 
1698 
1704 {
1706 }
1707 
1708 
1714 {
1715  trapErrors = false; // no more error trapping
1716 
1717  // if we have a stashed condition object, we need to raise this now
1718  if (conditionObj != OREF_NULL)
1719  {
1720  // we're raising this in the previous stack frame. If we're actually the
1721  // base of the stack, there's nothing left to handle this.
1722  if (!isStackBase())
1723  {
1724  /* get the original condition name */
1725  RexxString *condition = (RexxString *)conditionObj->at(OREF_CONDITION);
1726 
1727  /* fatal SYNTAX error? */
1728  if (condition->strCompare(CHAR_SYNTAX))
1729  {
1730  // this prevents us from trying to trap this again
1731  trapErrors = false;
1732  /* go propagate the condition */
1734  }
1735  else
1736  { /* normal condition trapping */
1737  /* get the sender object (if any) */
1738  // find a predecessor Rexx activation
1739  RexxActivationBase *_sender = this->getPreviousStackFrame();
1740  /* do we have a sender that is */
1741  /* trapping this condition? */
1742  /* do we have a sender? */
1743 
1744  if (_sender != OREF_NULL)
1745  {
1746  /* "tickle them" with this */
1747  _sender->trap(condition, conditionObj);
1748  }
1749  // if the trap is not handled, then we return directly. The return
1750  // value (if any) is stored in the condition object
1751  result = conditionObj->at(OREF_RESULT);
1752  }
1753  }
1754  }
1755 }
1756 
1757 
1759 /******************************************************************************/
1760 /* Function: Retrieve the set of method variables */
1761 /******************************************************************************/
1762 {
1763  /* first retrieval? */
1764  if (this->objectVariables == OREF_NULL)
1765  {
1766  // not a method invocation?
1767  if (receiver == OREF_NULL)
1768  {
1769  /* retrieve the method variables */
1770  this->objectVariables = ((RexxActivation *)this->receiver)->getLocalVariables();
1771  }
1772  else
1773  {
1774  RexxMethod *method = (RexxMethod *)executable;
1775  /* must be wanting the ovd set of */
1776  /*variables */
1777  this->objectVariables = this->receiver->getObjectVariables(method->getScope());
1778  /* guarded method? */
1779  if (this->object_scope == SCOPE_RELEASED && method->isGuarded())
1780  {
1781  /* reserve the variable scope */
1782  this->objectVariables->reserve(this->activity);
1783  /* and remember for later */
1784  this->object_scope = SCOPE_RESERVED;
1785  }
1786  }
1787  }
1788  return this->objectVariables; /* return the dictionary */
1789 }
1790 
1791 
1793  RexxObject *object) /* object to validate */
1794 /******************************************************************************/
1795 /* Function: Validate that an object has an integer value */
1796 /******************************************************************************/
1797 {
1798  wholenumber_t temp;
1799  return object->numberValue(temp, this->digits());
1800 }
1801 
1813 {
1814  ssize_t temp;
1815 
1816  // convert using the whole value range
1817  if (!Numerics::objectToSignedInteger(o, temp, maxValue, minValue))
1818  {
1820  }
1821  return temp;
1822 }
1823 
1824 
1825 
1836 {
1837  size_t temp;
1838 
1839  // convert using the whole value range
1840  if (!Numerics::objectToUnsignedInteger(o, temp, maxValue))
1841  {
1843  }
1844  return temp;
1845 }
1846 
1847 
1856 int64_t RexxNativeActivation::int64Value(RexxObject *o, size_t position)
1857 {
1858  int64_t temp;
1859 
1860  // convert using the whole value range
1861  if (!Numerics::objectToInt64(o, temp))
1862  {
1864  }
1865  return temp;
1866 }
1867 
1868 
1878 {
1879  uint64_t temp;
1880 
1881  // convert using the whole value range
1882  if (!Numerics::objectToUnsignedInt64(o, temp))
1883  {
1885  }
1886  return temp;
1887 }
1888 
1889 
1891  RexxObject *object) /* object to convert */
1892 /******************************************************************************/
1893 /* Function: Return an object as a CSTRING */
1894 /******************************************************************************/
1895 {
1896  /* force to a string value */
1897  RexxString *string = (RexxString *)object->stringValue();
1898  if (string != object) /* different value? */
1899  {
1900  /* make it safe */
1901  createLocalReference(string);
1902  }
1903  return string->getStringData(); /* just point to the string data */
1904 }
1905 
1906 
1914 void *RexxNativeActivation::pointerString(RexxObject *object, size_t position)
1915 {
1916  /* force to a string value */
1917  RexxString *string = (RexxString *)object->stringValue();
1918 
1919  void *pointerVal;
1920  if (sscanf(string->getStringData(), "0x%p", &pointerVal) != 1)
1921  {
1922  reportException(Error_Invalid_argument_pointer, position + 1, string);
1923  }
1924 
1925  return pointerVal;
1926 }
1927 
1928 
1929 double RexxNativeActivation::getDoubleValue(RexxObject *object, size_t position)
1930 /******************************************************************************/
1931 /* Function: Convert an object to a double */
1932 /******************************************************************************/
1933 {
1934  double r; /* returned result */
1935  /* convert and check result */
1936  if (!object->doubleValue(r))
1937  {
1938  /* conversion error */
1939  reportException(Error_Invalid_argument_double, position + 1, object);
1940  }
1941  return r; /* return converted number */
1942 }
1943 
1944 
1946  RexxObject *object) /* object to check */
1947 /******************************************************************************/
1948 /* Function: Test to see if an object is a valid double */
1949 /******************************************************************************/
1950 {
1951  double r; /* returned result */
1952  /* convert and check result */
1953  return object->doubleValue(r);
1954 }
1955 
1957 /******************************************************************************/
1958 /* Function: Returns "unwrapped" C or C++ object associated with this */
1959 /* object instance. If the variable CSELF does not exist, then */
1960 /* NULL is returned. */
1961 /******************************************************************************/
1962 {
1963  // if this is a method invocation, ask the receiver object to figure this out.
1964  if (receiver != OREF_NULL)
1965  {
1966  // this is necessary to get turn on a guard lock if the method
1967  // is guarded. Failure to do this can cause multithreading problems.
1968  methodVariables();
1969  return receiver->getCSelf(((RexxMethod *)executable)->getScope());
1970  }
1971  // nope, call context doesn't allow this
1972  return OREF_NULL;
1973 }
1974 
1975 
1977  RexxObject *object) /* object to convert */
1978 /******************************************************************************/
1979 /* Function: Return as a pointer the value of an integer */
1980 /******************************************************************************/
1981 {
1982  if (!object->isInstanceOf(ThePointerClass))
1983  {
1984  return NULL;
1985  }
1986  // just unwrap thee pointer
1987  return ((RexxPointer *)object)->pointer();
1988 }
1989 
1990 
1992 /******************************************************************************/
1993 /* Function: Redispatch an activation on a different activity */
1994 /******************************************************************************/
1995 {
1996  ProtectedObject r;
1997  this->run((RexxMethod *)executable, (RexxNativeMethod *)code, receiver, msgname, arglist, argcount, r); /* just do a method run */
1998  return (RexxObject *)r;
1999 }
2000 
2002 /******************************************************************************/
2003 /* Function: Return the current digits setting */
2004 /******************************************************************************/
2005 {
2006  /* have a real one? */
2007  if (activation == OREF_NULL)
2008  {
2009  return Numerics::DEFAULT_DIGITS; /* no, just return default value */
2010  }
2011  else
2012  {
2013  return activation->digits(); /* pass on the the sender */
2014  }
2015 }
2016 
2018 /******************************************************************************/
2019 /* Function: Return the current fuzz setting */
2020 /******************************************************************************/
2021 {
2022  /* have a real one? */
2023  if (activation == OREF_NULL)
2024  {
2025  return Numerics::DEFAULT_FUZZ; /* no, just return default value */
2026  }
2027  else
2028  {
2029  return activation->fuzz(); /* pass on the the sender */
2030  }
2031 }
2032 
2034 /******************************************************************************/
2035 /* Function: Return the curren form setting */
2036 /******************************************************************************/
2037 {
2038  /* have a real one? */
2039  if (activation == OREF_NULL)
2040  {
2041  return Numerics::DEFAULT_FORM; /* no, just return default value */
2042  }
2043  else
2044  {
2045  return activation->form(); /* pass on the the sender */
2046  }
2047 }
2048 
2050  size_t _digits) /* new NUMERIC DIGITS value */
2051 /******************************************************************************/
2052 /* Function: Set a new numeric digits setting */
2053 /******************************************************************************/
2054 {
2055  /* have a real one? */
2056  if (activation == OREF_NULL)
2057  {
2058  activation->setDigits(_digits); /* just forward the set */
2059  }
2060 }
2061 
2063  size_t _fuzz ) /* new NUMERIC FUZZ value */
2064 /******************************************************************************/
2065 /* Function: Set a new numeric fuzz setting */
2066 /******************************************************************************/
2067 {
2068  /* have a real one? */
2069  if (activation != OREF_NULL)
2070  {
2071  activation->setFuzz(_fuzz); /* just forward the set */
2072  }
2073 }
2074 
2076  bool _form ) /* new NUMERIC FORM value */
2077 /******************************************************************************/
2078 /* Function: Set a new numeric form setting */
2079 /******************************************************************************/
2080 {
2081  /* have a real one? */
2082  if (activation == OREF_NULL)
2083  {
2084  activation->setForm(_form); /* just forward the set */
2085  }
2086 }
2087 
2088 
2098 {
2099  if (activation == OREF_NULL)
2100  {
2102  }
2103  else
2104  {
2105  return activation->getNumericSettings();
2106  }
2107 }
2108 
2109 
2117 {
2118  return stackBase;
2119 }
2120 
2121 
2129 {
2130  return activation; // this might be null
2131 }
2132 
2133 
2142 {
2143  // since this should only be used for exit calls, in theory, we always
2144  // have one of these.
2145  if (activation != OREF_NULL)
2146  {
2147  return activation->getExecutable();
2148  }
2149  return OREF_NULL;
2150 }
2151 
2152 
2160 {
2161  // since this should only be used for exit calls, in theory, we always
2162  // have one of these.
2163  if (activation != OREF_NULL)
2164  {
2165  return activation->getContextObject();
2166  }
2167  return OREF_NULL;
2168 }
2169 
2170 
2178 {
2179  // if this is attached to a Rexx context, we can stop here
2180  if (activation != OREF_NULL)
2181  {
2182  return activation;
2183  }
2184  // otherwise, have our predecessor see if it can figure this out. It's likely
2185  // that is the one we need.
2186  if (previous != OREF_NULL)
2187  {
2188  return previous->findRexxContext();
2189  }
2190  // at the base of the stack, no context.
2191  return OREF_NULL;
2192 }
2193 
2194 
2202 {
2203  return receiver;
2204 }
2205 
2206 
2213 {
2214  RexxSource *s = getSourceObject();
2215  if (s != OREF_NULL)
2216  {
2217  return s->getSecurityManager();
2218  }
2219  return OREF_NULL; // no security manager on this context.
2220 }
2221 
2222 
2224 /******************************************************************************/
2225 /* Function: Release a variable pool guard lock */
2226 /******************************************************************************/
2227 {
2228  /* currently locked? */
2229  if (this->object_scope == SCOPE_RESERVED)
2230  {
2231  /* release the variable dictionary */
2232  this->objectVariables->release(this->activity);
2233  /* set the state to released */
2234  this->object_scope = SCOPE_RELEASED;
2235  }
2236 }
2237 
2239 /******************************************************************************/
2240 /* Function: Acquire a variable pool guard lock */
2241 /******************************************************************************/
2242 {
2243  // if there's no receiver object, then this is not a true method call.
2244  // there's nothing to lock
2245  if (receiver == OREF_NULL)
2246  {
2247  return;
2248  }
2249  /* first retrieval? */
2250  if (this->objectVariables == OREF_NULL)
2251  {
2252  /* grab the object variables associated with this object */
2254  }
2255  /* not currently holding the lock? */
2256  if (this->object_scope == SCOPE_RELEASED)
2257  {
2258  /* reserve the variable scope */
2259  this->objectVariables->reserve(this->activity);
2260  /* and remember for later */
2261  this->object_scope = SCOPE_RESERVED;
2262  }
2263 }
2264 
2266 /******************************************************************************/
2267 /* Function: Enable the variable pool */
2268 /******************************************************************************/
2269 {
2270  this->resetNext(); /* reset fetch next calls */
2271  this->vpavailable = true; /* allow the calls */
2272 }
2273 
2275 /******************************************************************************/
2276 /* Function: Disable the variable pool */
2277 /******************************************************************************/
2278 {
2279  this->resetNext(); /* reset fetch next calls */
2280  this->vpavailable = false; /* no more external calls */
2281 }
2282 
2284 /******************************************************************************/
2285 /* Function: Reset the next state of the variable pool */
2286 /******************************************************************************/
2287 {
2288  this->nextvariable = SIZE_MAX; /* turn off next index */
2289  this->nextcurrent = OREF_NULL; /* clear the next value */
2290  this->nextstem = OREF_NULL; /* clear the secondary pointer */
2291  this->compoundelement = OREF_NULL;
2292 }
2293 
2294 
2296  RexxString **name, /* the returned name */
2297  RexxObject **value) /* the return value */
2298 /******************************************************************************/
2299 /* Function: Fetch the next variable of a variable pool traversal */
2300 /******************************************************************************/
2301 {
2302  RexxVariable *variable; /* retrieved variable value */
2303  RexxCompoundElement *compound; /* retrieved variable value */
2304  RexxStem *stemVar; /* a potential stem variable collection */
2305 
2306  /* starting off fresh? */
2307  if (nextCurrent() == OREF_NULL)
2308  {
2309  /* grab the activation context */
2311  setNextVariable(SIZE_MAX); /* request the first item */
2312  /* Get the local variable dictionary from the context. */
2314  /* we are not on a stem */
2317  }
2318 
2319  for (;;) /* loop until we get something */
2320  {
2321  variable = nextStem(); /* see if we're processing a stem variable */
2322  if (variable != OREF_NULL) /* were we in the middle of processing a stem? */
2323  {
2324  stemVar = (RexxStem *)variable->getVariableValue();
2325  compound = stemVar->nextVariable(this);
2326  if (compound != OREF_NULL) /* if we still have elements here */
2327  {
2328  // create a full stem name
2329  // NOTE: We're using the stem name from the variable, not the
2330  // stem OBJECT we're iterating over.
2331  *name = compound->createCompoundName(variable->getName());
2332  /* get the value */
2333  *value = compound->getVariableValue();
2334  return true;
2335  }
2336  else /* we've reached the end of the stem, reset */
2337  {
2338  /* to the main dictionary and continue */
2341  }
2342  }
2343  /* get the next variable */
2344  variable = nextCurrent()->nextVariable(this);
2345  if (variable == OREF_NULL) /* reached the end of the table */
2346  {
2347  return false;
2348  }
2349  else /* have a real variable */
2350  {
2351  /* get the value */
2352  RexxObject *variable_value = variable->getVariableValue();
2353  /* found a stem item? */
2354  if (variable->isStem())
2355  {
2356  /* we are now on a stem */
2357  setNextStem(variable);
2358  setCompoundElement(((RexxStem *)variable_value)->first());
2359  /* set up an iterator for the stem */
2360  }
2361  else /* found a real variable */
2362  {
2363  *value = variable_value; /* pass back the value (name already set) */
2364  *name = variable->getName();
2365  return true; /* we have another variable to return */
2366  }
2367  }
2368  }
2369 }
2370 
2371 
2372 
2383 bool RexxNativeActivation::trap(RexxString *condition, RexxDirectory * exception_object)
2384 {
2385  // There are two possibilities here. We're either seeing this because of a
2386  // propagating syntax condition. for this case, we trap this and hold it.
2387  // The other possibility is a condition being raised by an API callback. That should
2388  // be the only situation where we see any other condition type. We also trap that
2389  // one so it can be raised in the caller's context.
2390 
2391  // we end up seeing this a second time if we're raising the exception on
2392  // return from an external call or method.
2393  if (condition->isEqual(OREF_SYNTAX))
2394  {
2395  if (trapErrors)
2396  {
2397  // record this in case any callers want to know about it.
2398  setConditionInfo(exception_object);
2399  // this will unwind back to the calling level, with the
2400  // exception information recorded.
2401  throw this;
2402  }
2403 
2404  }
2405  else if (trapConditions)
2406  {
2407  // pretty much the same deal, but we're only handling conditions, and
2408  // only one condtion, so reset the trap flag
2409  trapConditions = false;
2410  // record this in case any callers want to know about it.
2411  setConditionInfo(exception_object);
2412  // this will unwind back to the calling level, with the
2413  // exception information recorded.
2414  throw this;
2415  }
2416  return false; /* this wasn't handled */
2417 }
2418 
2419 
2430 void RexxNativeActivation::raiseCondition(RexxString *condition, RexxString *description, RexxObject *additional, RexxObject *_result)
2431 {
2432  this->result = (RexxObject *)_result; /* save the result */
2433  /* go raise the condition */
2434  this->activity->raiseCondition(condition, OREF_NULL, description, additional, result);
2435 
2436  // We only return here if no activation above us has trapped this. If we do return, then
2437  // we terminate the call by throw this up the stack.
2438  throw this;
2439 }
2440 
2441 
2448 {
2449  // if we've not requested this before, convert the arguments to an
2450  // array object.
2451  if (argArray == OREF_NULL)
2452  {
2453  /* create the argument array */
2455  // make sure the array is anchored in our activation
2457  }
2458  return argArray;
2459 }
2460 
2470 {
2471  if (index <= argcount)
2472  {
2473  return arglist[index - 1];
2474  }
2475  return OREF_NULL;
2476 }
2477 
2484 {
2486 }
2487 
2494 {
2495  return ((RexxMethod *)executable)->getScope();
2496 }
2497 
2509 {
2510  // is this a stem already?
2511  if (isStem(s))
2512  {
2513  return (RexxStem *)s;
2514  }
2515 
2516  /* force to a string value */
2517  RexxString *temp = stringArgument(s, 1);
2518  // see if we can retrieve this stem
2519  return (RexxStem *)getContextStem(temp);
2520 }
2521 
2522 
2524 /******************************************************************************/
2525 /* Function: retrieve a stem variable stem from the current context. */
2526 /******************************************************************************/
2527 {
2528  // if this is not a stem name, add it now
2529  if (name->getChar(name->getLength() - 1) != '.')
2530  {
2531  name = name->concatWithCstring(".");
2532  }
2533 
2535  // if this didn't parse, it's an illegal name
2536  // it must also resolve to a stem type...this could be a compound one
2537  if (retriever == OREF_NULL || !isOfClass(StemVariableTerm, retriever))
2538  {
2539  return OREF_NULL;
2540  }
2541  // get the variable value
2542  return retriever->getValue(activation);
2543 }
2544 
2545 
2555 {
2557  // if this didn't parse, it's an illegal name
2558  if (retriever == OREF_NULL)
2559  {
2560  return OREF_NULL;
2561  }
2562  this->resetNext(); // all next operations must be reset
2563 
2564  // have a non-name retriever?
2565  if (isString((RexxObject *)retriever))
2566  {
2567  // the value is the retriever
2568  return (RexxObject *)retriever;
2569  }
2570  else
2571  {
2572  // get the variable value
2573  return retriever->getRealValue(activation);
2574  }
2575 }
2576 
2584 {
2585  // get the REXX activation for the target context
2587  // if this didn't parse, it's an illegal name
2588  if (retriever == OREF_NULL || isString((RexxObject *)retriever))
2589  {
2590  return;
2591  }
2592  this->resetNext(); // all next operations must be reset
2593 
2594  // do the assignment
2595  retriever->set(activation, value);
2596 }
2597 
2598 
2605 {
2606  // get the REXX activation for the target context
2608  // if this didn't parse, it's an illegal name
2609  if (retriever == OREF_NULL || isString((RexxObject *)retriever))
2610  {
2611  return;
2612  }
2613  this->resetNext(); // all next operations must be reset
2614 
2615  // perform the drop
2616  retriever->drop(activation);
2617 }
2618 
2619 
2621 /******************************************************************************/
2622 /* Function: Retriev a list of all variables in the current context. */
2623 /******************************************************************************/
2624 {
2625  this->resetNext(); // all next operations must be reset
2626  return activation->getAllLocalVariables();
2627 }
2628 
2629 
2640 {
2641  RexxString *target = new_string(name);
2642  ProtectedObject p1(target);
2643  // get the REXX activation for the target context
2645  ProtectedObject p2(retriever);
2646  // if this didn't parse, it's an illegal name
2647  // we also don't allow compound variables here because the source for
2648  // resolving the tail pieces is not defined.
2649  if (retriever == OREF_NULL || isString((RexxObject *)retriever) || isOfClassType(CompoundVariableTerm, retriever))
2650  {
2651  return OREF_NULL;
2652  }
2653  // retrieve the value
2654  return retriever->getRealValue(methodVariables());
2655 }
2656 
2664 {
2665  RexxString *target = new_string(name);
2666  ProtectedObject p1(target);
2667  // get the REXX activation for the target context
2669  ProtectedObject p2(retriever);
2670  // if this didn't parse, it's an illegal name
2671  // we also don't allow compound variables here because the source for
2672  // resolving the tail pieces is not defined.
2673  if (retriever == OREF_NULL || isString((RexxObject *)retriever) || isOfClassType(CompoundVariableTerm, retriever))
2674  {
2675  return;
2676  }
2677  // do the assignment
2678  retriever->set(methodVariables(), value);
2679 }
2680 
2687 {
2688  RexxString *target = new_string(name);
2689  ProtectedObject p1(target);
2690  // get the REXX activation for the target context
2692  ProtectedObject p2(retriever);
2693  // if this didn't parse, it's an illegal name
2694  // we also don't allow compound variables here because the source for
2695  // resolving the tail pieces is not defined.
2696  if (retriever == OREF_NULL || isString((RexxObject *)retriever) || isOfClassType(CompoundVariableTerm, retriever))
2697  {
2698  return;
2699  }
2700  // do the assignment
2701  retriever->drop(methodVariables());
2702 }
2703 
2704 
2713 {
2714  RexxClass *classObject;
2715 
2716  // if we have an executable context, use that as the context.
2717  if (executable != OREF_NULL)
2718  {
2719  classObject = executable->findClass(className);
2720  }
2721  else
2722  {
2723  classObject = Interpreter::findClass(className);
2724  }
2725  // we need to filter this to always return a class object
2726  if (classObject != OREF_NULL && classObject->isInstanceOf(TheClassClass))
2727  {
2728  return classObject;
2729  }
2730  return OREF_NULL;
2731 }
2732 
2733 
2743 {
2744  RexxClass *classObject;
2745  // have a caller context? if not, just do the default environment searches
2746  if (activation == OREF_NULL)
2747  {
2748  classObject = Interpreter::findClass(className);
2749  }
2750  else
2751  {
2752  // use the caller activation to resolve this
2753  classObject = activation->findClass(className);
2754  }
2755  // we need to filter this to always return a class object
2756  if (classObject != OREF_NULL && classObject->isInstanceOf(TheClassClass))
2757  {
2758  return classObject;
2759  }
2760  return OREF_NULL;
2761 }
2762 
2763 
2771 {
2772  if (executable != OREF_NULL)
2773  {
2774  return executable->getSourceObject();
2775  }
2776  return OREF_NULL;
2777 }
2778 
2779 
2787 void * RexxNativeActivation::operator new(size_t size)
2788 {
2789  /* Get new object */
2790  RexxObject *newObject = new_object(size, T_NativeActivation);
2791  newObject->clearObject(); /* clear out at start */
2792  return newObject; /* return the new object */
2793 }
2794 
2795 
2804 {
2805  // this is not allowed asynchronously
2806  if (!getVpavailable())
2807  {
2808  return RXSHV_NOAVL;
2809  }
2810 
2811  RexxReturnCode retcode = 0; /* initialize composite rc */
2812 
2813  try
2814  {
2815  while (pshvblock)
2816  { /* while more request blocks */
2817  variablePoolRequest(pshvblock);
2818  retcode |= pshvblock->shvret; /* accumulate the return code */
2819  pshvblock = pshvblock->shvnext; /* step to the next block */
2820  }
2821  return retcode; /* return composite return code */
2822 
2823  }
2824  // intercept any termination failures
2825  catch (ActivityException)
2826  {
2827  /* set failure in current */
2828  pshvblock->shvret |= (uint8_t)RXSHV_MEMFL;
2829  retcode |= pshvblock->shvret; /* OR with the composite */
2830  return retcode; /* stop processing requests now */
2831  }
2832 }
2833 
2834 
2845 {
2846  /* no name given? */
2847  if (pshvblock->shvname.strptr==NULL)
2848  {
2849  pshvblock->shvret|=RXSHV_BADN; /* this is bad */
2850  }
2851  else
2852  {
2853  /* get the variable as a string */
2854  RexxString *variable = new_string(pshvblock->shvname);
2855  RexxVariableBase *retriever = OREF_NULL;
2856  /* symbolic access? */
2857  if (symbolic)
2858  {
2859  /* get a symbolic retriever */
2860  retriever = RexxVariableDictionary::getVariableRetriever(variable);
2861  }
2862  else /* need a direct retriever */
2863  {
2865  }
2866  if (retriever == OREF_NULL) /* have a bad name? */
2867  {
2868  pshvblock->shvret|=RXSHV_BADN; /* this is bad */
2869  }
2870  else
2871  {
2872  resetNext(); /* reset any next operations */
2873  return retriever;
2874  }
2875  }
2876  return OREF_NULL;
2877 }
2878 
2885 {
2886  RexxVariableBase *retriever = variablePoolGetVariable(pshvblock, pshvblock->shvcode == RXSHV_SYFET);
2887  RexxObject *value = OREF_NULL;
2888  if (retriever != OREF_NULL)
2889  {
2890  /* have a non-name retriever? */
2891  if (isString((RexxObject *)retriever))
2892  {
2893  /* the value is the retriever */
2894  value = (RexxObject *)retriever;
2895  }
2896  else
2897  {
2898  /* have a non-name retriever */
2899  /* and a new variable? */
2900  if (!retriever->exists(activation))
2901  {
2902  /* flag this in the block */
2903  pshvblock->shvret |= RXSHV_NEWV;
2904  }
2905  /* get the variable value */
2906  value = retriever->getValue(activation);
2907  }
2908 
2909  /* copy the value */
2910  pshvblock->shvret |= copyValue(value, &pshvblock->shvvalue, (size_t *)&pshvblock->shvvaluelen);
2911  }
2912  else
2913  {
2914  /* this is bad */
2915  pshvblock->shvret = RXSHV_BADN;
2916  }
2917 }
2918 
2919 
2926 {
2927  RexxVariableBase *retriever = variablePoolGetVariable(pshvblock, pshvblock->shvcode == RXSHV_SYSET);
2928  if (retriever != OREF_NULL)
2929  {
2930  /* have a non-name retriever? */
2931  if (isString((RexxObject *)retriever))
2932  {
2933  /* this is bad */
2934  pshvblock->shvret = RXSHV_BADN;
2935  }
2936  else
2937  {
2938  /* have a non-name retriever */
2939  /* and a new variable? */
2940  if (!retriever->exists(activation))
2941  {
2942  /* flag this in the block */
2943  pshvblock->shvret |= RXSHV_NEWV;
2944  }
2945  /* do the assignment */
2946  retriever->set(activation, new_string(pshvblock->shvvalue));
2947  }
2948  }
2949 }
2950 
2951 
2958 {
2959  RexxVariableBase *retriever = variablePoolGetVariable(pshvblock, pshvblock->shvcode == RXSHV_SYDRO);
2960  if (retriever != OREF_NULL)
2961  {
2962  /* have a non-name retriever? */
2963  if (isString((RexxObject *)retriever))
2964  {
2965  /* this is bad */
2966  pshvblock->shvret = RXSHV_BADN;
2967  }
2968  else
2969  {
2970  /* have a non-name retriever */
2971  /* and a new variable? */
2972  if (!retriever->exists(activation))
2973  {
2974  /* flag this in the block */
2975  pshvblock->shvret |= RXSHV_NEWV;
2976  }
2977  /* perform the drop */
2978  retriever->drop(activation);
2979  }
2980  }
2981 }
2982 
2983 
2990 {
2991  RexxString *name;
2992  RexxObject *value;
2993  /* get the next variable */
2994  if (!this->fetchNext(&name, &value))
2995  {
2996  pshvblock->shvret |= RXSHV_LVAR; /* flag as such */
2997  }
2998  else
2999  { /* need to copy the name and value */
3000  /* copy the name */
3001  pshvblock->shvret |= copyValue(name, &pshvblock->shvname, &pshvblock->shvnamelen);
3002  /* copy the value */
3003  pshvblock->shvret |= copyValue(value, &pshvblock->shvvalue, &pshvblock->shvvaluelen);
3004  }
3005 }
3006 
3007 
3014 {
3015  /* and VP is enabled */
3016  /* private block should always be enabled */
3017  /* no name given? */
3018  if (pshvblock->shvname.strptr==NULL)
3019  {
3020  pshvblock->shvret|=RXSHV_BADN; /* this is bad */
3021  }
3022  else
3023  {
3024  /* get the variable as a string */
3025  const char *variable = pshvblock->shvname.strptr;
3026  /* want the version string? */
3027  if (strcmp(variable, "VERSION") == 0)
3028  {
3029  /* copy the value */
3030  pshvblock->shvret |= copyValue(Interpreter::getVersionNumber(), &pshvblock->shvvalue, &pshvblock->shvvaluelen);
3031  }
3032  /* want the the current queue? */
3033  else if (strcmp(variable, "QUENAME") == 0)
3034  {
3035  /* copy the value */
3036  pshvblock->shvret |= copyValue(Interpreter::getCurrentQueue(), &pshvblock->shvvalue, &pshvblock->shvvaluelen);
3037  }
3038  /* want the version string? */
3039  else if (strcmp(variable, "SOURCE") == 0)
3040  {
3041  /* retrieve the source string */
3042  RexxString *value = activation->sourceString();
3043  /* copy the value */
3044  pshvblock->shvret |= copyValue(value, &pshvblock->shvvalue, &pshvblock->shvvaluelen);
3045  }
3046  /* want the parameter count? */
3047  else if (strcmp(variable, "PARM") == 0)
3048  {
3050  /* copy the value */
3051  pshvblock->shvret |= copyValue(value, &pshvblock->shvvalue, &pshvblock->shvvaluelen);
3052  }
3053  /* some other parm form */
3054  else if (!memcmp(variable, "PARM.", sizeof("PARM.") - 1))
3055  {
3056  wholenumber_t value_position;
3057  /* extract the numeric piece */
3058  RexxString *tail = new_string(variable + strlen("PARM."));
3059  /* get the binary value */
3060  /* not a good number? */
3061  if (!tail->numberValue(value_position) || value_position <= 0)
3062  {
3063  /* this is a bad name */
3064  pshvblock->shvret|=RXSHV_BADN;
3065  }
3066  else
3067  {
3068  /* get the arcgument from the parent activation */
3069  RexxObject *value = activation->getProgramArgument(value_position);
3070  if (value == OREF_NULL)
3071  { /* doesn't exist? */
3072  value = OREF_NULLSTRING; /* return a null string */
3073  }
3074  /* copy the value */
3075  pshvblock->shvret |= copyValue(value, &pshvblock->shvvalue, (size_t *)&pshvblock->shvvaluelen);
3076  }
3077  }
3078  else
3079  {
3080  pshvblock->shvret|=RXSHV_BADN; /* this is a bad name */
3081  }
3082  }
3083 }
3084 
3085 
3092 {
3093  pshvblock->shvret = 0; /* set the block return code */
3094 
3095  switch (pshvblock->shvcode)
3096  {
3097  case RXSHV_FETCH:
3098  case RXSHV_SYFET:
3099  {
3100  variablePoolFetchVariable(pshvblock);
3101  break;
3102  }
3103  case RXSHV_SET:
3104  case RXSHV_SYSET:
3105  {
3106  variablePoolSetVariable(pshvblock);
3107  break;
3108  }
3109  case RXSHV_DROPV:
3110  case RXSHV_SYDRO:
3111  {
3112  variablePoolDropVariable(pshvblock);
3113  break;
3114  }
3115  case RXSHV_NEXTV:
3116  {
3117  variablePoolNextVariable(pshvblock);
3118  break;
3119  }
3120  case RXSHV_PRIV:
3121  {
3122  variablePoolFetchPrivate(pshvblock);
3123  break;
3124  }
3125  default:
3126  {
3127  pshvblock->shvret |= RXSHV_BADF; /* bad function */
3128  break;
3129  }
3130  }
3131 }
3132 
3133 
3145 {
3146  RXSTRING temp;
3147 
3148  temp.strptr = const_cast<char *>(rxstring->strptr);
3149  temp.strlength = rxstring->strlength;
3150 
3151  RexxReturnCode rc = copyValue(value, &temp, length);
3152 
3153  rxstring->strptr = temp.strptr;
3154  rxstring->strlength = temp.strlength;
3155  return rc;
3156 }
3157 
3158 
3170 {
3171  RexxString * stringVal; /* converted object value */
3172  stringsize_t string_length; /* length of the string */
3173  uint32_t rc; /* return code */
3174 
3175  rc = 0; /* default to success */
3176  /* get the string value */
3177  stringVal = value->stringValue();
3178  string_length = stringVal->getLength();/* get the string length */
3179  // caller allowing use to allocate this?
3180  if (rxstring->strptr == NULL)
3181  {
3182  rxstring->strptr = (char *)SystemInterpreter::allocateResultMemory(string_length + 1);
3183  if (rxstring->strptr == NULL)
3184  {
3185  return RXSHV_MEMFL; /* couldn't allocate, return flag */
3186  }
3187  rxstring->strlength = string_length + 1;
3188  }
3189  /* buffer too short? */
3190  if (string_length > rxstring->strlength)
3191  {
3192  rc = RXSHV_TRUNC; /* set truncated return code */
3193  /* copy the short piece */
3194  memcpy(rxstring->strptr, stringVal->getStringData(), rxstring->strlength);
3195  }
3196  else
3197  {
3198  /* copy entire string */
3199  memcpy(rxstring->strptr, stringVal->getStringData(), string_length);
3200  /* room for a null? */
3201  if (rxstring->strlength > string_length)
3202  {
3203  /* yes, add one */
3204  rxstring->strptr[string_length] = '\0';
3205  }
3206  rxstring->strlength = string_length; /* string length doesn't include terminating 0 */
3207  }
3208  *length = string_length; /* return actual string length */
3209  return rc; /* give back the return code */
3210 }
3211 
3212 int RexxNativeActivation::stemSort(const char *stemname, int order, int type, size_t start, size_t end, size_t firstcol, size_t lastcol)
3213 /******************************************************************************/
3214 /* Function: Perform a sort on stem data. If everything works correctly, */
3215 /* this returns zero, otherwise an appropriate error value. */
3216 /******************************************************************************/
3217 {
3218  size_t position; /* scan position within compound name */
3219  size_t length; /* length of tail section */
3220 
3221  /* if access is enabled */
3222  // NB: The braces here are to ensure the ProtectedObjects get released before the
3223  // currentActivity gets zeroed out.
3224  {
3225  /* get the stem name as a string */
3226  RexxString *variable = new_string(stemname);
3227  ProtectedObject p1(variable);
3228  /* and get a retriever for this variable */
3230 
3231  /* this must be a stem variable in order for the sorting to work. */
3232 
3233  if ( (!isOfClass(StemVariableTerm, retriever)) && (!isOfClass(CompoundVariableTerm, retriever)) )
3234  {
3235  return false;
3236  }
3237 
3238  RexxString *tail = OREF_NULLSTRING ;
3239  ProtectedObject p2(tail);
3240 
3241  if (isOfClass(CompoundVariableTerm, retriever))
3242  {
3243  length = variable->getLength(); /* get the string length */
3244  position = 0; /* start scanning at first character */
3245  /* scan to the first period */
3246  while (variable->getChar(position) != '.')
3247  {
3248  position++; /* step to the next character */
3249  length--; /* reduce the length also */
3250  }
3251  position++; /* step past previous period */
3252  length--; /* adjust the length */
3253  tail = variable->extract(position, length);
3254  tail = tail->upper();
3255  }
3256 
3257  return retriever->sort(activation, tail, order, type, start, end, firstcol, lastcol);
3258  }
3259 }
3260 
3261 
3275 {
3276  // process all of the non-overridden values
3277  if (to == OREF_NULL)
3278  {
3279  to = getSelf();
3280  }
3281  if (msg == OREF_NULL)
3282  {
3283  msg = getMessageName();
3284  }
3285  if (args == OREF_NULL)
3286  {
3287  args = getArguments();
3288  }
3289 
3290  // no super class override? Normal message send
3291  if (super == OREF_NULL)
3292  {
3293  to->messageSend(msg, args->data(), args->size(), _result);
3294  }
3295  else
3296  {
3297  to->messageSend(msg, args->data(), args->size(), super, _result);
3298  }
3299 }
3300 
3301 
3308 {
3309  if (receiver == OREF_NULL)
3310  {
3311  RexxArray *info = new_array(getMessageName());
3312  ProtectedObject p(info);
3313 
3315  p = message;
3316  return new StackFrameClass(FRAME_ROUTINE, getMessageName(), (BaseExecutable *)getExecutableObject(), NULL, getArguments(), message, SIZE_MAX);
3317  }
3318  else
3319  {
3321  ProtectedObject p(info);
3322 
3324  p = message;
3326  }
3327 }
3328 
3329 
RexxCompoundElement::createCompoundName
RexxString * createCompoundName(RexxString *stemName)
Definition: RexxCompoundElement.hpp:68
MethodContext::threadContext
RexxMethodContext threadContext
Definition: ActivationApiContexts.hpp:74
ValueDescriptor::value_uint32_t
uint32_t value_uint32_t
Definition: oorexxapi.h:293
RexxNativeActivation::enableVariablepool
void enableVariablepool()
Definition: RexxNativeActivation.cpp:2265
RegisteredRoutine
Definition: RexxNativeCode.hpp:130
REXX_VALUE_uint8_t
#define REXX_VALUE_uint8_t
Definition: oorexxapi.h:78
PNATIVEMETHOD
uint16_t *(RexxEntry * PNATIVEMETHOD)(RexxMethodContext *, ValueDescriptor *)
Definition: MethodClass.hpp:76
CallbackDispatcher
Definition: CallbackDispatcher.hpp:47
Numerics::objectToInt64
static bool objectToInt64(RexxObject *o, int64_t &result)
Definition: Numerics.cpp:409
ValueDescriptor::value_logical_t
logical_t value_logical_t
Definition: oorexxapi.h:280
REXX_VALUE_int
#define REXX_VALUE_int
Definition: oorexxapi.h:65
Numerics::objectToStringSize
static bool objectToStringSize(RexxObject *o, stringsize_t &result, stringsize_t max)
Definition: Numerics.cpp:312
REXX_VALUE_CSELF
#define REXX_VALUE_CSELF
Definition: oorexxapi.h:58
BaseExecutable::findClass
RexxClass * findClass(RexxString *className)
Definition: MethodClass.cpp:87
RexxMethod::isGuarded
bool isGuarded()
Definition: MethodClass.hpp:133
SystemInterpreter::releaseResultMemory
static void releaseResultMemory(void *)
Definition: MemorySupport.cpp:75
RexxNativeActivation::FUNCTION_ACTIVATION
Definition: RexxNativeActivation.hpp:191
RexxNativeActivation::getRexxContextObject
RexxObject * getRexxContextObject()
Definition: RexxNativeActivation.cpp:2159
Interpreter::findClass
static RexxClass * findClass(RexxString *className)
Definition: Interpreter.cpp:520
new_array
RexxArray * new_array(size_t s)
Definition: ArrayClass.hpp:250
ValueDescriptor::value_uintptr_t
uintptr_t value_uintptr_t
Definition: oorexxapi.h:297
ValueDescriptor::value_int64_t
int64_t value_int64_t
Definition: oorexxapi.h:289
RexxNativeActivation::getSelf
RexxObject * getSelf()
Definition: RexxNativeActivation.hpp:142
CSTRING
const typedef char * CSTRING
Definition: rexx.h:78
REXX_VALUE_stringsize_t
#define REXX_VALUE_stringsize_t
Definition: oorexxapi.h:71
_SHVBLOCK::shvvaluelen
size_t shvvaluelen
Definition: rexx.h:209
RexxArray
Definition: ArrayClass.hpp:100
RexxCompoundElement
Definition: RexxCompoundElement.hpp:50
RXSHV_BADN
#define RXSHV_BADN
Definition: rexxapidefs.h:116
RXSHV_BADF
#define RXSHV_BADF
Definition: rexxapidefs.h:118
RexxNativeActivation::guardOff
void guardOff()
Definition: RexxNativeActivation.cpp:2223
RexxObject::isInstanceOf
bool isInstanceOf(RexxClass *)
Definition: ObjectClass.cpp:226
Error_Incorrect_call_signature
#define Error_Incorrect_call_signature
Definition: RexxErrorCodes.h:362
BaseExecutable::getSourceObject
RexxSource * getSourceObject()
Definition: MethodClass.hpp:85
RexxNativeActivation::METHOD_ACTIVATION
Definition: RexxNativeActivation.hpp:190
NumericSettings
Definition: Numerics.hpp:49
ActivityDispatcher::run
virtual void run()
Definition: ActivityDispatcher.cpp:50
RexxObject::truthValue
bool truthValue(int)
Definition: ObjectClass.cpp:468
TrappingDispatcher::handleError
virtual void handleError(wholenumber_t, RexxDirectory *)
Definition: TrappingDispatcher.cpp:63
RexxNativeActivation::variablePoolSetVariable
void variablePoolSetVariable(PSHVBLOCK pshvblock)
Definition: RexxNativeActivation.cpp:2925
RexxActivation::getAllLocalVariables
RexxDirectory * getAllLocalVariables()
Definition: RexxActivation.hpp:459
RexxActivation::getLocalVariables
RexxVariableDictionary * getLocalVariables()
Definition: RexxActivation.hpp:454
TheFalseObject
#define TheFalseObject
Definition: RexxCore.h:184
RexxNativeActivation::nextCurrent
RexxVariableDictionary * nextCurrent()
Definition: RexxNativeActivation.hpp:136
ValueDescriptor::value_RexxClassObject
RexxClassObject value_RexxClassObject
Definition: oorexxapi.h:276
RexxNativeActivation::checkConditions
void checkConditions()
Definition: RexxNativeActivation.cpp:1713
RexxArrayObject
struct _RexxArrayObject * RexxArrayObject
Definition: rexx.h:130
RexxNativeActivation::variablePoolNextVariable
void variablePoolNextVariable(PSHVBLOCK pshvblock)
Definition: RexxNativeActivation.cpp:2989
RexxNativeActivation::setNextStem
void setNextStem(RexxVariable *stemVar)
Definition: RexxNativeActivation.hpp:140
ValueDescriptor::value_int16_t
int16_t value_int16_t
Definition: oorexxapi.h:287
RexxNativeActivation::objectVariables
RexxVariableDictionary * objectVariables
Definition: RexxNativeActivation.hpp:210
MethodClass.hpp
RXSHV_SYDRO
#define RXSHV_SYDRO
Definition: rexxapidefs.h:102
ActivityDispatcher
Definition: ActivityDispatcher.hpp:47
ValueDescriptor::value_RexxObjectPtr
RexxObjectPtr value_RexxObjectPtr
Definition: oorexxapi.h:275
new_integer
RexxInteger * new_integer(wholenumber_t v)
Definition: IntegerClass.hpp:198
memory_mark_general
#define memory_mark_general(oref)
Definition: RexxMemory.hpp:437
ValueDescriptor::value_wholenumber_t
wholenumber_t value_wholenumber_t
Definition: oorexxapi.h:278
RexxNativeActivation::guardOn
void guardOn()
Definition: RexxNativeActivation.cpp:2238
RexxActivity::createCallContext
void createCallContext(CallContext &context, RexxNativeActivation *owner)
Definition: RexxActivity.cpp:3153
REXX_VALUE_uint64_t
#define REXX_VALUE_uint64_t
Definition: oorexxapi.h:81
ValueDescriptor::value_ssize_t
ssize_t value_ssize_t
Definition: oorexxapi.h:300
REXX_VALUE_logical_t
#define REXX_VALUE_logical_t
Definition: oorexxapi.h:86
RexxActivation.hpp
type
int type
Definition: cmdparse.cpp:1965
RexxVariableDictionary::release
void release(RexxActivity *)
Definition: RexxVariableDictionary.cpp:379
RexxNativeActivation::getSourceObject
RexxSource * getSourceObject()
Definition: RexxNativeActivation.cpp:2770
RexxNativeActivation::savelist
RexxIdentityTable * savelist
Definition: RexxNativeActivation.hpp:204
RexxNativeActivation::variablePoolFetchVariable
void variablePoolFetchVariable(PSHVBLOCK pshvblock)
Definition: RexxNativeActivation.cpp:2884
RexxNativeActivation::stemSort
int stemSort(const char *stemname, int order, int type, size_t start, size_t end, size_t firstcol, size_t lastcol)
Definition: RexxNativeActivation.cpp:3212
StackFrameClass
Definition: StackFrameClass.hpp:59
RXSHV_NEWV
#define RXSHV_NEWV
Definition: rexxapidefs.h:113
ActivityDispatcher::handleError
virtual void handleError(wholenumber_t, RexxDirectory *)
Definition: ActivityDispatcher.cpp:62
RexxActivationBase::previous
RexxActivationBase * previous
Definition: ObjectClass.hpp:602
RexxNativeActivation::trapConditions
bool trapConditions
Definition: RexxNativeActivation.hpp:220
_RXSTRING::strlength
size_t strlength
Definition: rexx.h:157
Error_Incorrect_call_nostem
#define Error_Incorrect_call_nostem
Definition: RexxErrorCodes.h:363
RexxNativeActivation::signedIntegerValue
wholenumber_t signedIntegerValue(RexxObject *o, size_t position, wholenumber_t maxValue, wholenumber_t minValue)
Definition: RexxNativeActivation.cpp:1812
RexxActivation::findClass
RexxClass * findClass(RexxString *name)
Definition: RexxActivation.cpp:2762
RexxNativeActivation::unsignedInt64Value
uint64_t unsignedInt64Value(RexxObject *o, size_t position)
Definition: RexxNativeActivation.cpp:1877
RexxNativeActivation::disableVariablepool
void disableVariablepool()
Definition: RexxNativeActivation.cpp:2274
RexxNativeActivation::createStackFrame
StackFrameClass * createStackFrame()
Definition: RexxNativeActivation.cpp:3307
RexxArray::data
RexxObject ** data()
Definition: ArrayClass.hpp:202
FRAME_METHOD
#define FRAME_METHOD
Definition: StackFrameClass.hpp:51
Error_Invalid_argument_maxarg
#define Error_Invalid_argument_maxarg
Definition: RexxErrorCodes.h:426
RexxNativeActivation::vpavailable
bool vpavailable
Definition: RexxNativeActivation.hpp:216
RexxReturnCode
int RexxReturnCode
Definition: rexx.h:73
RexxNativeActivation::object_scope
int object_scope
Definition: RexxNativeActivation.hpp:217
RexxMethod::getScope
RexxClass * getScope()
Definition: MethodClass.hpp:143
RoutineClass
Definition: RoutineClass.hpp:49
_CONSTRXSTRING::strptr
const char * strptr
Definition: rexx.h:163
Numerics::getDefaultSettings
static NumericSettings * getDefaultSettings()
Definition: Numerics.hpp:114
Numerics::objectToSignedInteger
static bool objectToSignedInteger(RexxObject *o, ssize_t &result, ssize_t max, ssize_t min)
Definition: Numerics.cpp:269
IS_OPTIONAL_ARGUMENT
#define IS_OPTIONAL_ARGUMENT(t)
Definition: oorexxapi.h:3690
REXX_VALUE_size_t
#define REXX_VALUE_size_t
Definition: oorexxapi.h:89
ValueDescriptor::value_RexxMutableBufferObject
RexxMutableBufferObject value_RexxMutableBufferObject
Definition: oorexxapi.h:304
CallContext::threadContext
RexxCallContext threadContext
Definition: ActivationApiContexts.hpp:80
RexxActivation::setForm
void setForm(bool)
Definition: RexxActivation.cpp:1981
RexxNativeActivation::setContextVariable
void setContextVariable(const char *name, RexxObject *value)
Definition: RexxNativeActivation.cpp:2583
RexxNativeActivation::valueToObject
RexxObject * valueToObject(ValueDescriptor *value)
Definition: RexxNativeActivation.cpp:697
RexxNativeActivation.hpp
PointerClass.hpp
RexxActivity::buildMessage
RexxString * buildMessage(wholenumber_t, RexxArray *)
Definition: RexxActivity.cpp:1011
RexxNativeActivation::methodVariables
RexxVariableDictionary * methodVariables()
Definition: RexxNativeActivation.cpp:1758
SystemInterpreter::allocateResultMemory
static void * allocateResultMemory(size_t)
Definition: MemorySupport.cpp:63
RexxNativeActivation::run
void run(RexxMethod *_method, RexxNativeMethod *_code, RexxObject *_receiver, RexxString *_msgname, RexxObject **_arglist, size_t _argcount, ProtectedObject &resultObj)
Definition: RexxNativeActivation.cpp:1211
SCOPE_RESERVED
#define SCOPE_RESERVED
Definition: RexxActivation.hpp:153
TrappingDispatcher.hpp
RexxNativeActivation::nextStem
RexxVariable * nextStem()
Definition: RexxNativeActivation.hpp:123
MAX_NATIVE_ARGUMENTS
#define MAX_NATIVE_ARGUMENTS
Definition: RexxNativeActivation.hpp:60
RexxIdentityTable::put
virtual RexxObject * put(RexxObject *, RexxObject *)
Definition: IdentityTableClass.cpp:139
ValueDescriptor::value
union ValueDescriptor::@0 value
RexxString::getLength
size_t getLength()
Definition: StringClass.hpp:330
ValueDescriptor::value_stringsize_t
stringsize_t value_stringsize_t
Definition: oorexxapi.h:279
RexxObject::messageSend
void messageSend(RexxString *, RexxObject **, size_t, ProtectedObject &)
Definition: ObjectClass.cpp:759
_RXSTRING::strptr
char * strptr
Definition: rexx.h:158
RexxNativeActivation::int64Value
int64_t int64Value(RexxObject *o, size_t position)
Definition: RexxNativeActivation.cpp:1856
RexxVariableDictionary::getDirectVariableRetriever
static RexxVariableBase * getDirectVariableRetriever(RexxString *variable)
Definition: RexxVariableDictionary.cpp:637
RexxVariableDictionary::reserve
void reserve(RexxActivity *)
Definition: RexxVariableDictionary.cpp:343
ValueDescriptor
Definition: oorexxapi.h:261
RexxArray::size
size_t size()
Definition: ArrayClass.hpp:200
RexxObject::doubleValue
virtual bool doubleValue(double &result)
Definition: ObjectClass.cpp:999
RexxPointer
Definition: PointerClass.hpp:49
RexxObject::getObjectVariables
RexxVariableDictionary * getObjectVariables(RexxObject *)
Definition: ObjectClass.cpp:2170
RexxNativeActivation::form
bool form()
Definition: RexxNativeActivation.cpp:2033
RexxNativeActivation::receiver
RexxObject * receiver
Definition: RexxNativeActivation.hpp:199
RexxVariableDictionary
Definition: RexxVariableDictionary.hpp:55
RexxActivity::requestAccess
void requestAccess()
Definition: RexxActivity.cpp:1945
RexxVariable::getName
RexxString * getName()
Definition: RexxVariable.hpp:74
ActivationFrame.hpp
RexxActivity::releaseAccess
void releaseAccess()
Definition: RexxActivity.cpp:1931
RexxObject::getCSelf
void * getCSelf()
Definition: ObjectClass.cpp:2554
RexxDirectory::at
RexxObject * at(RexxString *)
Definition: DirectoryClass.cpp:567
RXSHV_SYSET
#define RXSHV_SYSET
Definition: rexxapidefs.h:100
RexxVariableBase
Definition: ExpressionBaseVariable.hpp:47
ValueDescriptor::value_POINTER
POINTER value_POINTER
Definition: oorexxapi.h:283
Numerics::int64ToObject
static RexxObject * int64ToObject(int64_t v)
Definition: Numerics.cpp:140
RexxNativeActivation::dropContextVariable
void dropContextVariable(const char *name)
Definition: RexxNativeActivation.cpp:2604
ActivityDispatcher::setContext
void setContext(RexxActivity *act, RexxNativeActivation *a)
Definition: ActivityDispatcher.hpp:60
REXX_VALUE_RexxArrayObject
#define REXX_VALUE_RexxArrayObject
Definition: oorexxapi.h:87
reportException
void reportException(wholenumber_t error)
Definition: ActivityManager.hpp:136
Message_Translations_compiled_routine_invocation
#define Message_Translations_compiled_routine_invocation
Definition: RexxErrorCodes.h:621
RexxActivation::getProgramArgument
RexxObject * getProgramArgument(size_t position)
Definition: RexxActivation.hpp:439
RexxNativeActivation::cstring
const char * cstring(RexxObject *)
Definition: RexxNativeActivation.cpp:1890
Numerics::MAX_STRINGSIZE
static const size_t MAX_STRINGSIZE
Definition: Numerics.hpp:72
Numerics::wholenumberToObject
static RexxObject * wholenumberToObject(wholenumber_t v)
Definition: Numerics.cpp:182
REXX_VALUE_float
#define REXX_VALUE_float
Definition: oorexxapi.h:72
ValueDescriptor::value_uint8_t
uint8_t value_uint8_t
Definition: oorexxapi.h:291
RexxActivationBase::executable
BaseExecutable * executable
Definition: ObjectClass.hpp:603
RexxInstruction.hpp
Numerics::MAX_WHOLENUMBER
static const wholenumber_t MAX_WHOLENUMBER
Definition: Numerics.hpp:62
RexxNativeActivation::isStackBase
virtual bool isStackBase()
Definition: RexxNativeActivation.cpp:2116
TheClassClass
#define TheClassClass
Definition: RexxCore.h:149
RexxNativeActivation::removeLocalReference
void removeLocalReference(RexxObject *objr)
Definition: RexxNativeActivation.cpp:1185
Numerics::objectToUnsignedInteger
static bool objectToUnsignedInteger(RexxObject *o, size_t &result, size_t max)
Definition: Numerics.cpp:361
RexxNativeCode::getSecurityManager
SecurityManager * getSecurityManager()
Definition: RexxNativeCode.cpp:164
RexxString::isEqual
bool isEqual(RexxObject *)
Definition: StringClass.cpp:482
TheTrueObject
#define TheTrueObject
Definition: RexxCore.h:185
MutableBufferClass.hpp
RexxString::getStringData
const char * getStringData()
Definition: StringClass.hpp:333
RexxNativeActivation::unsignedIntegerValue
stringsize_t unsignedIntegerValue(RexxObject *o, size_t position, stringsize_t maxValue)
Definition: RexxNativeActivation.cpp:1835
RexxString::getChar
char getChar(size_t p)
Definition: StringClass.hpp:338
RexxActivationBase
Definition: ObjectClass.hpp:574
TrappingDispatcher::run
virtual void run()
Definition: TrappingDispatcher.cpp:51
RexxActivity::reraiseException
void reraiseException(RexxDirectory *)
Definition: RexxActivity.cpp:1105
RexxClassObject
struct _RexxClassObject * RexxClassObject
Definition: rexx.h:136
RexxInternalObject::clearObject
void clearObject()
Definition: ObjectClass.hpp:231
SPECIAL_ARGUMENT
#define SPECIAL_ARGUMENT
Definition: oorexxapi.h:259
RexxBuffer
Definition: BufferClass.hpp:91
RXSHV_TRUNC
#define RXSHV_TRUNC
Definition: rexxapidefs.h:115
IntegerZero
#define IntegerZero
Definition: RexxCore.h:188
RexxNativeActivation::dispatch
RexxObject * dispatch()
Definition: RexxNativeActivation.cpp:1991
RexxNativeActivation::reportStemError
void reportStemError(size_t position, RexxObject *object)
Definition: RexxNativeActivation.cpp:192
TrappingDispatcher
Definition: TrappingDispatcher.hpp:47
RXSHV_MEMFL
#define RXSHV_MEMFL
Definition: rexxapidefs.h:117
RexxNativeActivation::setForm
void setForm(bool)
Definition: RexxNativeActivation.cpp:2075
ARGUMENT_TYPE
#define ARGUMENT_TYPE(t)
Definition: oorexxapi.h:3689
ValueDescriptor::value_int
int value_int
Definition: oorexxapi.h:277
REXX_VALUE_SCOPE
#define REXX_VALUE_SCOPE
Definition: oorexxapi.h:57
RexxNativeActivation::getSuper
RexxObject * getSuper()
Definition: RexxNativeActivation.cpp:2483
Numerics::objectToUintptr
static bool objectToUintptr(RexxObject *source, uintptr_t &result)
Definition: Numerics.cpp:526
new_identity_table
RexxIdentityTable * new_identity_table()
Definition: IdentityTableClass.hpp:74
Interpreter.hpp
RexxNativeActivation::getVpavailable
bool getVpavailable()
Definition: RexxNativeActivation.hpp:120
isOfClass
#define isOfClass(t, r)
Definition: RexxCore.h:211
Numerics::pointerToString
static RexxString * pointerToString(void *)
Definition: Numerics.cpp:888
REXX_VALUE_RexxClassObject
#define REXX_VALUE_RexxClassObject
Definition: oorexxapi.h:92
RexxNativeActivation::arglist
RexxObject ** arglist
Definition: RexxNativeActivation.hpp:202
Numerics::uint64ToObject
static RexxObject * uint64ToObject(uint64_t v)
Definition: Numerics.cpp:161
RexxActivation::getContextObject
RexxObject * getContextObject()
Definition: RexxActivation.cpp:2469
RexxActivation::form
bool form()
Definition: RexxActivation.cpp:1929
RexxNativeActivation::securityManager
SecurityManager * securityManager
Definition: RexxNativeActivation.hpp:208
RexxNativeActivation::callNativeRoutine
void callNativeRoutine(RoutineClass *routine, RexxNativeRoutine *code, RexxString *functionName, RexxObject **list, size_t count, ProtectedObject &result)
Definition: RexxNativeActivation.cpp:1303
REXX_VALUE_double
#define REXX_VALUE_double
Definition: oorexxapi.h:67
ValueDescriptor::value_RexxArrayObject
RexxArrayObject value_RexxArrayObject
Definition: oorexxapi.h:301
RexxNativeMethod::getEntry
PNATIVEMETHOD getEntry()
Definition: RexxNativeCode.hpp:86
ValueDescriptor::value_size_t
size_t value_size_t
Definition: oorexxapi.h:299
RexxActivationBase::getExecutable
BaseExecutable * getExecutable()
Definition: ObjectClass.hpp:598
ValueDescriptor::value_uint16_t
uint16_t value_uint16_t
Definition: oorexxapi.h:292
REXX_VALUE_int16_t
#define REXX_VALUE_int16_t
Definition: oorexxapi.h:74
RexxNativeActivation::trapErrors
bool trapErrors
Definition: RexxNativeActivation.hpp:219
PNATIVEROUTINE
uint16_t *(RexxEntry * PNATIVEROUTINE)(RexxCallContext *, ValueDescriptor *)
Definition: MethodClass.hpp:78
RexxStemVariable::sort
bool sort(RexxActivation *context, RexxString *prefix, int order, int type, size_t start, size_t end, size_t firstcol, size_t lastcol)
Definition: ExpressionStem.cpp:329
REXX_VALUE_CSTRING
#define REXX_VALUE_CSTRING
Definition: oorexxapi.h:68
RexxSource
Definition: SourceFile.hpp:131
RexxActivity::getCurrentRexxFrame
RexxActivation * getCurrentRexxFrame()
Definition: RexxActivity.hpp:280
RexxNativeActivation::getDoubleValue
double getDoubleValue(RexxObject *, size_t position)
Definition: RexxNativeActivation.cpp:1929
RexxMethodContext_
Definition: oorexxapi.h:1404
CallContext
Definition: ActivationApiContexts.hpp:78
ThePointerClass
#define ThePointerClass
Definition: RexxCore.h:168
RexxStem
Definition: StemClass.hpp:70
REXX_VALUE_int8_t
#define REXX_VALUE_int8_t
Definition: oorexxapi.h:73
RexxNativeActivation::setConditionInfo
void setConditionInfo(RexxDirectory *info)
Definition: RexxNativeActivation.hpp:132
RexxRoutineHandler
size_t REXXENTRY RexxRoutineHandler(CSTRING, size_t, PCONSTRXSTRING, CSTRING, PRXSTRING)
Definition: rexx.h:406
Numerics::objectToWholeNumber
static bool objectToWholeNumber(RexxObject *o, wholenumber_t &result, wholenumber_t max, wholenumber_t min)
Definition: Numerics.cpp:226
new_string
RexxString * new_string(const char *s, stringsize_t l)
Definition: StringClass.hpp:524
ValueDescriptor::value_intptr_t
intptr_t value_intptr_t
Definition: oorexxapi.h:296
MAKERXSTRING
#define MAKERXSTRING(r, p, l)
Definition: rexx.h:182
RexxNativeActivation::setNextVariable
void setNextVariable(size_t value)
Definition: RexxNativeActivation.hpp:138
SystemInterpreter.hpp
RexxActivation::fuzz
size_t fuzz()
Definition: RexxActivation.cpp:1921
OREF_NULL
#define OREF_NULL
Definition: RexxCore.h:60
RexxActivation::setFuzz
void setFuzz(size_t)
Definition: RexxActivation.cpp:1963
RexxNativeActivation::live
void live(size_t)
Definition: RexxNativeActivation.cpp:113
RexxVariableDictionary::nextVariable
RexxVariable * nextVariable(RexxNativeActivation *)
Definition: RexxVariableDictionary.cpp:297
RexxNativeActivation::msgname
RexxString * msgname
Definition: RexxNativeActivation.hpp:200
RexxNativeActivation::getContextStem
RexxObject * getContextStem(RexxString *name)
Definition: RexxNativeActivation.cpp:2523
Error_Invalid_argument_double
#define Error_Invalid_argument_double
Definition: RexxErrorCodes.h:425
ArrayClass.hpp
CallbackDispatcher::run
virtual void run()
Definition: CallbackDispatcher.cpp:51
RexxNativeActivation::fuzz
size_t fuzz()
Definition: RexxNativeActivation.cpp:2017
Error_Incorrect_call_external
#define Error_Incorrect_call_external
Definition: RexxErrorCodes.h:327
RexxActivity
Definition: RexxActivity.hpp:127
Error_Invalid_argument_noclass
#define Error_Invalid_argument_noclass
Definition: RexxErrorCodes.h:418
_RXSTRING
Definition: rexx.h:156
RexxArray::put
void put(RexxObject *eref, size_t pos)
Definition: ArrayClass.cpp:203
RexxNativeActivation::activation
RexxActivation * activation
Definition: RexxNativeActivation.hpp:201
ExpressionBaseVariable.hpp
RexxInternalObject::getRealValue
virtual RexxObject * getRealValue(RexxActivation *)
Definition: ObjectClass.hpp:272
RexxNativeActivation::cself
void * cself()
Definition: RexxNativeActivation.cpp:1956
RXSHV_LVAR
#define RXSHV_LVAR
Definition: rexxapidefs.h:114
RexxNativeActivation::stackBase
bool stackBase
Definition: RexxNativeActivation.hpp:218
RexxDirectory
Definition: DirectoryClass.hpp:49
arrayArgument
RexxArray * arrayArgument(RexxObject *object, size_t position)
Definition: RexxCore.h:376
RexxNativeActivation::CALLBACK_ACTIVATION
Definition: RexxNativeActivation.hpp:193
MethodContext
Definition: ActivationApiContexts.hpp:72
RexxNativeActivation::findCallerClass
RexxClass * findCallerClass(RexxString *className)
Definition: RexxNativeActivation.cpp:2742
RexxNativeActivation::variablePoolDropVariable
void variablePoolDropVariable(PSHVBLOCK pshvblock)
Definition: RexxNativeActivation.cpp:2957
Numerics::DEFAULT_FORM
static const bool DEFAULT_FORM
Definition: Numerics.hpp:81
RexxClass
Definition: ClassClass.hpp:49
_SHVBLOCK::shvname
CONSTRXSTRING shvname
Definition: rexx.h:206
RexxActivation::setDigits
void setDigits(size_t)
Definition: RexxActivation.cpp:1945
RexxActivity::raiseCondition
bool raiseCondition(RexxString *, RexxObject *, RexxString *, RexxObject *, RexxObject *)
Definition: RexxActivity.cpp:434
ProtectedObject.hpp
RexxNativeActivation::getReceiver
virtual RexxObject * getReceiver()
Definition: RexxNativeActivation.cpp:2201
Error_Incorrect_method_signature
#define Error_Incorrect_method_signature
Definition: RexxErrorCodes.h:514
RexxNativeActivation::argcount
size_t argcount
Definition: RexxNativeActivation.hpp:215
ValueDescriptor::value_RexxStemObject
RexxStemObject value_RexxStemObject
Definition: oorexxapi.h:302
RexxNativeActivation::findRexxContext
virtual RexxActivation * findRexxContext()
Definition: RexxNativeActivation.cpp:2177
_SHVBLOCK::shvnamelen
size_t shvnamelen
Definition: rexx.h:208
RexxNativeActivation::nextcurrent
RexxVariableDictionary * nextcurrent
Definition: RexxNativeActivation.hpp:212
ProtectedObject
Definition: ProtectedObject.hpp:46
MessageClass.hpp
StringClass.hpp
ValueDescriptor::value_RexxStringObject
RexxStringObject value_RexxStringObject
Definition: oorexxapi.h:284
_CONSTRXSTRING::strlength
size_t strlength
Definition: rexx.h:162
ValueDescriptor::value_int32_t
int32_t value_int32_t
Definition: oorexxapi.h:288
RexxNativeActivation::compoundelement
RexxCompoundElement * compoundelement
Definition: RexxNativeActivation.hpp:213
RexxNativeActivation::argArray
RexxArray * argArray
Definition: RexxNativeActivation.hpp:203
StackFrameClass.hpp
ARGUMENT_EXISTS
#define ARGUMENT_EXISTS
Definition: oorexxapi.h:257
REXX_VALUE_uint16_t
#define REXX_VALUE_uint16_t
Definition: oorexxapi.h:79
RXSHV_NEXTV
#define RXSHV_NEXTV
Definition: rexxapidefs.h:103
RexxNativeActivation::createLocalReference
void createLocalReference(RexxObject *objr)
Definition: RexxNativeActivation.cpp:1162
_SHVBLOCK::shvvalue
RXSTRING shvvalue
Definition: rexx.h:207
RexxNativeActivation::resolveStemVariable
RexxStem * resolveStemVariable(RexxObject *s)
Definition: RexxNativeActivation.cpp:2508
RexxNativeActivation::code
RexxNativeCode * code
Definition: RexxNativeActivation.hpp:198
CallbackDispatcher::setContext
void setContext(RexxActivity *act, RexxNativeActivation *a)
Definition: CallbackDispatcher.hpp:57
RexxActivity::popStackFrame
void popStackFrame(bool reply)
Definition: RexxActivity.cpp:1508
Numerics::stringsizeToObject
static RexxObject * stringsizeToObject(stringsize_t v)
Definition: Numerics.cpp:203
RexxMutableBufferObject
struct _RexxMutableBufferObject * RexxMutableBufferObject
Definition: rexx.h:140
RXSHV_SYFET
#define RXSHV_SYFET
Definition: rexxapidefs.h:101
_SHVBLOCK
Definition: rexx.h:204
RexxNativeActivation::RexxNativeActivation
RexxNativeActivation()
Definition: RexxNativeActivation.cpp:80
RexxNativeActivation::conditionObj
RexxDirectory * conditionObj
Definition: RexxNativeActivation.hpp:207
RexxNativeActivation::getScope
RexxObject * getScope()
Definition: RexxNativeActivation.cpp:2493
REXX_VALUE_SUPER
#define REXX_VALUE_SUPER
Definition: oorexxapi.h:60
REXX_VALUE_ARGLIST
#define REXX_VALUE_ARGLIST
Definition: oorexxapi.h:55
RexxNativeCode.hpp
RexxVariable::isStem
bool isStem()
Definition: RexxVariable.hpp:91
REXX_VALUE_int32_t
#define REXX_VALUE_int32_t
Definition: oorexxapi.h:75
Interpreter::getVersionNumber
static RexxString * getVersionNumber()
Definition: Version.cpp:52
RexxNativeActivation::activationType
ActivationType activationType
Definition: RexxNativeActivation.hpp:206
Numerics::DEFAULT_DIGITS
static const size_t DEFAULT_DIGITS
Definition: Numerics.hpp:66
RexxNativeActivation::setDigits
void setDigits(size_t)
Definition: RexxNativeActivation.cpp:2049
RexxNativeActivation::fetchNext
bool fetchNext(RexxString **name, RexxObject **value)
Definition: RexxNativeActivation.cpp:2295
RexxNativeActivation::processArguments
void processArguments(size_t argcount, RexxObject **arglist, uint16_t *argumentTypes, ValueDescriptor *descriptors, size_t maximumArgumentCount)
Definition: RexxNativeActivation.cpp:219
RexxIdentityTable::remove
virtual RexxObject * remove(RexxObject *key)
Definition: IdentityTableClass.cpp:95
RexxNativeActivation::isInteger
bool isInteger(RexxObject *)
Definition: RexxNativeActivation.cpp:1792
Error_Invalid_argument_pointer
#define Error_Invalid_argument_pointer
Definition: RexxErrorCodes.h:423
RexxString::extract
RexxString * extract(size_t offset, size_t sublength)
Definition: StringClass.hpp:229
RexxNativeActivation::pointer
void * pointer(RexxObject *)
Definition: RexxNativeActivation.cpp:1976
RexxNativeActivation::setCompoundElement
void setCompoundElement(RexxCompoundElement *element)
Definition: RexxNativeActivation.hpp:141
_SHVBLOCK::shvcode
unsigned char shvcode
Definition: rexx.h:210
Message_Translations_compiled_method_invocation
#define Message_Translations_compiled_method_invocation
Definition: RexxErrorCodes.h:620
memory_mark
#define memory_mark(oref)
Definition: RexxMemory.hpp:436
RexxCode.hpp
_SHVBLOCK::shvret
unsigned char shvret
Definition: rexx.h:211
NativeActivationFrame
Definition: ActivationFrame.hpp:95
REXX_VALUE_POINTER
#define REXX_VALUE_POINTER
Definition: oorexxapi.h:69
RexxNativeActivation::accessCallerContext
void accessCallerContext()
Definition: RexxNativeActivation.cpp:1703
RexxNativeActivation::getArguments
RexxArray * getArguments()
Definition: RexxNativeActivation.cpp:2447
RexxMethodContext_::arguments
ValueDescriptor * arguments
Definition: oorexxapi.h:1408
RexxNativeActivation::liveGeneral
void liveGeneral(int reason)
Definition: RexxNativeActivation.cpp:144
REXX_VALUE_OSELF
#define REXX_VALUE_OSELF
Definition: oorexxapi.h:59
REXX_VALUE_NAME
#define REXX_VALUE_NAME
Definition: oorexxapi.h:56
_SHVBLOCK::shvnext
struct _SHVBLOCK * shvnext
Definition: rexx.h:205
REXX_VALUE_RexxMutableBufferObject
#define REXX_VALUE_RexxMutableBufferObject
Definition: oorexxapi.h:93
SCOPE_RELEASED
#define SCOPE_RELEASED
Definition: RexxActivation.hpp:154
RexxActivation::getProgramArgumentCount
size_t getProgramArgumentCount()
Definition: RexxActivation.hpp:437
SecurityManager
Definition: SecurityManager.hpp:52
RexxNativeActivation::variablePoolGetVariable
RexxVariableBase * variablePoolGetVariable(PSHVBLOCK pshvblock, bool symbolic)
Definition: RexxNativeActivation.cpp:2844
RexxObject::logicalValue
virtual bool logicalValue(logical_t &)
Definition: ObjectClass.cpp:451
RexxNativeActivation::isDouble
bool isDouble(RexxObject *)
Definition: RexxNativeActivation.cpp:1945
RexxBuffer::getData
virtual char * getData()
Definition: BufferClass.hpp:105
REXX_VALUE_uint32_t
#define REXX_VALUE_uint32_t
Definition: oorexxapi.h:80
BaseExecutable
Definition: MethodClass.hpp:82
RexxActivation
Definition: RexxActivation.hpp:156
RexxActivity::getInstanceSecurityManager
SecurityManager * getInstanceSecurityManager()
Definition: RexxActivity.cpp:2803
RexxInternalObject::setHasNoReferences
void setHasNoReferences()
Definition: ObjectClass.hpp:240
RexxString::strCompare
bool strCompare(const char *s)
Definition: StringClass.hpp:346
RexxString::toRxstring
void toRxstring(CONSTRXSTRING &r)
Definition: StringClass.hpp:351
RexxNativeActivation::getRexxContextExecutable
BaseExecutable * getRexxContextExecutable()
Definition: RexxNativeActivation.cpp:2141
RexxNativeActivation::callRegisteredRoutine
void callRegisteredRoutine(RoutineClass *routine, RegisteredRoutine *code, RexxString *functionName, RexxObject **list, size_t count, ProtectedObject &resultObj)
Definition: RexxNativeActivation.cpp:1390
RexxNativeActivation::findClass
RexxClass * findClass(RexxString *className)
Definition: RexxNativeActivation.cpp:2712
RexxString::concatWithCstring
RexxString * concatWithCstring(const char *)
Definition: StringClass.cpp:1271
wholenumber_t
ssize_t wholenumber_t
Definition: rexx.h:229
CallbackDispatcher::handleError
virtual void handleError(wholenumber_t, RexxDirectory *)
Definition: CallbackDispatcher.cpp:63
RexxActivationBase::trap
virtual bool trap(RexxString *, RexxDirectory *)
Definition: ObjectClass.hpp:588
RexxNativeActivation::variablePoolFetchPrivate
void variablePoolFetchPrivate(PSHVBLOCK pshvblock)
Definition: RexxNativeActivation.cpp:3013
RXSHV_NOAVL
#define RXSHV_NOAVL
Definition: rexxapidefs.h:108
Interpreter::getCurrentQueue
static RexxString * getCurrentQueue()
Definition: Interpreter.cpp:540
REXX_ARGUMENT_TERMINATOR
#define REXX_ARGUMENT_TERMINATOR
Definition: oorexxapi.h:54
RexxNativeMethod
Definition: RexxNativeCode.hpp:72
RexxNativeActivation::getNumericSettings
virtual NumericSettings * getNumericSettings()
Definition: RexxNativeActivation.cpp:2097
ValueDescriptor::value_int8_t
int8_t value_int8_t
Definition: oorexxapi.h:286
new_buffer
RexxBuffer * new_buffer(size_t s)
Definition: BufferClass.hpp:116
RexxActivation::sourceString
RexxString * sourceString()
Definition: RexxActivation.cpp:3983
RexxInternalObject::getValue
virtual RexxObject * getValue(RexxActivation *)
Definition: ObjectClass.hpp:270
stringsize_t
size_t stringsize_t
Definition: rexx.h:228
RexxActivation::digits
size_t digits()
Definition: RexxActivation.cpp:1913
TrappingDispatcher::setContext
void setContext(RexxActivity *act, RexxNativeActivation *a)
Definition: TrappingDispatcher.hpp:57
REXX_VALUE_ssize_t
#define REXX_VALUE_ssize_t
Definition: oorexxapi.h:90
isStem
bool isStem(RexxObject *o)
Definition: RexxCore.h:267
RexxNativeActivation::getMessageName
RexxString * getMessageName()
Definition: RexxNativeActivation.hpp:121
RexxNativeActivation::pointerString
void * pointerString(RexxObject *object, size_t position)
Definition: RexxNativeActivation.cpp:1914
RexxNativeActivation::forwardMessage
void forwardMessage(RexxObject *to, RexxString *msg, RexxClass *super, RexxArray *args, ProtectedObject &result)
Definition: RexxNativeActivation.cpp:3274
RexxString::numberValue
bool numberValue(wholenumber_t &result, size_t precision)
Definition: StringClass.cpp:244
REXX_VALUE_RexxStemObject
#define REXX_VALUE_RexxStemObject
Definition: oorexxapi.h:88
RexxActivity::restoreActivationLevel
void restoreActivationLevel(size_t l)
Definition: RexxActivity.hpp:260
RexxNativeActivation::trap
bool trap(RexxString *, RexxDirectory *)
Definition: RexxNativeActivation.cpp:2383
Numerics::DEFAULT_FUZZ
static const size_t DEFAULT_FUZZ
Definition: Numerics.hpp:79
RexxNativeActivation
Definition: RexxNativeActivation.hpp:62
RexxNativeActivation::setNextCurrent
void setNextCurrent(RexxVariableDictionary *vdict)
Definition: RexxNativeActivation.hpp:139
ActivityException
ActivityException
Definition: RexxActivity.hpp:108
DEFRXSTRING
#define DEFRXSTRING
Definition: PlatformDefinitions.h:172
ValueDescriptor::flags
uint16_t flags
Definition: oorexxapi.h:339
RexxActivation::getNumericSettings
virtual NumericSettings * getNumericSettings()
Definition: RexxActivation.cpp:2030
TheNilObject
#define TheNilObject
Definition: RexxCore.h:180
ActivityManager::currentActivity
static RexxActivity *volatile currentActivity
Definition: ActivityManager.hpp:95
REXX_VALUE_wholenumber_t
#define REXX_VALUE_wholenumber_t
Definition: oorexxapi.h:66
REXX_VALUE_RexxObjectPtr
#define REXX_VALUE_RexxObjectPtr
Definition: oorexxapi.h:64
isString
bool isString(RexxObject *o)
Definition: RexxCore.h:264
RexxNativeActivation::variablePoolRequest
void variablePoolRequest(PSHVBLOCK pshvblock)
Definition: RexxNativeActivation.cpp:3091
Numerics::objectToUnsignedInt64
static bool objectToUnsignedInt64(RexxObject *o, uint64_t &result)
Definition: Numerics.cpp:483
Error_Logical_value_method
#define Error_Logical_value_method
Definition: RexxErrorCodes.h:273
RexxNativeActivation::activity
RexxActivity * activity
Definition: RexxNativeActivation.hpp:197
FRAME_ROUTINE
#define FRAME_ROUTINE
Definition: StackFrameClass.hpp:50
RexxSource::getSecurityManager
SecurityManager * getSecurityManager()
Definition: SourceFile.hpp:367
RexxNativeActivation::variablePoolInterface
RexxReturnCode variablePoolInterface(PSHVBLOCK requests)
Definition: RexxNativeActivation.cpp:2803
RexxNativeActivation::raiseCondition
void raiseCondition(RexxString *condition, RexxString *description, RexxObject *additional, RexxObject *result)
Definition: RexxNativeActivation.cpp:2430
new_pointer
RexxPointer * new_pointer(void *p)
Definition: PointerClass.hpp:81
RexxNativeActivation::resetNext
void resetNext()
Definition: RexxNativeActivation.cpp:2283
RexxActivationBase::getExecutableObject
RexxObject * getExecutableObject()
Definition: ObjectClass.hpp:599
stringArgument
RexxString * stringArgument(RexxObject *object, size_t position)
Definition: RexxCore.h:296
RXSHV_DROPV
#define RXSHV_DROPV
Definition: rexxapidefs.h:99
CHAR_SYNTAX
char CHAR_SYNTAX[]
REXX_VALUE_POINTERSTRING
#define REXX_VALUE_POINTERSTRING
Definition: oorexxapi.h:91
RexxNativeActivation::copyValue
RexxReturnCode copyValue(RexxObject *value, RXSTRING *rxstring, size_t *length)
Definition: RexxNativeActivation.cpp:3169
RexxNativeActivation::reportSignatureError
void reportSignatureError()
Definition: RexxNativeActivation.cpp:176
RexxNativeActivation::objectToValue
bool objectToValue(RexxObject *o, ValueDescriptor *value)
Definition: RexxNativeActivation.cpp:849
RexxCallContext_::arguments
ValueDescriptor * arguments
Definition: oorexxapi.h:2158
RexxActivationBase::getPreviousStackFrame
RexxActivationBase * getPreviousStackFrame()
Definition: ObjectClass.hpp:597
RexxNativeActivation::digits
size_t digits()
Definition: RexxNativeActivation.cpp:2001
RegisteredRoutine::getEntry
RexxRoutineHandler * getEntry()
Definition: RexxNativeCode.hpp:147
RexxNativeActivation::dropObjectVariable
void dropObjectVariable(const char *name)
Definition: RexxNativeActivation.cpp:2686
RXSHV_FETCH
#define RXSHV_FETCH
Definition: rexxapidefs.h:98
RexxActivationBase::findRexxContext
virtual RexxActivation * findRexxContext()
Definition: ObjectClass.hpp:584
CallbackDispatcher.hpp
RexxStemObject
struct _RexxStemObject * RexxStemObject
Definition: rexx.h:139
RexxCallContext_
Definition: oorexxapi.h:2154
RexxCore.h
RexxNativeActivation::getArgument
RexxObject * getArgument(size_t index)
Definition: RexxNativeActivation.cpp:2469
T_NativeActivation
Definition: ClassTypeCodes.h:188
Error_Invalid_argument_noarg
#define Error_Invalid_argument_noarg
Definition: RexxErrorCodes.h:405
ValueDescriptor::value_float
float value_float
Definition: oorexxapi.h:285
RexxNativeRoutine::getEntry
PNATIVEROUTINE getEntry()
Definition: RexxNativeCode.hpp:121
RexxNativeActivation::getAllContextVariables
RexxDirectory * getAllContextVariables()
Definition: RexxNativeActivation.cpp:2620
DirectoryClass.hpp
TheMutableBufferClass
#define TheMutableBufferClass
Definition: RexxCore.h:163
RexxNativeActivation::getSecurityManager
virtual SecurityManager * getSecurityManager()
Definition: RexxNativeActivation.cpp:2212
RexxObject::superScope
RexxObject * superScope(RexxObject *)
Definition: ObjectClass.cpp:2151
Numerics::MIN_WHOLENUMBER
static const wholenumber_t MIN_WHOLENUMBER
Definition: Numerics.hpp:63
RexxMethod
Definition: MethodClass.hpp:101
ValueDescriptor::value_double
double value_double
Definition: oorexxapi.h:281
RexxVariableDictionary::getVariableRetriever
static RexxVariableBase * getVariableRetriever(RexxString *variable)
Definition: RexxVariableDictionary.cpp:587
ValueDescriptor::type
uint16_t type
Definition: oorexxapi.h:338
RexxNativeActivation::getContextVariable
RexxObject * getContextVariable(const char *name)
Definition: RexxNativeActivation.cpp:2554
new_object
RexxObject * new_object(size_t s)
Definition: RexxMemory.hpp:422
ValueDescriptor::value_POINTERSTRING
POINTER value_POINTERSTRING
Definition: oorexxapi.h:303
REXX_VALUE_RexxStringObject
#define REXX_VALUE_RexxStringObject
Definition: oorexxapi.h:70
RexxObject::stringValue
RexxString * stringValue()
Definition: ObjectClass.cpp:1036
RexxNativeActivation::DISPATCHER_ACTIVATION
Definition: RexxNativeActivation.hpp:192
RexxStringObject
struct _RexxStringObject * RexxStringObject
Definition: rexx.h:128
Error_Invalid_argument_range
#define Error_Invalid_argument_range
Definition: RexxErrorCodes.h:411
RexxNativeActivation::result
RexxObject * result
Definition: RexxNativeActivation.hpp:205
RXSHV_PRIV
#define RXSHV_PRIV
Definition: rexxapidefs.h:104
RexxActivity::createMethodContext
void createMethodContext(MethodContext &context, RexxNativeActivation *owner)
Definition: RexxActivity.cpp:3138
ActivityDispatcher.hpp
RexxInteger
Definition: IntegerClass.hpp:56
RexxNativeActivation::setFuzz
void setFuzz(size_t)
Definition: RexxNativeActivation.cpp:2062
RexxString::upper
RexxString * upper()
Definition: StringClass.cpp:1442
RexxStemVariable
Definition: ExpressionStem.hpp:49
RexxStem::nextVariable
RexxCompoundElement * nextVariable(RexxNativeActivation *activation)
Definition: StemClass.cpp:611
RexxNativeActivation::nextstem
RexxVariable * nextstem
Definition: RexxNativeActivation.hpp:214
Numerics::objectToIntptr
static bool objectToIntptr(RexxObject *source, intptr_t &result)
Definition: Numerics.cpp:549
ValueDescriptor::value_CSTRING
CSTRING value_CSTRING
Definition: oorexxapi.h:282
RXSHV_SET
#define RXSHV_SET
Definition: rexxapidefs.h:97
REXX_VALUE_intptr_t
#define REXX_VALUE_intptr_t
Definition: oorexxapi.h:83
RexxObject::requestString
RexxString * requestString()
Definition: ObjectClass.cpp:1124
RexxNativeActivation::getObjectVariable
RexxObject * getObjectVariable(const char *name)
Definition: RexxNativeActivation.cpp:2639
RexxVariableDictionary.hpp
Error_Incorrect_method_nostem
#define Error_Incorrect_method_nostem
Definition: RexxErrorCodes.h:515
RexxVariable::getVariableValue
RexxObject * getVariableValue()
Definition: RexxVariable.hpp:72
RexxNativeActivation::TRAPPING_ACTIVATION
Definition: RexxNativeActivation.hpp:194
BufferClass.hpp
_CONSTRXSTRING
Definition: rexx.h:161
SourceFile.hpp
REXX_VALUE_int64_t
#define REXX_VALUE_int64_t
Definition: oorexxapi.h:76
RexxObject
Definition: ObjectClass.hpp:311
REXX_VALUE_uintptr_t
#define REXX_VALUE_uintptr_t
Definition: oorexxapi.h:84
RexxActivity::getActivationLevel
size_t getActivationLevel()
Definition: RexxActivity.hpp:259
RexxNativeActivation::valuesToObject
RexxArray * valuesToObject(ValueDescriptor *value, size_t count)
Definition: RexxNativeActivation.cpp:676
ValueDescriptor::value_uint64_t
uint64_t value_uint64_t
Definition: oorexxapi.h:294
RexxString
Definition: StringClass.hpp:119
RexxObjectPtr
struct _RexxObjectPtr * RexxObjectPtr
Definition: rexx.h:127
RexxNativeActivation::setObjectVariable
void setObjectVariable(const char *name, RexxObject *value)
Definition: RexxNativeActivation.cpp:2663
RexxNativeActivation::getRexxContext
virtual RexxActivation * getRexxContext()
Definition: RexxNativeActivation.cpp:2128
RexxVariable
Definition: RexxVariable.hpp:49
RexxNativeActivation::nextvariable
size_t nextvariable
Definition: RexxNativeActivation.hpp:211
isOfClassType
#define isOfClassType(t, r)
Definition: RexxCore.h:212
RexxNativeRoutine
Definition: RexxNativeCode.hpp:107