Skip to content

Commit

Permalink
CogVM source as per VMMaker.oscog-eem.3116
Browse files Browse the repository at this point in the history
StackInterpreter: fix printAllStacks for v3.  Do so by changing
SpurMemoryManager>>allObjectsDoSafely: to use isNormalObject: (excluding
forwarding pointers) rather than allObjectsDo:, which uses isEnumerableObject:
(whcih includes forwarding pointers, and all the puns).  This is good for
allAccessibleObjectsOkay & checkAllAccessibleObjectsOkay which should indeed
ignore things like the class table etc.

Spur: eliminate duplicate enableObjectEnumerationFrom:'s in both senders of
allEntitiesFrom:do:.

Cogit: eliminate some C compiler warnings in the 64-bit cogits.

Slang: TMethod's writtenToGlobalVarsCache should be voided more agressively to
ensure endOfMemory is inlined in allEntitiesFrom:do:.
  • Loading branch information
eliotmiranda committed Dec 1, 2021
1 parent c3fd39d commit 8d5e090
Show file tree
Hide file tree
Showing 51 changed files with 2,863 additions and 5,619 deletions.
2 changes: 1 addition & 1 deletion src/spur32.cog.lowcode/cogit.h
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
/* Automatically generated by
CCodeGenerator VMMaker.oscog-eem.3101 uuid: 343b46dc-8e9f-48c8-bb97-74b76f1d07cc
CCodeGenerator VMMaker.oscog-eem.3116 uuid: d757936e-c3f3-48be-9435-9a3a60b14615
*/


Expand Down
18 changes: 9 additions & 9 deletions src/spur32.cog.lowcode/cogitARMv5.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* Automatically generated by
CCodeGenerator VMMaker.oscog-eem.3109 uuid: 28141cc3-6a57-4a86-b9c2-383d8563851b
CCodeGenerator VMMaker.oscog-eem.3115 uuid: e71c2bb2-05b8-4d1e-a837-c31a9bcc2148
from
StackToRegisterMappingCogit VMMaker.oscog-eem.3109 uuid: 28141cc3-6a57-4a86-b9c2-383d8563851b
StackToRegisterMappingCogit VMMaker.oscog-eem.3115 uuid: e71c2bb2-05b8-4d1e-a837-c31a9bcc2148
*/
static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.3109 uuid: 28141cc3-6a57-4a86-b9c2-383d8563851b " __DATE__ ;
static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.3115 uuid: e71c2bb2-05b8-4d1e-a837-c31a9bcc2148 " __DATE__ ;
char *__cogitBuildInfo = __buildInfo;


Expand Down Expand Up @@ -841,7 +841,7 @@ extern void markAndTraceMachineCodeOfMarkedMethods(void);
static void markAndTraceObjectReferencesInGeneratedRuntime(void);
static sqInt NoDbgRegParms markAndTraceOrFreeCogMethodfirstVisit(CogMethod *cogMethod, sqInt firstVisit);
static sqInt NoDbgRegParms markAndTraceOrFreePICTargetin(sqInt entryPoint, CogMethod *cPIC);
static sqInt NoDbgRegParms markLiteralsAndUnlinkIfUnmarkedSendpcmethod(sqInt annotation, char *mcpc, sqInt cogMethod);
static sqInt NoDbgRegParms markLiteralsAndUnlinkIfUnmarkedSendpcmethod(sqInt annotation, char *mcpc, CogMethod *cogMethod);
static sqInt NoDbgRegParms markLiteralspcmethod(sqInt annotation, char *mcpc, CogMethod *cogMethod);
extern void markMethodAndReferents(CogBlockMethod *aCogMethod);
extern usqInt maxCogMethodAddress(void);
Expand Down Expand Up @@ -903,7 +903,7 @@ static sqInt NoDbgRegParms unlinkIfInvalidClassSendpcignored(sqInt annotation, c
static sqInt NoDbgRegParms unlinkIfLinkedSendToFreepcignored(sqInt annotation, char *mcpc, sqInt superfluity);
static sqInt NoDbgRegParms unlinkIfLinkedSendpcif(sqInt annotation, char *mcpc, CogMethod *criterionArg);
static sqInt NoDbgRegParms unlinkIfLinkedSendpcignored(sqInt annotation, char *mcpc, sqInt superfluity);
static sqInt NoDbgRegParms unlinkIfLinkedSendpcto(sqInt annotation, char *mcpc, sqInt theCogMethod);
static sqInt NoDbgRegParms unlinkIfLinkedSendpcto(sqInt annotation, char *mcpc, CogMethod *theCogMethod);
extern void unlinkSendsLinkedForInvalidClasses(void);
extern void unlinkSendsOfisMNUSelector(sqInt selector, sqInt isMNUSelector);
extern void unlinkSendsToFree(void);
Expand Down Expand Up @@ -4235,7 +4235,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize)
sqInt offset17;
sqInt offset18;
sqInt offset19;
sqInt offset2;
int offset2;
sqInt offset20;
sqInt offset21;
sqInt offset22;
Expand Down Expand Up @@ -14672,7 +14672,7 @@ markAndTraceOrFreePICTargetin(sqInt entryPoint, CogMethod *cPIC)

