Skip to content

Commit

Permalink
CogVM source as per VMMaker.oscog-eem.3307/VMConstruction-Plugins-OSP…
Browse files Browse the repository at this point in the history
…rocessPlugin.oscog-eem.76

Implement a machine code primitive for primitiveHighResClock on 64-bit platforms.
This is faster than the fast-call interpreter primitive by 15% on x86_64 and by
480% on ARMv8 (Apple M1).

Have compilePrimitive use methodOrBlockNumArgs rather than argumentCountOf: methodObj.

Fix the type of semaIndices.  This should be int. unsigned char risks corruption
if there are more than 256 external semaphores, which could be the case in a
very complex application.
Fix a few sends of stackIntegerValue: that were not followed by the obligatory
interpreterProxy failed check.  I lost patience/time, but this really should be
done.  In all VMs, proceeding after a primitive has failed without checking for
primitive failure can have disastrous effects (arguments are popped off the
stack that shouldn't be).
  • Loading branch information
eliotmiranda committed Feb 23, 2023
1 parent ce56b3a commit 75b01da
Show file tree
Hide file tree
Showing 64 changed files with 976 additions and 397 deletions.
172 changes: 81 additions & 91 deletions src/plugins/UnixOSProcessPlugin/UnixOSProcessPlugin.c

Large diffs are not rendered by default.

2 changes: 1 addition & 1 deletion src/spur32.cog.lowcode/cogit.h
@@ -1,5 +1,5 @@
/* Automatically generated by
CCodeGenerator VMMaker.oscog-eem.3304 uuid: d2a7fa73-fe36-4db6-b473-554e09c396e5
CCodeGenerator VMMaker.oscog-eem.3307 uuid: bea33bb5-98d1-4d1a-8004-40be76e0b94c
*/


Expand Down
8 changes: 4 additions & 4 deletions src/spur32.cog.lowcode/cogitARMv5.c
@@ -1,9 +1,9 @@
/* Automatically generated by
CCodeGenerator VMMaker.oscog-eem.3302 uuid: 66c9a94d-c30b-41ca-b89c-297646db25f7
CCodeGenerator VMMaker.oscog-eem.3307 uuid: bea33bb5-98d1-4d1a-8004-40be76e0b94c
from
StackToRegisterMappingCogit VMMaker.oscog-eem.3302 uuid: 66c9a94d-c30b-41ca-b89c-297646db25f7
StackToRegisterMappingCogit VMMaker.oscog-eem.3307 uuid: bea33bb5-98d1-4d1a-8004-40be76e0b94c
*/
static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.3302 uuid: 66c9a94d-c30b-41ca-b89c-297646db25f7 " __DATE__ ;
static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.3307 uuid: bea33bb5-98d1-4d1a-8004-40be76e0b94c " __DATE__ ;
char *__cogitBuildInfo = __buildInfo;


Expand Down Expand Up @@ -28550,7 +28550,7 @@ compilePrimitive(void)
if ((((primitiveDescriptor = primitiveGeneratorOrNil())) != null)
&& ((((primitiveDescriptor->primitiveGenerator)) != null)
&& ((((primitiveDescriptor->primNumArgs)) < 0)
|| (((primitiveDescriptor->primNumArgs)) == (argumentCountOf(methodObj)))))) {
|| (((primitiveDescriptor->primNumArgs)) == methodOrBlockNumArgs)))) {

/* Note opcodeIndex so that any arg load instructions
for unimplemented primitives can be discarded. */
Expand Down
15 changes: 11 additions & 4 deletions src/spur32.cog.lowcode/cogitIA32.c
@@ -1,9 +1,9 @@
/* Automatically generated by
CCodeGenerator VMMaker.oscog-eem.3302 uuid: 66c9a94d-c30b-41ca-b89c-297646db25f7
CCodeGenerator VMMaker.oscog-eem.3307 uuid: bea33bb5-98d1-4d1a-8004-40be76e0b94c
from
StackToRegisterMappingCogit VMMaker.oscog-eem.3302 uuid: 66c9a94d-c30b-41ca-b89c-297646db25f7
StackToRegisterMappingCogit VMMaker.oscog-eem.3307 uuid: bea33bb5-98d1-4d1a-8004-40be76e0b94c
*/
static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.3302 uuid: 66c9a94d-c30b-41ca-b89c-297646db25f7 " __DATE__ ;
static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.3307 uuid: bea33bb5-98d1-4d1a-8004-40be76e0b94c " __DATE__ ;
char *__cogitBuildInfo = __buildInfo;


Expand Down Expand Up @@ -26051,7 +26051,7 @@ compilePrimitive(void)
if ((((primitiveDescriptor = primitiveGeneratorOrNil())) != null)
&& ((((primitiveDescriptor->primitiveGenerator)) != null)
&& ((((primitiveDescriptor->primNumArgs)) < 0)
|| (((primitiveDescriptor->primNumArgs)) == (argumentCountOf(methodObj)))))) {
|| (((primitiveDescriptor->primNumArgs)) == methodOrBlockNumArgs)))) {

/* Note opcodeIndex so that any arg load instructions
for unimplemented primitives can be discarded. */
Expand Down Expand Up @@ -26080,6 +26080,13 @@ compilePrimitive(void)
|| (primitiveRoutine == (((void (*)(void)) primitiveFail)))) {
return genFastPrimFail();
}
if ((primitiveRoutine == (((void (*)(void)) primitiveHighResClock)))
&& (methodOrBlockNumArgs == 0)) {
code = genPrimitiveHighResClock32();
if (code != UnimplementedPrimitive) {
return code;
}
}
if (((flags & PrimCallOnSmalltalkStack) != 0)) {
return compileOnStackExternalPrimitiveflags(primitiveRoutine, flags);
}
Expand Down
28 changes: 14 additions & 14 deletions src/spur32.cog.lowcode/cointerp.c
@@ -1,9 +1,9 @@
/* Automatically generated by
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3304 uuid: d2a7fa73-fe36-4db6-b473-554e09c396e5
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3307 uuid: bea33bb5-98d1-4d1a-8004-40be76e0b94c
from
CoInterpreter VMMaker.oscog-eem.3304 uuid: d2a7fa73-fe36-4db6-b473-554e09c396e5
CoInterpreter VMMaker.oscog-eem.3307 uuid: bea33bb5-98d1-4d1a-8004-40be76e0b94c
*/
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.3304 uuid: d2a7fa73-fe36-4db6-b473-554e09c396e5 " __DATE__ ;
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.3307 uuid: bea33bb5-98d1-4d1a-8004-40be76e0b94c " __DATE__ ;
char *__interpBuildInfo = __buildInfo;


