Skip to content

Commit

Permalink
CogVM source as per VMMaker.oscog-eem.3298
Browse files Browse the repository at this point in the history
Fix a slip in followForwardingPointersOfReceiverAndTemporariesInStackZone,
which has no business calling markAndTrace: :-)
  • Loading branch information
eliotmiranda committed Jan 13, 2023
1 parent f185ad8 commit f883966
Show file tree
Hide file tree
Showing 16 changed files with 86 additions and 110 deletions.
2 changes: 1 addition & 1 deletion src/spur32.cog/cogit.h
@@ -1,5 +1,5 @@
/* Automatically generated by
CCodeGenerator VMMaker.oscog-eem.3297 uuid: 052ff1ab-c36e-496e-9d02-5c15f1bd3b1b
CCodeGenerator VMMaker.oscog-eem.3298 uuid: 835282e6-0e94-4101-a82d-46bd16786302
*/


Expand Down
25 changes: 11 additions & 14 deletions src/spur32.cog/cointerp.c
@@ -1,9 +1,9 @@
/* Automatically generated by
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3297 uuid: 052ff1ab-c36e-496e-9d02-5c15f1bd3b1b
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3298 uuid: 835282e6-0e94-4101-a82d-46bd16786302
from
CoInterpreter VMMaker.oscog-eem.3297 uuid: 052ff1ab-c36e-496e-9d02-5c15f1bd3b1b
CoInterpreter VMMaker.oscog-eem.3298 uuid: 835282e6-0e94-4101-a82d-46bd16786302
*/
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.3297 uuid: 052ff1ab-c36e-496e-9d02-5c15f1bd3b1b " __DATE__ ;
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.3298 uuid: 835282e6-0e94-4101-a82d-46bd16786302 " __DATE__ ;
char *__interpBuildInfo = __buildInfo;