/* Cogit>>#markLiteralsAndUnlinkIfUnmarkedSend:pc:method: */
static sqInt NoDbgRegParms
markLiteralsAndUnlinkIfUnmarkedSendpcmethod(sqInt annotation, char *mcpc, sqInt cogMethod)
markLiteralsAndUnlinkIfUnmarkedSendpcmethod(sqInt annotation, char *mcpc, CogMethod *cogMethod)
{
sqInt cacheTag1;
sqInt cacheTagMarked;
Expand Down Expand Up @@ -16399,7 +16399,7 @@ unlinkIfLinkedSendpcignored(sqInt annotation, char *mcpc, sqInt superfluity)

/* Cogit>>#unlinkIfLinkedSend:pc:to: */
static sqInt NoDbgRegParms
unlinkIfLinkedSendpcto(sqInt annotation, char *mcpc, sqInt theCogMethod)
unlinkIfLinkedSendpcto(sqInt annotation, char *mcpc, CogMethod *theCogMethod)
{
sqInt entryPoint;
sqInt offset1;
Expand Down Expand Up @@ -16435,7 +16435,7 @@ unlinkIfLinkedSendpcto(sqInt annotation, char *mcpc, sqInt theCogMethod)
}
}
targetMethod1 = ((CogMethod *) (entryPoint - offset1));
if ((((sqInt)targetMethod1)) == theCogMethod) {
if (targetMethod1 == theCogMethod) {
/* begin unlinkSendAt:targetMethod:sendTable: */
unlinkedRoutine = sendTable1[((((targetMethod1->cmNumArgs)) < (NumSendTrampolines - 1)) ? ((targetMethod1->cmNumArgs)) : (NumSendTrampolines - 1))];
/* begin setCodeModified */
Expand Down
22 changes: 11 additions & 11 deletions src/spur32.cog.lowcode/cogitIA32.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* Automatically generated by
CCodeGenerator VMMaker.oscog-eem.3109 uuid: 28141cc3-6a57-4a86-b9c2-383d8563851b
CCodeGenerator VMMaker.oscog-eem.3115 uuid: e71c2bb2-05b8-4d1e-a837-c31a9bcc2148
from
StackToRegisterMappingCogit VMMaker.oscog-eem.3109 uuid: 28141cc3-6a57-4a86-b9c2-383d8563851b
StackToRegisterMappingCogit VMMaker.oscog-eem.3115 uuid: e71c2bb2-05b8-4d1e-a837-c31a9bcc2148
*/
static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.3109 uuid: 28141cc3-6a57-4a86-b9c2-383d8563851b " __DATE__ ;
static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.3115 uuid: e71c2bb2-05b8-4d1e-a837-c31a9bcc2148 " __DATE__ ;
char *__cogitBuildInfo = __buildInfo;


Expand Down Expand Up @@ -803,7 +803,7 @@ extern void markAndTraceMachineCodeOfMarkedMethods(void);
static void markAndTraceObjectReferencesInGeneratedRuntime(void);
static sqInt NoDbgRegParms markAndTraceOrFreeCogMethodfirstVisit(CogMethod *cogMethod, sqInt firstVisit);
static sqInt NoDbgRegParms markAndTraceOrFreePICTargetin(sqInt entryPoint, CogMethod *cPIC);
static sqInt NoDbgRegParms markLiteralsAndUnlinkIfUnmarkedSendpcmethod(sqInt annotation, char *mcpc, sqInt cogMethod);
static sqInt NoDbgRegParms markLiteralsAndUnlinkIfUnmarkedSendpcmethod(sqInt annotation, char *mcpc, CogMethod *cogMethod);
static sqInt NoDbgRegParms markLiteralspcmethod(sqInt annotation, char *mcpc, CogMethod *cogMethod);
extern void markMethodAndReferents(CogBlockMethod *aCogMethod);
extern usqInt maxCogMethodAddress(void);
Expand Down Expand Up @@ -865,7 +865,7 @@ static sqInt NoDbgRegParms unlinkIfInvalidClassSendpcignored(sqInt annotation, c
static sqInt NoDbgRegParms unlinkIfLinkedSendToFreepcignored(sqInt annotation, char *mcpc, sqInt superfluity);
static sqInt NoDbgRegParms unlinkIfLinkedSendpcif(sqInt annotation, char *mcpc, CogMethod *criterionArg);
static sqInt NoDbgRegParms unlinkIfLinkedSendpcignored(sqInt annotation, char *mcpc, sqInt superfluity);
static sqInt NoDbgRegParms unlinkIfLinkedSendpcto(sqInt annotation, char *mcpc, sqInt theCogMethod);
static sqInt NoDbgRegParms unlinkIfLinkedSendpcto(sqInt annotation, char *mcpc, CogMethod *theCogMethod);
extern void unlinkSendsLinkedForInvalidClasses(void);
extern void unlinkSendsOfisMNUSelector(sqInt selector, sqInt isMNUSelector);
extern void unlinkSendsToFree(void);
Expand Down Expand Up @@ -3991,8 +3991,8 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize)
usqInt mask2;
usqInt maskReg;
sqInt mcIdx;
sqInt offset;
sqInt offset1;
int offset;
int offset1;
usqInt offset10;
usqInt offset11;
sqInt offset110;
Expand All @@ -4017,7 +4017,7 @@ dispatchConcretize(AbstractInstruction * self_in_dispatchConcretize)
sqInt offset17;
sqInt offset18;
sqInt offset19;
sqInt offset2;
int offset2;
sqInt offset20;
sqInt offset21;
sqInt offset22;
Expand Down Expand Up @@ -14344,7 +14344,7 @@ markAndTraceOrFreePICTargetin(sqInt entryPoint, CogMethod *cPIC)

/* Cogit>>#markLiteralsAndUnlinkIfUnmarkedSend:pc:method: */
static sqInt NoDbgRegParms
markLiteralsAndUnlinkIfUnmarkedSendpcmethod(sqInt annotation, char *mcpc, sqInt cogMethod)
markLiteralsAndUnlinkIfUnmarkedSendpcmethod(sqInt annotation, char *mcpc, CogMethod *cogMethod)
{
sqInt cacheTag1;
sqInt cacheTagMarked;
Expand Down Expand Up @@ -16062,7 +16062,7 @@ unlinkIfLinkedSendpcignored(sqInt annotation, char *mcpc, sqInt superfluity)

/* Cogit>>#unlinkIfLinkedSend:pc:to: */
static sqInt NoDbgRegParms
unlinkIfLinkedSendpcto(sqInt annotation, char *mcpc, sqInt theCogMethod)
unlinkIfLinkedSendpcto(sqInt annotation, char *mcpc, CogMethod *theCogMethod)
{
sqInt entryPoint;
sqInt offset1;
Expand Down Expand Up @@ -16098,7 +16098,7 @@ unlinkIfLinkedSendpcto(sqInt annotation, char *mcpc, sqInt theCogMethod)
}
}
targetMethod1 = ((CogMethod *) (entryPoint - offset1));
if ((((sqInt)targetMethod1)) == theCogMethod) {
if (targetMethod1 == theCogMethod) {
/* begin unlinkSendAt:targetMethod:sendTable: */
unlinkedRoutine = sendTable1[((((targetMethod1->cmNumArgs)) < (NumSendTrampolines - 1)) ? ((targetMethod1->cmNumArgs)) : (NumSendTrampolines - 1))];
/* begin setCodeModified */
Expand Down

0 comments on commit 8d5e090

Please sign in to comment.