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)  

MethodClass.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 */
40 /* */
41 /* Primitive Method Class */
42 /* */
43 /******************************************************************************/
44 #include <stdlib.h>
45 #include <stdio.h>
46 #include <string.h>
47 #include "RexxCore.h"
48 #include "StringClass.hpp"
49 #include "ArrayClass.hpp"
50 #include "RexxCode.hpp"
51 #include "RexxNativeCode.hpp"
52 #include "RexxActivity.hpp"
53 #include "RexxActivation.hpp"
54 #include "RexxNativeActivation.hpp"
55 #include "MethodClass.hpp"
56 #include "SourceFile.hpp"
57 #include "DirectoryClass.hpp"
58 #include "ProtectedObject.hpp"
59 #include "BufferClass.hpp"
60 #include "RexxInternalApis.h"
61 #include "RoutineClass.hpp"
62 #include "PackageClass.hpp"
63 #include "Interpreter.hpp"
64 #include "RexxCode.hpp"
65 #include "PackageManager.hpp"
66 
67 // singleton class instance
69 
70 
75 {
76  CLASS_CREATE(Method, "Method", RexxClass);
77 }
78 
79 
88 {
89  return code->findClass(className);
90 }
91 
92 
107 {
108  // set this into a source object context. If we get a
109  // new object returned, we need to make a copy of the base
110  // executable object also
111  BaseCode *setCode = code->setSourceObject(s);
112  // we're cool if these are equal
113  if (setCode == code)
114  {
115  return this;
116  }
117  // make a copy of this executable, and set the new code into it.
118  BaseExecutable *newBase = (BaseExecutable *)this->copy();
119  OrefSet(newBase, newBase->code, setCode);
120  return newBase;
121 }
122 
123 
131 {
132  PackageClass *package = code->getPackage();
133  if (package == OREF_NULL)
134  {
135  return (PackageClass *)TheNilObject;
136  }
137  return package;
138 }
139 
140 
147 {
148  return code->getSource();
149 }
150 
151 
152 
159 {
160  // we need to protect this object until the constructor completes.
161  // the code generation step will create lots of new objects, giving a
162  // pretty high probability that it will be collected.
163  ProtectedObject p(this);
164  ProtectedObject p2(_source);
165  OrefSet(this, this->executableName, name);
166  // generate our code object and make the file hook up.
167  RexxCode *codeObj = _source->generateCode(true);
168  OrefSet(this, this->code, codeObj);
169 }
170 
171 
180 {
181  OrefSet(this, this->executableName, name);
182  OrefSet(this, this->code, codeObj); /* store the code */
183 }
184 
185 
192 {
193  // we need to protect this object until the constructor completes.
194  // the code generation step will create lots of new objects, giving a
195  // pretty high probability that it will be collected.
196  ProtectedObject p(this);
197  OrefSet(this, this->executableName, name);
198  // get a source object to generat this from
199  RexxSource *_source = new RexxSource(name);
200  ProtectedObject p2(_source);
201  // generate our code object and make the file hook up.
202  RexxCode *codeObj = _source->generateCode(true);
203  OrefSet(this, this->code, codeObj);
204 }
205 
206 
214 {
215  // we need to protect this object until the constructor completes.
216  // the code generation step will create lots of new objects, giving a
217  // pretty high probability that it will be collected.
218  ProtectedObject p(this);
219  OrefSet(this, this->executableName, name);
220  // get a source object to generat this from
221  RexxSource *_source = new RexxSource(name, buf);
222  ProtectedObject p2(_source);
223  // generate our code object and make the file hook up.
224  RexxCode *codeObj = _source->generateCode(true);
225  OrefSet(this, this->code, codeObj);
226 }
227 
228 
236 RexxMethod::RexxMethod(RexxString *name, const char *data, size_t length)
237 {
238  // we need to protect this object until the constructor completes.
239  // the code generation step will create lots of new objects, giving a
240  // pretty high probability that it will be collected.
241  ProtectedObject p(this);
242  OrefSet(this, this->executableName, name);
243  // get a source object to generat this from
244  RexxSource *_source = new RexxSource(name, data, length);
245  ProtectedObject p2(_source);
246  // generate our code object and make the file hook up.
247  RexxCode *codeObj = _source->generateCode(true);
248  OrefSet(this, this->code, codeObj);
249 }
250 
251 
259 {
260  // we need to protect this object until the constructor completes.
261  // the code generation step will create lots of new objects, giving a
262  // pretty high probability that it will be collected.
263  ProtectedObject p(this);
264  OrefSet(this, this->executableName, name);
265  // get a source object to generat this from
266  RexxSource *_source = new RexxSource(name, s);
267  ProtectedObject p2(_source);
268  // generate our code object and make the file hook up.
269  RexxCode *codeObj = _source->generateCode(true);
270  OrefSet(this, this->code, codeObj);
271 }
272 
273 void RexxMethod::live(size_t liveMark)
274 /******************************************************************************/
275 /* Function: Normal garbage collection live marking */
276 /******************************************************************************/
277 {
278  memory_mark(this->scope);
279  memory_mark(this->code);
281  memory_mark(this->objectVariables);
282 }
283 
284 void RexxMethod::liveGeneral(int reason)
285 /******************************************************************************/
286 /* Function: Generalized object marking */
287 /******************************************************************************/
288 {
289  memory_mark_general(this->scope);
290  memory_mark_general(this->code);
292  memory_mark_general(this->objectVariables);
293 }
294 
296 /******************************************************************************/
297 /* Function: Flatten an object */
298 /******************************************************************************/
299 {
301 
302  flatten_reference(newThis->scope, envelope);
303  flatten_reference(newThis->code, envelope);
304  flatten_reference(newThis->executableName, envelope);
305  flatten_reference(newThis->objectVariables, envelope);
306 
308 }
309 
310 
312  RexxActivity *activity, /* activity running under */
313  RexxObject *receiver, /* object receiving the message */
314  RexxString *msgname, /* message to be run */
315  RexxObject **argPtr, /* arguments to the method */
316  size_t count, /* count of arguments */
317  ProtectedObject &result) // the returned result
318 /******************************************************************************/
319 /* Function: Run a method on an object */
320 /******************************************************************************/
321 {
322  ProtectedObject p(this); // belt-and-braces to make sure this is protected
323  // just forward this to the code object
324  code->run(activity, this, receiver, msgname, argPtr, count, result);
325 }
326 
327 
329  RexxClass *_scope) /* new method scope */
330 /******************************************************************************/
331 /* Function: Create a new method with a given scope */
332 /******************************************************************************/
333 {
334  // if this doesn't have a scope yet, we can just override what's here
335  if (this->scope == OREF_NULL)
336  {
337  OrefSet(this, this->scope, _scope); /* just set it directly */
338  return this; /* and pass back unchanged */
339  }
340  else
341  {
342  /* copy the method */
343  RexxMethod *newMethod= (RexxMethod *)this->copy();
344  /* give the method the new scope */
345  OrefSet(newMethod, newMethod->scope, _scope);
346  return newMethod; /* and return it */
347  }
348 }
349 
350 
352  RexxObject *manager) /* supplied security manager */
353 /******************************************************************************/
354 /* Function: Associate a security manager with a method's source */
355 /******************************************************************************/
356 {
357  return code->setSecurityManager(manager);
358 }
359 
361  RexxClass *_scope) /* scope for the method */
362 /******************************************************************************/
363 /* Function: Set a scope for a method without making a copy of the method */
364 /* object. */
365 /******************************************************************************/
366 {
367  OrefSet(this, this->scope, _scope); /* just set the scope */
368 }
369 
371 /******************************************************************************/
372 /* Function: Flag a method as being an unguarded method */
373 /******************************************************************************/
374 {
375  this->setUnguarded(); /* turn on the UNGUARDED state */
376  return OREF_NULL; /* return nothing */
377 }
378 
380 /******************************************************************************/
381 /* Function: Flag a method as being a guarded method (the default) */
382 /******************************************************************************/
383 {
384  this->setGuarded(); /* flip back to the GUARDED state */
385  return OREF_NULL; /* return nothing */
386 }
387 
389 /******************************************************************************/
390 /* Function: Flag a method as being a private method */
391 /******************************************************************************/
392 {
393  this->setPrivate(); /* turn on the PRIVATE flag */
394  return OREF_NULL; /* always return nothing */
395 }
396 
398 /******************************************************************************/
399 /* Function: Flag a method as being a private method */
400 /******************************************************************************/
401 {
402  this->setProtected(); /* turn on the PROTECTED flag */
403  return OREF_NULL; /* always return nothing */
404 }
405 
412 {
413  return isGuarded() ? TheTrueObject : TheFalseObject;
414 }
415 
422 {
423  return isPrivate() ? TheTrueObject : TheFalseObject;
424 }
425 
432 {
433  return isProtected() ? TheTrueObject : TheFalseObject;
434 }
435 
436 
445 void RexxMethod::setAttributes(bool _private, bool _protected, bool _guarded)
446 {
447  if (_private)
448  {
449  setPrivate();
450  }
451  if (_protected)
452  {
453  setProtected();
454  }
455  // guarded is the default, so we need to reverse this
456  if (!_guarded)
457  {
458  setUnguarded();
459  }
460 }
461 
462 
464 /******************************************************************************/
465 /* Function: Flatten translated method into a buffer for storage into EA's etc*/
466 /******************************************************************************/
467 {
468  RexxEnvelope *envelope; /* envelope for flattening */
469  /* Get new envelope object */
470  envelope = new RexxEnvelope;
471  ProtectedObject p(envelope);
472  /* now pack up the envelope for */
473  /* saving. */
474  envelope->pack(this);
475  return envelope->getBuffer(); /* return the buffer */
476 }
477 
478 void *RexxMethod::operator new (size_t size)
479 /******************************************************************************/
480 /* Function: create a new method instance */
481 /******************************************************************************/
482 {
483  /* get a new method object */
484  RexxObject *newObj = new_object(size, T_Method);
485  return newObj; /* Initialize this new method */
486 }
487 
488 
504 {
505  // request this as an array. If not convertable, then we'll use it as a string
506  RexxArray *newSourceArray = source->requestArray();
507  /* couldn't convert? */
508  if (newSourceArray == (RexxArray *)TheNilObject)
509  {
510  /* get the string representation */
511  RexxString *sourceString = source->makeString();
512  /* got back .nil? */
513  if (sourceString == (RexxString *)TheNilObject)
514  {
515  /* raise an error */
517  }
518  /* wrap an array around the value */
519  newSourceArray = new_array(sourceString);
520  }
521  else /* have an array, make sure all */
522  {
523  /* is it single dimensional? */
524  if (newSourceArray->getDimension() != 1)
525  {
526  /* raise an error */
528  }
529  /* element are strings. */
530  /* Make a source array safe. */
531  ProtectedObject p(newSourceArray);
532  /* Make sure all elements in array */
533  for (size_t counter = 1; counter <= newSourceArray->size(); counter++)
534  {
535  /* Get element as string object */
536  RexxString *sourceString = newSourceArray ->get(counter)->makeString();
537  /* Did it convert? */
538  if (sourceString == (RexxString *)TheNilObject)
539  {
540  /* and report the error. */
542  }
543  else
544  {
545  /* itsa string add to source array */
546  newSourceArray ->put(sourceString, counter);
547  }
548  }
549  }
550 
551  RexxMethod *result = new RexxMethod(pgmname, newSourceArray);
552 
553  // if we've been provided with a scope, use it
554  if (parentSource == OREF_NULL)
555  {
556  // see if we have an active context and use the current source as the basis for the lookup
558  if (currentContext != OREF_NULL)
559  {
560  parentSource = currentContext->getSourceObject();
561  }
562  }
563 
564  // if there is a parent source, then merge in the scope information
565  if (parentSource != OREF_NULL)
566  {
567  result->getSourceObject()->inheritSourceContext(parentSource);
568  }
569 
570  return result;
571 }
572 
573 
575  RexxObject **init_args, /* subclass init arguments */
576  size_t argCount) /* number of arguments passed */
577 /******************************************************************************/
578 /* Function: Create a new method from REXX code contained in a string or an */
579 /* array */
580 /******************************************************************************/
581 {
582  RexxObject *pgmname; /* method name */
583  RexxObject *_source; /* Array or string object */
584  RexxMethod *newMethod; /* newly created method object */
585  RexxObject *option = OREF_NULL;
586  size_t initCount = 0; /* count of arguments we pass along */
587 
588  /* break up the arguments */
589 
590  RexxClass::processNewArgs(init_args, argCount, &init_args, &initCount, 2, (RexxObject **)&pgmname, (RexxObject **)&_source);
591  /* get the method name as a string */
592  RexxString *nameString = stringArgument(pgmname, ARG_ONE);
593  requiredArgument(_source, ARG_TWO); /* make sure we have the second too */
594 
595  RexxSource *sourceContext = OREF_NULL;
596  // retrieve extra parameter if exists
597  if (initCount != 0)
598  {
599  RexxClass::processNewArgs(init_args, initCount, &init_args, &initCount, 1, (RexxObject **)&option, NULL);
600  if (isOfClass(Method, option))
601  {
602  sourceContext = ((RexxMethod *)option)->getSourceObject();
603  }
604  else if (isOfClass(Routine, option))
605  {
606  sourceContext = ((RoutineClass *)option)->getSourceObject();
607  }
608  else if (isOfClass(Package, option))
609  {
610  sourceContext = ((PackageClass *)option)->getSourceObject();
611  }
612  else
613  {
614  // this must be a string (or convertable) and have a specific value
615  option = option->requestString();
616  if (option == TheNilObject)
617  {
618  reportException(Error_Incorrect_method_argType, IntegerThree, "Method, Routine, Package, or String object");
619  }
620  // default given? set option to NULL (see code below)
621  if (!((RexxString *)option)->strCaselessCompare("PROGRAMSCOPE"))
622  {
623  reportException(Error_Incorrect_call_list, "NEW", IntegerThree, "\"PROGRAMSCOPE\", Method, Routine, Package object", option);
624  }
625  }
626  }
627  /* go create a method */
628  newMethod = RexxMethod::newMethodObject(nameString, _source, IntegerTwo, sourceContext);
629  ProtectedObject p(newMethod);
630  /* Give new object its behaviour */
631  newMethod->setBehaviour(((RexxClass *)this)->getInstanceBehaviour());
632  if (((RexxClass *)this)->hasUninitDefined()) /* does object have an UNINT method */
633  {
634  newMethod->hasUninit(); /* Make sure everyone is notified. */
635  }
636  /* now send an INIT message */
637  newMethod->sendMessage(OREF_INIT, init_args, initCount);
638  return newMethod; /* return the new method */
639 }
640 
641 
643 /******************************************************************************/
644 /* Function: Create a method from a fully resolved file name */
645 /******************************************************************************/
646 {
647  /* get the method name as a string */
648  filename = stringArgument(filename, ARG_ONE);
649  /* create a source object */
650  RexxMethod *newMethod = new RexxMethod(filename);
651  ProtectedObject p(newMethod);
652  newMethod->setScope((RexxClass *)TheNilObject);
653  /* Give new object its behaviour */
654  newMethod->setBehaviour(((RexxClass *)this)->getInstanceBehaviour());
655  if (((RexxClass *)this)->hasUninitDefined()) /* does object have an UNINT method */
656  {
657  newMethod->hasUninit(); /* Make sure everyone is notified. */
658  }
659  /* now send an INIT message */
660  newMethod->sendMessage(OREF_INIT);
661  return newMethod;
662 }
663 
664 
666  RexxBuffer *buffer, /* buffer containing the method */
667  char *startPointer, /* first character of the method */
668  size_t length) // length of the data to restore
669 /******************************************************************************/
670 /* Function: Unflatten a translated method. Passed a buffer object containing*/
671 /* the method */
672 /******************************************************************************/
673 {
674  /* Get new envelope object */
675  RexxEnvelope *envelope = new RexxEnvelope;
676  ProtectedObject p(envelope);
677  /* now puff up the method object */
678  envelope->puff(buffer, startPointer, length);
679  /* The receiver object is an envelope*/
680  /* whose receiver is the actual */
681  /* method object we're restoring */
682  return (RexxMethod *)envelope->getReceiver();
683 }
684 
685 
697 void BaseCode::run(RexxActivity *activity, RexxMethod *method, RexxObject *receiver, RexxString *msgname, RexxObject **arguments, size_t argCount, ProtectedObject &result)
698 {
699  // The subcasses decide which of run and call are allowed
701 }
702 
703 
719 void BaseCode::call(RexxActivity *activity, RoutineClass *routine, RexxString *msgname, RexxObject **arguments, size_t argcount, RexxString *ct, RexxString *env, int context, ProtectedObject &result)
720 {
721  // the default for this is the simplified call. This is used by Rexx code to make calls to
722  // both Rexx programs and native routines, so the polymorphism simplifies the processing.
723  call(activity, routine, msgname, arguments, argcount, result);
724 }
725 
726 
736 void BaseCode::call(RexxActivity *activity, RoutineClass *routine, RexxString *msgname, RexxObject **arguments, size_t argcount, ProtectedObject &result)
737 {
738  // The subcasses decide which of run and call are allowed
740 }
741 
742 
751 {
752  /* this is always a null array */
753  return (RexxArray *)TheNullArray->copy();
754 }
755 
756 
766 /******************************************************************************/
767 /* Function: Associate a security manager with a method's source */
768 /******************************************************************************/
769 {
770  // the default is just to return a failure
771  return TheFalseObject;
772 }
773 
774 
781 {
782  return OREF_NULL;
783 }
784 
785 
795 {
796  // the interpreter class handles the default lookups
797  return Interpreter::findClass(className);
798 }
799 
800 
801 
814 {
815  return this; // this is just a nop
816 }
817 
818 
826 {
828  if (source != OREF_NULL)
829  {
830  return source->getPackage();
831  }
832 
833  return OREF_NULL;
834 }
835 
836 
846 {
847  name = stringArgument(name, "name");
848  descriptor = stringArgument(descriptor, "descriptor");
849  /* convert external into words */
850  RexxArray *_words = StringUtil::words(descriptor->getStringData(), descriptor->getLength());
851  ProtectedObject p(_words);
852  // "LIBRARY libbar [foo]"
853  if (((RexxString *)(_words->get(1)))->strCompare(CHAR_LIBRARY))
854  {
855  RexxString *library = OREF_NULL;
856  // the default entry point name is the internal name
857  RexxString *entry = name;
858 
859  // full library with entry name version?
860  if (_words->size() == 3)
861  {
862  library = (RexxString *)_words->get(2);
863  entry = (RexxString *)_words->get(3);
864  }
865  else if (_words->size() == 2)
866  {
867  library = (RexxString *)_words->get(2);
868  }
869  else // wrong number of tokens
870  {
871  /* this is an error */
873  }
874  /* create a new native method */
875  RexxNativeCode *nmethod = PackageManager::loadMethod(library, entry);
876  // raise an exception if this entry point is not found.
877  if (nmethod == OREF_NULL)
878  {
879  return (RexxMethod *)TheNilObject;
880  }
881  /* turn into a real method object */
882  return new RexxMethod(name, nmethod);
883  }
884  else
885  {
886  /* unknown external type */
888  }
889  return OREF_NULL;
890 }
891 
RexxObject::makeString
RexxString * makeString()
Definition: ObjectClass.cpp:1070
RexxMethod::setUnguardedRexx
RexxObject * setUnguardedRexx()
Definition: MethodClass.cpp:370
RexxObject::copy
RexxObject * copy()
Definition: ObjectClass.cpp:518
Error_Incorrect_method_noarray
#define Error_Incorrect_method_noarray
Definition: RexxErrorCodes.h:490
Error_Interpretation
#define Error_Interpretation
Definition: RexxErrorCodes.h:400
RexxMethod::liveGeneral
void liveGeneral(int reason)
Definition: MethodClass.cpp:284
BaseExecutable::findClass
RexxClass * findClass(RexxString *className)
Definition: MethodClass.cpp:87
RexxObject::sendMessage
void sendMessage(RexxString *, RexxArray *, ProtectedObject &)
Definition: ObjectClass.cpp:668
Interpreter::findClass
static RexxClass * findClass(RexxString *className)
Definition: Interpreter.cpp:520
RexxArray::getDimension
size_t getDimension()
Definition: ArrayClass.cpp:690
new_array
RexxArray * new_array(size_t s)
Definition: ArrayClass.hpp:250
RexxMethod::setAttributes
void setAttributes(bool _private, bool _protected, bool _guarded)
Definition: MethodClass.cpp:445
RexxArray
Definition: ArrayClass.hpp:100
BaseExecutable::getSourceObject
RexxSource * getSourceObject()
Definition: MethodClass.hpp:85
Error_Incorrect_call_list
#define Error_Incorrect_call_list
Definition: RexxErrorCodes.h:344
BaseExecutable::source
RexxArray * source()
Definition: MethodClass.cpp:146
BaseCode::getPackage
virtual PackageClass * getPackage()
Definition: MethodClass.cpp:825
TheFalseObject
#define TheFalseObject
Definition: RexxCore.h:184
MethodClass.hpp
PackageClass.hpp
BaseExecutable::getPackage
PackageClass * getPackage()
Definition: MethodClass.cpp:130
RexxMethod::RexxMethod
RexxMethod(RexxString *name, BaseCode *_code)
Definition: MethodClass.cpp:179
memory_mark_general
#define memory_mark_general(oref)
Definition: RexxMemory.hpp:437
RexxActivation::getSourceObject
RexxSource * getSourceObject()
Definition: RexxActivation.hpp:325
RexxMethod::scope
RexxClass * scope
Definition: MethodClass.hpp:165
RexxActivation.hpp
OrefSet
#define OrefSet(o, r, v)
Definition: RexxCore.h:94
RexxMethod::run
void run(RexxActivity *, RexxObject *, RexxString *, RexxObject **, size_t, ProtectedObject &)
Definition: MethodClass.cpp:311
RexxMethod::newScope
RexxMethod * newScope(RexxClass *)
Definition: MethodClass.cpp:328
RoutineClass.hpp
RoutineClass
Definition: RoutineClass.hpp:49
BaseExecutable::setSourceObject
BaseExecutable * setSourceObject(RexxSource *s)
Definition: MethodClass.cpp:106
RexxNativeActivation.hpp
RexxMethod::createInstance
static void createInstance()
Definition: MethodClass.cpp:74
RexxString::getLength
size_t getLength()
Definition: StringClass.hpp:330
BaseCode::run
virtual void run(RexxActivity *, RexxMethod *, RexxObject *, RexxString *, RexxObject **, size_t, ProtectedObject &)
Definition: MethodClass.cpp:697
T_Method
Definition: ClassTypeCodes.h:71
requiredArgument
void requiredArgument(RexxObject *object, size_t position)
Definition: RexxCore.h:284
RexxCode
Definition: RexxCode.hpp:58
RexxArray::size
size_t size()
Definition: ArrayClass.hpp:200
RexxMethod::isProtectedRexx
RexxObject * isProtectedRexx()
Definition: MethodClass.cpp:431
RexxSource::generateCode
RexxCode * generateCode(bool isMethod)
Definition: SourceFile.cpp:1198
RexxSmartBuffer
Definition: RexxSmartBuffer.hpp:47
ARG_TWO
const int ARG_TWO
Definition: RexxCore.h:81
RexxInternalObject::hasUninit
void hasUninit()
Definition: ObjectClass.cpp:1873
RexxNativeCode
Definition: RexxNativeCode.hpp:50
reportException
void reportException(wholenumber_t error)
Definition: ActivityManager.hpp:136
RexxMethod::setGuardedRexx
RexxObject * setGuardedRexx()
Definition: MethodClass.cpp:379
BaseExecutable::executableName
RexxString * executableName
Definition: MethodClass.hpp:96
TheTrueObject
#define TheTrueObject
Definition: RexxCore.h:185
RexxString::getStringData
const char * getStringData()
Definition: StringClass.hpp:333
RexxEnvelope
Definition: RexxEnvelope.hpp:53
RexxMethod::saveMethod
RexxSmartBuffer * saveMethod()
Definition: MethodClass.cpp:463
RexxBuffer
Definition: BufferClass.hpp:91
RexxArray::get
RexxObject * get(size_t pos)
Definition: ArrayClass.hpp:201
RexxMethod::restore
static RexxMethod * restore(RexxBuffer *, char *, size_t length)
Definition: MethodClass.cpp:665
Interpreter.hpp
isOfClass
#define isOfClass(t, r)
Definition: RexxCore.h:211
RexxMethod::flatten
void flatten(RexxEnvelope *)
Definition: MethodClass.cpp:295
RexxMethod::setScope
void setScope(RexxClass *)
Definition: MethodClass.cpp:360
RexxMethod::setProtectedRexx
RexxObject * setProtectedRexx()
Definition: MethodClass.cpp:397
RexxEnvelope::getBuffer
RexxSmartBuffer * getBuffer()
Definition: RexxEnvelope.hpp:73
RexxSource::inheritSourceContext
void inheritSourceContext(RexxSource *source)
Definition: SourceFile.cpp:1358
RexxMethod::isPrivateRexx
RexxObject * isPrivateRexx()
Definition: MethodClass.cpp:421
BaseCode::call
virtual void call(RexxActivity *, RoutineClass *, RexxString *, RexxObject **, size_t, RexxString *, RexxString *, int, ProtectedObject &)
Definition: MethodClass.cpp:719
RexxSource
Definition: SourceFile.hpp:131
RexxActivity::getCurrentRexxFrame
RexxActivation * getCurrentRexxFrame()
Definition: RexxActivity.hpp:280
RexxEnvelope::getReceiver
RexxObject * getReceiver()
Definition: RexxEnvelope.hpp:74
RexxMethod::newMethodObject
static RexxMethod * newMethodObject(RexxString *, RexxObject *, RexxObject *, RexxSource *a)
Definition: MethodClass.cpp:503
RexxArray::makeString
RexxString * makeString(RexxString *, RexxString *)
Definition: ArrayClass.cpp:1519
Error_Incorrect_method_no_method
#define Error_Incorrect_method_no_method
Definition: RexxErrorCodes.h:501
ARG_ONE
const int ARG_ONE
Definition: RexxCore.h:80
OREF_NULL
#define OREF_NULL
Definition: RexxCore.h:60
ArrayClass.hpp
RexxActivity
Definition: RexxActivity.hpp:127
PackageManager::loadMethod
static RexxNativeMethod * loadMethod(RexxString *packageName, RexxString *methodName)
Definition: PackageManager.cpp:263
RexxArray::put
void put(RexxObject *eref, size_t pos)
Definition: ArrayClass.cpp:203
Error_Incorrect_method_argType
#define Error_Incorrect_method_argType
Definition: RexxErrorCodes.h:502
IntegerTwo
#define IntegerTwo
Definition: RexxCore.h:190
RexxClass
Definition: ClassClass.hpp:49
RexxInternalObject::setBehaviour
void setBehaviour(RexxBehaviour *b)
Definition: ObjectClass.hpp:265
ProtectedObject.hpp
flatten_reference
#define flatten_reference(oref, envel)
Definition: RexxMemory.hpp:440
IntegerThree
#define IntegerThree
Definition: RexxCore.h:191
cleanUpFlatten
#define cleanUpFlatten
Definition: RexxMemory.hpp:432
ProtectedObject
Definition: ProtectedObject.hpp:46
StringClass.hpp
RexxMethod::newRexx
RexxMethod * newRexx(RexxObject **, size_t)
Definition: MethodClass.cpp:574
Error_Incorrect_method_nostring_inarray
#define Error_Incorrect_method_nostring_inarray
Definition: RexxErrorCodes.h:504
PackageClass
Definition: PackageClass.hpp:48
BaseCode
Definition: MethodClass.hpp:62
RexxMethod::live
void live(size_t)
Definition: MethodClass.cpp:273
RexxNativeCode.hpp
BaseCode::getSource
virtual RexxArray * getSource()
Definition: MethodClass.cpp:750
CLASS_CREATE
#define CLASS_CREATE(name, id, className)
Definition: RexxMemory.hpp:445
memory_mark
#define memory_mark(oref)
Definition: RexxMemory.hpp:436
RexxCode.hpp
StringUtil::words
static RexxArray * words(const char *data, size_t length)
Definition: StringUtil.cpp:1645
RexxMethod::isGuardedRexx
RexxObject * isGuardedRexx()
Definition: MethodClass.cpp:411
RexxInternalApis.h
BaseExecutable
Definition: MethodClass.hpp:82
RexxActivation
Definition: RexxActivation.hpp:156
BaseCode::findClass
virtual RexxClass * findClass(RexxString *className)
Definition: MethodClass.cpp:794
BaseCode::setSourceObject
virtual BaseCode * setSourceObject(RexxSource *s)
Definition: MethodClass.cpp:813
TheNullArray
#define TheNullArray
Definition: RexxCore.h:182
BaseCode::setSecurityManager
virtual RexxObject * setSecurityManager(RexxObject *manager)
Definition: MethodClass.cpp:765
RexxEnvelope::pack
RexxBuffer * pack(RexxObject *)
Definition: RexxEnvelope.cpp:168
setUpFlatten
#define setUpFlatten(type)
Definition: RexxMemory.hpp:427
RexxMethod::newFileRexx
RexxMethod * newFileRexx(RexxString *)
Definition: MethodClass.cpp:642
TheNilObject
#define TheNilObject
Definition: RexxCore.h:180
ActivityManager::currentActivity
static RexxActivity *volatile currentActivity
Definition: ActivityManager.hpp:95
RexxMethod::classInstance
static RexxClass * classInstance
Definition: MethodClass.hpp:154
RexxEnvelope::puff
void puff(RexxBuffer *, char *, size_t length)
Definition: RexxEnvelope.cpp:242
RexxActivity.hpp
stringArgument
RexxString * stringArgument(RexxObject *object, size_t position)
Definition: RexxCore.h:296
RexxObject::requestArray
RexxArray * requestArray()
Definition: ObjectClass.cpp:1461
BaseCode::getSourceObject
virtual RexxSource * getSourceObject()
Definition: MethodClass.cpp:780
RexxClass::processNewArgs
static void processNewArgs(RexxObject **, size_t, RexxObject ***, size_t *, size_t, RexxObject **, RexxObject **)
Definition: ClassClass.cpp:1701
RexxCore.h
CHAR_LIBRARY
char CHAR_LIBRARY[]
DirectoryClass.hpp
RexxMethod
Definition: MethodClass.hpp:101
new_object
RexxObject * new_object(size_t s)
Definition: RexxMemory.hpp:422
BaseExecutable::code
BaseCode * code
Definition: MethodClass.hpp:97
RexxMethod::setPrivateRexx
RexxObject * setPrivateRexx()
Definition: MethodClass.cpp:388
RexxObject::requestString
RexxString * requestString()
Definition: ObjectClass.cpp:1124
Error_Translation_bad_external
#define Error_Translation_bad_external
Definition: RexxErrorCodes.h:578
BufferClass.hpp
SourceFile.hpp
RexxObject
Definition: ObjectClass.hpp:311
RexxMethod::setSecurityManager
RexxObject * setSecurityManager(RexxObject *)
Definition: MethodClass.cpp:351
PackageManager.hpp
RexxMethod::loadExternalMethod
RexxMethod * loadExternalMethod(RexxString *name, RexxString *descriptor)
Definition: MethodClass.cpp:845
RexxString
Definition: StringClass.hpp:119