Skip to content

Commit

Permalink
v3 source as per VMMaker.oscog-mt.3083 [ci skip]
Browse files Browse the repository at this point in the history
  • Loading branch information
marceltaeumel committed Oct 1, 2021
1 parent 740244d commit ddeec61
Show file tree
Hide file tree
Showing 4 changed files with 238 additions and 174 deletions.
104 changes: 60 additions & 44 deletions src/v3.cog/cointerp.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* Automatically generated by
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3077 uuid: 8ad52133-62f2-4e1e-bf92-9b29ba104d62
CCodeGeneratorGlobalStructure VMMaker.oscog-mt.3083 uuid: 0d345f2b-f29d-7148-b84c-cb4ed3775bb1
from
CoInterpreter VMMaker.oscog-eem.3077 uuid: 8ad52133-62f2-4e1e-bf92-9b29ba104d62
CoInterpreter VMMaker.oscog-mt.3083 uuid: 0d345f2b-f29d-7148-b84c-cb4ed3775bb1
*/
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.3077 uuid: 8ad52133-62f2-4e1e-bf92-9b29ba104d62 " __DATE__ ;
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-mt.3083 uuid: 0d345f2b-f29d-7148-b84c-cb4ed3775bb1 " __DATE__ ;
char *__interpBuildInfo = __buildInfo;


Expand Down Expand Up @@ -2233,7 +2233,7 @@ sqInt suppressHeartbeatFlag;
sqInt debugCallbackInvokes;
sqInt debugCallbackReturns;
sqInt checkedPluginName;
const char *interpreterVersion = "Open Smalltalk Cog[SqueakV3] VM [CoInterpreterPrimitives VMMaker.oscog-eem.3077]";
const char *interpreterVersion = "Open Smalltalk Cog[SqueakV3] VM [CoInterpreterPrimitives VMMaker.oscog-mt.3083]";
sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
char expensiveAsserts = 0;
int (*showSurfaceFn)(sqIntptr_t, int, int, int, int);
Expand Down Expand Up @@ -15041,7 +15041,7 @@ printFrameWithSP(char *theFP, char *theSP)
usqInt index;
sqInt methodField;
usqInt numArgs;
usqInt numTemps;
sqInt numTemps;
sqInt oop;
char *rcvrAddress;
sqInt rcvrOrClosure;
Expand Down Expand Up @@ -30058,8 +30058,8 @@ primitiveStringReplace(void)
sqInt srcIndex;
sqInt start1;
sqInt stop1;
sqInt sz;
sqInt sz1;
sqInt sz11;
sqInt sz2;
sqInt totalLength;
sqInt valuePointer;

