Skip to content

Commit

Permalink
CogVM source as per VMMaker.oscog-eem.3350
Browse files Browse the repository at this point in the history
Fix regression introduced in VMMaker.oscog-eem.3349 by adding a
disownVM:/ownVM: pair to the SSL connnect primitive.
  • Loading branch information
eliotmiranda committed Feb 15, 2024
1 parent c1cd035 commit 172df70
Show file tree
Hide file tree
Showing 31 changed files with 303 additions and 207 deletions.
34 changes: 19 additions & 15 deletions src/spur32.cog.lowcode/cointerp.c
@@ -1,9 +1,9 @@
/* Automatically generated by
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3349 uuid: 09001547-129a-4b6b-9fed-ccdd6790c8f4
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3350 uuid: b14d789f-780b-49f2-91aa-d50085ca62e6
from
CoInterpreter VMMaker.oscog-eem.3349 uuid: 09001547-129a-4b6b-9fed-ccdd6790c8f4
CoInterpreter VMMaker.oscog-eem.3350 uuid: b14d789f-780b-49f2-91aa-d50085ca62e6
*/
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.3349 uuid: 09001547-129a-4b6b-9fed-ccdd6790c8f4 " __DATE__ ;
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.3350 uuid: b14d789f-780b-49f2-91aa-d50085ca62e6 " __DATE__ ;
char *__interpBuildInfo = __buildInfo;


Expand Down Expand Up @@ -2027,7 +2027,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 @@ -2701,7 +2701,7 @@ sqInt debugCallbackReturns;
sqInt suppressHeartbeatFlag;
sqInt cannotDeferDisplayUpdates;
sqInt checkedPluginName;
const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.3349]";
const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.3350]";
sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
char expensiveAsserts = 0;
int (*showSurfaceFn)(sqIntptr_t, int, int, int, int);
Expand Down Expand Up @@ -38971,7 +38971,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 @@ -39020,7 +39020,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 @@ -39038,7 +39038,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 @@ -40237,7 +40237,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 @@ -53239,7 +53239,7 @@ primitiveInvokeObjectAsMethod(void)
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
sqInt i;
sqInt lookupClassTag;
usqInt runArgs;
sqInt runArgs;
sqInt runReceiver;
char *sp;
char *sp1;
Expand Down Expand Up @@ -81137,7 +81137,7 @@ prepareForSnapshot(void)
sqInt limit;
sqInt newEndOfMemory;
sqInt next;
sqInt node;
usqInt node;
SpurSegmentInfo *seg;
sqInt smallChild;
sqInt treeNode;
Expand Down Expand Up @@ -82927,8 +82927,9 @@ defaultNumStackPages(void)

/* Release the VM to other threads and answer the current thread's index.
Currently valid flags for the non-threaded VM are:
DisownVMForThreading - allow the VM to thread-switch; this is ignored
DisownVMLockOutFullGC - prevent fullGCs while this thread disowns the VM
DisownVMForFFICall - informs the VM that it is entering an FFI call
DisownVMForFFICall - informs the VM that it is entering an FFI call

This is the entry-point for plugins and primitives that wish to release
the VM while
Expand All @@ -82944,6 +82945,9 @@ disownVM(sqInt flags)
sqInt top;

assert(GIV(primFailCode) == 0);
if (flags == DisownVMForThreading) {
return 0;
}
assert((isImmediate(flags)
? ((flags & 1))
&& (((((flags >> 1)) >= 0) && (((flags >> 1)) <= (argumentCountOfMethodHeader(-1)))))
Expand Down Expand Up @@ -87217,7 +87221,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 @@ -87261,7 +87265,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 @@ -87279,7 +87283,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.cog.lowcode/cointerp.h
@@ -1,5 +1,5 @@
/* Automatically generated by
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3347 uuid: 7e4df21b-b561-434b-b2d3-45e8806d7875
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3350 uuid: b14d789f-780b-49f2-91aa-d50085ca62e6
*/


Expand Down
34 changes: 19 additions & 15 deletions src/spur32.cog.lowcode/gcc3x-cointerp.c
Expand Up @@ -2,11 +2,11 @@


/* Automatically generated by
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3349 uuid: 09001547-129a-4b6b-9fed-ccdd6790c8f4
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3350 uuid: b14d789f-780b-49f2-91aa-d50085ca62e6
from
CoInterpreter VMMaker.oscog-eem.3349 uuid: 09001547-129a-4b6b-9fed-ccdd6790c8f4
CoInterpreter VMMaker.oscog-eem.3350 uuid: b14d789f-780b-49f2-91aa-d50085ca62e6
*/
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.3349 uuid: 09001547-129a-4b6b-9fed-ccdd6790c8f4 " __DATE__ ;
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.3350 uuid: b14d789f-780b-49f2-91aa-d50085ca62e6 " __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 debugCallbackReturns;
sqInt suppressHeartbeatFlag;
sqInt cannotDeferDisplayUpdates;
sqInt checkedPluginName;
const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.3349]";
const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.3350]";
sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
char expensiveAsserts = 0;
int (*showSurfaceFn)(sqIntptr_t, int, int, int, int);
Expand Down Expand Up @@ -38980,7 +38980,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 @@ -39029,7 +39029,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 @@ -39047,7 +39047,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 @@ -40246,7 +40246,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 @@ -53248,7 +53248,7 @@ primitiveInvokeObjectAsMethod(void)
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
sqInt i;
sqInt lookupClassTag;
usqInt runArgs;
sqInt runArgs;
sqInt runReceiver;
char *sp;
char *sp1;
Expand Down Expand Up @@ -81146,7 +81146,7 @@ prepareForSnapshot(void)
sqInt limit;
sqInt newEndOfMemory;
sqInt next;
sqInt node;
usqInt node;
SpurSegmentInfo *seg;
sqInt smallChild;
sqInt treeNode;
Expand Down Expand Up @@ -82936,8 +82936,9 @@ defaultNumStackPages(void)

/* Release the VM to other threads and answer the current thread's index.
Currently valid flags for the non-threaded VM are:
DisownVMForThreading - allow the VM to thread-switch; this is ignored
DisownVMLockOutFullGC - prevent fullGCs while this thread disowns the VM
DisownVMForFFICall - informs the VM that it is entering an FFI call
DisownVMForFFICall - informs the VM that it is entering an FFI call

This is the entry-point for plugins and primitives that wish to release
the VM while
Expand All @@ -82953,6 +82954,9 @@ disownVM(sqInt flags)
sqInt top;

assert(GIV(primFailCode) == 0);
if (flags == DisownVMForThreading) {
return 0;
}
assert((isImmediate(flags)
? ((flags & 1))
&& (((((flags >> 1)) >= 0) && (((flags >> 1)) <= (argumentCountOfMethodHeader(-1)))))
Expand Down Expand Up @@ -87226,7 +87230,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 @@ -87270,7 +87274,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 @@ -87288,7 +87292,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

0 comments on commit 172df70

Please sign in to comment.