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)  

RexxBehaviour.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 Behaviour Class */
42 /* */
43 /******************************************************************************/
44 #include <string.h>
45 #include "RexxCore.h"
46 #include "RexxBehaviour.hpp"
47 #include "StringClass.hpp"
48 #include "MethodClass.hpp"
49 #include "ArrayClass.hpp"
50 #include "SupplierClass.hpp"
51 #include "ProtectedObject.hpp"
52 #include "CPPCode.hpp"
53 
54 
56  size_t newTypenum, /* class type number */
57  PCPPM * operator_methods ) /* operator lookaside table */
58 /******************************************************************************/
59 /* Function: Construct C++ methods in OKGDATA.C */
60 /******************************************************************************/
61 {
63  this->header.setObjectSize(sizeof(RexxBehaviour));
64  this->setClassType(newTypenum);
65  this->behaviourFlags = 0;
66  this->scopes = OREF_NULL;
68  this->operatorMethods = operator_methods;
69  this->owningClass = OREF_NULL;
71 
72  // if this is an internal class, normalize this so we can
73  // restore this to the correct value if we add additional internal classes.
74  if (newTypenum > T_Last_Exported_Class && newTypenum < T_First_Transient_Class)
75  {
76 
78  }
79  else if (newTypenum >= T_First_Transient_Class)
80  {
81 
83  }
84 
85 
86 }
87 
88 void RexxBehaviour::live(size_t liveMark)
89 /******************************************************************************/
90 /* Function: Normal garbage collection live marking */
91 /******************************************************************************/
92 {
95  memory_mark(this->scopes);
96  memory_mark(this->owningClass);
97 }
98 
100 /******************************************************************************/
101 /* Function: Generalized object marking */
102 /******************************************************************************/
103 {
104  /* Save image processing? */
105  if (memoryObject.savingImage() && this->isNonPrimitive())
106  {
107  // mark this as needing resolution when restored.
108  this->setNotResolved();
109  }
110  // the other side of the process?
111  else if (memoryObject.restoringImage())
112  {
113  // if we have a non-primitive here on a restore image, we need to fix this up.
114  if (isNonPrimitive())
115  {
117  }
118  }
119 
124 }
125 
127 /******************************************************************************/
128 /* Function: Flatten an object */
129 /******************************************************************************/
130 {
132 
133  flatten_reference(newThis->methodDictionary, envelope);
134  flatten_reference(newThis->instanceMethodDictionary, envelope);
135  flatten_reference(newThis->scopes, envelope);
136  flatten_reference(newThis->owningClass, envelope);
137 
138  /* Is this a non-primitive behav */
139  if (this->isNonPrimitive())
140  {
141  /* yes, mark that we need to be */
142  /* resolved on the puff. */
143  newThis->setNotResolved();
144  }
146 }
147 
154 {
155  if (isNotResolved())
156  {
157  setResolved();
159  }
160 }
161 
162 
164 /******************************************************************************/
165 /* Function: Copy the behaviour object with an independent named method */
166 /* dictionary, but leave the original create_class. */
167 /******************************************************************************/
168 {
169  /* Instead of calling new_object and memcpy, ask the memory object to make*/
170  /* a copy of ourself. This way, any header information can be correctly */
171  /* initialized by memory. */
172 
173  /* first, clone the existing object */
174  RexxBehaviour *newBehaviour = (RexxBehaviour *)this->clone();
175  /* have an method dictionary */
176  if (this->methodDictionary != OREF_NULL)
177  {
178  /* make a copy of this too */
179  OrefSet(newBehaviour, newBehaviour->methodDictionary, (RexxTable *)this->methodDictionary->copy());
180  }
181  if (this->scopes != OREF_NULL) /* scope information? */
182  {
183  /* make a copy of it too */
184  OrefSet(newBehaviour, newBehaviour->scopes, (RexxIdentityTable *)this->scopes->copy());
185  }
186  /* do we have added methods? */
187  if (this->instanceMethodDictionary != OREF_NULL)
188  {
189  /* copy those also */
190  OrefSet(newBehaviour, newBehaviour->instanceMethodDictionary, (RexxTable *)this->instanceMethodDictionary->copy());
191  }
192  /* use default operator methods set */
194  /* all copied behaviours are */
195  /* non-primitive ones */
196  newBehaviour->setNonPrimitive();
197  return(RexxObject *)newBehaviour; /* return the copied behaviour */
198 }
199 
200 
202 /******************************************************************************/
203 /* Function: Copy the source behaviour object into this, inheriting all of */
204 /* the method dictionaries. */
205 /******************************************************************************/
206 {
207  /* have an method dictionary */
208  if (source->methodDictionary != OREF_NULL)
209  {
210  /* make a copy of this too */
211  OrefSet(this, this->methodDictionary, (RexxTable *)source->methodDictionary->copy());
212  }
213  if (source->scopes != OREF_NULL) /* scope information? */
214  {
215  /* make a copy of it too */
216  OrefSet(this, this->scopes, (RexxIdentityTable *)source->scopes->copy());
217  }
218  /* do we have added methods? */
219  if (source->instanceMethodDictionary != OREF_NULL)
220  {
221  /* copy those also */
223  }
224  // this is the same class as the source also
225  OrefSet(this, this->owningClass, source->owningClass);
226  /* use default operator methods set */
227  this->operatorMethods = (PCPPM *)source->operatorMethods;
228 }
229 
230 
240 RexxMethod *RexxBehaviour::define(const char *name, PCPPM entryPoint, size_t arguments)
241 {
243  RexxMethod *method = new RexxMethod(n, CPPCode::resolveExportedMethod(name, entryPoint, arguments));
244  define(n, method);
245  return method;
246 }
247 
248 
250  RexxString *methodName, /* name of the defined method */
251  RexxMethod *method) /* method to add to the behaviour */
252 /******************************************************************************/
253 /* Function: Add or remove a method from an object's behaviour */
254 /******************************************************************************/
255 {
256  RexxMethod * tableMethod; /* method from the table */
257 
258  /* no method dictionary yet? */
259  if (this->methodDictionary == OREF_NULL)
260  {
261  /* allocate a table */
262  OrefSet(this, this->methodDictionary, new_table());
263  }
264 
265 
266  if (method == OREF_NULL || method == TheNilObject)
267  {
268  /* replace the method with .nil */
269  this->methodDictionary->stringPut(TheNilObject, methodName);
270 
271  }
272  else
273  {
274  /* already have this method? */
275  if ((tableMethod = (RexxMethod *)this->methodDictionary->stringGet(methodName)) == OREF_NULL)
276  {
277  /* No, just add this directly */
278  this->methodDictionary->stringAdd(method, methodName);
279  }
280  else
281  {
282  /* are the scopes the same? */
283  if (tableMethod->getScope() == method->getScope())
284  {
285  /* same scope, so replace existing */
286  /* method with the new one */
287  this->methodDictionary->stringPut(method, methodName);
288 
289  }
290  else
291  {
292  /* new scope, for this, just replace */
293  this->methodDictionary->stringAdd(method, methodName);
294 
295  }
296  }
297  }
298  return OREF_NULL; /* always return nothing */
299 }
300 
302  RexxString *methodName ) /* name of the removed method */
303 /******************************************************************************/
304 /* Function: Reverse a SETMETHOD operation */
305 /******************************************************************************/
306 {
307  /* actually done SETMETHOD calls? */
308  if (this->instanceMethodDictionary != OREF_NULL)
309  {
310  /* do we have one of these? */
311  if (this->instanceMethodDictionary->remove(methodName) != OREF_NULL)
312  {
313  /* remove from the real dictionary */
314  this->methodDictionary->remove(methodName);
315  }
316  }
317 }
318 
320  RexxString *methodName, /* name of the defined method */
321  RexxMethod *method) /* method to add to the behaviour */
322 /******************************************************************************/
323 /* Function: Add a method to an object's behaviour */
324 /******************************************************************************/
325 {
326  /* no method dictionary yet? */
327  if (this->methodDictionary == OREF_NULL)
328  {
329  /* allocate a table */
330  OrefSet(this, this->methodDictionary, new_table());
331  }
332  /* now repeat for the instance */
333  if (this->instanceMethodDictionary == OREF_NULL)
334  {
335  /* methods to track additions */
337  }
338  /* already added one by this name? */
339  if (this->instanceMethodDictionary->stringGet(methodName) != OREF_NULL)
340  {
341  /* remove from the method dictionary */
342  this->methodDictionary->remove(methodName);
343  }
344 
345  /* now just add this directly */
346  this->methodDictionary->stringAdd(method, methodName);
347  /* and also add to the instance one */
348  this->instanceMethodDictionary->stringPut(method, methodName);
349 }
350 
352  RexxString *messageName ) /* name of method to retrieve */
353 /******************************************************************************/
354 /* Function: Retrieve a method associated with the given name */
355 /******************************************************************************/
356 {
357  /* force to a string version (upper */
358  /* case required) */
359  messageName = stringArgument(messageName, ARG_ONE)->upper();
360  /* now just do a method lookup */
361  return this->methodLookup(messageName);
362 }
363 
365  RexxString *messageName ) /* name of method to retrieve */
366 /******************************************************************************/
367 /* Function: Perform lowest level method lookup on an object */
368 /******************************************************************************/
369 {
370  /* have a method dictionary? */
371  if (this->methodDictionary != OREF_NULL)
372  {
373  // just get the object directly. Unknown methods will return OREF_NULL. However,
374  // explicit overrides are indicated by putting .nil in the table. Our callers
375  // are dependent upon getting OREF_NULL back for unknown methods.
376  RexxMethod *method = (RexxMethod *)this->methodDictionary->stringGet(messageName);
377  if (method != TheNilObject)
378  {
379  return method;
380  }
381  }
382  return OREF_NULL;
383 }
384 
386  RexxString *messageName ) /* name of method to retrieve */
387 /******************************************************************************/
388 /* Function: Retrieve a method object from the method dictionary. This */
389 /* returns OREF_NULL if the method does not exist. */
390 /******************************************************************************/
391 {
392  if (this->methodDictionary != OREF_NULL)
393  {
394  /* try to get the method */
395  return(RexxMethod *)this->methodDictionary->stringGet(messageName);
396  }
397  return OREF_NULL; /* return the method object */
398 }
399 
401  RexxString *messageName ) /* name of method to delete */
402 /******************************************************************************/
403 /* Function: Delete a method from an object's behaviour */
404 /******************************************************************************/
405 {
406  /* have a dictionary? */
407  if (this->methodDictionary != OREF_NULL)
408  {
409  /* just remove from the table */
410  this->methodDictionary->remove(messageName);
411  }
412  return OREF_NULL; /* always return nothing */
413 }
414 
416  RexxBehaviour *subclass_behaviour)/* source behaviour */
417 /******************************************************************************/
418 /* Function: Replace the fields in a new behaviour attached to a new */
419 /* subclass class object from the subclassed class behaviour. */
420 /******************************************************************************/
421 {
422  /* replace the typenum */
423  this->setClassType(subclass_behaviour->getClassType());
424 }
425 
427  RexxBehaviour * saved) /* the saved behaviour info */
428 /******************************************************************************/
429 /* Function: Restore primtive behaviours */
430 /******************************************************************************/
431 {
432  /* set the behaviour behaviour */
434  /* set proper size */
436  this->setOldSpace();
437  /* Make sure we pick up additional */
438  /* methods defined during saveimage */
439  /* Don't use OrefSet here */
440  this->methodDictionary = saved->getMethodDictionary();
441  this->scopes = saved->getScopes(); /* and the scopes that are there */
442  /* copy over the associated class */
443  this->owningClass = saved->getOwningClass();
444 }
445 
447 /******************************************************************************/
448 /* Function: Update and return a primitive behaviour's primitive class */
449 /******************************************************************************/
450 {
451  /* Adjust the instance behaviour. Note that we don't use */
452  /* OrefSet() for this. When we're restoring the classes, the */
453  /* class objects are in oldspace, and the behaviours are */
454  /* primitive objects, not subject to sweeping. We do a direct */
455  /* assignment to avoid creating a reference entry in the old2new */
456  /* table. */
457  this->owningClass->setInstanceBehaviour(this);
458  return this->owningClass; /* return the associated class */
459 }
460 
461 void *RexxBehaviour::operator new(size_t size,
462  size_t typenum) /* target behaviour type number */
463 /******************************************************************************/
464 /* Function: Create and initialize a target primitive behaviour */
465 /******************************************************************************/
466 {
467  // return a pointer to the static primitive one
468  return (void *)getPrimitiveBehaviour(typenum);
469 }
470 
472  RexxObject * start_scope) /* requested current scope */
473 /******************************************************************************/
474 /* Function: Return the scope following a give scope */
475 /******************************************************************************/
476 {
477  if (this->scopes == OREF_NULL) /* no scopes defined? */
478  {
479  return TheNilObject; /* no super scoping possible */
480  }
481  /* go get the super scope */
482  return this->scopes->findSuperScope(start_scope);
483 }
484 
486  RexxString * messageName, /* target method name */
487  RexxObject * startScope) /* starting scope */
488 /******************************************************************************/
489 /* Function: Find a method using the given starting scope information */
490 /******************************************************************************/
491 {
492  /* if we have scopes defined and we */
493  /* have a good start scope */
494  if (this->scopes != OREF_NULL && startScope != TheNilObject)
495  {
496  /* get the scope list for the given */
497  /* starting scope */
498  RexxArray *scopeList = (RexxArray *)this->scopes->get(startScope);
499  if (scopeList != OREF_NULL) /* have a matching list? */
500  {
501  /* get a list of methods */
502  RexxArray *methods = this->methodDictionary->stringGetAll(messageName);
503  size_t scopes_size = scopeList->size(); /* get the two array sizes */
504  size_t methods_size = methods->size();
505  /* search through the methods list */
506  /* for the first one with a */
507  /* conforming scope */
508  for (size_t i = 1; i <= methods_size; i++)
509  {
510  /* get the next method */
511  RexxMethod *method = (RexxMethod *)methods->get(i);
512  /* now loop through the scopes list */
513  for (size_t j = 1; j <= scopes_size; j++)
514  {
515  /* got a matching scope here? */
516  if (scopeList->get(j) == method->getScope())
517  {
518  return method; /* return the method */
519  }
520  }
521  }
522  }
523  }
524  return OREF_NULL; /* nothing found */
525 }
526 
528  RexxObject *scope) /* new scopy for all methods */
529 /******************************************************************************/
530 /* Function: Set a new set of scoping information for an object */
531 /******************************************************************************/
532 {
533  // we might not have instance methods to process
535  {
536  return;
537  }
538 
539  /* traverse the method dictionary */
540  for (HashLink i = this->methodDictionary->first();
541  this->methodDictionary->index(i) != OREF_NULL;
542  i = this->methodDictionary->next(i))
543  {
544  /* setting each scope */
545  ((RexxMethod *)this->methodDictionary->value(i))->setScope((RexxClass *)scope);
546  }
547 }
548 
549 
561 {
562  // if asking for everything, just return the supplier.
563  if (scope == OREF_NULL)
564  {
565  return this->methodDictionary->supplier();
566  }
567 
568  size_t count = 0;
569  HashLink i;
570 
571  // travese the method dictionary, searching for methods with the target scope
572  for (i = this->methodDictionary->first(); this->methodDictionary->index(i) != OREF_NULL; i = this->methodDictionary->next(i))
573  {
574  if (((RexxMethod *)this->methodDictionary->value(i))->getScope() == scope)
575  {
576  count++;
577  }
578  }
579 
580  RexxArray *names = new_array(count);
581  RexxArray *methods = new_array(count);
582  count = 1;
583 
584  // pass two, copy the entries into the array
585  for (i = this->methodDictionary->first(); this->methodDictionary->index(i) != OREF_NULL; i = this->methodDictionary->next(i))
586  {
587  if (((RexxMethod *)this->methodDictionary->value(i))->getScope() == scope)
588  {
589  names->put(this->methodDictionary->index(i), count);
590  methods->put(this->methodDictionary->value(i), count);
591  count++;
592  }
593  }
594 
595  return (RexxSupplier *)new_supplier(methods, names);
596 }
597 
598 
600  RexxIdentityTable *newscopes) /* new table of scopes */
601 /******************************************************************************/
602 /* Function: Set a new set of scoping information for an object */
603 /******************************************************************************/
604 {
605  /* set the scoping info */
606  OrefSet(this, this->scopes, newscopes);
607  return OREF_NULL; /* always return nothing */
608 }
609 
611  RexxObject *scope) /* new scope for the scope table */
612 /******************************************************************************/
613 /* Function: Set a new set of scoping information for an object */
614 /******************************************************************************/
615 {
616  if (this->scopes == OREF_NULL) /* no scopes set? */
617  {
618  /* add a scope table to add to */
619  OrefSet(this, this->scopes, new_identity_table());
620  }
621  /* set the scoping info */
622  this->scopes->add(scope, TheNilObject);
623  /* add the scope list for this scope */
624  this->scopes->add(this->scopes->allAt(TheNilObject), scope);
625  return OREF_NULL; /* return the big nothing */
626 }
627 
629  RexxObject *scope) /* new scope for the scope table */
630 /******************************************************************************/
631 /* Function: Set a new set of scoping information for an object */
632 /******************************************************************************/
633 {
634  if (this->checkScope(scope)) // seen this one before?
635  {
636  return OREF_NULL; // we're done
637  }
638 
639  return this->addScope(scope); // go and add this
640 }
641 
642 
644  RexxObject *scope) /* scope to check */
645 /*****************************************************************************/
646 /* Function: Check if the passed scope is already in the scope table */
647 /*****************************************************************************/
648 {
649  if (this->scopes == OREF_NULL) /* no scopes set? */
650  {
651  return false; /* then it can't be in the table */
652  }
653  /* have the table check for the index*/
654  return this->scopes->get(scope) != OREF_NULL;
655 }
656 
658  RexxBehaviour * source_behav) /* new behaviour to add in */
659 /*****************************************************************************/
660 /* Function: Merge the passed behaviour's mdict into this behaviour's mdict */
661 /* The method search order will be for the target(this) behaviour */
662 /* to be found before the source behaviour */
663 /*****************************************************************************/
664 {
665  /* if there isn't a source mdict */
666  /* there isn't anything to do */
667  if (source_behav->methodDictionary == OREF_NULL)
668  {
669  return;
670  }
671  /* if there isn't a mdict yet just */
672  /* use the source for this one */
673  if (this->methodDictionary == OREF_NULL)
674  {
675  OrefSet(this, this->methodDictionary, source_behav->methodDictionary);
676  }
677  else
678  {
679  /* get a copy of the source mdict */
680  /* for the merge */
681  RexxTable *newMethods = (RexxTable *)source_behav->methodDictionary->copy();
682  ProtectedObject p(newMethods);
683  /* merge this mdict with the copy */
684  this->methodDictionary->merge(newMethods);
685  /* and put it into this behaviour */
686  OrefSet(this, this->methodDictionary, newMethods);
687  }
688 }
689 
691  RexxTable *sourceDictionary) /* dictionary to merge in */
692 /*****************************************************************************/
693 /* Function: Merge the passed mdict into this behaviour's mdict */
694 /* After this merge the method search order will find the source */
695 /* mdict methods prior to self(target) methods */
696 /*****************************************************************************/
697 {
698  RexxTable *newDictionary; /* new method dictionary */
699 
700  /* if there isn't a source mdict */
701  if (sourceDictionary == OREF_NULL) /* there isn't anything to do */
702  {
703  return; /* just return */
704  }
705  /* if there isn't a mdict yet just */
706  /* use the source for this one */
707  if (this->methodDictionary == OREF_NULL)
708  {
709  OrefSet(this, this->methodDictionary, sourceDictionary);
710  }
711  else
712  {
713  /* get a copy of the target mdict */
714  /* for the merge */
715  newDictionary = (RexxTable *)this->methodDictionary->copy();
716  ProtectedObject p(newDictionary);
717  /* merge the source mdict and copy */
718  sourceDictionary->merge(newDictionary);
719  /* and put it into this behaviour */
720  OrefSet(this, this->methodDictionary, newDictionary);
721  }
722 }
723 
RexxMemory::restoringImage
bool restoringImage()
Definition: RexxMemory.hpp:215
RexxBehaviour::getScopes
RexxIdentityTable * getScopes()
Definition: RexxBehaviour.hpp:92
new_array
RexxArray * new_array(size_t s)
Definition: ArrayClass.hpp:250
RexxTable::stringGet
RexxObject * stringGet(RexxString *key)
Definition: TableClass.hpp:67
RexxHashTableCollection::index
RexxObject * index(HashLink pos)
Definition: RexxCollection.hpp:90
RexxHashTableCollection::next
HashLink next(HashLink pos)
Definition: RexxCollection.hpp:88
RexxArray
Definition: ArrayClass.hpp:100
RexxBehaviour::flatten
void flatten(RexxEnvelope *)
Definition: RexxBehaviour.cpp:126
RexxBehaviour::resolveNonPrimitiveBehaviour
void resolveNonPrimitiveBehaviour()
Definition: RexxBehaviour.cpp:153
RexxBehaviour::liveGeneral
void liveGeneral(int reason)
Definition: RexxBehaviour.cpp:99
RexxBehaviour::getMethods
RexxSupplier * getMethods(RexxObject *scope)
Definition: RexxBehaviour.cpp:560
MethodClass.hpp
memory_mark_general
#define memory_mark_general(oref)
Definition: RexxMemory.hpp:437
memoryObject
RexxMemory memoryObject
Definition: RexxMemory.cpp:84
RexxInternalObject::behaviour
RexxBehaviour * behaviour
Definition: ObjectClass.hpp:306
OrefSet
#define OrefSet(o, r, v)
Definition: RexxCore.h:94
RexxBehaviour::setResolved
void setResolved()
Definition: RexxBehaviour.hpp:109
RexxIdentityTable::allAt
RexxArray * allAt(RexxObject *key)
Definition: IdentityTableClass.hpp:64
RexxMethod::getScope
RexxClass * getScope()
Definition: MethodClass.hpp:143
RexxInternalObject::clone
RexxObject * clone()
Definition: ObjectClass.cpp:2308
RexxMemory::savingImage
bool savingImage()
Definition: RexxMemory.hpp:214
SupplierClass.hpp
new_supplier
RexxSupplier * new_supplier(RexxArray *c, RexxArray *f)
Definition: SupplierClass.hpp:80
RexxBehaviour::getClassType
size_t getClassType()
Definition: RexxBehaviour.hpp:101
RexxBehaviour::restoreClass
RexxClass * restoreClass()
Definition: RexxBehaviour.cpp:446
RexxArray::size
size_t size()
Definition: ArrayClass.hpp:200
RexxTable::stringGetAll
RexxArray * stringGetAll(RexxString *key)
Definition: TableClass.hpp:66
RexxBehaviour::methodLookup
RexxMethod * methodLookup(RexxString *)
Definition: RexxBehaviour.cpp:364
RexxHashTableCollection::remove
virtual RexxObject * remove(RexxObject *key)
Definition: RexxCollection.cpp:190
RexxInternalObject::setOldSpace
void setOldSpace()
Definition: ObjectClass.hpp:255
roundObjectBoundary
size_t roundObjectBoundary(size_t n)
Definition: RexxMemory.hpp:95
RexxBehaviour::behaviourFlags
uint16_t behaviourFlags
Definition: RexxBehaviour.hpp:161
RexxObject::operatorMethods
static PCPPM operatorMethods[]
Definition: ObjectClass.hpp:542
RexxSupplier
Definition: SupplierClass.hpp:47
RexxBehaviour::methodObject
RexxMethod * methodObject(RexxString *)
Definition: RexxBehaviour.cpp:351
RexxIdentityTable::get
virtual RexxObject * get(RexxObject *key)
Definition: IdentityTableClass.cpp:111
RexxEnvelope
Definition: RexxEnvelope.hpp:53
RexxBehaviour::owningClass
RexxClass * owningClass
Definition: RexxBehaviour.hpp:165
RexxArray::get
RexxObject * get(size_t pos)
Definition: ArrayClass.hpp:201
RexxBehaviour::scopes
RexxIdentityTable * scopes
Definition: RexxBehaviour.hpp:162
RexxHashTableCollection::copy
RexxObject * copy()
Definition: RexxCollection.cpp:119
RexxBehaviour::instanceMethodDictionary
RexxTable * instanceMethodDictionary
Definition: RexxBehaviour.hpp:167
new_identity_table
RexxIdentityTable * new_identity_table()
Definition: IdentityTableClass.hpp:74
RexxBehaviour
Definition: RexxBehaviour.hpp:49
RexxBehaviour::getPrimitiveBehaviour
static RexxBehaviour * getPrimitiveBehaviour(size_t index)
Definition: RexxBehaviour.hpp:143
CPPCode.hpp
RexxHashTableCollection::first
HashLink first()
Definition: RexxCollection.hpp:87
RexxInternalObject::setObjectSize
void setObjectSize(size_t s)
Definition: ObjectClass.hpp:225
RexxBehaviour::superMethod
RexxMethod * superMethod(RexxString *, RexxObject *)
Definition: RexxBehaviour.cpp:485
RexxHashTableCollection::value
RexxObject * value(HashLink pos)
Definition: RexxCollection.hpp:89
ARG_ONE
const int ARG_ONE
Definition: RexxCore.h:80
ObjectHeader::setObjectSize
void setObjectSize(size_t l)
Definition: ObjectClass.hpp:95
OREF_NULL
#define OREF_NULL
Definition: RexxCore.h:60
RexxTable::stringAdd
RexxObject * stringAdd(RexxObject *, RexxString *)
Definition: TableClass.cpp:94
RexxBehaviour::RexxBehaviour
RexxBehaviour()
Definition: RexxBehaviour.hpp:59
ArrayClass.hpp
RexxArray::put
void put(RexxObject *eref, size_t pos)
Definition: ArrayClass.cpp:203
RexxBehaviour::methodDictionaryMerge
void methodDictionaryMerge(RexxTable *)
Definition: RexxBehaviour.cpp:690
RexxBehaviour::INTERNAL_CLASS
Definition: RexxBehaviour.hpp:154
RexxBehaviour::getOwningClass
RexxClass * getOwningClass()
Definition: RexxBehaviour.hpp:97
RexxClass
Definition: ClassClass.hpp:49
RexxInternalObject::setBehaviour
void setBehaviour(RexxBehaviour *b)
Definition: ObjectClass.hpp:265
ProtectedObject.hpp
RexxBehaviour::operatorMethods
PCPPM * operatorMethods
Definition: RexxBehaviour.hpp:164
RexxBehaviour::isNotResolved
bool isNotResolved()
Definition: RexxBehaviour.hpp:104
flatten_reference
#define flatten_reference(oref, envel)
Definition: RexxMemory.hpp:440
cleanUpFlatten
#define cleanUpFlatten
Definition: RexxMemory.hpp:432
ProtectedObject
Definition: ProtectedObject.hpp:46
StringClass.hpp
PCPPM
RexxObject *(RexxObject::* PCPPM)()
Definition: ObjectClass.hpp:198
RexxBehaviour::merge
void merge(RexxBehaviour *)
Definition: RexxBehaviour.cpp:657
RexxBehaviour::removeMethod
void removeMethod(RexxString *)
Definition: RexxBehaviour.cpp:301
RexxBehaviour::copy
RexxObject * copy()
Definition: RexxBehaviour.cpp:163
RexxBehaviour::getMethod
RexxMethod * getMethod(RexxString *)
Definition: RexxBehaviour.cpp:385
memory_mark
#define memory_mark(oref)
Definition: RexxMemory.hpp:436
RexxBehaviour::copyBehaviour
void copyBehaviour(RexxBehaviour *source)
Definition: RexxBehaviour.cpp:201
new_table
RexxTable * new_table()
Definition: TableClass.hpp:76
RexxBehaviour::checkScope
bool checkScope(RexxObject *)
Definition: RexxBehaviour.cpp:643
HashLink
size_t HashLink
Definition: RexxHashTable.hpp:49
RexxBehaviour::setNotResolved
void setNotResolved()
Definition: RexxBehaviour.hpp:110
RexxTable
Definition: TableClass.hpp:49
T_First_Transient_Class
Definition: ClassTypeCodes.h:181
RexxClass::setInstanceBehaviour
void setInstanceBehaviour(RexxBehaviour *)
Definition: ClassClass.cpp:290
RexxIdentityTable::add
virtual RexxObject * add(RexxObject *, RexxObject *)
Definition: IdentityTableClass.cpp:161
RexxBehaviour::methodDictionary
RexxTable * methodDictionary
Definition: RexxBehaviour.hpp:163
RexxMemory::getGlobalName
static RexxString * getGlobalName(const char *value)
Definition: RexxMemory.cpp:2277
RexxBehaviour::isNonPrimitive
bool isNonPrimitive()
Definition: RexxBehaviour.hpp:103
RexxBehaviour::addScope
RexxObject * addScope(RexxObject *)
Definition: RexxBehaviour.cpp:610
RexxBehaviour::addMethod
void addMethod(RexxString *, RexxMethod *)
Definition: RexxBehaviour.cpp:319
RexxHashTableCollection::merge
RexxObject * merge(RexxHashTableCollection *)
Definition: RexxCollection.cpp:324
setUpFlatten
#define setUpFlatten(type)
Definition: RexxMemory.hpp:427
RexxBehaviour::live
void live(size_t)
Definition: RexxBehaviour.cpp:88
TheNilObject
#define TheNilObject
Definition: RexxCore.h:180
RexxBehaviour::restore
void restore(RexxBehaviour *)
Definition: RexxBehaviour.cpp:426
RexxBehaviour::setClassType
void setClassType(size_t n)
Definition: RexxBehaviour.hpp:100
RexxBehaviour::define
RexxObject * define(RexxString *, RexxMethod *)
Definition: RexxBehaviour.cpp:249
RexxBehaviour::deleteMethod
RexxObject * deleteMethod(RexxString *)
Definition: RexxBehaviour.cpp:400
RexxIdentityTable
Definition: IdentityTableClass.hpp:49
T_Last_Exported_Class
Definition: ClassTypeCodes.h:106
RexxBehaviour::setMethodDictionaryScope
void setMethodDictionaryScope(RexxObject *)
Definition: RexxBehaviour.cpp:527
stringArgument
RexxString * stringArgument(RexxObject *object, size_t position)
Definition: RexxCore.h:296
RexxBehaviour::setScopes
RexxObject * setScopes(RexxIdentityTable *)
Definition: RexxBehaviour.cpp:599
T_Behaviour
Definition: ClassTypeCodes.h:111
RexxIdentityTable::findSuperScope
RexxObject * findSuperScope(RexxObject *v)
Definition: IdentityTableClass.hpp:65
RexxBehaviour.hpp
RexxCore.h
CPPCode::resolveExportedMethod
static CPPCode * resolveExportedMethod(const char *, PCPPM targetMethod, size_t argcount)
Definition: CPPCode.cpp:1031
RexxMethod
Definition: MethodClass.hpp:101
RexxBehaviour::TRANSIENT_CLASS
Definition: RexxBehaviour.hpp:155
RexxTable::stringPut
RexxObject * stringPut(RexxObject *, RexxString *)
Definition: TableClass.cpp:113
RexxBehaviour::subclass
void subclass(RexxBehaviour *)
Definition: RexxBehaviour.cpp:415
RexxString::upper
RexxString * upper()
Definition: StringClass.cpp:1442
RexxBehaviour::setNonPrimitive
void setNonPrimitive()
Definition: RexxBehaviour.hpp:112
RexxBehaviour::superScope
RexxObject * superScope(RexxObject *)
Definition: RexxBehaviour.cpp:471
RexxInternalObject::header
ObjectHeader header
Definition: ObjectClass.hpp:305
RexxObject
Definition: ObjectClass.hpp:311
RexxBehaviour::getOperatorMethods
static PCPPM * getOperatorMethods(size_t index)
Definition: RexxBehaviour.hpp:144
RexxHashTableCollection::supplier
RexxSupplier * supplier()
Definition: RexxCollection.cpp:476
RexxBehaviour::getMethodDictionary
RexxTable * getMethodDictionary()
Definition: RexxBehaviour.hpp:93
RexxBehaviour::mergeScope
RexxObject * mergeScope(RexxObject *)
Definition: RexxBehaviour.cpp:628
RexxString
Definition: StringClass.hpp:119