Expand Down Expand Up @@ -2047,7 +2047,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 @@ -2721,7 +2721,7 @@ sqInt debugCallbackInvokes;
sqInt debugCallbackReturns;
sqInt cannotDeferDisplayUpdates;
sqInt checkedPluginName;
const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.3304]";
const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.3307]";
sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
char expensiveAsserts = 0;
int (*showSurfaceFn)(sqIntptr_t, int, int, int, int);
Expand Down Expand Up @@ -39079,7 +39079,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 @@ -39128,7 +39128,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 @@ -39146,7 +39146,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 @@ -40365,7 +40365,7 @@ printFrameWithSP(char *theFP, char *theSP)
usqInt index;
sqInt methodField;
usqInt numArgs;
usqInt numTemps;
sqInt numTemps;
char *rcvrAddress;
sqInt rcvrOrClosure;
CogBlockMethod * self_in_cmHomeMethod;
Expand Down Expand Up @@ -81069,7 +81069,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 @@ -81099,7 +81099,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 @@ -87716,7 +87716,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 @@ -87760,7 +87760,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 @@ -87778,7 +87778,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
3 changes: 2 additions & 1 deletion src/spur32.cog.lowcode/cointerp.h
@@ -1,5 +1,5 @@
/* Automatically generated by
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3304 uuid: d2a7fa73-fe36-4db6-b473-554e09c396e5
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3307 uuid: bea33bb5-98d1-4d1a-8004-40be76e0b94c
*/


Expand Down Expand Up @@ -137,6 +137,7 @@ extern sqInt primitiveFailFor(sqInt reasonCode);
extern sqInt primitiveFailForwithSecondary(sqInt reasonCode, sqLong extraErrorCode);
extern sqInt primitiveFailureCode(void);
extern void primitiveFullClosureValueNoContextSwitch(void);
EXPORT(sqInt) primitiveHighResClock(void);
extern sqInt signalNoResume(sqInt aSemaphore);
extern usqInt sizeOfAlienData(sqInt oop);
extern void * startOfAlienData(sqInt oop);
Expand Down
28 changes: 14 additions & 14 deletions src/spur32.cog.lowcode/gcc3x-cointerp.c
Expand Up @@ -2,11 +2,11 @@


/* Automatically generated by
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3304 uuid: d2a7fa73-fe36-4db6-b473-554e09c396e5
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3307 uuid: bea33bb5-98d1-4d1a-8004-40be76e0b94c
from
CoInterpreter VMMaker.oscog-eem.3304 uuid: d2a7fa73-fe36-4db6-b473-554e09c396e5
CoInterpreter VMMaker.oscog-eem.3307 uuid: bea33bb5-98d1-4d1a-8004-40be76e0b94c
*/
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.3304 uuid: d2a7fa73-fe36-4db6-b473-554e09c396e5 " __DATE__ ;
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.3307 uuid: bea33bb5-98d1-4d1a-8004-40be76e0b94c " __DATE__ ;
char *__interpBuildInfo = __buildInfo;