Expand Down Expand Up @@ -2689,7 +2689,7 @@ sqInt debugCallbackInvokes;
sqInt debugCallbackReturns;
sqInt cannotDeferDisplayUpdates;
sqInt checkedPluginName;
const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.3297]";
const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.3298]";
sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
char expensiveAsserts = 0;
int (*showSurfaceFn)(sqIntptr_t, int, int, int, int);
Expand Down Expand Up @@ -17432,9 +17432,6 @@ followForwardingPointersOfReceiverAndTemporariesInStackZone(void)
oop = referent1;
longAtput(theSP, oop);
}
if (!(((oop & (tagMask())) != 0))) {
markAndTrace(oop);
}
theSP += BytesPerWord;
}
if ((((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory())
Expand Down Expand Up @@ -19260,7 +19257,7 @@ mnuMethodOrNilFor(sqInt rcvr)
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
sqInt currentClass;
sqInt dictionary;
usqInt index;
sqInt index;
usqInt length;
sqInt mask;
sqInt methodArray;
Expand Down Expand Up @@ -19309,7 +19306,7 @@ mnuMethodOrNilFor(sqInt rcvr)
wrapAround = 0;
while (1) {
/* begin fetchPointer:ofObject: */
nextSelector = longAt((dictionary + BaseHeaderSize) + (index << (shiftForWord())));
nextSelector = longAt((dictionary + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord())))));
if (nextSelector == GIV(nilObj)) {
mnuMethod = null;
goto l11;
Expand All @@ -19327,7 +19324,7 @@ mnuMethodOrNilFor(sqInt rcvr)
}
methodArray = objOop;
/* begin followField:ofObject: */
objOop1 = longAt((methodArray + BaseHeaderSize) + ((index - SelectorStart) << (shiftForWord())));
objOop1 = longAt((methodArray + BaseHeaderSize) + (((sqInt)((usqInt)((index - SelectorStart)) << (shiftForWord())))));
if (((!(objOop1 & (tagMask()))))
&& ((!((longAt(objOop1)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun())))))) {
objOop1 = fixFollowedFieldofObjectwithInitialValue(index - SelectorStart, methodArray, objOop1);
Expand Down Expand Up @@ -61757,7 +61754,7 @@ prepareForSnapshot(void)
sqInt limit;
sqInt newEndOfMemory;
sqInt next;
sqInt node;
usqInt node;
SpurSegmentInfo *seg;
sqInt smallChild;
sqInt treeNode;
Expand Down Expand Up @@ -67788,7 +67785,7 @@ lookupSelectorinClass(sqInt selector, sqInt class)
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
sqInt currentClass;
sqInt dictionary;
usqInt index;
sqInt index;
usqInt length;
sqInt mask;
sqInt meth;
Expand Down Expand Up @@ -67832,7 +67829,7 @@ lookupSelectorinClass(sqInt selector, sqInt class)
wrapAround = 0;
while (1) {
/* begin fetchPointer:ofObject: */
nextSelector = longAt((dictionary + BaseHeaderSize) + (index << (shiftForWord())));
nextSelector = longAt((dictionary + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord())))));
if (nextSelector == GIV(nilObj)) {
meth = null;
goto l8;
Expand All @@ -67850,7 +67847,7 @@ lookupSelectorinClass(sqInt selector, sqInt class)
}
methodArray = objOop2;
/* begin followField:ofObject: */
objOop1 = longAt((methodArray + BaseHeaderSize) + ((index - SelectorStart) << (shiftForWord())));
objOop1 = longAt((methodArray + BaseHeaderSize) + (((sqInt)((usqInt)((index - SelectorStart)) << (shiftForWord())))));
if (((!(objOop1 & (tagMask()))))
&& ((!((longAt(objOop1)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun())))))) {
objOop1 = fixFollowedFieldofObjectwithInitialValue(index - SelectorStart, methodArray, objOop1);
Expand Down
2 changes: 1 addition & 1 deletion src/spur32.cog/cointerp.h
@@ -1,5 +1,5 @@
/* Automatically generated by
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3297 uuid: 052ff1ab-c36e-496e-9d02-5c15f1bd3b1b
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3298 uuid: 835282e6-0e94-4101-a82d-46bd16786302
*/


Expand Down
25 changes: 11 additions & 14 deletions src/spur32.cog/gcc3x-cointerp.c
Expand Up @@ -2,11 +2,11 @@


/* Automatically generated by
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3297 uuid: 052ff1ab-c36e-496e-9d02-5c15f1bd3b1b
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3298 uuid: 835282e6-0e94-4101-a82d-46bd16786302
from
CoInterpreter VMMaker.oscog-eem.3297 uuid: 052ff1ab-c36e-496e-9d02-5c15f1bd3b1b
CoInterpreter VMMaker.oscog-eem.3298 uuid: 835282e6-0e94-4101-a82d-46bd16786302
*/
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.3297 uuid: 052ff1ab-c36e-496e-9d02-5c15f1bd3b1b " __DATE__ ;
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.3298 uuid: 835282e6-0e94-4101-a82d-46bd16786302 " __DATE__ ;
char *__interpBuildInfo = __buildInfo;


Expand Down Expand Up @@ -2692,7 +2692,7 @@ sqInt debugCallbackInvokes;
sqInt debugCallbackReturns;
sqInt cannotDeferDisplayUpdates;
sqInt checkedPluginName;
const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.3297]";
const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.3298]";
sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
char expensiveAsserts = 0;
int (*showSurfaceFn)(sqIntptr_t, int, int, int, int);
Expand Down Expand Up @@ -17441,9 +17441,6 @@ followForwardingPointersOfReceiverAndTemporariesInStackZone(void)
oop = referent1;
longAtput(theSP, oop);
}
if (!(((oop & (tagMask())) != 0))) {
markAndTrace(oop);
}
theSP += BytesPerWord;
}
if ((((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory())
Expand Down Expand Up @@ -19269,7 +19266,7 @@ mnuMethodOrNilFor(sqInt rcvr)
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
sqInt currentClass;
sqInt dictionary;
usqInt index;
sqInt index;
usqInt length;
sqInt mask;
sqInt methodArray;
Expand Down Expand Up @@ -19318,7 +19315,7 @@ mnuMethodOrNilFor(sqInt rcvr)
wrapAround = 0;
while (1) {
/* begin fetchPointer:ofObject: */
nextSelector = longAt((dictionary + BaseHeaderSize) + (index << (shiftForWord())));
nextSelector = longAt((dictionary + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord())))));
if (nextSelector == GIV(nilObj)) {
mnuMethod = null;
goto l11;
Expand All @@ -19336,7 +19333,7 @@ mnuMethodOrNilFor(sqInt rcvr)
}
methodArray = objOop;
/* begin followField:ofObject: */
objOop1 = longAt((methodArray + BaseHeaderSize) + ((index - SelectorStart) << (shiftForWord())));
objOop1 = longAt((methodArray + BaseHeaderSize) + (((sqInt)((usqInt)((index - SelectorStart)) << (shiftForWord())))));
if (((!(objOop1 & (tagMask()))))
&& ((!((longAt(objOop1)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun())))))) {
objOop1 = fixFollowedFieldofObjectwithInitialValue(index - SelectorStart, methodArray, objOop1);
Expand Down Expand Up @@ -61766,7 +61763,7 @@ prepareForSnapshot(void)
sqInt limit;
sqInt newEndOfMemory;
sqInt next;
sqInt node;
usqInt node;
SpurSegmentInfo *seg;
sqInt smallChild;
sqInt treeNode;
Expand Down Expand Up @@ -67797,7 +67794,7 @@ lookupSelectorinClass(sqInt selector, sqInt class)
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
sqInt currentClass;
sqInt dictionary;
usqInt index;
sqInt index;
usqInt length;
sqInt mask;
sqInt meth;
Expand Down Expand Up @@ -67841,7 +67838,7 @@ lookupSelectorinClass(sqInt selector, sqInt class)
wrapAround = 0;
while (1) {
/* begin fetchPointer:ofObject: */
nextSelector = longAt((dictionary + BaseHeaderSize) + (index << (shiftForWord())));
nextSelector = longAt((dictionary + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord())))));
if (nextSelector == GIV(nilObj)) {
meth = null;
goto l8;
Expand All @@ -67859,7 +67856,7 @@ lookupSelectorinClass(sqInt selector, sqInt class)
}
methodArray = objOop2;
/* begin followField:ofObject: */
objOop1 = longAt((methodArray + BaseHeaderSize) + ((index - SelectorStart) << (shiftForWord())));
objOop1 = longAt((methodArray + BaseHeaderSize) + (((sqInt)((usqInt)((index - SelectorStart)) << (shiftForWord())))));
if (((!(objOop1 & (tagMask()))))
&& ((!((longAt(objOop1)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun())))))) {
objOop1 = fixFollowedFieldofObjectwithInitialValue(index - SelectorStart, methodArray, objOop1);
Expand Down
2 changes: 1 addition & 1 deletion src/spur32.sista/cogit.h
@@ -1,5 +1,5 @@
/* Automatically generated by
CCodeGenerator VMMaker.oscog-eem.3297 uuid: 052ff1ab-c36e-496e-9d02-5c15f1bd3b1b
CCodeGenerator VMMaker.oscog-eem.3298 uuid: 835282e6-0e94-4101-a82d-46bd16786302
*/


Expand Down
31 changes: 14 additions & 17 deletions src/spur32.sista/cointerp.c
@@ -1,9 +1,9 @@
/* Automatically generated by
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3297 uuid: 052ff1ab-c36e-496e-9d02-5c15f1bd3b1b
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3298 uuid: 835282e6-0e94-4101-a82d-46bd16786302
from
CoInterpreter VMMaker.oscog-eem.3297 uuid: 052ff1ab-c36e-496e-9d02-5c15f1bd3b1b
CoInterpreter VMMaker.oscog-eem.3298 uuid: 835282e6-0e94-4101-a82d-46bd16786302
*/
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.3297 uuid: 052ff1ab-c36e-496e-9d02-5c15f1bd3b1b " __DATE__ ;
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.3298 uuid: 835282e6-0e94-4101-a82d-46bd16786302 " __DATE__ ;
char *__interpBuildInfo = __buildInfo;


Expand Down Expand Up @@ -2030,7 +2030,7 @@ static signed short primitiveMetadataTable[MaxPrimitiveIndex + 2 /* 584 */] = {
/*78*/ 0, 0,
/*80*/ -256,-256,-256, 4, 4, 0, 0x100, 0, 0x200,-256,-256, 0, 0, 0, 0x100,-256, 0,-256,
/*98*/ 0, 0,
/*100*/ 260, 0x200, 0x200, 0x200,-256, 513,-256,-256,-256,-256, 0, 0x100, 0, 0,-256,
/*100*/ 260, 0x200, 0x100, 0x200,-256, 513,-256,-256,-256,-256, 0, 0x100, 0, 0,-256,
/*115*/ 0x100, 0, 12, 260, 0,
/*120*/ 524, 0x100,-256,-256, 1, 0, 0, 0, 0,-255,-256,-256, 0, 0, 0,-256, 0,-256,-256,
/*139*/ 0,
Expand Down Expand Up @@ -2704,7 +2704,7 @@ sqInt debugCallbackInvokes;
sqInt debugCallbackReturns;
sqInt cannotDeferDisplayUpdates;
sqInt checkedPluginName;
const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.3297]";
const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.3298]";
sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
char expensiveAsserts = 0;
int (*showSurfaceFn)(sqIntptr_t, int, int, int, int);
Expand Down Expand Up @@ -20287,9 +20287,6 @@ followForwardingPointersOfReceiverAndTemporariesInStackZone(void)
oop = referent1;
longAtput(theSP, oop);
}
if (!(((oop & (tagMask())) != 0))) {
markAndTrace(oop);
}
theSP += BytesPerWord;
}
if ((((((usqInt)(longAt(theFP + FoxMethod)))) < (startOfMemory())
Expand Down Expand Up @@ -22117,7 +22114,7 @@ mnuMethodOrNilFor(sqInt rcvr)
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
sqInt currentClass;
sqInt dictionary;
sqInt index;
usqInt index;
usqInt length;
sqInt mask;
sqInt methodArray;
Expand Down Expand Up @@ -22166,7 +22163,7 @@ mnuMethodOrNilFor(sqInt rcvr)
wrapAround = 0;
while (1) {
/* begin fetchPointer:ofObject: */
nextSelector = longAt((dictionary + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord())))));
nextSelector = longAt((dictionary + BaseHeaderSize) + (index << (shiftForWord())));
if (nextSelector == GIV(nilObj)) {
mnuMethod = null;
goto l11;
Expand All @@ -22184,7 +22181,7 @@ mnuMethodOrNilFor(sqInt rcvr)
}
methodArray = objOop;
/* begin followField:ofObject: */
objOop1 = longAt((methodArray + BaseHeaderSize) + (((sqInt)((usqInt)((index - SelectorStart)) << (shiftForWord())))));
objOop1 = longAt((methodArray + BaseHeaderSize) + ((index - SelectorStart) << (shiftForWord())));
if (((!(objOop1 & (tagMask()))))
&& ((!((longAt(objOop1)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun())))))) {
objOop1 = fixFollowedFieldofObjectwithInitialValue(index - SelectorStart, methodArray, objOop1);
Expand Down Expand Up @@ -23360,7 +23357,7 @@ printFrameWithSP(char *theFP, char *theSP)
usqInt index;
sqInt methodField;
usqInt numArgs;
sqInt numTemps;
usqInt numTemps;
char *rcvrAddress;
sqInt rcvrOrClosure;
CogBlockMethod * self_in_cmHomeMethod;
Expand Down Expand Up @@ -64220,7 +64217,7 @@ updatePointersInsavedFirstFieldPointer(sqInt obj, sqInt firstFieldPtr)
assert((ReceiverIndex + ((sp >> 1))) < (lengthOf(obj)));
contextSize = (sp >> 1);
l6: /* end fetchStackPointerOf: */;
numPointerSlots = CtxtTempFrameStart + contextSize;
numPointerSlots = ((usqInt) (CtxtTempFrameStart + contextSize));
goto l10;
}
/* begin numSlotsOf: */
Expand Down Expand Up @@ -64250,7 +64247,7 @@ updatePointersInsavedFirstFieldPointer(sqInt obj, sqInt firstFieldPtr)
/* begin literalCountOfMethodHeader: */
assert((header & 1));
numLiterals = ((header >> 1)) & AlternateHeaderNumLiteralsMask;
numPointerSlots = numLiterals + LiteralStart;
numPointerSlots = ((usqInt) (numLiterals + LiteralStart));
l10: /* end numPointerSlotsWhileCompactingOf:withFormat:savedFirstFieldPointer: */;
if ((fmt <= 5 /* lastPointerFormat */)
&& (numPointerSlots > 0)) {
Expand Down Expand Up @@ -70853,7 +70850,7 @@ lookupSelectorinClass(sqInt selector, sqInt class)
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
sqInt currentClass;
sqInt dictionary;
sqInt index;
usqInt index;
usqInt length;
sqInt mask;
sqInt meth;
Expand Down Expand Up @@ -70897,7 +70894,7 @@ lookupSelectorinClass(sqInt selector, sqInt class)
wrapAround = 0;
while (1) {
/* begin fetchPointer:ofObject: */
nextSelector = longAt((dictionary + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord())))));
nextSelector = longAt((dictionary + BaseHeaderSize) + (index << (shiftForWord())));
if (nextSelector == GIV(nilObj)) {
meth = null;
goto l8;
Expand All @@ -70915,7 +70912,7 @@ lookupSelectorinClass(sqInt selector, sqInt class)
}
methodArray = objOop2;
/* begin followField:ofObject: */
objOop1 = longAt((methodArray + BaseHeaderSize) + (((sqInt)((usqInt)((index - SelectorStart)) << (shiftForWord())))));
objOop1 = longAt((methodArray + BaseHeaderSize) + ((index - SelectorStart) << (shiftForWord())));
if (((!(objOop1 & (tagMask()))))
&& ((!((longAt(objOop1)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun())))))) {
objOop1 = fixFollowedFieldofObjectwithInitialValue(index - SelectorStart, methodArray, objOop1);
Expand Down
2 changes: 1 addition & 1 deletion src/spur32.sista/cointerp.h
@@ -1,5 +1,5 @@
/* Automatically generated by
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3297 uuid: 052ff1ab-c36e-496e-9d02-5c15f1bd3b1b
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3298 uuid: 835282e6-0e94-4101-a82d-46bd16786302
*/


Expand Down

0 comments on commit f883966

Please sign in to comment.