Skip to content

Commit 172df70

Browse files
committed
CogVM source as per VMMaker.oscog-eem.3350
Fix regression introduced in VMMaker.oscog-eem.3349 by adding a disownVM:/ownVM: pair to the SSL connnect primitive.
1 parent c1cd035 commit 172df70

31 files changed

+303
-207
lines changed

src/spur32.cog.lowcode/cointerp.c

+19-15
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,9 @@
11
/* Automatically generated by
2-
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3349 uuid: 09001547-129a-4b6b-9fed-ccdd6790c8f4
2+
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3350 uuid: b14d789f-780b-49f2-91aa-d50085ca62e6
33
from
4-
CoInterpreter VMMaker.oscog-eem.3349 uuid: 09001547-129a-4b6b-9fed-ccdd6790c8f4
4+
CoInterpreter VMMaker.oscog-eem.3350 uuid: b14d789f-780b-49f2-91aa-d50085ca62e6
55
*/
6-
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.3349 uuid: 09001547-129a-4b6b-9fed-ccdd6790c8f4 " __DATE__ ;
6+
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.3350 uuid: b14d789f-780b-49f2-91aa-d50085ca62e6 " __DATE__ ;
77
char *__interpBuildInfo = __buildInfo;
88

99

@@ -2027,7 +2027,7 @@ static signed short primitiveMetadataTable[MaxPrimitiveIndex + 2 /* 584 */] = {
20272027
/*78*/ 0, 0,
20282028
/*80*/ -256,-256,-256, 4, 4, 0, 0x100, 0, 0x200,-256,-256, 0, 0, 0, 0x100,-256, 0,-256,
20292029
/*98*/ 0, 0,
2030-
/*100*/ 260, 0x200, 0x200, 0x200,-256, 513,-256,-256,-256,-256, 0, 0x100, 0, 0,-256,
2030+
/*100*/ 260, 0x200, 0x100, 0x200,-256, 513,-256,-256,-256,-256, 0, 0x100, 0, 0,-256,
20312031
/*115*/ 0x100, 0, 12, 260, 0,
20322032
/*120*/ 524, 0x100,-256,-256, 1, 0, 0, 0, 0,-255,-256,-256, 0, 0, 0,-256, 0,-256,-256,
20332033
/*139*/ 0,
@@ -2701,7 +2701,7 @@ sqInt debugCallbackReturns;
27012701
sqInt suppressHeartbeatFlag;
27022702
sqInt cannotDeferDisplayUpdates;
27032703
sqInt checkedPluginName;
2704-
const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.3349]";
2704+
const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.3350]";
27052705
sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
27062706
char expensiveAsserts = 0;
27072707
int (*showSurfaceFn)(sqIntptr_t, int, int, int, int);
@@ -38971,7 +38971,7 @@ mnuMethodOrNilFor(sqInt rcvr)
3897138971
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
3897238972
sqInt currentClass;
3897338973
sqInt dictionary;
38974-
sqInt index;
38974+
usqInt index;
3897538975
usqInt length;
3897638976
sqInt mask;
3897738977
sqInt methodArray;
@@ -39020,7 +39020,7 @@ mnuMethodOrNilFor(sqInt rcvr)
3902039020
wrapAround = 0;
3902139021
while (1) {
3902239022
/* begin fetchPointer:ofObject: */
39023-
nextSelector = longAt((dictionary + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord())))));
39023+
nextSelector = longAt((dictionary + BaseHeaderSize) + (index << (shiftForWord())));
3902439024
if (nextSelector == GIV(nilObj)) {
3902539025
mnuMethod = null;
3902639026
goto l11;
@@ -39038,7 +39038,7 @@ mnuMethodOrNilFor(sqInt rcvr)
3903839038
}
3903939039
methodArray = objOop;
3904039040
/* begin followField:ofObject: */
39041-
objOop1 = longAt((methodArray + BaseHeaderSize) + (((sqInt)((usqInt)((index - SelectorStart)) << (shiftForWord())))));
39041+
objOop1 = longAt((methodArray + BaseHeaderSize) + ((index - SelectorStart) << (shiftForWord())));
3904239042
if (((!(objOop1 & (tagMask()))))
3904339043
&& ((!((longAt(objOop1)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun())))))) {
3904439044
objOop1 = fixFollowedFieldofObjectwithInitialValue(index - SelectorStart, methodArray, objOop1);
@@ -40237,7 +40237,7 @@ printFrameWithSP(char *theFP, char *theSP)
4023740237
usqInt index;
4023840238
sqInt methodField;
4023940239
usqInt numArgs;
40240-
sqInt numTemps;
40240+
usqInt numTemps;
4024140241
char *rcvrAddress;
4024240242
sqInt rcvrOrClosure;
4024340243
CogBlockMethod * self_in_cmHomeMethod;
@@ -53239,7 +53239,7 @@ primitiveInvokeObjectAsMethod(void)
5323953239
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
5324053240
sqInt i;
5324153241
sqInt lookupClassTag;
53242-
usqInt runArgs;
53242+
sqInt runArgs;
5324353243
sqInt runReceiver;
5324453244
char *sp;
5324553245
char *sp1;
@@ -81137,7 +81137,7 @@ prepareForSnapshot(void)
8113781137
sqInt limit;
8113881138
sqInt newEndOfMemory;
8113981139
sqInt next;
81140-
sqInt node;
81140+
usqInt node;
8114181141
SpurSegmentInfo *seg;
8114281142
sqInt smallChild;
8114381143
sqInt treeNode;
@@ -82927,8 +82927,9 @@ defaultNumStackPages(void)
8292782927

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

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

8294682947
assert(GIV(primFailCode) == 0);
82948+
if (flags == DisownVMForThreading) {
82949+
return 0;
82950+
}
8294782951
assert((isImmediate(flags)
8294882952
? ((flags & 1))
8294982953
&& (((((flags >> 1)) >= 0) && (((flags >> 1)) <= (argumentCountOfMethodHeader(-1)))))
@@ -87217,7 +87221,7 @@ lookupSelectorinClass(sqInt selector, sqInt class)
8721787221
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
8721887222
sqInt currentClass;
8721987223
sqInt dictionary;
87220-
sqInt index;
87224+
usqInt index;
8722187225
usqInt length;
8722287226
sqInt mask;
8722387227
sqInt meth;
@@ -87261,7 +87265,7 @@ lookupSelectorinClass(sqInt selector, sqInt class)
8726187265
wrapAround = 0;
8726287266
while (1) {
8726387267
/* begin fetchPointer:ofObject: */
87264-
nextSelector = longAt((dictionary + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord())))));
87268+
nextSelector = longAt((dictionary + BaseHeaderSize) + (index << (shiftForWord())));
8726587269
if (nextSelector == GIV(nilObj)) {
8726687270
meth = null;
8726787271
goto l8;
@@ -87279,7 +87283,7 @@ lookupSelectorinClass(sqInt selector, sqInt class)
8727987283
}
8728087284
methodArray = objOop2;
8728187285
/* begin followField:ofObject: */
87282-
objOop1 = longAt((methodArray + BaseHeaderSize) + (((sqInt)((usqInt)((index - SelectorStart)) << (shiftForWord())))));
87286+
objOop1 = longAt((methodArray + BaseHeaderSize) + ((index - SelectorStart) << (shiftForWord())));
8728387287
if (((!(objOop1 & (tagMask()))))
8728487288
&& ((!((longAt(objOop1)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun())))))) {
8728587289
objOop1 = fixFollowedFieldofObjectwithInitialValue(index - SelectorStart, methodArray, objOop1);

src/spur32.cog.lowcode/cointerp.h

+1-1
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Automatically generated by
2-
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3347 uuid: 7e4df21b-b561-434b-b2d3-45e8806d7875
2+
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3350 uuid: b14d789f-780b-49f2-91aa-d50085ca62e6
33
*/
44

55

src/spur32.cog.lowcode/gcc3x-cointerp.c

+19-15
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,11 @@
22

33

44
/* Automatically generated by
5-
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3349 uuid: 09001547-129a-4b6b-9fed-ccdd6790c8f4
5+
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3350 uuid: b14d789f-780b-49f2-91aa-d50085ca62e6
66
from
7-
CoInterpreter VMMaker.oscog-eem.3349 uuid: 09001547-129a-4b6b-9fed-ccdd6790c8f4
7+
CoInterpreter VMMaker.oscog-eem.3350 uuid: b14d789f-780b-49f2-91aa-d50085ca62e6
88
*/
9-
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.3349 uuid: 09001547-129a-4b6b-9fed-ccdd6790c8f4 " __DATE__ ;
9+
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.3350 uuid: b14d789f-780b-49f2-91aa-d50085ca62e6 " __DATE__ ;
1010
char *__interpBuildInfo = __buildInfo;
1111

1212

@@ -2030,7 +2030,7 @@ static signed short primitiveMetadataTable[MaxPrimitiveIndex + 2 /* 584 */] = {
20302030
/*78*/ 0, 0,
20312031
/*80*/ -256,-256,-256, 4, 4, 0, 0x100, 0, 0x200,-256,-256, 0, 0, 0, 0x100,-256, 0,-256,
20322032
/*98*/ 0, 0,
2033-
/*100*/ 260, 0x200, 0x200, 0x200,-256, 513,-256,-256,-256,-256, 0, 0x100, 0, 0,-256,
2033+
/*100*/ 260, 0x200, 0x100, 0x200,-256, 513,-256,-256,-256,-256, 0, 0x100, 0, 0,-256,
20342034
/*115*/ 0x100, 0, 12, 260, 0,
20352035
/*120*/ 524, 0x100,-256,-256, 1, 0, 0, 0, 0,-255,-256,-256, 0, 0, 0,-256, 0,-256,-256,
20362036
/*139*/ 0,
@@ -2704,7 +2704,7 @@ sqInt debugCallbackReturns;
27042704
sqInt suppressHeartbeatFlag;
27052705
sqInt cannotDeferDisplayUpdates;
27062706
sqInt checkedPluginName;
2707-
const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.3349]";
2707+
const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.3350]";
27082708
sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
27092709
char expensiveAsserts = 0;
27102710
int (*showSurfaceFn)(sqIntptr_t, int, int, int, int);
@@ -38980,7 +38980,7 @@ mnuMethodOrNilFor(sqInt rcvr)
3898038980
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
3898138981
sqInt currentClass;
3898238982
sqInt dictionary;
38983-
sqInt index;
38983+
usqInt index;
3898438984
usqInt length;
3898538985
sqInt mask;
3898638986
sqInt methodArray;
@@ -39029,7 +39029,7 @@ mnuMethodOrNilFor(sqInt rcvr)
3902939029
wrapAround = 0;
3903039030
while (1) {
3903139031
/* begin fetchPointer:ofObject: */
39032-
nextSelector = longAt((dictionary + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord())))));
39032+
nextSelector = longAt((dictionary + BaseHeaderSize) + (index << (shiftForWord())));
3903339033
if (nextSelector == GIV(nilObj)) {
3903439034
mnuMethod = null;
3903539035
goto l11;
@@ -39047,7 +39047,7 @@ mnuMethodOrNilFor(sqInt rcvr)
3904739047
}
3904839048
methodArray = objOop;
3904939049
/* begin followField:ofObject: */
39050-
objOop1 = longAt((methodArray + BaseHeaderSize) + (((sqInt)((usqInt)((index - SelectorStart)) << (shiftForWord())))));
39050+
objOop1 = longAt((methodArray + BaseHeaderSize) + ((index - SelectorStart) << (shiftForWord())));
3905139051
if (((!(objOop1 & (tagMask()))))
3905239052
&& ((!((longAt(objOop1)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun())))))) {
3905339053
objOop1 = fixFollowedFieldofObjectwithInitialValue(index - SelectorStart, methodArray, objOop1);
@@ -40246,7 +40246,7 @@ printFrameWithSP(char *theFP, char *theSP)
4024640246
usqInt index;
4024740247
sqInt methodField;
4024840248
usqInt numArgs;
40249-
sqInt numTemps;
40249+
usqInt numTemps;
4025040250
char *rcvrAddress;
4025140251
sqInt rcvrOrClosure;
4025240252
CogBlockMethod * self_in_cmHomeMethod;
@@ -53248,7 +53248,7 @@ primitiveInvokeObjectAsMethod(void)
5324853248
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
5324953249
sqInt i;
5325053250
sqInt lookupClassTag;
53251-
usqInt runArgs;
53251+
sqInt runArgs;
5325253252
sqInt runReceiver;
5325353253
char *sp;
5325453254
char *sp1;
@@ -81146,7 +81146,7 @@ prepareForSnapshot(void)
8114681146
sqInt limit;
8114781147
sqInt newEndOfMemory;
8114881148
sqInt next;
81149-
sqInt node;
81149+
usqInt node;
8115081150
SpurSegmentInfo *seg;
8115181151
sqInt smallChild;
8115281152
sqInt treeNode;
@@ -82936,8 +82936,9 @@ defaultNumStackPages(void)
8293682936

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

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

8295582956
assert(GIV(primFailCode) == 0);
82957+
if (flags == DisownVMForThreading) {
82958+
return 0;
82959+
}
8295682960
assert((isImmediate(flags)
8295782961
? ((flags & 1))
8295882962
&& (((((flags >> 1)) >= 0) && (((flags >> 1)) <= (argumentCountOfMethodHeader(-1)))))
@@ -87226,7 +87230,7 @@ lookupSelectorinClass(sqInt selector, sqInt class)
8722687230
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
8722787231
sqInt currentClass;
8722887232
sqInt dictionary;
87229-
sqInt index;
87233+
usqInt index;
8723087234
usqInt length;
8723187235
sqInt mask;
8723287236
sqInt meth;
@@ -87270,7 +87274,7 @@ lookupSelectorinClass(sqInt selector, sqInt class)
8727087274
wrapAround = 0;
8727187275
while (1) {
8727287276
/* begin fetchPointer:ofObject: */
87273-
nextSelector = longAt((dictionary + BaseHeaderSize) + (((sqInt)((usqInt)(index) << (shiftForWord())))));
87277+
nextSelector = longAt((dictionary + BaseHeaderSize) + (index << (shiftForWord())));
8727487278
if (nextSelector == GIV(nilObj)) {
8727587279
meth = null;
8727687280
goto l8;
@@ -87288,7 +87292,7 @@ lookupSelectorinClass(sqInt selector, sqInt class)
8728887292
}
8728987293
methodArray = objOop2;
8729087294
/* begin followField:ofObject: */
87291-
objOop1 = longAt((methodArray + BaseHeaderSize) + (((sqInt)((usqInt)((index - SelectorStart)) << (shiftForWord())))));
87295+
objOop1 = longAt((methodArray + BaseHeaderSize) + ((index - SelectorStart) << (shiftForWord())));
8729287296
if (((!(objOop1 & (tagMask()))))
8729387297
&& ((!((longAt(objOop1)) & ((classIndexMask()) - (isForwardedObjectClassIndexPun())))))) {
8729487298
objOop1 = fixFollowedFieldofObjectwithInitialValue(index - SelectorStart, methodArray, objOop1);

0 commit comments

Comments
 (0)