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 
148 /**
149  * Do fix ups for non-primitive behaviours, ensuring they
150  * get all of the appropriate information from their parent
151  * primitive behaviour types.
152  */
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  ProtectedObject p(newBehaviour);
176  /* have an method dictionary */
177  if (this->methodDictionary != OREF_NULL)
178  {
179  /* make a copy of this too */
180  OrefSet(newBehaviour, newBehaviour->methodDictionary, (RexxTable *)this->methodDictionary->copy());
181  }
182  if (this->scopes != OREF_NULL) /* scope information? */
183  {
184  /* make a copy of it too */
185  OrefSet(newBehaviour, newBehaviour->scopes, (RexxIdentityTable *)this->scopes->copy());
186  }
187  /* do we have added methods? */
188  if (this->instanceMethodDictionary != OREF_NULL)
189  {
190  /* copy those also */
191  OrefSet(newBehaviour, newBehaviour->instanceMethodDictionary, (RexxTable *)this->instanceMethodDictionary->copy());
192  }
193  /* use default operator methods set */
195  /* all copied behaviours are */
196  /* non-primitive ones */
197  newBehaviour->setNonPrimitive();
198  return(RexxObject *)newBehaviour; /* return the copied behaviour */
199 }
200 
201 
203 /******************************************************************************/
204 /* Function: Copy the source behaviour object into this, inheriting all of */
205 /* the method dictionaries. */
206 /******************************************************************************/
207 {
208  /* have an method dictionary */
209  if (source->methodDictionary != OREF_NULL)
210  {
211  /* make a copy of this too */
212  OrefSet(this, this->methodDictionary, (RexxTable *)source->methodDictionary->copy());
213  }
214  if (source->scopes != OREF_NULL) /* scope information? */
215  {
216  /* make a copy of it too */
217  OrefSet(this, this->scopes, (RexxIdentityTable *)source->scopes->copy());
218  }
219  /* do we have added methods? */
220  if (source->instanceMethodDictionary != OREF_NULL)
221  {
222  /* copy those also */
224  }
225  // this is the same class as the source also
226  OrefSet(this, this->owningClass, source->owningClass);
227  /* use default operator methods set */
228  this->operatorMethods = (PCPPM *)source->operatorMethods;
229 }
230 
231 
232 /**
233  * Define a native kernel method on this behaviour.
234  *
235  * @param name The method name.
236  * @param entryPoint The method entry point
237  * @param arguments The argument definition.
238  * @param passNamedArgs True if the named arguments must be passed.
239  *
240  * @return The created method object.
241  */
242 RexxMethod *RexxBehaviour::define(const char *name, PCPPM entryPoint, size_t arguments, bool passNamedArgs)
243 {
245  RexxMethod *method = new RexxMethod(n, CPPCode::resolveExportedMethod(name, entryPoint, arguments, passNamedArgs));
246  define(n, method);
247  return method;
248 }
249 
250 
252  RexxString *methodName, /* name of the defined method */
253  RexxMethod *method) /* method to add to the behaviour */
254 /******************************************************************************/
255 /* Function: Add or remove a method from an object's behaviour */
256 /******************************************************************************/
257 {
258  RexxMethod * tableMethod; /* method from the table */
259 
260  /* no method dictionary yet? */
261  if (this->methodDictionary == OREF_NULL)
262  {
263  /* allocate a table */
264  OrefSet(this, this->methodDictionary, new_table());
265  }
266 
267 
268  if (method == OREF_NULL || method == TheNilObject)
269  {
270  /* replace the method with .nil */
271  this->methodDictionary->stringPut(TheNilObject, methodName);
272 
273  }
274  else
275  {
276  /* already have this method? */
277  if ((tableMethod = (RexxMethod *)this->methodDictionary->stringGet(methodName)) == OREF_NULL)
278  {
279  /* No, just add this directly */
280  this->methodDictionary->stringAdd(method, methodName);
281  }
282  else
283  {
284  /* are the scopes the same? */
285  if (tableMethod->getScope() == method->getScope())
286  {
287  /* same scope, so replace existing */
288  /* method with the new one */
289  this->methodDictionary->stringPut(method, methodName);
290 
291  }
292  else
293  {
294  /* new scope, for this, just replace */
295  this->methodDictionary->stringAdd(method, methodName);
296 
297  }
298  }
299  }
300  return OREF_NULL; /* always return nothing */
301 }
302 
304  RexxString *methodName ) /* name of the removed method */
305 /******************************************************************************/
306 /* Function: Reverse a SETMETHOD operation */
307 /******************************************************************************/
308 {
309  /* actually done SETMETHOD calls? */
310  if (this->instanceMethodDictionary != OREF_NULL)
311  {
312  /* do we have one of these? */
313  if (this->instanceMethodDictionary->remove(methodName) != OREF_NULL)
314  {
315  /* remove from the real dictionary */
316  this->methodDictionary->remove(methodName);
317  }
318  }
319 }
320 
322  RexxString *methodName, /* name of the defined method */
323  RexxMethod *method) /* method to add to the behaviour */
324 /******************************************************************************/
325 /* Function: Add a method to an object's behaviour */
326 /******************************************************************************/
327 {
328  /* no method dictionary yet? */
329  if (this->methodDictionary == OREF_NULL)
330  {
331  /* allocate a table */
332  OrefSet(this, this->methodDictionary, new_table());
333  }
334  /* now repeat for the instance */
335  if (this->instanceMethodDictionary == OREF_NULL)
336  {
337  /* methods to track additions */
339  }
340  /* already added one by this name? */
341  if (this->instanceMethodDictionary->stringGet(methodName) != OREF_NULL)
342  {
343  /* remove from the method dictionary */
344  this->methodDictionary->remove(methodName);
345  }
346 
347  /* now just add this directly */
348  this->methodDictionary->stringAdd(method, methodName);
349  /* and also add to the instance one */
350  this->instanceMethodDictionary->stringPut(method, methodName);
351 }
352 
354  RexxString *messageName ) /* name of method to retrieve */
355 /******************************************************************************/
356 /* Function: Retrieve a method associated with the given name */
357 /******************************************************************************/
358 {
359  /* force to a string version (upper */
360  /* case required) */
361  messageName = stringArgument(messageName, OREF_positional, ARG_ONE)->upper();
362  /* now just do a method lookup */
363  return this->methodLookup(messageName);
364 }
365 
367  RexxString *messageName ) /* name of method to retrieve */
368 /******************************************************************************/
369 /* Function: Perform lowest level method lookup on an object */
370 /******************************************************************************/
371 {
372  /* have a method dictionary? */
373  if (this->methodDictionary != OREF_NULL)
374  {
375  // just get the object directly. Unknown methods will return OREF_NULL. However,
376  // explicit overrides are indicated by putting .nil in the table. Our callers
377  // are dependent upon getting OREF_NULL back for unknown methods.
378  RexxMethod *method = (RexxMethod *)this->methodDictionary->stringGet(messageName);
379  if (method != TheNilObject)
380  {
381  return method;
382  }
383  }
384  return OREF_NULL;
385 }
386 
388  RexxString *messageName ) /* name of method to retrieve */
389 /******************************************************************************/
390 /* Function: Retrieve a method object from the method dictionary. This */
391 /* returns OREF_NULL if the method does not exist. */
392 /******************************************************************************/
393 {
394  if (this->methodDictionary != OREF_NULL)
395  {
396  /* try to get the method */
397  return(RexxMethod *)this->methodDictionary->stringGet(messageName);
398  }
399  return OREF_NULL; /* return the method object */
400 }
401 
403  RexxString *messageName ) /* name of method to delete */
404 /******************************************************************************/
405 /* Function: Delete a method from an object's behaviour */
406 /******************************************************************************/
407 {
408  /* have a dictionary? */
409  if (this->methodDictionary != OREF_NULL)
410  {
411  /* just remove from the table */
412  this->methodDictionary->remove(messageName);
413  }
414  return OREF_NULL; /* always return nothing */
415 }
416 
418  RexxBehaviour *subclass_behaviour)/* source behaviour */
419 /******************************************************************************/
420 /* Function: Replace the fields in a new behaviour attached to a new */
421 /* subclass class object from the subclassed class behaviour. */
422 /******************************************************************************/
423 {
424  /* replace the typenum */
425  this->setClassType(subclass_behaviour->getClassType());
426 }
427 
429  RexxBehaviour * saved) /* the saved behaviour info */
430 /******************************************************************************/
431 /* Function: Restore primtive behaviours */
432 /******************************************************************************/
433 {
434  /* set the behaviour behaviour */
436  /* set proper size */
438  this->setOldSpace();
439  /* Make sure we pick up additional */
440  /* methods defined during saveimage */
441  /* Don't use OrefSet here */
442  this->methodDictionary = saved->getMethodDictionary();
443  this->scopes = saved->getScopes(); /* and the scopes that are there */
444  /* copy over the associated class */
445  this->owningClass = saved->getOwningClass();
446 }
447 
449 /******************************************************************************/
450 /* Function: Update and return a primitive behaviour's primitive class */
451 /******************************************************************************/
452 {
453  /* Adjust the instance behaviour. Note that we don't use */
454  /* OrefSet() for this. When we're restoring the classes, the */
455  /* class objects are in oldspace, and the behaviours are */
456  /* primitive objects, not subject to sweeping. We do a direct */
457  /* assignment to avoid creating a reference entry in the old2new */
458  /* table. */
459  this->owningClass->setInstanceBehaviour(this);
460  return this->owningClass; /* return the associated class */
461 }
462 
463 void *RexxBehaviour::operator new(size_t size,
464  size_t typenum) /* target behaviour type number */
465 /******************************************************************************/
466 /* Function: Create and initialize a target primitive behaviour */
467 /******************************************************************************/
468 {
469  // return a pointer to the static primitive one
470  return (void *)getPrimitiveBehaviour(typenum);
471 }
472 
474  RexxObject * start_scope) /* requested current scope */
475 /******************************************************************************/
476 /* Function: Return the scope following a give scope */
477 /******************************************************************************/
478 {
479  if (this->scopes == OREF_NULL) /* no scopes defined? */
480  {
481  return TheNilObject; /* no super scoping possible */
482  }
483  /* go get the super scope */
484  return this->scopes->findSuperScope(start_scope);
485 }
486 
488  RexxString * messageName, /* target method name */
489  RexxObject * startScope) /* starting scope */
490 /******************************************************************************/
491 /* Function: Find a method using the given starting scope information */
492 /******************************************************************************/
493 {
494  /* if we have scopes defined and we */
495  /* have a good start scope */
496  if (this->scopes != OREF_NULL && startScope != TheNilObject)
497  {
498  /* get the scope list for the given */
499  /* starting scope */
500  RexxArray *scopeList = (RexxArray *)this->scopes->get(startScope);
501  if (scopeList != OREF_NULL) /* have a matching list? */
502  {
503  /* get a list of methods */
504  RexxArray *methods = this->methodDictionary->stringGetAll(messageName);
505  size_t scopes_size = scopeList->size(); /* get the two array sizes */
506  size_t methods_size = methods->size();
507  /* search through the methods list */
508  /* for the first one with a */
509  /* conforming scope */
510  for (size_t i = 1; i <= methods_size; i++)
511  {
512  /* get the next method */
513  RexxMethod *method = (RexxMethod *)methods->get(i);
514  /* now loop through the scopes list */
515  for (size_t j = 1; j <= scopes_size; j++)
516  {
517  /* got a matching scope here? */
518  if (scopeList->get(j) == method->getScope())
519  {
520  return method; /* return the method */
521  }
522  }
523  }
524  }
525  }
526  return OREF_NULL; /* nothing found */
527 }
528 
530  RexxObject *scope) /* new scopy for all methods */
531 /******************************************************************************/
532 /* Function: Set a new set of scoping information for an object */
533 /******************************************************************************/
534 {
535  // we might not have instance methods to process
537  {
538  return;
539  }
540 
541  /* traverse the method dictionary */
542  for (HashLink i = this->methodDictionary->first();
543  this->methodDictionary->index(i) != OREF_NULL;
544  i = this->methodDictionary->next(i))
545  {
546  /* setting each scope */
547  ((RexxMethod *)this->methodDictionary->value(i))->setScope((RexxClass *)scope);
548  }
549 }
550 
551 
552 /**
553  * Extract from the method dictionary all methods defined with
554  * a given scope.
555  *
556  * @param scope The target scope. If null, then all methods
557  * are returned.
558  *
559  * @return A supplier holding the names and methods with the target
560  * scope. This supplier can be empty.
561  */
563 {
564  // if asking for everything, just return the supplier.
565  if (scope == OREF_NULL)
566  {
567  return this->methodDictionary->supplier();
568  }
569 
570  size_t count = 0;
571  HashLink i;
572 
573  // travese the method dictionary, searching for methods with the target scope
574  for (i = this->methodDictionary->first(); this->methodDictionary->index(i) != OREF_NULL; i = this->methodDictionary->next(i))
575  {
576  if (((RexxMethod *)this->methodDictionary->value(i))->getScope() == scope)
577  {
578  count++;
579  }
580  }
581 
582  RexxArray *names = new_array(count);
583  RexxArray *methods = new_array(count);
584  count = 1;
585 
586  // pass two, copy the entries into the array
587  for (i = this->methodDictionary->first(); this->methodDictionary->index(i) != OREF_NULL; i = this->methodDictionary->next(i))
588  {
589  if (((RexxMethod *)this->methodDictionary->value(i))->getScope() == scope)
590  {
591  names->put(this->methodDictionary->index(i), count);
592  methods->put(this->methodDictionary->value(i), count);
593  count++;
594  }
595  }
596 
597  return (RexxSupplier *)new_supplier(methods, names);
598 }
599 
600 
602  RexxIdentityTable *newscopes) /* new table of scopes */
603 /******************************************************************************/
604 /* Function: Set a new set of scoping information for an object */
605 /******************************************************************************/
606 {
607  /* set the scoping info */
608  OrefSet(this, this->scopes, newscopes);
609  return OREF_NULL; /* always return nothing */
610 }
611 
613  RexxObject *scope) /* new scope for the scope table */
614 /******************************************************************************/
615 /* Function: Set a new set of scoping information for an object */
616 /******************************************************************************/
617 {
618  if (this->scopes == OREF_NULL) /* no scopes set? */
619  {
620  /* add a scope table to add to */
621  OrefSet(this, this->scopes, new_identity_table());
622  }
623  /* set the scoping info */
624  this->scopes->add(scope, TheNilObject);
625  /* add the scope list for this scope */
626  this->scopes->add(this->scopes->allAt(TheNilObject), scope);
627  return OREF_NULL; /* return the big nothing */
628 }
629 
631  RexxObject *scope) /* new scope for the scope table */
632 /******************************************************************************/
633 /* Function: Set a new set of scoping information for an object */
634 /******************************************************************************/
635 {
636  if (this->checkScope(scope)) // seen this one before?
637  {
638  return OREF_NULL; // we're done
639  }
640 
641  return this->addScope(scope); // go and add this
642 }
643 
644 
646  RexxObject *scope) /* scope to check */
647 /*****************************************************************************/
648 /* Function: Check if the passed scope is already in the scope table */
649 /*****************************************************************************/
650 {
651  if (this->scopes == OREF_NULL) /* no scopes set? */
652  {
653  return false; /* then it can't be in the table */
654  }
655  /* have the table check for the index*/
656  return this->scopes->get(scope) != OREF_NULL;
657 }
658 
660  RexxBehaviour * source_behav) /* new behaviour to add in */
661 /*****************************************************************************/
662 /* Function: Merge the passed behaviour's mdict into this behaviour's mdict */
663 /* The method search order will be for the target(this) behaviour */
664 /* to be found before the source behaviour */
665 /*****************************************************************************/
666 {
667  /* if there isn't a source mdict */
668  /* there isn't anything to do */
669  if (source_behav->methodDictionary == OREF_NULL)
670  {
671  return;
672  }
673  /* if there isn't a mdict yet just */
674  /* use the source for this one */
675  if (this->methodDictionary == OREF_NULL)
676  {
677  OrefSet(this, this->methodDictionary, source_behav->methodDictionary);
678  }
679  else
680  {
681  /* get a copy of the source mdict */
682  /* for the merge */
683  RexxTable *newMethods = (RexxTable *)source_behav->methodDictionary->copy();
684  ProtectedObject p(newMethods);
685  /* merge this mdict with the copy */
686  this->methodDictionary->merge(newMethods);
687  /* and put it into this behaviour */
688  OrefSet(this, this->methodDictionary, newMethods);
689  }
690 }
691 
693  RexxTable *sourceDictionary) /* dictionary to merge in */
694 /*****************************************************************************/
695 /* Function: Merge the passed mdict into this behaviour's mdict */
696 /* After this merge the method search order will find the source */
697 /* mdict methods prior to self(target) methods */
698 /*****************************************************************************/
699 {
700  RexxTable *newDictionary; /* new method dictionary */
701 
702  /* if there isn't a source mdict */
703  if (sourceDictionary == OREF_NULL) /* there isn't anything to do */
704  {
705  return; /* just return */
706  }
707  /* if there isn't a mdict yet just */
708  /* use the source for this one */
709  if (this->methodDictionary == OREF_NULL)
710  {
711  OrefSet(this, this->methodDictionary, sourceDictionary);
712  }
713  else
714  {
715  /* get a copy of the target mdict */
716  /* for the merge */
717  newDictionary = (RexxTable *)this->methodDictionary->copy();
718  ProtectedObject p(newDictionary);
719  /* merge the source mdict and copy */
720  sourceDictionary->merge(newDictionary);
721  /* and put it into this behaviour */
722  OrefSet(this, this->methodDictionary, newDictionary);
723  }
724 }
725 
RexxArray * new_array(size_t s)
Definition: ArrayClass.hpp:259
@ T_Last_Exported_Class
@ T_First_Transient_Class
@ T_Behaviour
RexxIdentityTable * new_identity_table()
RexxObject *(RexxObject::* PCPPM)()
#define OREF_NULL
Definition: RexxCore.h:60
RexxString * stringArgument(RexxObject *object, RexxString *kind, size_t position)
Definition: RexxCore.h:303
#define OrefSet(o, r, v)
Definition: RexxCore.h:94
#define TheNilObject
Definition: RexxCore.h:181
const int ARG_ONE
Definition: RexxCore.h:80
size_t HashLink
RexxMemory memoryObject
Definition: RexxMemory.cpp:85
#define memory_mark(oref)
Definition: RexxMemory.hpp:445
#define flatten_reference(oref, envel)
Definition: RexxMemory.hpp:493
size_t roundObjectBoundary(size_t n)
Definition: RexxMemory.hpp:95
#define memory_mark_general(oref)
Definition: RexxMemory.hpp:446
#define cleanUpFlatten
Definition: RexxMemory.hpp:479
#define setUpFlatten(type)
Definition: RexxMemory.hpp:473
RexxSupplier * new_supplier(RexxArray *c, RexxArray *f)
RexxTable * new_table()
Definition: TableClass.hpp:76
static CPPCode * resolveExportedMethod(const char *, PCPPM targetMethod, size_t argcount, bool passNamedArgs)
Definition: CPPCode.cpp:1113
void setObjectSize(size_t l)
Definition: ObjectClass.hpp:95
void put(RexxObject *eref, size_t pos)
Definition: ArrayClass.cpp:208
size_t size()
Definition: ArrayClass.hpp:202
RexxObject * get(size_t pos)
Definition: ArrayClass.hpp:203
uint16_t behaviourFlags
RexxMethod * methodLookup(RexxString *)
RexxTable * getMethodDictionary()
void merge(RexxBehaviour *)
void setMethodDictionaryScope(RexxObject *)
RexxMethod * getMethod(RexxString *)
RexxObject * mergeScope(RexxObject *)
RexxObject * addScope(RexxObject *)
void methodDictionaryMerge(RexxTable *)
RexxTable * methodDictionary
void restore(RexxBehaviour *)
void setNonPrimitive()
RexxObject * define(RexxString *, RexxMethod *)
RexxObject * copy()
void removeMethod(RexxString *)
void live(size_t)
RexxClass * getOwningClass()
RexxMethod * methodObject(RexxString *)
RexxSupplier * getMethods(RexxObject *scope)
RexxClass * restoreClass()
RexxObject * deleteMethod(RexxString *)
RexxTable * instanceMethodDictionary
void flatten(RexxEnvelope *)
RexxObject * setScopes(RexxIdentityTable *)
bool checkScope(RexxObject *)
static RexxBehaviour * getPrimitiveBehaviour(size_t index)
RexxIdentityTable * getScopes()
RexxIdentityTable * scopes
void setClassType(size_t n)
RexxMethod * superMethod(RexxString *, RexxObject *)
void subclass(RexxBehaviour *)
void copyBehaviour(RexxBehaviour *source)
void liveGeneral(int reason)
void resolveNonPrimitiveBehaviour()
RexxObject * superScope(RexxObject *)
RexxClass * owningClass
static PCPPM * getOperatorMethods(size_t index)
void addMethod(RexxString *, RexxMethod *)
size_t getClassType()
PCPPM * operatorMethods
void setInstanceBehaviour(RexxBehaviour *)
Definition: ClassClass.cpp:294
RexxObject * value(HashLink pos)
virtual RexxObject * remove(RexxObject *key)
RexxObject * merge(RexxHashTableCollection *)
RexxObject * index(HashLink pos)
RexxSupplier * supplier()
RexxArray * allAt(RexxObject *key)
RexxObject * findSuperScope(RexxObject *v)
virtual RexxObject * get(RexxObject *key)
virtual RexxObject * add(RexxObject *, RexxObject *)
void setBehaviour(RexxBehaviour *b)
void setObjectSize(size_t s)
ObjectHeader header
RexxObject * clone()
RexxBehaviour * behaviour
bool restoringImage()
Definition: RexxMemory.hpp:218
bool savingImage()
Definition: RexxMemory.hpp:217
static RexxString * getGlobalName(const char *value)
RexxClass * getScope()
static PCPPM operatorMethods[]
RexxString * upper()
RexxArray * stringGetAll(RexxString *key)
Definition: TableClass.hpp:66
RexxObject * stringAdd(RexxObject *, RexxString *)
Definition: TableClass.cpp:94
RexxObject * stringPut(RexxObject *, RexxString *)
Definition: TableClass.cpp:113
RexxObject * stringGet(RexxString *key)
Definition: TableClass.hpp:67