From: <bi...@us...> - 2007-11-30 00:36:04
|
Revision: 1340 http://oorexx.svn.sourceforge.net/oorexx/?rev=1340&view=rev Author: bigrixx Date: 2007-11-29 16:36:03 -0800 (Thu, 29 Nov 2007) Log Message: ----------- Another incremental checkin. Modified Paths: -------------- sandbox/rick/save/kernel/classes/MethodClass.cpp sandbox/rick/save/kernel/classes/MutableBufferClass.cpp sandbox/rick/save/kernel/classes/ObjectClass.cpp sandbox/rick/save/kernel/classes/StringClass.cpp sandbox/rick/save/kernel/parser/SourceFile.cpp sandbox/rick/save/kernel/platform/unix/FileSystem.cpp sandbox/rick/save/kernel/platform/windows/FileSystem.cpp sandbox/rick/save/kernel/platform/windows/wrexx.def sandbox/rick/save/kernel/runtime/ActivityManager.cpp sandbox/rick/save/kernel/runtime/GlobalNames.cpp sandbox/rick/save/kernel/runtime/Initialization.cpp sandbox/rick/save/kernel/runtime/RexxActivationStack.cpp sandbox/rick/save/kernel/runtime/RexxCore.h sandbox/rick/save/kernel/runtime/RexxEnvelope.cpp sandbox/rick/save/kernel/runtime/RexxHashTable.cpp sandbox/rick/save/kernel/runtime/RexxListTable.cpp sandbox/rick/save/kernel/runtime/RexxMemory.cpp sandbox/rick/save/kernel/runtime/RexxMemory.hpp sandbox/rick/save/kernel/runtime/RexxStartup.cpp sandbox/rick/save/kernel/runtime/Setup.cpp sandbox/rick/save/lib/LocalProcessData.cpp sandbox/rick/save/lib/RexxPlatformInterface.h sandbox/rick/save/platform/unix/rexx.cpp sandbox/rick/save/platform/windows/rexx.c sandbox/rick/save/platform/windows/rexxc.c sandbox/rick/save/platform/windows/rexxpaws.c Modified: sandbox/rick/save/kernel/classes/MethodClass.cpp =================================================================== --- sandbox/rick/save/kernel/classes/MethodClass.cpp 2007-11-29 18:59:33 UTC (rev 1339) +++ sandbox/rick/save/kernel/classes/MethodClass.cpp 2007-11-30 00:36:03 UTC (rev 1340) @@ -58,8 +58,6 @@ #include "ProtectedObject.hpp" #include <ctype.h> -extern PCPPM ExportedMethods[]; /* table of exported methods */ - RexxMethod::RexxMethod( size_t method, /* method table index */ PCPPM entry, /* method entry point */ @@ -113,7 +111,7 @@ if (memoryObject.restoringImage()) { /* restoring the image? */ this->setInternal(); /* mark as an image method */ /* reset the method entry point */ - this->cppEntry = ExportedMethods[this->getMethodIndex()]; + this->cppEntry = RexxMemory::exportedMethods[this->getMethodIndex()]; } } @@ -141,7 +139,7 @@ /* if not then we haven't unflattened*/ if (this->code == OREF_NULL) /* is this a kernel method? */ /* reset the method entry point */ - this->cppEntry = ExportedMethods[this->getMethodIndex()]; + this->cppEntry = RexxMemory::exportedMethods[this->getMethodIndex()]; return (RexxObject *)this; /* return ourself. */ } Modified: sandbox/rick/save/kernel/classes/MutableBufferClass.cpp =================================================================== --- sandbox/rick/save/kernel/classes/MutableBufferClass.cpp 2007-11-29 18:59:33 UTC (rev 1339) +++ sandbox/rick/save/kernel/classes/MutableBufferClass.cpp 2007-11-30 00:36:03 UTC (rev 1340) @@ -95,7 +95,7 @@ /* set the behaviour from the class */ newBuffer->setBehaviour(this->getInstanceBehaviour()); /* set the virtual function table */ - newBuffer->setVirtualFunctions(VFTArray[T_mutablebuffer]); + newBuffer->setVirtualFunctions(RexxMemory::VFTArray[T_mutablebuffer]); /* clear the front part */ newBuffer->clearObject(sizeof(RexxMutableBuffer)); newBuffer->bufferLength = bufferLength;/* save the length of the buffer */ Modified: sandbox/rick/save/kernel/classes/ObjectClass.cpp =================================================================== --- sandbox/rick/save/kernel/classes/ObjectClass.cpp 2007-11-29 18:59:33 UTC (rev 1339) +++ sandbox/rick/save/kernel/classes/ObjectClass.cpp 2007-11-30 00:36:03 UTC (rev 1340) @@ -2183,7 +2183,7 @@ // function table pointer. RexxObject *newObj = new_object(size, T_object); // we need to switch the virtual method table pointer new. - newObj->setVirtualFunctions(VFTArray[T_nil_object]); + newObj->setVirtualFunctions(RexxMemory::VFTArray[T_nil_object]); return newObj; } Modified: sandbox/rick/save/kernel/classes/StringClass.cpp =================================================================== --- sandbox/rick/save/kernel/classes/StringClass.cpp 2007-11-29 18:59:33 UTC (rev 1339) +++ sandbox/rick/save/kernel/classes/StringClass.cpp 2007-11-30 00:36:03 UTC (rev 1340) @@ -1638,7 +1638,7 @@ /* set the behaviour from the class*/ newObj->setBehaviour(TheStringBehaviour); /* set the virtual function table */ - newObj->setVirtualFunctions(VFTArray[T_string]); + newObj->setVirtualFunctions(RexxMemory::VFTArray[T_string]); /* clear the front part */ newObj->clearObject(sizeof(RexxString)); newObj->setLength(length); /* save the length */ @@ -1674,7 +1674,7 @@ /* set the behaviour from the class*/ newObj->setBehaviour(TheStringBehaviour); /* set the virtual function table */ - newObj->setVirtualFunctions(VFTArray[T_string]); + newObj->setVirtualFunctions(RexxMemory::VFTArray[T_string]); /* clear the front part */ newObj->clearObject(sizeof(RexxString)); newObj->setLength(length); /* save the length */ @@ -1717,7 +1717,7 @@ /* set the behaviour from the class*/ newObj->setBehaviour(TheStringBehaviour); /* set the virtual function table */ - newObj->setVirtualFunctions(VFTArray[T_string]); + newObj->setVirtualFunctions(RexxMemory::VFTArray[T_string]); /* clear the front part */ newObj->clearObject(sizeof(RexxString)); newObj->length = length; /* save the length */ Modified: sandbox/rick/save/kernel/parser/SourceFile.cpp =================================================================== --- sandbox/rick/save/kernel/parser/SourceFile.cpp 2007-11-29 18:59:33 UTC (rev 1339) +++ sandbox/rick/save/kernel/parser/SourceFile.cpp 2007-11-30 00:36:03 UTC (rev 1340) @@ -895,13 +895,12 @@ OrefSet(this, this->subTerms, new_queue()); OrefSet(this, this->operators, new_queue()); OrefSet(this, this->literals, new_directory()); - if (TheGlobalStrings != OREF_NULL) /* doing an image build? */ + // during an image build, we have a global string table. If this is + // available now, use it. + OrefSet(this, this->strings, memoryObject.getGlobalStrings()); + if (this->strings == OREF_NULL) { - /* use this for the string table */ - OrefSet(this, this->strings, TheGlobalStrings); - } - else - { + // no global string table, use a local copy OrefSet(this, this->strings, new_directory()); } /* get the clause object */ Modified: sandbox/rick/save/kernel/platform/unix/FileSystem.cpp =================================================================== --- sandbox/rick/save/kernel/platform/unix/FileSystem.cpp 2007-11-29 18:59:33 UTC (rev 1339) +++ sandbox/rick/save/kernel/platform/unix/FileSystem.cpp 2007-11-30 00:36:03 UTC (rev 1340) @@ -442,7 +442,7 @@ //} -void SysLoadImage(char **imageBuffer, long *imageSize) +void SysLoadImage(char **imageBuffer, size_t *imageSize) /*******************************************************************/ /* Function : Load the image into storage */ /*******************************************************************/ Modified: sandbox/rick/save/kernel/platform/windows/FileSystem.cpp =================================================================== --- sandbox/rick/save/kernel/platform/windows/FileSystem.cpp 2007-11-29 18:59:33 UTC (rev 1339) +++ sandbox/rick/save/kernel/platform/windows/FileSystem.cpp 2007-11-30 00:36:03 UTC (rev 1340) @@ -299,7 +299,7 @@ // retrofit by IH void SysLoadImage( char **imageBuffer, /* returned start of the image */ - long *imageSize ) /* size of the image */ + size_t *imageSize ) /* size of the image */ /*******************************************************************/ /* Function: Load the image into storage */ /*******************************************************************/ Modified: sandbox/rick/save/kernel/platform/windows/wrexx.def =================================================================== --- sandbox/rick/save/kernel/platform/windows/wrexx.def 2007-11-29 18:59:33 UTC (rev 1339) +++ sandbox/rick/save/kernel/platform/windows/wrexx.def 2007-11-30 00:36:03 UTC (rev 1340) @@ -128,7 +128,6 @@ ; ; Windows Specific ; -ProcessRestoreImage @105 ProcessSaveImage @106 RexxTerminated @107 RexxWaitForTermination @108 Modified: sandbox/rick/save/kernel/runtime/ActivityManager.cpp =================================================================== --- sandbox/rick/save/kernel/runtime/ActivityManager.cpp 2007-11-29 18:59:33 UTC (rev 1339) +++ sandbox/rick/save/kernel/runtime/ActivityManager.cpp 2007-11-30 00:36:03 UTC (rev 1340) @@ -790,13 +790,17 @@ */ void ActivityManager::startup() { + // if we have a local server created already, don't recurse. + if (localServer != OREF_NULL) + { + return; + } + + getActivity(); /* get an activity set up */ localEnvironment = new_directory(); /* get the local environment */ /* get the server class */ RexxObject *server_class = env_find(new_string("!SERVER")); - unlockKernel(); /* now unlock the kernel */ - - getActivity(); /* get an activity set up */ /* create a new server object */ currentActivity->messageSend(server_class, OREF_NEW, 0, OREF_NULL, &localServer); /* now release this activity */ Modified: sandbox/rick/save/kernel/runtime/GlobalNames.cpp =================================================================== --- sandbox/rick/save/kernel/runtime/GlobalNames.cpp 2007-11-29 18:59:33 UTC (rev 1339) +++ sandbox/rick/save/kernel/runtime/GlobalNames.cpp 2007-11-30 00:36:03 UTC (rev 1340) @@ -44,57 +44,59 @@ #include "RexxCore.h" #include "DirectoryClass.hpp" #include "ArrayClass.hpp" -RexxString *kernel_name (const char* value); - -void createStrings (void) +void RexxMemory::createStrings() /******************************************************************************/ /* Function: Create all globally available string objects */ /******************************************************************************/ { - LONG stringCount; /* number of strings */ - RexxArray * stringArray; /* saved array of strings */ - /* redefine the GLOBAL_NAME macro */ - /* to create and give a count of the */ - /* strings created */ + /* to create each of the strings */ #undef GLOBAL_NAME - #define GLOBAL_NAME(name, value) OREF_##name = kernel_name(value); stringCount++; + #define GLOBAL_NAME(name, value) OREF_##name = getGlobalName(value); - stringCount = 0; /* no strings yet */ - #include "GlobalNames.h" /* now create the strings */ + #include "GlobalNames.h" /* now create the strings */ +} - stringArray = new_array(stringCount);/* get a large array */ - /* save the strings */ - kernel_public(CHAR_NAME_STRINGS, stringArray, TheKernel); +RexxArray *RexxMemory::saveStrings() +/******************************************************************************/ +/* Function: Create all globally available string objects */ +/******************************************************************************/ +{ /* redefine the GLOBAL_NAME macro */ + /* to count the number of string */ + /* objects we need to save */ + #undef GLOBAL_NAME + #define GLOBAL_NAME(name, value) OREF_##name = getGlobalName(value); stringCount++; + + size_t stringCount = 0; /* no strings yet */ + #include "GlobalNames.h" /* now create the strings */ + + // get an array to contain all of the string values + RexxArray *stringArray = new_array(stringCount); + /* redefine the GLOBAL_NAME macro */ /* to save each string in the array */ /* at its relative offset */ #undef GLOBAL_NAME #define GLOBAL_NAME(name, value) stringArray->put((RexxObject *)OREF_##name, stringCount); stringCount++; stringCount = 1; /* start with the first string */ - #include "GlobalNames.h" /* now save the strings */ + #include "GlobalNames.h" /* now save the strings */ + + return stringArray; // and return the saved string array } -void restoreStrings (void) +void RexxMemory::restoreStrings(RexxArray *stringArray) /******************************************************************************/ /* Function: Create all globally available string objects */ /******************************************************************************/ { - RexxArray * stringArray; /* array of strings */ - RexxString **strings; /* pointer to individual strings */ - long stringCount; - /* redefine the GLOBAL_NAME macro */ /* to create and give a count of the */ /* strings created */ #undef GLOBAL_NAME #define GLOBAL_NAME(name, value) OREF_##name = *strings++; - stringCount = 0; /* start with the first string */ - stringArray = (RexxArray *)TheSaveArray->get(saveArray_NAME_STRINGS); - /* point to the actual array data */ - strings = (RexxString **)stringArray->data(); + RexxString **strings = (RexxString **)stringArray->data(); #include "GlobalNames.h" /* now restore the strings */ } Modified: sandbox/rick/save/kernel/runtime/Initialization.cpp =================================================================== --- sandbox/rick/save/kernel/runtime/Initialization.cpp 2007-11-29 18:59:33 UTC (rev 1339) +++ sandbox/rick/save/kernel/runtime/Initialization.cpp 2007-11-30 00:36:03 UTC (rev 1340) @@ -36,9 +36,9 @@ /* */ /*----------------------------------------------------------------------------*/ /******************************************************************************/ -/* REXX Kernel okinit.c */ +/* REXX Kernel */ /* */ -/* Initialization and termination */ +/* Initialization of the virtual function table */ /* */ /******************************************************************************/ #include <string.h> @@ -149,70 +149,7 @@ #include "OtherwiseInstruction.hpp" #include "SelectInstruction.hpp" -/******************************************************************************/ -/* Initialisation */ -/******************************************************************************/ -void REXX_terminate (void); -void restoreStrings(void); /* restore "name" strings */ -void kernelBuildVirtualFunctionTableArray(void); -RexxString * kernel_name ( - const char *value) /* ASCII-Z string value */ -/******************************************************************************/ -/* Function: Create a common string value during image build and save */ -/******************************************************************************/ -{ - RexxString * stringValue; /* string value */ - RexxString * result; /* result value */ - - stringValue = new_string(value); /* get a string object */ - if (TheGlobalStrings == OREF_NULL) /* no longer collecting strings? */ - return stringValue; /* just return the string */ - /* check the global table first */ - result = (RexxString *)TheGlobalStrings->at(stringValue); - if (result == OREF_NULL) { /* not in the table */ - /* add this to the table */ - TheGlobalStrings->put((RexxObject *)stringValue, stringValue); - result = stringValue; /* also the final value */ - } - return result; /* return the string */ -} - -void kernelRestore(void) -/******************************************************************************/ -/* Function: Restore the kernel state from a saved image. */ -/******************************************************************************/ -{ - /* go build the VFT Array */ - kernelBuildVirtualFunctionTableArray(); - memoryRestore(); /* go restore the save image */ - - /* If first one through, generate all*/ - IntegerZero = new_integer(0L); /* static integers we want to use...*/ - IntegerOne = new_integer(1L); /* This will allow us to use static */ - IntegerTwo = new_integer(2L); /* integers instead of having to do a*/ - IntegerThree = new_integer(3L); /* new_integer evrytime.... */ - IntegerFour = new_integer(4L); - IntegerFive = new_integer(5L); - IntegerSix = new_integer(6L); - IntegerSeven = new_integer(7L); - IntegerEight = new_integer(8L); - IntegerNine = new_integer(9L); - IntegerMinusOne = new_integer(-1); - restoreStrings(); /* restore the global strings */ - RexxNativeCode::restoreClass(); /* fix up native methods */ - ActivityManager::init(); /* do activity restores */ - memoryObject.enableOrefChecks(); /* enable setCheckOrefs... */ -} - -void kernelNewProcess(void) -/******************************************************************************/ -/* Function: Restore the kernel state from a saved image. */ -/******************************************************************************/ -{ - memoryNewProcess(); /* go restore the save image */ - -} #undef CLASS_EXTERNAL #undef CLASS_INTERNAL #undef CLASS_EXTERNAL_STRING @@ -231,7 +168,7 @@ #define CLASS_INTERNAL(b,c) CLASS_EXTERNAL(b,c) #define CLASS_EXTERNAL_STRING(b,c) CLASS_EXTERNAL(b,c) -void kernelBuildVirtualFunctionTableArray(void) +void RexxMemory::buildVFTArray() /******************************************************************************/ /* Function: This routine will build an array of the virtualFunctions */ /* There will be one for each Class. */ Modified: sandbox/rick/save/kernel/runtime/RexxActivationStack.cpp =================================================================== --- sandbox/rick/save/kernel/runtime/RexxActivationStack.cpp 2007-11-29 18:59:33 UTC (rev 1339) +++ sandbox/rick/save/kernel/runtime/RexxActivationStack.cpp 2007-11-30 00:36:03 UTC (rev 1340) @@ -161,7 +161,7 @@ /* Give new object its behaviour */ newObj->setBehaviour(TheActivationFrameBufferBehaviour); /* set the virtual function table */ - newObj->setVirtualFunctions(VFTArray[T_activation_frame_buffer]); + newObj->setVirtualFunctions(RexxMemory::VFTArray[T_activation_frame_buffer]); newObj->size = entries; /* set the size */ newObj->next = 0; /* set the top element */ newObj->previous = OREF_NULL; /* no previous element yet */ Modified: sandbox/rick/save/kernel/runtime/RexxCore.h =================================================================== --- sandbox/rick/save/kernel/runtime/RexxCore.h 2007-11-29 18:59:33 UTC (rev 1339) +++ sandbox/rick/save/kernel/runtime/RexxCore.h 2007-11-30 00:36:03 UTC (rev 1340) @@ -148,7 +148,6 @@ /* Object creation macros */ /******************************************************************************/ -#define kernel_public(name, object, dir) ((RexxDirectory *)dir)->setEntry(kernel_name(name), (RexxObject *)object) #define new_activity(l) (ActivityManager::newActivity(MEDIUM_PRIORITY, l)) #define new_behaviour(t) (new (t) RexxBehaviour) #define new_buffer(s) (new (s) RexxBuffer) @@ -249,8 +248,6 @@ EXTERN RexxDirectory * TheEnvironmentBase INITGLOBALPTR; // environment object base ptr /* function table */ EXTERN RexxDirectory * TheFunctionsDirectory INITGLOBALPTR; - /* global string set */ -EXTERN RexxDirectory * TheGlobalStrings INITGLOBALPTR; /* integer class */ EXTERN RexxIntegerClass * TheIntegerClass INITGLOBALPTR; EXTERN RexxDirectory * TheKernel INITGLOBALPTR; /* kernel directory */ @@ -278,9 +275,6 @@ EXTERN RexxStringClass * TheStringClass INITGLOBALPTR; /* mutablebuffer class */ EXTERN RexxClass * TheMutableBufferClass INITGLOBALPTR; - /* Save array used for quick lookup */ - /*of objects during restore image */ -EXTERN RexxArray * TheSaveArray INITGLOBALPTR; /* saved array of primitive */ /*behaviours */ EXTERN RexxObject * TheSavedBehaviours INITGLOBALPTR; @@ -470,11 +464,7 @@ /******************************************************************************/ /* Global Objects - Primitive Behaviour */ /******************************************************************************/ -#ifndef GDATA -EXTERN void *VFTArray[highest_T]; /* table of virtual functions */ -#endif - #define TheActivationBehaviour ((RexxBehaviour *)(&RexxBehaviour::primitiveBehaviours[T_activation])) #define TheActivityBehaviour ((RexxBehaviour *)(&RexxBehaviour::primitiveBehaviours[T_activity])) #define TheArrayBehaviour ((RexxBehaviour *)(&RexxBehaviour::primitiveBehaviours[T_array])) Modified: sandbox/rick/save/kernel/runtime/RexxEnvelope.cpp =================================================================== --- sandbox/rick/save/kernel/runtime/RexxEnvelope.cpp 2007-11-29 18:59:33 UTC (rev 1339) +++ sandbox/rick/save/kernel/runtime/RexxEnvelope.cpp 2007-11-30 00:36:03 UTC (rev 1340) @@ -36,7 +36,7 @@ /* */ /*----------------------------------------------------------------------------*/ /******************************************************************************/ -/* REXX Kernel RexxEnvelope.c */ +/* REXX Kernel RexxEnvelope.c */ /* */ /* Primitive Envelope Class */ /* */ @@ -52,8 +52,6 @@ #include "RexxEnvelope.hpp" #include "MethodClass.hpp" -extern void *VFTArray[highest_T]; /* table of virtual function tables */ - RexxEnvelope::RexxEnvelope() /******************************************************************************/ /* Function: Initialize a REXX envelope object */ @@ -318,7 +316,7 @@ } /* Force fix-up of */ /*VirtualFunctionTable, */ - ((RexxObject *)bufferPointer)->setVirtualFunctions(VFTArray[primitiveTypeNum]); + ((RexxObject *)bufferPointer)->setVirtualFunctions(RexxMemory::VFTArray[primitiveTypeNum]); puffObject->setObjectLive(memoryObject.markWord); /* Then Mark this object as live. */ /* Mark other referenced objs */ /* Note that this flavor of */ Modified: sandbox/rick/save/kernel/runtime/RexxHashTable.cpp =================================================================== --- sandbox/rick/save/kernel/runtime/RexxHashTable.cpp 2007-11-29 18:59:33 UTC (rev 1339) +++ sandbox/rick/save/kernel/runtime/RexxHashTable.cpp 2007-11-30 00:36:03 UTC (rev 1340) @@ -139,7 +139,7 @@ bytes = newObj->getObjectSize() - companionSize; // initialize the hash table object - ((RexxObject *)newHash)->initializeNewObject(bytes, memoryObject.markWord, VFTArray[T_hashtab], TheHashTableBehaviour); + ((RexxObject *)newHash)->initializeNewObject(bytes, memoryObject.markWord, RexxMemory::VFTArray[T_hashtab], TheHashTableBehaviour); /* reduce the companion size */ newObj->setObjectSize(companionSize); newHash->size = bucketSize; /* record the size */ Modified: sandbox/rick/save/kernel/runtime/RexxListTable.cpp =================================================================== --- sandbox/rick/save/kernel/runtime/RexxListTable.cpp 2007-11-29 18:59:33 UTC (rev 1339) +++ sandbox/rick/save/kernel/runtime/RexxListTable.cpp 2007-11-30 00:36:03 UTC (rev 1340) @@ -132,7 +132,7 @@ bytes = newList->getObjectSize() - companionSize; // initialize the hash table object - ((RexxObject *)newTable)->initializeNewObject(bytes, memoryObject.markWord, VFTArray[T_listtable], TheListTableBehaviour); + ((RexxObject *)newTable)->initializeNewObject(bytes, memoryObject.markWord, RexxMemory::VFTArray[T_listtable], TheListTableBehaviour); /* reduce the companion size */ newList->setObjectSize(companionSize); newTable->size = initialSize; /* fill in the initial size */ Modified: sandbox/rick/save/kernel/runtime/RexxMemory.cpp =================================================================== --- sandbox/rick/save/kernel/runtime/RexxMemory.cpp 2007-11-29 18:59:33 UTC (rev 1339) +++ sandbox/rick/save/kernel/runtime/RexxMemory.cpp 2007-11-30 00:36:03 UTC (rev 1340) @@ -60,21 +60,18 @@ /* NOTE: There is just a single memory object in global storage. We'll define */ /* memobj to be the direct address of this memory object. */ RexxMemory memoryObject; -RexxMemory *pMemoryObject = &memoryObject; - #define LiveStackSize 16370 /* live stack size */ #define SaveStackSize 20 /* newly created objects to save */ #define SaveStackAllocSize 500 /* pre-allocation for save stack */ -#define MaxImageSize 800000 /* maximum startup image size */ +#define MaxImageSize 1200000 /* maximum startup image size */ -extern void *VFTArray[highest_T]; +void *RexxMemory::VFTArray[highest_T]; /* table of virtual functions */ -RexxString * kernel_name (const char * value); +RexxDirectory *RexxMemory::globalStrings = OREF_NULL; - static void SysCall logMemoryCheck(FILE *outfile, const char *message, ...) { va_list args; @@ -150,6 +147,7 @@ collections = 0; allocations = 0; variableCache = OREF_NULL; + globalStrings = OREF_NULL; /* NOTE: we don't set livestack */ /*via the OrefSet macro, since we */ @@ -160,13 +158,13 @@ /* remember the original one */ originalLiveStack = liveStack; - if (_restoringImage) { /* restoring the image? */ + + if (_restoringImage) /* restoring the image? */ + { restoreImage(); /* do it now... */ } - /* initial marktable value is */ /* TheKernel */ -// this->markTable = (RexxTable *)TheKernel; this->markTable = OREF_NULL; /* fix by CHM/Rick: set initial table*/ /* to NULL since TheKernel could */ /* point to an invalid memory address*/ @@ -175,6 +173,11 @@ /* make sure we have an inital segment set to allocate from. */ newSpaceNormalSegments.getInitialSet(); + + // TODO: this is just scaffolding until the WeakReference support is in. + subClasses = new_object_table(); + // get the initial uninit table + uninitTable = new_object_table(); } void RexxMemory::logVerboseOutput(const char *message, void *sub1, void *sub2) @@ -282,6 +285,13 @@ /* Function: Main memory_mark driving loop */ /******************************************************************************/ { + // for some of the root objects, we get called to mark them before they get allocated. + // make sure we don't process any null references. + if (rootObject == OREF_NULL) + { + return; + } + RexxObject *markObject; setUpMemoryMark @@ -309,6 +319,13 @@ /* Function: Garbage collection validity check routine */ /******************************************************************************/ { + // for some of the root objects, we get called to mark them before they get allocated. + // make sure we don't process any null references. + if (rootObject == OREF_NULL) + { + return; + } + RexxObject *mref; setUpMemoryMarkGeneral @@ -515,6 +532,13 @@ HashLink position; /* position within the table */ RexxObject *classObj; /* object to check */ + // it's possible that this will occur before the subclasses table is allocated, + // so don't process if nothing there yet. + if (subClasses == OREF_NULL) + { + return; + } + /* check each VALUE position, not the*/ /* index positions for dead objects */ /* the values are the subclasses, and*/ @@ -685,16 +709,22 @@ } -void RexxMemory::restoreImage(void) +void RexxMemory::restoreImage() /******************************************************************************/ /* Function: Restore a saved image to usefulness. */ /******************************************************************************/ { - long imagesize; /* size of the image */ + // Nothing to restore if we have a buffer already + if (image_buffer != NULL) + { + return; + } + + size_t imagesize; /* size of the image */ char *objectPointer, *endPointer; RexxBehaviour *imageBehav; /*behaviour of OP object in image */ RexxArray *primitiveBehaviours; /* saved array of behaviours */ - long primitiveTypeNum; + size_t primitiveTypeNum; int i; /* go load the image */ @@ -705,7 +735,7 @@ /* and the ending location */ endPointer = image_buffer + imagesize; /* the save Array is the 1st object */ - TheSaveArray = (RexxArray *)image_buffer; + RexxArray *saveArray = (RexxArray *)image_buffer; restoreimage = true; /* we are now restoring */ /* loop through the image buffer */ while (objectPointer < endPointer) { @@ -757,14 +787,32 @@ restoreimage = false; /* OREF_ENV is the first element of */ /*array */ - TheEnvironment = (RexxDirectory *)TheSaveArray->get(saveArray_ENV); + TheEnvironment = (RexxDirectory *)saveArray->get(saveArray_ENV); /* get the primitive behaviours */ - primitiveBehaviours = (RexxArray *)TheSaveArray->get(saveArray_PBEHAV); + primitiveBehaviours = (RexxArray *)saveArray->get(saveArray_PBEHAV); /* restore all of the saved primitive*/ for (i = 0; i <= highest_exposed_T; i++) + { /* behaviours into this array */ - RexxBehaviour::primitiveBehaviours[i].restore((RexxBehaviour *)primitiveBehaviours->get(i + 1)); + RexxBehaviour::primitiveBehaviours[i].restore((RexxBehaviour *)primitiveBehaviours->get(i + 1)); + } + TheKernel = (RexxDirectory *)saveArray->get(saveArray_KERNEL); + TheSystem = (RexxDirectory *)saveArray->get(saveArray_SYSTEM); + TheFunctionsDirectory = (RexxDirectory *)saveArray->get(saveArray_FUNCTIONS); + TheTrueObject = (RexxInteger *)saveArray->get(saveArray_TRUE); + TheFalseObject = (RexxInteger *)saveArray->get(saveArray_FALSE); + TheNilObject = saveArray->get(saveArray_NIL); + TheNullArray = (RexxArray *)saveArray->get(saveArray_NULLA); + TheNullPointer = (RexxInteger *)saveArray->get(saveArray_NULLPOINTER); + TheClassClass = (RexxClass *)saveArray->get(saveArray_CLASS); + TheNativeCodeClass = (RexxNativeCodeClass *)saveArray->get(saveArray_NMETHOD); + TheCommonRetrievers = (RexxDirectory *)saveArray->get(saveArray_COMMON_RETRIEVERS); + TheStaticRequires = (RexxDirectory *)saveArray->get(saveArray_STATIC_REQ); + ThePublicRoutines = (RexxDirectory *)saveArray->get(saveArray_PUBLIC_RTN); + + /* restore the global strings */ + memoryObject.restoreStrings((RexxArray *)saveArray->get(saveArray_SYSTEM)); } @@ -787,6 +835,7 @@ memory_mark(this->envelope); memory_mark(this->variableCache); memory_mark(this->markTable); + memory_mark(globalStrings); cleanUpMemoryMark // now call the various subsystem managers to mark their references ActivityManager::live(); @@ -807,6 +856,7 @@ memory_mark_general(this->envelope); memory_mark_general(this->variableCache); memory_mark_general(this->markTable); + memory_mark_general(globalStrings); cleanUpMemoryMarkGeneral // now call the various subsystem managers to mark their references ActivityManager::liveGeneral(); @@ -1500,11 +1550,15 @@ /* of image for faster restore. */ _imageStats.clear(); /* clear out image counters */ - /* release the global strings table */ - TheKernel->remove(kernel_name(CHAR_GLOBAL_STRINGS)); + globalStrings = OREF_NULL; /* memory Object not saved */ - TheKernel->remove(kernel_name(CHAR_MEMORY)); + TheKernel->remove(getGlobalName(CHAR_MEMORY)); + // this has been protecting every thing critical + // from GC events thus far, but now we remove it because + // it contains things we don't want to save in the image. + TheEnvironment->remove(getGlobalName(CHAR_KERNEL)); + /* remove any programs left over in */ /* Get an array to hold all special */ /*objs */ @@ -1526,7 +1580,7 @@ saveArray->put((RexxObject *)TheSystem, saveArray_SYSTEM); saveArray->put((RexxObject *)TheFunctionsDirectory, saveArray_FUNCTIONS); saveArray->put((RexxObject *)TheCommonRetrievers, saveArray_COMMON_RETRIEVERS); - saveArray->put((RexxObject *)TheKernel->entry(kernel_name(CHAR_NAME_STRINGS)), saveArray_NAME_STRINGS); + saveArray->put((RexxObject *)saveStrings(), saveArray_NAME_STRINGS); saveArray->put((RexxObject *)TheStaticRequires, saveArray_STATIC_REQ); saveArray->put((RexxObject *)ThePublicRoutines, saveArray_PUBLIC_RTN); @@ -2089,13 +2143,45 @@ } -void memoryCreate() +/** + * Add a string to the global name table. + * + * @param value The new value to add. + * + * @return The single instance of this string. + */ +RexxString *RexxMemory::getGlobalName(const char *value) +{ + // see if we have a global table. If not collecting currently, + // just return the non-unique value + + RexxString *stringValue = new_string(value); + if (globalStrings == OREF_NULL) + { + return stringValue; /* just return the string */ + } + + // now see if we have this string in the table already + RexxString *result = (RexxString *)globalStrings->at(stringValue); + if (result != OREF_NULL) + { + return result; // return the previously created one + } + /* add this to the table */ + globalStrings->put((RexxObject *)stringValue, stringValue); + return stringValue; // return the newly created one +} + + +void RexxMemory::create() /******************************************************************************/ /* Function: Initial memory setup during image build */ /******************************************************************************/ { + // get our table of virtual functions setup first thing. + buildVFTArray(); - TheMemoryObject = pMemoryObject; + TheMemoryObject = &memoryObject; /* Make sure memory is cleared! */ memoryObject.init(false); @@ -2108,7 +2194,7 @@ CLASS_CREATE(Relation, "Relation", RexxClass); TheFunctionsDirectory = new_directory(); - TheGlobalStrings = new_directory(); + globalStrings = new_directory(); /* If first one through, generate all */ IntegerZero = new_integer(0); /* static integers we want to use... */ @@ -2128,7 +2214,7 @@ TheTrueObject = new RexxInteger(1); TheFalseObject = new RexxInteger(0); - pMemoryObject->setBehaviour(TheMemoryBehaviour); + memoryObject.setBehaviour(TheMemoryBehaviour); TheNilObject = new RexxNilObject; /* We don't move the NIL object, we */ @@ -2145,33 +2231,21 @@ } -void memoryRestore() +void RexxMemory::restore() /******************************************************************************/ /* Function: Memory management image restore functions */ /******************************************************************************/ { - TheMemoryObject = pMemoryObject; + + TheMemoryObject = &memoryObject; /* Make sure memory is cleared! */ memoryObject.init(true); /* set memories behaviour */ - pMemoryObject->setBehaviour(TheMemoryBehaviour); + memoryObject.setBehaviour(TheMemoryBehaviour); /* Retrieve special saved objects */ /* OREF_ENV and primitive behaviours */ /* are already restored */ - TheKernel = (RexxDirectory *)TheSaveArray->get(saveArray_KERNEL); - TheSystem = (RexxDirectory *)TheSaveArray->get(saveArray_SYSTEM); - TheFunctionsDirectory = (RexxDirectory *)TheSaveArray->get(saveArray_FUNCTIONS); - TheTrueObject = (RexxInteger *)TheSaveArray->get(saveArray_TRUE); - TheFalseObject = (RexxInteger *)TheSaveArray->get(saveArray_FALSE); - TheNilObject = TheSaveArray->get(saveArray_NIL); - TheNullArray = (RexxArray *)TheSaveArray->get(saveArray_NULLA); - TheNullPointer = (RexxInteger *)TheSaveArray->get(saveArray_NULLPOINTER); - TheClassClass = (RexxClass *)TheSaveArray->get(saveArray_CLASS); - TheNativeCodeClass = (RexxNativeCodeClass *)TheSaveArray->get(saveArray_NMETHOD); - TheCommonRetrievers = (RexxDirectory *)TheSaveArray->get(saveArray_COMMON_RETRIEVERS); - TheStaticRequires = (RexxDirectory *)TheSaveArray->get(saveArray_STATIC_REQ); - ThePublicRoutines = (RexxDirectory *)TheSaveArray->get(saveArray_PUBLIC_RTN); /* start restoring class OREF_s */ RESTORE_CLASS(Object, object, RexxClass); @@ -2195,19 +2269,27 @@ /* behaviours */ TheNativeCodeClass->setBehaviour(TheNativeCodeClassBehaviour); - pMemoryObject->setOldSpace(); /* Mark Memory Object as OldSpace */ + memoryObject.setOldSpace(); /* Mark Memory Object as OldSpace */ /* initialize the tables used for garbage collection. */ memoryObject.setUpMemoryTables(new_object_table()); + /* If first one through, generate all*/ + IntegerZero = new_integer(0); /* static integers we want to use...*/ + IntegerOne = new_integer(1); /* This will allow us to use static */ + IntegerTwo = new_integer(2); /* integers instead of having to do a*/ + IntegerThree = new_integer(3); /* new_integer evrytime.... */ + IntegerFour = new_integer(4); + IntegerFive = new_integer(5); + IntegerSix = new_integer(6); + IntegerSeven = new_integer(7); + IntegerEight = new_integer(8); + IntegerNine = new_integer(9); + IntegerMinusOne = new_integer(-1); + RexxNativeCode::restoreClass(); /* fix up native methods */ + ActivityManager::init(); /* do activity restores */ + memoryObject.enableOrefChecks(); /* enable setCheckOrefs... */ + /* Create/Open Shared MUTEX */ + /* Semophores used to serialize */ + /* the flatten/unflatten process */ + memoryObject.createLocks(); } - -void memoryNewProcess(void) -/******************************************************************************/ -/* Function: Do the processing required for a new process Initialization */ -/******************************************************************************/ -{ - /* Create/Open Shared MUTEX */ - /* Semophores used to serialize */ - /* the flatten/unflatten process */ - memoryObject.createLocks(); -} Modified: sandbox/rick/save/kernel/runtime/RexxMemory.hpp =================================================================== --- sandbox/rick/save/kernel/runtime/RexxMemory.hpp 2007-11-29 18:59:33 UTC (rev 1339) +++ sandbox/rick/save/kernel/runtime/RexxMemory.hpp 2007-11-30 00:36:03 UTC (rev 1340) @@ -45,10 +45,6 @@ #ifndef Included_RexxMemory #define Included_RexxMemory -void memoryCreate(); -void memoryRestore(void); -void memoryNewProcess (void); - /* The minimum allocation unit for an object. */ #define ObjectGrain 8 /* The unit of granularity for large allocation */ @@ -82,6 +78,7 @@ class RexxActivationFrameBuffer; class MemorySegment; +class RexxMethod; #ifdef _DEBUG class RexxMemory; #endif @@ -243,7 +240,20 @@ void scavengeSegmentSets(MemorySegmentSet *requester, size_t allocationLength); void setUpMemoryTables(RexxObjectTable *old2newTable); void forceUninits(); + inline RexxDirectory *getGlobalStrings() { return globalStrings; } + static void restore(); + static void buildVFTArray(); + static void create(); + static void createImage(); + static RexxString *getGlobalName(const char *value); + static void createStrings(); + static RexxArray *saveStrings(); + static void restoreStrings(RexxArray *stringArray); + + static void *VFTArray[highest_T]; /* table of virtual functions */ + static PCPPM exportedMethods[]; /* start of exported methods table */ + uint16_t markWord; /* current marking counter */ SMTX flattenMutex; /* locks for various memory processes */ SMTX unflattenMutex; @@ -280,8 +290,16 @@ bool inObjectStorage(RexxObject *obj); bool inSharedObjectStorage(RexxObject *obj); bool objectReferenceOK(RexxObject *o); - void restoreImage(void); + void restoreImage(); + static size_t resolveExportedMethod(PCPPM targetMethod); + static RexxMethod *createKernelMethod(PCPPM entryPoint, size_t arguments); + static RexxMethod *createProtectedKernelMethod(PCPPM entryPoint, size_t arguments); + static RexxMethod *createPrivateKernelMethod(PCPPM entryPoint, size_t arguments); + static void defineKernelMethod(const char *name, RexxBehaviour * behaviour, PCPPM entryPoint, size_t arguments); + static void defineProtectedKernelMethod(const char *name, RexxBehaviour * behaviour, PCPPM entryPoint, size_t arguments); + static void definePrivateKernelMethod(const char *name, RexxBehaviour * behaviour, PCPPM entryPoint, size_t arguments); + RexxStack *liveStack; RexxStack *flattenStack; RexxSaveStack *saveStack; @@ -296,7 +314,6 @@ RexxObjectTable *subClasses; // the table of subclasses - MemorySegmentPool *firstPool; /* First segmentPool block. */ MemorySegmentPool *currentPool; /* Curent segmentPool being carved */ OldSpaceSegmentSet oldSpaceSegments; @@ -321,6 +338,8 @@ size_t allocations; /* number of allocations since last GC */ size_t collections; /* number of garbage collections */ + + static RexxDirectory *globalStrings; // table of global strings }; Modified: sandbox/rick/save/kernel/runtime/RexxStartup.cpp =================================================================== --- sandbox/rick/save/kernel/runtime/RexxStartup.cpp 2007-11-29 18:59:33 UTC (rev 1339) +++ sandbox/rick/save/kernel/runtime/RexxStartup.cpp 2007-11-30 00:36:03 UTC (rev 1340) @@ -67,7 +67,6 @@ extern BOOL ProcessDoneTerm; /* termination is done */ extern BOOL ProcessFirstThread; /* first (and primary thread) */ -extern BOOL ProcessRestoreImage; /* we're restoring the image */ extern SEV RexxTerminated; /* Termination complete semaphore. */ extern RexxInteger *ProcessName; @@ -77,9 +76,6 @@ extern int SecureFlag; #endif -void activity_startup(void); -void createImage(void); - void kernelShutdown (void) /******************************************************************************/ /* Shutdown OREXX System for this process */ @@ -94,15 +90,6 @@ ProcessDoneInit = FALSE; /* no longer initialized. */ ProcessColdStart = TRUE; /* next one is a cold start */ ProcessFirstThread = TRUE; /* first thread needs to be created */ - ProcessRestoreImage = TRUE; /* and we have to restore the image */ - /* subprocess, which means that memory is not released at program end */ - /* only on shutdown. So if there is (for huge files) a linked list of */ - /* memory pools allocated, the newly created pools would be freed here*/ - /* exept the base pool, BUT the linked lists of f.e Dead Objects swept*/ - /* segments etc, are still alive. I have tried to relinke those Object*/ - /* s but without success. So i decided not to free the pools on OS/2. */ - /* Be aware of possible resource problems especially when the interpre*/ - /* is started in a loop with REXXSTART */ memoryObject.freePools(); /* release access to memoryPools */ } #ifdef SHARED @@ -115,34 +102,9 @@ } -void kernelRestore (void); -void kernelNewProcess (void); -RexxString * kernel_name (const char* value); - extern BOOL ProcessSaveImage; -void restoreImage(void) -/******************************************************************************/ -/* Main startup routine for OREXX */ -/******************************************************************************/ -{ - ActivityManager::lockKernel(); /* lock the kernel */ - kernelRestore(); /* initialize the kernel */ - ActivityManager::unlockKernel(); /* lock the kernel */ -} -void start_rexx_environment(void) -/******************************************************************************/ -/* Main startup routine for OREXX */ -/******************************************************************************/ -{ - ActivityManager::lockKernel(); /* lock the kernel */ - kernelNewProcess(); /* do new process initialization */ - - ActivityManager::startup(); // go create the local enviroment. - ProcessRestoreImage = FALSE; /* Turn off restore image flag. */ -} - int REXXENTRY RexxTerminate (void) /******************************************************************************/ /* Function: Terminate the REXX interpreter...will only terminate if the */ @@ -240,12 +202,12 @@ SysInitialize(); /* perform other system init work */ if (ProcessSaveImage) /* need to create the image? */ - createImage(); /* go create the image */ + { + RexxMemory::createImage(); /* go create the image */ + } else { - if (ProcessRestoreImage) { /* Does image need to be restored */ - restoreImage(); /*Yes, restore the image */ - } - start_rexx_environment(); /* call main initialization routine. */ + RexxMemory::restore(); // go restore the state of the memory object + ActivityManager::startup(); // go create the local enviroment. } ProcessDoneInit = TRUE; /* we're now initialized */ } /* end of serialized block of code */ Modified: sandbox/rick/save/kernel/runtime/Setup.cpp =================================================================== --- sandbox/rick/save/kernel/runtime/Setup.cpp 2007-11-29 18:59:33 UTC (rev 1339) +++ sandbox/rick/save/kernel/runtime/Setup.cpp 2007-11-30 00:36:03 UTC (rev 1340) @@ -36,42 +36,46 @@ /* */ /*----------------------------------------------------------------------------*/ /******************************************************************************/ -/* REXX Kernel oksetup.c */ +/* REXX Kernel */ /* */ /* Setup initial class definitions during an image build */ /* */ +/* NOTE: The methods contained here are part of the RexxMemory class, but */ +/* are in a separate file because of the extensive #include requirements */ +/* for these particular methods and tables. */ +/* */ /******************************************************************************/ #include <string.h> #include "RexxCore.h" - #include "TableClass.hpp" - #include "RexxMemory.hpp" - #include "RexxBehaviour.hpp" - #include "ClassClass.hpp" - #include "NumberStringClass.hpp" - #include "IntegerClass.hpp" - #include "StringClass.hpp" - #include "MutableBufferClass.hpp" - #include "ArrayClass.hpp" - #include "DirectoryClass.hpp" - #include "RelationClass.hpp" - #include "ListClass.hpp" - #include "QueueClass.hpp" - #include "SupplierClass.hpp" - #include "MethodClass.hpp" - #include "RexxEnvelope.hpp" - #include "MessageClass.hpp" - #include "StemClass.hpp" - #include "RexxMisc.hpp" - #include "RexxNativeMethod.hpp" - #include "RexxActivity.hpp" - #include "ActivityManager.hpp" - #include "RexxNativeActivation.hpp" - #include "RexxVariableDictionary.hpp" - #include "ExpressionVariable.hpp" - #include "RexxLocalVariables.hpp" - #include "ProtectedObject.hpp" +#include "TableClass.hpp" +#include "RexxMemory.hpp" +#include "RexxBehaviour.hpp" +#include "ClassClass.hpp" +#include "NumberStringClass.hpp" +#include "IntegerClass.hpp" +#include "StringClass.hpp" +#include "MutableBufferClass.hpp" +#include "ArrayClass.hpp" +#include "DirectoryClass.hpp" +#include "RelationClass.hpp" +#include "ListClass.hpp" +#include "QueueClass.hpp" +#include "SupplierClass.hpp" +#include "MethodClass.hpp" +#include "RexxEnvelope.hpp" +#include "MessageClass.hpp" +#include "StemClass.hpp" +#include "RexxMisc.hpp" +#include "RexxNativeMethod.hpp" +#include "RexxActivity.hpp" +#include "ActivityManager.hpp" +#include "RexxNativeActivation.hpp" +#include "RexxVariableDictionary.hpp" +#include "ExpressionVariable.hpp" +#include "RexxLocalVariables.hpp" +#include "ProtectedObject.hpp" -PCPPM ExportedMethods[] = { /* start of exported methods table */ +PCPPM RexxMemory::exportedMethods[] = {/* start of exported methods table */ /* NOTE: getAttribute and */ /* setAttribute need to be the first */ /* entries in the table, since these */ @@ -530,7 +534,8 @@ NULL /* final terminating method */ }; -size_t resolveExportedMethod( + +size_t RexxMemory::resolveExportedMethod( PCPPM targetMethod ) /* method needed to resolve */ /******************************************************************************/ /* Function: Resolve a method address to numeric index */ @@ -542,9 +547,9 @@ /* this is a bad error */ logic_error("Unresolved exported method"); /* scan the method address table */ - for (i = 0; ExportedMethods[i] != NULL; i++) { + for (i = 0; exportedMethods[i] != NULL; i++) { /* found the one we want? */ - if (ExportedMethods[i] == targetMethod) + if (exportedMethods[i] == targetMethod) return i; /* return the index */ } /* this is a bad error */ @@ -555,12 +560,8 @@ /*****************************************************************************/ /* Initialisation and build of the Object REXX image */ /*****************************************************************************/ -RexxString * kernel_name (const char* value); -void kernelBuildVirtualFunctionTableArray(void); -void createStrings(void); /* create "name" strings */ - -RexxMethod * createKernelMethod( +RexxMethod *RexxMemory::createKernelMethod( PCPPM entryPoint, /* method entry point */ size_t arguments) /* count of arguments */ /******************************************************************************/ @@ -571,7 +572,7 @@ return new RexxMethod(resolveExportedMethod(entryPoint), entryPoint, arguments, OREF_NULL); } -RexxMethod * createProtectedKernelMethod( +RexxMethod *RexxMemory::createProtectedKernelMethod( PCPPM entryPoint, /* method entry point */ size_t arguments) /* count of arguments */ /******************************************************************************/ @@ -585,7 +586,7 @@ return method; /* return the method */ } -RexxMethod * createPrivateKernelMethod( +RexxMethod *RexxMemory::createPrivateKernelMethod( PCPPM entryPoint, /* method entry point */ size_t arguments) /* count of arguments */ /******************************************************************************/ @@ -600,8 +601,8 @@ return method; /* return the method */ } -void defineKernelMethod( - char * name, /* ASCII-Z name for the method */ +void RexxMemory::defineKernelMethod( + const char * name, /* ASCII-Z name for the method */ RexxBehaviour * behaviour, /* behaviour to use */ PCPPM entryPoint, /* method's entry point */ size_t arguments ) /* count of arguments */ @@ -609,42 +610,40 @@ /* Function: Add a C++ method to an object's behaviour */ /******************************************************************************/ { - behaviour->define(kernel_name(name), createKernelMethod(entryPoint, arguments)); + behaviour->define(getGlobalName(name), createKernelMethod(entryPoint, arguments)); } -void defineProtectedKernelMethod( - char * name, /* ASCII-Z name for the method */ +void RexxMemory::defineProtectedKernelMethod( + const char * name, /* ASCII-Z name for the method */ RexxBehaviour * behaviour, /* behaviour to use */ PCPPM entryPoint, /* method's entry point */ - LONG arguments ) /* count of arguments */ + size_t arguments ) /* count of arguments */ /******************************************************************************/ /* Function: Add a C++ method to an object's behaviour */ /******************************************************************************/ { - behaviour->define(kernel_name(name), createProtectedKernelMethod(entryPoint, arguments)); + behaviour->define(get... [truncated message content] |