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)  

PackageManager.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.ibm.com/developerworks/oss/CPLv1.0.htm */
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 Package management */
42 /* */
43 /******************************************************************************/
44 
45 #include "RexxCore.h"
46 #include "PackageManager.hpp"
47 #include "LibraryPackage.hpp"
48 #include "Interpreter.hpp"
49 #include "RexxNativeCode.hpp"
50 #include "DirectoryClass.hpp"
51 #include "ActivityManager.hpp"
52 #include "RoutineClass.hpp"
53 #include "RexxInternalApis.h"
54 #include "ProtectedObject.hpp"
55 #include "SecurityManager.hpp"
56 #include "WeakReferenceClass.hpp"
57 #include "RexxActivation.hpp"
58 #include "PackageClass.hpp"
59 
60 // this first set is the inital image set, which we preserve the references
61 // to in order to reset the package loads when the Rexx environment shuts down
66 
67 RexxDirectory *PackageManager::packages = OREF_NULL; // our loaded packages
68 RexxDirectory *PackageManager::packageRoutines = OREF_NULL; // table of functions loaded from packages
71 
76 {
77  packages = new_directory(); // create the tables for the manager
81  // load the internal library first
82  loadInternalPackage(OREF_REXX, rexxPackage);
83  loadLibrary(OREF_REXXUTIL); // load the rexxutil package automatically
84 }
85 
86 
94 {
95 
96  RexxArray *imageArray = new_array(IMAGE_ARRAY_SIZE);
97  imageArray->put(packages, IMAGE_PACKAGES);
100  imageArray->put(loadedRequires, IMAGE_REQUIRES);
101 
102  return imageArray;
103 }
104 
105 
112 {
113  // The memory manager is not initialized yet, so we just store the references
114  // at this point. A little later, we'll replace these with copies.
115  imagePackages = (RexxDirectory *)imageArray->get(IMAGE_PACKAGES);
119 }
120 
121 
126 {
127  // we use copies of the image directories to avoid old-to-new image problems.
128  // this also allows us to restore the environment after interpreter shutdown
133 
134  for (HashLink i = packages->first(); packages->available(i); i = packages->next(i))
135  {
136  // get the next package
137  LibraryPackage *package = (LibraryPackage *)packages->value(i);
138  // not one of the internal packages, so reload.
139  if (!package->isInternal())
140  {
141  package->reload();
142  package->makeInternal(); // make this part of the persistent set now
143  }
144  else
145  {
146  // the only internal package is the Rexx one
147  package->reload(rexxPackage);
148  }
149  }
150 }
151 
152 
156 void PackageManager::live(size_t liveMark)
157 {
162 }
163 
168 {
173 }
174 
175 
186 {
187  // have we already loaded this package?
188  // may need to bootstrap it up first.
189  LibraryPackage *package = loadLibrary(name);
190  if (package == NULL)
191  {
192  // this is an error
194  }
195  return package;
196 }
197 
198 
209 {
210  // have we already loaded this package?
211  // may need to bootstrap it up first.
212  LibraryPackage *package = (LibraryPackage *)packages->at(name);
213  if (package == NULL)
214  {
215  package = new LibraryPackage(name);
216  // add this to our package list.
217  packages->put((RexxObject *)package, name);
218  // now force the package to load.
219  if (!package->load())
220  {
221  // unable to load the library, so remove this and return NULL.
222  packages->remove(name);
223  return OREF_NULL;
224  }
225  }
226  return package;
227 }
228 
229 
242 {
243  // have we already loaded this package?
244  // may need to bootstrap it up first.
245  LibraryPackage *package = getLibrary(packageName);
246 
247  // now see if this can be resolved.
248  return package->resolveMethod(methodName);
249 }
250 
251 
264 {
265  // have we already loaded this package?
266  // may need to bootstrap it up first.
267  LibraryPackage *package = loadLibrary(packageName);
268  // silently fail this if it couldn't load
269  if (package == OREF_NULL)
270  {
271  return OREF_NULL;
272  }
273 
274  // now see if this can be resolved.
275  return package->resolveMethod(methodName);
276 }
277 
278 
279 
292 {
293  // see if we have this one already
294  RoutineClass *func = (RoutineClass *)registeredRoutines->at(function);
295 
296  // if we have this, then we can return it directly.
297  if (func != OREF_NULL)
298  {
299  return func;
300  }
301 
302  const char *functionName = function->getStringData();
303  const char *libraryName = packageName->getStringData();
304  const char *procedureName = procedure->getStringData();
305 
306  {
307  UnsafeBlock releaser; // don't hold the block while making the API call
308  // go register this (unconditionally....at this point, we don't care if this fails)
309  RexxRegisterFunctionDll(functionName, libraryName, procedureName);
310  }
311 
312 
313  // resolve a registered entry, if we can and add it to the cache
314  return createRegisteredRoutine(function);
315 }
316 
317 
327 {
328  // see if we have this one already as a package function
329  RoutineClass *func = getLoadedRoutine(function);
330 
331  // if we have this, then we can return it directly.
332  if (func != OREF_NULL)
333  {
334  return func;
335  }
336 
337  // resolve a registered entry, if we can and add it to the cache
338  return createRegisteredRoutine(function);
339 }
340 
341 
356 {
357  // have we already loaded this package?
358  // may need to bootstrap it up first.
359  LibraryPackage *package = getLibrary(packageName);
360 
361  // now see if this can be resolved.
362  return package->resolveRoutine(function);
363 }
364 
365 
380 {
381  // have we already loaded this package?
382  // may need to bootstrap it up first.
383  LibraryPackage *package = loadLibrary(packageName);
384  if (package == OREF_NULL)
385  {
386  return OREF_NULL;
387  }
388 
389  // now see if this can be resolved.
390  return package->resolveRoutine(function);
391 }
392 
393 
394 
404 {
405  // see if we have this one already as a package function
406  RoutineClass *func = (RoutineClass *)packageRoutines->at(function);
407 
408  // if we have this, then we can return it directly.
409  if (func != OREF_NULL)
410  {
411  return func;
412  }
413 
414  // see if we have this one already as a registered function
415  return (RoutineClass *)registeredRoutines->at(function);
416 }
417 
418 
428 {
429  REXXPFN entry = NULL;
430 
431  const char *functionName = function->getStringData();
432 
433  {
434  UnsafeBlock releaser; // don't hold the lock while calling
435  // now go resolve this entry pointer
436  RexxResolveRoutine(functionName, &entry);
437  }
438 
439  // this is a failure
440  if (entry == NULL)
441  {
442  return OREF_NULL;
443  }
444 
445  // create a code handler and add to the cache
446  RoutineClass *func = new RoutineClass(function, new RegisteredRoutine(function, (RexxRoutineHandler *)entry));
447  registeredRoutines->put(func, function->upper());
448  // we got this
449  return func;
450 }
451 
452 
462 {
463  // load up the package and add it to our cache
464  LibraryPackage *package = new LibraryPackage(name, p);
465  // have we already loaded this package?
466  packages->put((RexxObject *)package, name);
467  // now process the package loading after we add this to the table.
468  // This avoids a multi-threaded race condition resulting from the fact
469  // we release the global resource lock when we call out to the package loader.
470  package->loadPackage();
471 }
472 
473 
484 {
485  // don't replace any already loaded packages
486  if (packages->at(name) != OREF_NULL)
487  {
488  return false;
489  }
490  // handle like an internal package
491  loadInternalPackage(name, p);
492  return true;
493 }
494 
495 
496 
504 {
505  packageRoutines->put(func, name);
506 }
507 
508 
528 {
529  // make sure we're using uppercase name versions here.
530  name = name->upper();
531  ProtectedObject p1(name);
532 
533  // see if we have this one already, either from a package or previously loaded
534  RoutineClass *func = getLoadedRoutine(name);
535 
536  // if we have this, then we can return it directly.
537  if (func != OREF_NULL)
538  {
539  return TheFalseObject;
540  }
541 
542  // see if this package is resolveable/loadable.
543  LibraryPackage *package = loadLibrary(module);
544  if (package != OREF_NULL)
545  {
546  // See if this is resolvable in this context. If we got it,
547  // return 0, the false object.
549  }
550 
551  // ok, this is not a converted new-style package. Now try registering the function and
552  // resolving it in this process. This will also add this to the local cache
553  return resolveRoutine(name, module, proc) != OREF_NULL ? TheFalseObject : TheTrueObject;
554 }
555 
556 
566 {
567  // we register this using the uppercase name, so make sure we uppercase it
568  // before looking in the tables.
569  name = name->upper();
570  // remove this from the local cache, then remove it from the global function
571  // registration.
572  registeredRoutines->remove(name);
573  const char *functionName = name->getStringData();
574 
575  {
576  UnsafeBlock releaser;
577  // if this is a registered routine, removed it from the registered table
578  registeredRoutines->remove(name);
579  // just allow this to pass through to Rexxapi. If this was truely registered
580  // instead of loaded implicitly, this will remove the entry. Otherwise, it will
581  // return false.
582  return RexxDeregisterFunction(functionName) == 0 ? TheFalseObject : TheTrueObject;
583  }
584 }
585 
586 
598 {
599  // we register this using the uppercase name, so make sure we uppercase it
600  // before looking in the tables.
601  name = name->upper();
602  // does this name exist in our table?
603  if (getLoadedRoutine(name) != OREF_NULL)
604  {
605  return TheFalseObject;
606  }
607 
608  const char *functionName = name->getStringData();
609  {
610  UnsafeBlock releaser;
611  // just allow this to pass through to Rexxapi. If this was truly registered
612  // instead of loaded implicitly, it will find it.
613  return RexxQueryFunction(functionName) != 0 ? TheTrueObject : TheFalseObject;
614  }
615 }
616 
617 
622 {
623  // traverse the package table, and force an unload for each library we've loaded up.
624  for (HashLink i = packages->first(); packages->available(i); i = packages->next(i))
625  {
626  // get the next package
627  LibraryPackage *package = (LibraryPackage *)packages->value(i);
628  package->unload();
629  }
630 
631  // now roll back to a copy of the image versions of these directories so we only
632  // have the orignal image set once again
637 }
638 
639 
654  RexxObject **arguments, size_t argcount, ProtectedObject &result)
655 {
656  // all of our tables use uppercase names...make this a case-insensitive lookup
657  name = name->upper();
658 
659  // package functions come first
660  RoutineClass *function = (RoutineClass *)packageRoutines->at(name);
661  if (function != OREF_NULL)
662  {
663  function->call(activity, name, arguments, argcount, result);
664  return true;
665  }
666 
667  // now check for registered functions. This will either return a cached value,
668  // or resolve a routine for the first time and return the cached value.
669  function = resolveRoutine(name);
670  if (function != OREF_NULL)
671  {
672  function->call(activity, name, arguments, argcount, result);
673  return true;
674  }
675 
676  // not one of these
677  return false;
678 }
679 
680 
696 {
697  result = OREF_NULL;
698 
699  SecurityManager *manager = activity->getEffectiveSecurityManager();
700  RexxObject *securityManager = OREF_NULL;
701 
702  shortName = manager->checkRequiresAccess(shortName, securityManager);
703  // no return means forbidden access to this name. Just return
704  // nothing
705  if (shortName == OREF_NULL)
706  {
707  return OREF_NULL;
708  }
709 
710 
711  // first check this using the specified name. Since we need to perform checks in the
712  // macro space, it's possible this will be loaded under the simple name. We'll need to check
713  // table again using the fully resolved name afterward.
714 
715  RoutineClass *package = checkRequiresCache(shortName, result);
716  if (package != OREF_NULL)
717  {
718  return package;
719  }
720 
721  unsigned short macroPosition; // a macrospace position marker
722 
723  // we need to look in the macrospace before we try checking for a file-based
724  // requires. The macrospace version uses the original name for all checks. Once we
725  // get to the file-based version, we switch to the full resolved name.
726  bool checkMacroSpace = RexxQueryMacro(shortName->getStringData(), &macroPosition) == 0;
727  if (checkMacroSpace && (macroPosition == RXMACRO_SEARCH_BEFORE))
728  {
729  return getMacroSpaceRequires(activity, shortName, result, securityManager);
730  }
731 
732  // it's possible we don't have a file version of this
733  if (resolvedName != OREF_NULL)
734  {
735  resolvedName = manager->checkRequiresAccess(resolvedName, securityManager);
736  // no return means forbidden access to this name. Just return
737  // nothing
738  if (resolvedName == OREF_NULL)
739  {
740  return OREF_NULL;
741  }
742 
743 
744  // now check again using the longer name
745  package = checkRequiresCache(resolvedName, result);
746  if (package != OREF_NULL)
747  {
748  return package;
749  }
750 
751  // load the file version of this.
752  return getRequiresFile(activity, resolvedName, securityManager, result);
753  }
754 
755  // do the macrospace after checks
756  if (checkMacroSpace)
757  {
758  return getMacroSpaceRequires(activity, shortName, result, securityManager);
759  }
760 
761  // nothing to return
762  return OREF_NULL;
763 }
764 
765 
778 {
779  // make sure we're not stuck in a circular reference
780  activity->checkRequires(name);
781  // unflatten the method and protect it
783  result = code;
784 
785  if (securityManager == OREF_NULL)
786  {
787  code->setSecurityManager(securityManager);
788  }
789  // we place the code in the package table so we have
790  // access to it to run the prologue code in other instances
791  // We also add this before running the prolog in case another
792  // thread tries to load the same thing.
793  WeakReference *ref = new WeakReference(code);
794  loadedRequires->put(ref, name);
795 
796  return code;
797 }
798 
799 
810 {
811  // make sure we're not stuck in a circular reference
812  activity->checkRequires(name);
813  // try to load this from a previously compiled source file or
814  // translate it a new if not.
815  RoutineClass *code = RoutineClass::fromFile(name);
816  result = code; // we need to protect this until things are fully resolved.
817 
818  if (securityManager == OREF_NULL)
819  {
820  code->setSecurityManager(securityManager);
821  }
822  return code;
823 }
824 
825 
836 RoutineClass *PackageManager::loadRequires(RexxActivity *activity, RexxString *name, const char *data, size_t length, ProtectedObject &result)
837 {
838  // first check this using the specified name.
839  RoutineClass *resolved = checkRequiresCache(name, result);
840  if (resolved != OREF_NULL)
841  {
842  return resolved;
843  }
844 
845  RoutineClass *code = new RoutineClass(name, data, length);
846  result = code;
847 
848  // we place the code in the package table so we have
849  // access to it to run the prologue code in other instances
850  // We also add this before running the prolog in case another
851  // thread tries to load the same thing.
852  WeakReference *ref = new WeakReference(code);
853  loadedRequires->put(ref, name);
854  return code;
855 }
856 
857 
869 {
870  // first check this using the specified name.
871  RoutineClass *code = checkRequiresCache(name, result);
872  if (code == OREF_NULL)
873  {
874  code = new RoutineClass(name, data);
875  result = code;
876 
877  // we place the code in the package table so we have
878  // access to it to run the prologue code in other instances
879  // We also add this before running the prolog in case another
880  // thread tries to load the same thing.
881  WeakReference *ref = new WeakReference(code);
882  loadedRequires->put(ref, name);
883  }
884  return code;
885 }
886 
887 
896 {
897  // first check this using the specified name. Since we need to perform checks in the
898  // macro space, it's possible this will be loaded under the simple name. We'll need to check
899  // table again using the fully resolved name afterward.
900  WeakReference *requiresRef = (WeakReference *)loadedRequires->get(name);
901  if (requiresRef != OREF_NULL)
902  {
903  RoutineClass *resolved = (RoutineClass *)requiresRef->get();
904  if (resolved != OREF_NULL)
905  {
906  result = resolved;
907  return resolved;
908  }
909  // this was garbage collected, remove it from the table
910  loadedRequires->remove(name);
911  }
912  return OREF_NULL;
913 }
914 
915 
925 {
926  LibraryPackage *package = loadLibrary(packageName);
927 
928  // if no entry, something bad has gone wrong
929  if (package == NULL)
930  {
932  }
933  return package->resolveMethodEntry(name);
934 }
935 
936 
946 {
947  LibraryPackage *package = loadLibrary(packageName);
948 
949  // if no entry, something bad has gone wrong
950  if (package == NULL)
951  {
953  }
954  return package->resolveRoutineEntry(name);
955 }
956 
957 
967 {
968  // if there's no package name, then this is stored in raw name form (I don't believe this should
969  // ever happen....but.
970  if (packageName == OREF_NULL)
971  {
972  REXXPFN entry = NULL;
973 
974  const char *functionName = name->getStringData();
975  {
976  UnsafeBlock releaser;
977  // now go resolve this entry pointer
978  RexxResolveRoutine(functionName, &entry);
979  }
980 
981  // this is a failure
982  if (entry == NULL)
983  {
985  }
986  return (PREGISTEREDROUTINE)entry;
987  }
988  else
989  {
990  LibraryPackage *package = loadLibrary(packageName);
991 
992  // if no entry, something bad has gone wrong
993  if (package == NULL)
994  {
996  }
997  return package->resolveRegisteredRoutineEntry(name);
998  }
999 }
RegisteredRoutine
Definition: RexxNativeCode.hpp:130
PNATIVEMETHOD
uint16_t *(RexxEntry * PNATIVEMETHOD)(RexxMethodContext *, ValueDescriptor *)
Definition: MethodClass.hpp:76
PackageManager::unload
static void unload()
Definition: PackageManager.cpp:621
LibraryPackage::resolveRoutine
RoutineClass * resolveRoutine(RexxString *name)
Definition: LibraryPackage.cpp:395
PackageManager::loadLibrary
static LibraryPackage * loadLibrary(RexxString *name)
Definition: PackageManager.cpp:208
new_array
RexxArray * new_array(size_t s)
Definition: ArrayClass.hpp:250
RexxHashTableCollection::next
HashLink next(HashLink pos)
Definition: RexxCollection.hpp:88
RexxArray
Definition: ArrayClass.hpp:100
PackageManager::getLibrary
static LibraryPackage * getLibrary(RexxString *name)
Definition: PackageManager.cpp:185
PackageManager::IMAGE_ARRAY_SIZE
Definition: PackageManager.hpp:108
PackageManager::resolveRoutine
static RoutineClass * resolveRoutine(RexxString *function, RexxString *packageName, RexxString *procedure)
Definition: PackageManager.cpp:291
TheFalseObject
#define TheFalseObject
Definition: RexxCore.h:184
PackageManager::IMAGE_REGISTERED_ROUTINES
Definition: PackageManager.hpp:106
LibraryPackage.hpp
PackageManager::resolveMethod
static RexxNativeMethod * resolveMethod(RexxString *packageName, RexxString *methodName)
Definition: PackageManager.cpp:241
PackageClass.hpp
WeakReferenceClass.hpp
RexxActivity::getEffectiveSecurityManager
SecurityManager * getEffectiveSecurityManager()
Definition: RexxActivity.cpp:2782
memory_mark_general
#define memory_mark_general(oref)
Definition: RexxMemory.hpp:437
PackageManager::initialize
static void initialize()
Definition: PackageManager.cpp:75
RexxActivation.hpp
RoutineClass::setSecurityManager
RexxObject * setSecurityManager(RexxObject *)
Definition: RoutineClass.cpp:323
RoutineClass.hpp
RoutineClass
Definition: RoutineClass.hpp:49
RexxDirectory::copy
RexxObject * copy()
Definition: DirectoryClass.cpp:109
PackageManager::addPackageRoutine
static void addPackageRoutine(RexxString *name, RoutineClass *func)
Definition: PackageManager.cpp:503
ActivityManager.hpp
PackageManager::packageRoutines
static RexxDirectory * packageRoutines
Definition: PackageManager.hpp:118
WeakReference::get
RexxObject * get()
Definition: WeakReferenceClass.hpp:73
SecurityManager::checkRequiresAccess
RexxString * checkRequiresAccess(RexxString *name, RexxObject *&securityManager)
Definition: SecurityManager.cpp:310
PackageManager::registeredRoutines
static RexxDirectory * registeredRoutines
Definition: PackageManager.hpp:119
UnsafeBlock
Definition: ActivityManager.hpp:280
RexxDirectory::at
RexxObject * at(RexxString *)
Definition: DirectoryClass.cpp:567
reportException
void reportException(wholenumber_t error)
Definition: ActivityManager.hpp:136
PackageManager::IMAGE_PACKAGES
Definition: PackageManager.hpp:104
PackageManager::resolveRoutineEntry
static PNATIVEROUTINE resolveRoutineEntry(RexxString *package, RexxString *name)
Definition: PackageManager.cpp:945
Error_Execution_library_method
#define Error_Execution_library_method
Definition: RexxErrorCodes.h:555
TheTrueObject
#define TheTrueObject
Definition: RexxCore.h:185
RexxString::getStringData
const char * getStringData()
Definition: StringClass.hpp:333
PackageManager::registerPackage
static bool registerPackage(RexxString *name, RexxPackageEntry *p)
Definition: PackageManager.cpp:483
PackageManager::callNativeRoutine
static bool callNativeRoutine(RexxActivity *activity, RexxString *name, RexxObject **arguments, size_t argcount, ProtectedObject &result)
Definition: PackageManager.cpp:653
PackageManager::getMacroSpaceRequires
static RoutineClass * getMacroSpaceRequires(RexxActivity *activity, RexxString *name, ProtectedObject &result, RexxObject *securityManager)
Definition: PackageManager.cpp:777
PackageManager::resolveRegisteredRoutineEntry
static PREGISTEREDROUTINE resolveRegisteredRoutineEntry(RexxString *package, RexxString *name)
Definition: PackageManager.cpp:966
PackageManager::live
static void live(size_t liveMark)
Definition: PackageManager.cpp:156
RexxArray::get
RexxObject * get(size_t pos)
Definition: ArrayClass.hpp:201
RXMACRO_SEARCH_BEFORE
#define RXMACRO_SEARCH_BEFORE
Definition: rexxapidefs.h:220
Interpreter.hpp
LibraryPackage
Definition: LibraryPackage.hpp:57
RexxHashTableCollection::get
virtual RexxObject * get(RexxObject *key)
Definition: RexxCollection.cpp:242
PackageManager::IMAGE_REQUIRES
Definition: PackageManager.hpp:107
PackageManager::liveGeneral
static void liveGeneral(int reason)
Definition: PackageManager.cpp:167
RexxHashTableCollection::first
HashLink first()
Definition: RexxCollection.hpp:87
PNATIVEROUTINE
uint16_t *(RexxEntry * PNATIVEROUTINE)(RexxCallContext *, ValueDescriptor *)
Definition: MethodClass.hpp:78
RexxRoutineHandler
size_t REXXENTRY RexxRoutineHandler(CSTRING, size_t, PCONSTRXSTRING, CSTRING, PRXSTRING)
Definition: rexx.h:406
OREF_NULL
#define OREF_NULL
Definition: RexxCore.h:60
SecurityManager.hpp
PackageManager::loadInternalPackage
static void loadInternalPackage(RexxString *name, RexxPackageEntry *p)
Definition: PackageManager.cpp:461
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
RexxDirectory
Definition: DirectoryClass.hpp:49
REXXPFN
void * REXXPFN
Definition: rexxapitypes.h:63
PackageManager::imagePackageRoutines
static RexxDirectory * imagePackageRoutines
Definition: PackageManager.hpp:112
LibraryPackage::unload
void unload()
Definition: LibraryPackage.cpp:155
PackageManager::checkRequiresCache
static RoutineClass * checkRequiresCache(RexxString *name, ProtectedObject &result)
Definition: PackageManager.cpp:895
PackageManager::createRegisteredRoutine
static RoutineClass * createRegisteredRoutine(RexxString *function)
Definition: PackageManager.cpp:427
ProtectedObject.hpp
PackageManager::imageLoadedRequires
static RexxDirectory * imageLoadedRequires
Definition: PackageManager.hpp:114
ProtectedObject
Definition: ProtectedObject.hpp:46
RexxActivation::getMacroCode
static RoutineClass * getMacroCode(RexxString *macroName)
Definition: RexxActivation.cpp:2714
PackageManager::rexxPackage
static RexxPackageEntry * rexxPackage
Definition: PackageManager.hpp:122
PackageManager::imagePackages
static RexxDirectory * imagePackages
Definition: PackageManager.hpp:111
Error_Execution_library
#define Error_Execution_library
Definition: RexxErrorCodes.h:524
PackageManager::IMAGE_PACKAGE_ROUTINES
Definition: PackageManager.hpp:105
RexxResolveRoutine
int REXXENTRY RexxResolveRoutine(const char *, REXXPFN *)
Definition: RegistrationAPI.cpp:526
RexxNativeCode.hpp
RexxDirectory::put
RexxObject * put(RexxObject *, RexxString *)
Definition: DirectoryClass.cpp:636
memory_mark
#define memory_mark(oref)
Definition: RexxMemory.hpp:436
HashLink
size_t HashLink
Definition: RexxHashTable.hpp:49
PackageManager::resolveMethodEntry
static PNATIVEMETHOD resolveMethodEntry(RexxString *package, RexxString *name)
Definition: PackageManager.cpp:924
PackageManager::getLoadedRoutine
static RoutineClass * getLoadedRoutine(RexxString *function)
Definition: PackageManager.cpp:403
RexxDeregisterFunction
RexxReturnCode REXXENTRY RexxDeregisterFunction(CSTRING)
RexxActivity::checkRequires
bool checkRequires(RexxString *n)
Definition: RexxActivity.hpp:288
SecurityManager
Definition: SecurityManager.hpp:52
RexxInternalApis.h
LibraryPackage::resolveMethod
RexxNativeMethod * resolveMethod(RexxString *name)
Definition: LibraryPackage.cpp:359
PackageManager::dropRegisteredRoutine
static RexxObject * dropRegisteredRoutine(RexxString *name)
Definition: PackageManager.cpp:565
Error_Execution_library_routine
#define Error_Execution_library_routine
Definition: RexxErrorCodes.h:556
new_directory
RexxDirectory * new_directory()
Definition: DirectoryClass.hpp:101
PREGISTEREDROUTINE
size_t(RexxEntry * PREGISTEREDROUTINE)(const char *, size_t, PCONSTRXSTRING, const char *, PRXSTRING)
Definition: MethodClass.hpp:80
RexxNativeMethod
Definition: RexxNativeCode.hpp:72
RexxRegisterFunctionDll
RexxReturnCode REXXENTRY RexxRegisterFunctionDll(CSTRING, CSTRING, CSTRING)
_RexxPackageEntry
Definition: oorexxapi.h:241
RexxQueryFunction
RexxReturnCode REXXENTRY RexxQueryFunction(CSTRING)
PackageManager::loadRequires
static RoutineClass * loadRequires(RexxActivity *activity, RexxString *shortName, RexxString *resolvedName, ProtectedObject &result)
Definition: PackageManager.cpp:695
PackageManager::restore
static void restore()
Definition: PackageManager.cpp:125
RexxHashTableCollection::available
bool available(HashLink pos)
Definition: RexxCollection.hpp:91
PackageManager::loadRoutine
static RoutineClass * loadRoutine(RexxString *packageName, RexxString *function)
Definition: PackageManager.cpp:379
PackageManager::imageRegisteredRoutines
static RexxDirectory * imageRegisteredRoutines
Definition: PackageManager.hpp:113
RexxDirectory::remove
RexxObject * remove(RexxString *)
Definition: DirectoryClass.cpp:433
RoutineClass::fromFile
static RoutineClass * fromFile(RexxString *filename)
Definition: RoutineClass.cpp:845
PackageManager::addRegisteredRoutine
static RexxObject * addRegisteredRoutine(RexxString *name, RexxString *module, RexxString *proc)
Definition: PackageManager.cpp:527
RexxCore.h
LibraryPackage::reload
void reload()
Definition: LibraryPackage.cpp:480
PackageManager::packages
static RexxDirectory * packages
Definition: PackageManager.hpp:117
DirectoryClass.hpp
PackageManager::loadedRequires
static RexxDirectory * loadedRequires
Definition: PackageManager.hpp:120
PackageManager::getRequiresFile
static RoutineClass * getRequiresFile(RexxActivity *activity, RexxString *name, RexxObject *securityManager, ProtectedObject &result)
Definition: PackageManager.cpp:809
PackageManager::getImageData
static RexxArray * getImageData()
Definition: PackageManager.cpp:93
RexxString::upper
RexxString * upper()
Definition: StringClass.cpp:1442
WeakReference
Definition: WeakReferenceClass.hpp:54
RexxObject
Definition: ObjectClass.hpp:311
PackageManager.hpp
PackageManager::queryRegisteredRoutine
static RexxObject * queryRegisteredRoutine(RexxString *name)
Definition: PackageManager.cpp:597
RexxString
Definition: StringClass.hpp:119
RexxQueryMacro
RexxReturnCode REXXENTRY RexxQueryMacro(CSTRING, unsigned short *)