Expand Down Expand Up @@ -2050,7 +2050,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 @@ -2724,7 +2724,7 @@ sqInt debugCallbackInvokes;
sqInt debugCallbackReturns;
sqInt cannotDeferDisplayUpdates;
sqInt checkedPluginName;
const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.3304]";
const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.3307]";
sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
char expensiveAsserts = 0;
int (*showSurfaceFn)(sqIntptr_t, int, int, int, int);
Expand Down Expand Up @@ -39088,7 +39088,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 @@ -39137,7 +39137,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 @@ -39155,7 +39155,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 @@ -40374,7 +40374,7 @@ printFrameWithSP(char *theFP, char *theSP)
usqInt index;
sqInt methodField;
usqInt numArgs;
usqInt numTemps;
sqInt numTemps;
char *rcvrAddress;
sqInt rcvrOrClosure;
CogBlockMethod * self_in_cmHomeMethod;
Expand Down Expand Up @@ -81078,7 +81078,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 @@ -81108,7 +81108,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 @@ -87725,7 +87725,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 @@ -87769,7 +87769,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 @@ -87787,7 +87787,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/cogit.h
@@ -1,5 +1,5 @@
/* Automatically generated by
CCodeGenerator VMMaker.oscog-eem.3304 uuid: d2a7fa73-fe36-4db6-b473-554e09c396e5
CCodeGenerator VMMaker.oscog-eem.3307 uuid: bea33bb5-98d1-4d1a-8004-40be76e0b94c
*/


Expand Down
8 changes: 4 additions & 4 deletions src/spur32.cog/cogitARMv5.c
@@ -1,9 +1,9 @@
/* Automatically generated by
CCodeGenerator VMMaker.oscog-eem.3302 uuid: 66c9a94d-c30b-41ca-b89c-297646db25f7
CCodeGenerator VMMaker.oscog-eem.3307 uuid: bea33bb5-98d1-4d1a-8004-40be76e0b94c
from
StackToRegisterMappingCogit VMMaker.oscog-eem.3302 uuid: 66c9a94d-c30b-41ca-b89c-297646db25f7
StackToRegisterMappingCogit VMMaker.oscog-eem.3307 uuid: bea33bb5-98d1-4d1a-8004-40be76e0b94c
*/
static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.3302 uuid: 66c9a94d-c30b-41ca-b89c-297646db25f7 " __DATE__ ;
static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.3307 uuid: bea33bb5-98d1-4d1a-8004-40be76e0b94c " __DATE__ ;
char *__cogitBuildInfo = __buildInfo;


Expand Down Expand Up @@ -26380,7 +26380,7 @@ compilePrimitive(void)
if ((((primitiveDescriptor = primitiveGeneratorOrNil())) != null)
&& ((((primitiveDescriptor->primitiveGenerator)) != null)
&& ((((primitiveDescriptor->primNumArgs)) < 0)
|| (((primitiveDescriptor->primNumArgs)) == (argumentCountOf(methodObj)))))) {
|| (((primitiveDescriptor->primNumArgs)) == methodOrBlockNumArgs)))) {

/* Note opcodeIndex so that any arg load instructions
for unimplemented primitives can be discarded. */
Expand Down
15 changes: 11 additions & 4 deletions src/spur32.cog/cogitIA32.c
@@ -1,9 +1,9 @@
/* Automatically generated by
CCodeGenerator VMMaker.oscog-eem.3302 uuid: 66c9a94d-c30b-41ca-b89c-297646db25f7
CCodeGenerator VMMaker.oscog-eem.3307 uuid: bea33bb5-98d1-4d1a-8004-40be76e0b94c
from
StackToRegisterMappingCogit VMMaker.oscog-eem.3302 uuid: 66c9a94d-c30b-41ca-b89c-297646db25f7
StackToRegisterMappingCogit VMMaker.oscog-eem.3307 uuid: bea33bb5-98d1-4d1a-8004-40be76e0b94c
*/
static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.3302 uuid: 66c9a94d-c30b-41ca-b89c-297646db25f7 " __DATE__ ;
static char __buildInfo[] = "StackToRegisterMappingCogit VMMaker.oscog-eem.3307 uuid: bea33bb5-98d1-4d1a-8004-40be76e0b94c " __DATE__ ;
char *__cogitBuildInfo = __buildInfo;


Expand Down Expand Up @@ -23919,7 +23919,7 @@ compilePrimitive(void)
if ((((primitiveDescriptor = primitiveGeneratorOrNil())) != null)
&& ((((primitiveDescriptor->primitiveGenerator)) != null)
&& ((((primitiveDescriptor->primNumArgs)) < 0)
|| (((primitiveDescriptor->primNumArgs)) == (argumentCountOf(methodObj)))))) {
|| (((primitiveDescriptor->primNumArgs)) == methodOrBlockNumArgs)))) {

/* Note opcodeIndex so that any arg load instructions
for unimplemented primitives can be discarded. */
Expand Down Expand Up @@ -23948,6 +23948,13 @@ compilePrimitive(void)
|| (primitiveRoutine == (((void (*)(void)) primitiveFail)))) {
return genFastPrimFail();
}
if ((primitiveRoutine == (((void (*)(void)) primitiveHighResClock)))
&& (methodOrBlockNumArgs == 0)) {
code = genPrimitiveHighResClock32();
if (code != UnimplementedPrimitive) {
return code;
}
}
if (((flags & PrimCallOnSmalltalkStack) != 0)) {
return compileOnStackExternalPrimitiveflags(primitiveRoutine, flags);
}
Expand Down

0 comments on commit 75b01da

Please sign in to comment.