Expand All @@ -30070,17 +30070,17 @@ primitiveStringReplace(void)
/* begin checkedIntegerValueOf: */
if ((integerPointer & 1)) {
start1 = (integerPointer >> 1);
goto l24;
goto l26;
}
else {
/* begin primitiveFail */
if (!GIV(primFailCode)) {
GIV(primFailCode) = 1;
}
start1 = 0;
goto l24;
goto l26;
}
l24: /* end stackIntegerValue: */;
l26: /* end stackIntegerValue: */;
/* begin stackIntegerValue: */
integerPointer1 = longAt(GIV(stackPointer) + (2 * BytesPerWord));
/* begin checkedIntegerValueOf: */
Expand All @@ -30103,28 +30103,28 @@ primitiveStringReplace(void)
/* begin checkedIntegerValueOf: */
if ((integerPointer2 & 1)) {
replStart1 = (integerPointer2 >> 1);
goto l21;
goto l22;
}
else {
/* begin primitiveFail */
if (!GIV(primFailCode)) {
GIV(primFailCode) = 1;
}
replStart1 = 0;
goto l21;
goto l22;
}
l21: /* end stackIntegerValue: */;
l22: /* end stackIntegerValue: */;
if (GIV(primFailCode)) {
/* begin primitiveFailFor: */
GIV(primFailCode) = PrimErrBadArgument;
goto l25;
goto l27;
}
if ((repl1 & 1)) {

/* can happen in LgInt copy */
/* begin primitiveFailFor: */
GIV(primFailCode) = PrimErrBadArgument;
goto l25;
goto l27;
}
if ((stop1 >= start1)
&& (
Expand All @@ -30136,35 +30136,35 @@ primitiveStringReplace(void)
)) {
/* begin primitiveFailFor: */
GIV(primFailCode) = PrimErrNoModification;
goto l25;
goto l27;
}
hdr = longAt(array1);
arrayFmt1 = (((usqInt)(hdr)) >> (instFormatFieldLSB())) & 15;
/* begin lengthOf:baseHeader:format: */
if ((hdr & TypeMask) == HeaderTypeSizeAndClass) {
sz = (longAt(array1 - (BytesPerWord * 2))) & LongSizeMask;
sz2 = (longAt(array1 - (BytesPerWord * 2))) & LongSizeMask;
}
else {
sz = hdr & SizeMask;
sz2 = hdr & SizeMask;
}
sz -= hdr & Size4Bit;
sz2 -= hdr & Size4Bit;
if (arrayFmt1 <= 4 /* lastPointerFormat */) {
totalLength = ((usqInt)((sz - BaseHeaderSize))) >> (shiftForWord());
goto l18;
totalLength = ((usqInt)((sz2 - BaseHeaderSize))) >> (shiftForWord());
goto l19;
}
totalLength = (arrayFmt1 < (firstByteFormat())
? ((usqInt)((sz - BaseHeaderSize))) >> 2
: (sz - BaseHeaderSize) - (arrayFmt1 & 3));
l18: /* end lengthOf:baseHeader:format: */;
? ((usqInt)((sz2 - BaseHeaderSize))) >> 2
: (sz2 - BaseHeaderSize) - (arrayFmt1 & 3));
l19: /* end lengthOf:baseHeader:format: */;
/* begin fixedFieldsOf:format:length: */
if ((arrayFmt1 > 4 /* lastPointerFormat */)
|| (arrayFmt1 == 2 /* arrayFormat */)) {
arrayInstSize1 = 0;
goto l20;
goto l21;
}
if (arrayFmt1 < 2) {
arrayInstSize1 = totalLength;
goto l20;
goto l21;
}
if (((ccIndex2 = (((usqInt)((longAt(array1)))) >> (compactClassFieldLSB())) & 0x1F)) == 0) {
class2 = (longAt(array1 - BaseHeaderSize)) & AllButTypeMask;
Expand All @@ -30176,41 +30176,41 @@ primitiveStringReplace(void)
}
classFormat2 = (longAt((class2 + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) - 1;
arrayInstSize1 = (((((usqInt)(classFormat2)) >> 11) & 192) + ((((usqInt)(classFormat2)) >> 2) & 0x3F)) - 1;
l20: /* end fixedFieldsOf:format:length: */;
l21: /* end fixedFieldsOf:format:length: */;
if (!((start1 >= 1)
&& (((start1 - 1) <= stop1)
&& ((stop1 + arrayInstSize1) <= totalLength)))) {
/* begin primitiveFailFor: */
GIV(primFailCode) = PrimErrBadIndex;
goto l25;
goto l27;
}
hdr = longAt(repl1);
replFmt1 = (((usqInt)(hdr)) >> (instFormatFieldLSB())) & 15;
/* begin lengthOf:baseHeader:format: */
if ((hdr & TypeMask) == HeaderTypeSizeAndClass) {
sz1 = (longAt(repl1 - (BytesPerWord * 2))) & LongSizeMask;
sz11 = (longAt(repl1 - (BytesPerWord * 2))) & LongSizeMask;
}
else {
sz1 = hdr & SizeMask;
sz11 = hdr & SizeMask;
}
sz1 -= hdr & Size4Bit;
sz11 -= hdr & Size4Bit;
if (replFmt1 <= 4 /* lastPointerFormat */) {
totalLength = ((usqInt)((sz1 - BaseHeaderSize))) >> (shiftForWord());
totalLength = ((usqInt)((sz11 - BaseHeaderSize))) >> (shiftForWord());
goto l14;
}
totalLength = (replFmt1 < (firstByteFormat())
? ((usqInt)((sz1 - BaseHeaderSize))) >> 2
: (sz1 - BaseHeaderSize) - (replFmt1 & 3));
? ((usqInt)((sz11 - BaseHeaderSize))) >> 2
: (sz11 - BaseHeaderSize) - (replFmt1 & 3));
l14: /* end lengthOf:baseHeader:format: */;
/* begin fixedFieldsOf:format:length: */
if ((replFmt1 > 4 /* lastPointerFormat */)
|| (replFmt1 == 2 /* arrayFormat */)) {
replInstSize1 = 0;
goto l13;
goto l23;
}
if (replFmt1 < 2) {
replInstSize1 = totalLength;
goto l13;
goto l23;
}
if (((ccIndex11 = (((usqInt)((longAt(repl1)))) >> (compactClassFieldLSB())) & 0x1F)) == 0) {
class11 = (longAt(repl1 - BaseHeaderSize)) & AllButTypeMask;
Expand All @@ -30222,25 +30222,25 @@ primitiveStringReplace(void)
}
classFormat11 = (longAt((class11 + BaseHeaderSize) + (((int)((usqInt)(InstanceSpecificationIndex) << (shiftForWord())))))) - 1;
replInstSize1 = (((((usqInt)(classFormat11)) >> 11) & 192) + ((((usqInt)(classFormat11)) >> 2) & 0x3F)) - 1;
l13: /* end fixedFieldsOf:format:length: */;
l23: /* end fixedFieldsOf:format:length: */;
if (!((replStart1 >= 1)
&& ((((stop1 - start1) + replStart1) + replInstSize1) <= totalLength))) {
/* begin primitiveFailFor: */
GIV(primFailCode) = PrimErrBadIndex;
goto l25;
goto l27;
}
if (arrayFmt1 < (firstByteFormat())) {
if (!(arrayFmt1 == replFmt1)) {
/* begin primitiveFailFor: */
GIV(primFailCode) = PrimErrInappropriate;
goto l25;
goto l27;
}
}
else {
if (!((arrayFmt1 & 12 /* byteFormatMask */) == (replFmt1 & 12 /* byteFormatMask */))) {
/* begin primitiveFailFor: */
GIV(primFailCode) = PrimErrInappropriate;
goto l25;
goto l27;
}
}

Expand Down Expand Up @@ -30279,7 +30279,7 @@ primitiveStringReplace(void)
}
/* begin pop: */
GIV(stackPointer) += GIV(argumentCount) * BytesPerWord;
l25: /* end primitiveV3StringReplace */;
l27: /* end primitiveV3StringReplace */;
}

/* InterpreterPrimitives>>#primitiveSubtract */
Expand Down Expand Up @@ -40326,14 +40326,30 @@ printNonPointerDataOfon(sqInt oop, FILE *aStream)
sqInt index;
sqInt lastIndex;
char * sixteenSpaces;
sqInt sz;
sqInt v16;
usqLong v64;
sqInt v8;

/* begin formatOf: */
format = (((usqInt)((longAt(oop)))) >> (instFormatFieldLSB())) & 15;
assert(((format >= (sixtyFourBitIndexableFormat())) && (format <= ((firstCompiledMethodFormat()) - 1))));
lastIndex = lengthOfformat(oop, format);
/* begin lengthOf:baseHeader:format: */
if (((longAt(oop)) & TypeMask) == HeaderTypeSizeAndClass) {
sz = (longAt(oop - (BytesPerWord * 2))) & LongSizeMask;
}
else {
sz = (longAt(oop)) & SizeMask;
}
sz -= (longAt(oop)) & Size4Bit;
if (format <= 4 /* lastPointerFormat */) {
lastIndex = ((usqInt)((sz - BaseHeaderSize))) >> (shiftForWord());
goto l4;
}
lastIndex = (format < (firstByteFormat())
? ((usqInt)((sz - BaseHeaderSize))) >> 2
: (sz - BaseHeaderSize) - (format & 3));
l4: /* end lengthOf:baseHeader:format: */;
if (lastIndex == 0) {
return;
}
Expand Down Expand Up @@ -40400,12 +40416,12 @@ printNonPointerDataOfon(sqInt oop, FILE *aStream)
static void NoDbgRegParms
printStringDataOfon(sqInt oop, FILE *aStream)
{
sqInt buffer;
char *buffer;
sqInt byte;
sqInt i;
sqInt limit;
sqInt n;
int * wideBuffer;
unsigned int *wideBuffer;
sqInt word;

if (((((usqInt)((longAt(oop)))) >> (instFormatFieldLSB())) & 15) >= (firstByteFormat())) {
Expand Down
Loading

0 comments on commit ddeec61

Please sign in to comment.