Skip to content

Commit

Permalink
CogVM source as per VMMaker.oscog-dtl.3185
Browse files Browse the repository at this point in the history
Let primitiveImageFormatVersion answer the correct image format number when multiple byte codes are active.
  • Loading branch information
marceltaeumel committed Jun 2, 2022
1 parent 144607d commit ad970a9
Show file tree
Hide file tree
Showing 30 changed files with 360 additions and 172 deletions.
25 changes: 18 additions & 7 deletions src/spur32.cog.lowcode/cointerp.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* Automatically generated by
CCodeGeneratorGlobalStructure VMMaker.oscog-mt.3184 uuid: 57b61827-3f1a-ab45-966e-7c5caaef28d7
CCodeGeneratorGlobalStructure VMMaker.oscog-dtl.3185 uuid: 0e7f07b8-eed6-4362-b223-86c98594ddb9
from
CoInterpreter VMMaker.oscog-mt.3184 uuid: 57b61827-3f1a-ab45-966e-7c5caaef28d7
CoInterpreter VMMaker.oscog-dtl.3185 uuid: 0e7f07b8-eed6-4362-b223-86c98594ddb9
*/
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-mt.3184 uuid: 57b61827-3f1a-ab45-966e-7c5caaef28d7 " __DATE__ ;
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-dtl.3185 uuid: 0e7f07b8-eed6-4362-b223-86c98594ddb9 " __DATE__ ;
char *__interpBuildInfo = __buildInfo;


Expand Down Expand Up @@ -2671,7 +2671,7 @@ sqInt debugCallbackInvokes;
sqInt debugCallbackReturns;
sqInt cannotDeferDisplayUpdates;
sqInt checkedPluginName;
const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-mt.3184]";
const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-dtl.3185]";
sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
char expensiveAsserts = 0;
int (*showSurfaceFn)(sqIntptr_t, int, int, int, int);
Expand Down Expand Up @@ -52497,6 +52497,7 @@ primitiveIdentityHash(void)
EXPORT(sqInt)
primitiveImageFormatVersion(void)
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
unsigned int integerValue;
usqInt newLargeInteger;
usqInt newObj;
usqInt numBytes;
Expand All @@ -52505,10 +52506,20 @@ primitiveImageFormatVersion(void)
char *sp;

/* begin pop:thenPush: */
if (GIV(multipleBytecodeSetsActive)) {
integerValue = ((sqInt) (6521 /* imageFormatVersion */ | MultipleBytecodeSetsBitmask));
goto l6;
}
else {
/* begin imageFormatVersion */
integerValue = 6521;
goto l6;
}
l6: /* end imageFormatVersionForSnapshot */;
/* begin maybeInlinePositive32BitIntegerFor: */
assert(!((hasSixtyFourBitImmediates())));
if ((((unsigned int) 6521 /* imageFormatVersion */)) <= (MaxSmallInteger)) {
oop = (((usqInt)6521 /* imageFormatVersion */ << 1) | 1);
if ((((unsigned int) integerValue)) <= (MaxSmallInteger)) {
oop = ((integerValue << 1) | 1);
goto l5;
}
/* begin eeInstantiateSmallClassIndex:format:numSlots: */
Expand Down Expand Up @@ -52543,7 +52554,7 @@ primitiveImageFormatVersion(void)
/* Memory is 8 byte aligned in Spur, make sure that oversized bytes are set to zero */
/* eem 4/28/2016 questionable; they should never be read */
/* begin storeLong32:ofObject:withValue: */
long32Atput((newLargeInteger + BaseHeaderSize), SQ_SWAP_4_BYTES_IF_BIGENDIAN(6521 /* imageFormatVersion */));
long32Atput((newLargeInteger + BaseHeaderSize), SQ_SWAP_4_BYTES_IF_BIGENDIAN(integerValue));
/* begin storeLong32:ofObject:withValue: */
long32Atput((newLargeInteger + BaseHeaderSize) + (4), 0);
oop = newLargeInteger;
Expand Down
25 changes: 18 additions & 7 deletions src/spur32.cog.lowcode/gcc3x-cointerp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@


/* Automatically generated by
CCodeGeneratorGlobalStructure VMMaker.oscog-mt.3184 uuid: 57b61827-3f1a-ab45-966e-7c5caaef28d7
CCodeGeneratorGlobalStructure VMMaker.oscog-dtl.3185 uuid: 0e7f07b8-eed6-4362-b223-86c98594ddb9
from
CoInterpreter VMMaker.oscog-mt.3184 uuid: 57b61827-3f1a-ab45-966e-7c5caaef28d7
CoInterpreter VMMaker.oscog-dtl.3185 uuid: 0e7f07b8-eed6-4362-b223-86c98594ddb9
*/
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-mt.3184 uuid: 57b61827-3f1a-ab45-966e-7c5caaef28d7 " __DATE__ ;
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-dtl.3185 uuid: 0e7f07b8-eed6-4362-b223-86c98594ddb9 " __DATE__ ;
char *__interpBuildInfo = __buildInfo;


Expand Down Expand Up @@ -2674,7 +2674,7 @@ sqInt debugCallbackInvokes;
sqInt debugCallbackReturns;
sqInt cannotDeferDisplayUpdates;
sqInt checkedPluginName;
const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-mt.3184]";
const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-dtl.3185]";
sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
char expensiveAsserts = 0;
int (*showSurfaceFn)(sqIntptr_t, int, int, int, int);
Expand Down Expand Up @@ -52506,6 +52506,7 @@ primitiveIdentityHash(void)
EXPORT(sqInt)
primitiveImageFormatVersion(void)
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
unsigned int integerValue;
usqInt newLargeInteger;
usqInt newObj;
usqInt numBytes;
Expand All @@ -52514,10 +52515,20 @@ primitiveImageFormatVersion(void)
char *sp;

/* begin pop:thenPush: */
if (GIV(multipleBytecodeSetsActive)) {
integerValue = ((sqInt) (6521 /* imageFormatVersion */ | MultipleBytecodeSetsBitmask));
goto l6;
}
else {
/* begin imageFormatVersion */
integerValue = 6521;
goto l6;
}
l6: /* end imageFormatVersionForSnapshot */;
/* begin maybeInlinePositive32BitIntegerFor: */
assert(!((hasSixtyFourBitImmediates())));
if ((((unsigned int) 6521 /* imageFormatVersion */)) <= (MaxSmallInteger)) {
oop = (((usqInt)6521 /* imageFormatVersion */ << 1) | 1);
if ((((unsigned int) integerValue)) <= (MaxSmallInteger)) {
oop = ((integerValue << 1) | 1);
goto l5;
}
/* begin eeInstantiateSmallClassIndex:format:numSlots: */
Expand Down Expand Up @@ -52552,7 +52563,7 @@ primitiveImageFormatVersion(void)
/* Memory is 8 byte aligned in Spur, make sure that oversized bytes are set to zero */
/* eem 4/28/2016 questionable; they should never be read */
/* begin storeLong32:ofObject:withValue: */
long32Atput((newLargeInteger + BaseHeaderSize), SQ_SWAP_4_BYTES_IF_BIGENDIAN(6521 /* imageFormatVersion */));
long32Atput((newLargeInteger + BaseHeaderSize), SQ_SWAP_4_BYTES_IF_BIGENDIAN(integerValue));
/* begin storeLong32:ofObject:withValue: */
long32Atput((newLargeInteger + BaseHeaderSize) + (4), 0);
oop = newLargeInteger;
Expand Down
25 changes: 18 additions & 7 deletions src/spur32.cog/cointerp.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* Automatically generated by
CCodeGeneratorGlobalStructure VMMaker.oscog-mt.3184 uuid: 57b61827-3f1a-ab45-966e-7c5caaef28d7
CCodeGeneratorGlobalStructure VMMaker.oscog-dtl.3185 uuid: 0e7f07b8-eed6-4362-b223-86c98594ddb9
from
CoInterpreter VMMaker.oscog-mt.3184 uuid: 57b61827-3f1a-ab45-966e-7c5caaef28d7
CoInterpreter VMMaker.oscog-dtl.3185 uuid: 0e7f07b8-eed6-4362-b223-86c98594ddb9
*/
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-mt.3184 uuid: 57b61827-3f1a-ab45-966e-7c5caaef28d7 " __DATE__ ;
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-dtl.3185 uuid: 0e7f07b8-eed6-4362-b223-86c98594ddb9 " __DATE__ ;
char *__interpBuildInfo = __buildInfo;


Expand Down Expand Up @@ -2646,7 +2646,7 @@ sqInt debugCallbackInvokes;
sqInt debugCallbackReturns;
sqInt cannotDeferDisplayUpdates;
sqInt checkedPluginName;
const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-mt.3184]";
const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-dtl.3185]";
sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
char expensiveAsserts = 0;
int (*showSurfaceFn)(sqIntptr_t, int, int, int, int);
Expand Down Expand Up @@ -32609,6 +32609,7 @@ primitiveIdentityHash(void)
EXPORT(sqInt)
primitiveImageFormatVersion(void)
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
unsigned int integerValue;
usqInt newLargeInteger;
usqInt newObj;
usqInt numBytes;
Expand All @@ -32617,10 +32618,20 @@ primitiveImageFormatVersion(void)
char *sp;

/* begin pop:thenPush: */
if (GIV(multipleBytecodeSetsActive)) {
integerValue = ((sqInt) (6521 /* imageFormatVersion */ | MultipleBytecodeSetsBitmask));
goto l6;
}
else {
/* begin imageFormatVersion */
integerValue = 6521;
goto l6;
}
l6: /* end imageFormatVersionForSnapshot */;
/* begin maybeInlinePositive32BitIntegerFor: */
assert(!((hasSixtyFourBitImmediates())));
if ((((unsigned int) 6521 /* imageFormatVersion */)) <= (MaxSmallInteger)) {
oop = (((usqInt)6521 /* imageFormatVersion */ << 1) | 1);
if ((((unsigned int) integerValue)) <= (MaxSmallInteger)) {
oop = ((integerValue << 1) | 1);
goto l5;
}
/* begin eeInstantiateSmallClassIndex:format:numSlots: */
Expand Down Expand Up @@ -32655,7 +32666,7 @@ primitiveImageFormatVersion(void)
/* Memory is 8 byte aligned in Spur, make sure that oversized bytes are set to zero */
/* eem 4/28/2016 questionable; they should never be read */
/* begin storeLong32:ofObject:withValue: */
long32Atput((newLargeInteger + BaseHeaderSize), SQ_SWAP_4_BYTES_IF_BIGENDIAN(6521 /* imageFormatVersion */));
long32Atput((newLargeInteger + BaseHeaderSize), SQ_SWAP_4_BYTES_IF_BIGENDIAN(integerValue));
/* begin storeLong32:ofObject:withValue: */
long32Atput((newLargeInteger + BaseHeaderSize) + (4), 0);
oop = newLargeInteger;
Expand Down
25 changes: 18 additions & 7 deletions src/spur32.cog/cointerpmt.c
Original file line number Diff line number Diff line change
@@ -1,9 +1,9 @@
/* Automatically generated by
CCodeGeneratorGlobalStructure VMMaker.oscog-mt.3184 uuid: 57b61827-3f1a-ab45-966e-7c5caaef28d7
CCodeGeneratorGlobalStructure VMMaker.oscog-dtl.3185 uuid: 0e7f07b8-eed6-4362-b223-86c98594ddb9
from
CoInterpreterMT VMMaker.oscog-mt.3184 uuid: 57b61827-3f1a-ab45-966e-7c5caaef28d7
CoInterpreterMT VMMaker.oscog-dtl.3185 uuid: 0e7f07b8-eed6-4362-b223-86c98594ddb9
*/
static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-mt.3184 uuid: 57b61827-3f1a-ab45-966e-7c5caaef28d7 " __DATE__ ;
static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-dtl.3185 uuid: 0e7f07b8-eed6-4362-b223-86c98594ddb9 " __DATE__ ;
char *__interpBuildInfo = __buildInfo;


Expand Down Expand Up @@ -2739,7 +2739,7 @@ sqInt debugCallbackInvokes;
sqInt debugCallbackReturns;
sqInt cannotDeferDisplayUpdates;
sqInt checkedPluginName;
const char *interpreterVersion = "Open Smalltalk Cog MT VM [CoInterpreterMT VMMaker.oscog-mt.3184]";
const char *interpreterVersion = "Open Smalltalk Cog MT VM [CoInterpreterMT VMMaker.oscog-dtl.3185]";
sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
char expensiveAsserts = 0;
int (*showSurfaceFn)(sqIntptr_t, int, int, int, int);
Expand Down Expand Up @@ -35353,6 +35353,7 @@ primitiveIdentityHash(void)
EXPORT(sqInt)
primitiveImageFormatVersion(void)
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
unsigned int integerValue;
usqInt newLargeInteger;
usqInt newObj;
usqInt numBytes;
Expand All @@ -35361,10 +35362,20 @@ primitiveImageFormatVersion(void)
char *sp;

/* begin pop:thenPush: */
if (GIV(multipleBytecodeSetsActive)) {
integerValue = ((sqInt) (6521 /* imageFormatVersion */ | MultipleBytecodeSetsBitmask));
goto l6;
}
else {
/* begin imageFormatVersion */
integerValue = 6521;
goto l6;
}
l6: /* end imageFormatVersionForSnapshot */;
/* begin maybeInlinePositive32BitIntegerFor: */
assert(!((hasSixtyFourBitImmediates())));
if ((((unsigned int) 6521 /* imageFormatVersion */)) <= (MaxSmallInteger)) {
oop = (((usqInt)6521 /* imageFormatVersion */ << 1) | 1);
if ((((unsigned int) integerValue)) <= (MaxSmallInteger)) {
oop = ((integerValue << 1) | 1);
goto l5;
}
/* begin eeInstantiateSmallClassIndex:format:numSlots: */
Expand Down Expand Up @@ -35399,7 +35410,7 @@ primitiveImageFormatVersion(void)
/* Memory is 8 byte aligned in Spur, make sure that oversized bytes are set to zero */
/* eem 4/28/2016 questionable; they should never be read */
/* begin storeLong32:ofObject:withValue: */
long32Atput((newLargeInteger + BaseHeaderSize), SQ_SWAP_4_BYTES_IF_BIGENDIAN(6521 /* imageFormatVersion */));
long32Atput((newLargeInteger + BaseHeaderSize), SQ_SWAP_4_BYTES_IF_BIGENDIAN(integerValue));
/* begin storeLong32:ofObject:withValue: */
long32Atput((newLargeInteger + BaseHeaderSize) + (4), 0);
oop = newLargeInteger;
Expand Down
25 changes: 18 additions & 7 deletions src/spur32.cog/gcc3x-cointerp.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@


/* Automatically generated by
CCodeGeneratorGlobalStructure VMMaker.oscog-mt.3184 uuid: 57b61827-3f1a-ab45-966e-7c5caaef28d7
CCodeGeneratorGlobalStructure VMMaker.oscog-dtl.3185 uuid: 0e7f07b8-eed6-4362-b223-86c98594ddb9
from
CoInterpreter VMMaker.oscog-mt.3184 uuid: 57b61827-3f1a-ab45-966e-7c5caaef28d7
CoInterpreter VMMaker.oscog-dtl.3185 uuid: 0e7f07b8-eed6-4362-b223-86c98594ddb9
*/
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-mt.3184 uuid: 57b61827-3f1a-ab45-966e-7c5caaef28d7 " __DATE__ ;
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-dtl.3185 uuid: 0e7f07b8-eed6-4362-b223-86c98594ddb9 " __DATE__ ;
char *__interpBuildInfo = __buildInfo;


Expand Down Expand Up @@ -2649,7 +2649,7 @@ sqInt debugCallbackInvokes;
sqInt debugCallbackReturns;
sqInt cannotDeferDisplayUpdates;
sqInt checkedPluginName;
const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-mt.3184]";
const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-dtl.3185]";
sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
char expensiveAsserts = 0;
int (*showSurfaceFn)(sqIntptr_t, int, int, int, int);
Expand Down Expand Up @@ -32618,6 +32618,7 @@ primitiveIdentityHash(void)
EXPORT(sqInt)
primitiveImageFormatVersion(void)
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
unsigned int integerValue;
usqInt newLargeInteger;
usqInt newObj;
usqInt numBytes;
Expand All @@ -32626,10 +32627,20 @@ primitiveImageFormatVersion(void)
char *sp;

/* begin pop:thenPush: */
if (GIV(multipleBytecodeSetsActive)) {
integerValue = ((sqInt) (6521 /* imageFormatVersion */ | MultipleBytecodeSetsBitmask));
goto l6;
}
else {
/* begin imageFormatVersion */
integerValue = 6521;
goto l6;
}
l6: /* end imageFormatVersionForSnapshot */;
/* begin maybeInlinePositive32BitIntegerFor: */
assert(!((hasSixtyFourBitImmediates())));
if ((((unsigned int) 6521 /* imageFormatVersion */)) <= (MaxSmallInteger)) {
oop = (((usqInt)6521 /* imageFormatVersion */ << 1) | 1);
if ((((unsigned int) integerValue)) <= (MaxSmallInteger)) {
oop = ((integerValue << 1) | 1);
goto l5;
}
/* begin eeInstantiateSmallClassIndex:format:numSlots: */
Expand Down Expand Up @@ -32664,7 +32675,7 @@ primitiveImageFormatVersion(void)
/* Memory is 8 byte aligned in Spur, make sure that oversized bytes are set to zero */
/* eem 4/28/2016 questionable; they should never be read */
/* begin storeLong32:ofObject:withValue: */
long32Atput((newLargeInteger + BaseHeaderSize), SQ_SWAP_4_BYTES_IF_BIGENDIAN(6521 /* imageFormatVersion */));
long32Atput((newLargeInteger + BaseHeaderSize), SQ_SWAP_4_BYTES_IF_BIGENDIAN(integerValue));
/* begin storeLong32:ofObject:withValue: */
long32Atput((newLargeInteger + BaseHeaderSize) + (4), 0);
oop = newLargeInteger;
Expand Down
25 changes: 18 additions & 7 deletions src/spur32.cog/gcc3x-cointerpmt.c
Original file line number Diff line number Diff line change
Expand Up @@ -2,11 +2,11 @@


/* Automatically generated by
CCodeGeneratorGlobalStructure VMMaker.oscog-mt.3184 uuid: 57b61827-3f1a-ab45-966e-7c5caaef28d7
CCodeGeneratorGlobalStructure VMMaker.oscog-dtl.3185 uuid: 0e7f07b8-eed6-4362-b223-86c98594ddb9
from
CoInterpreterMT VMMaker.oscog-mt.3184 uuid: 57b61827-3f1a-ab45-966e-7c5caaef28d7
CoInterpreterMT VMMaker.oscog-dtl.3185 uuid: 0e7f07b8-eed6-4362-b223-86c98594ddb9
*/
static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-mt.3184 uuid: 57b61827-3f1a-ab45-966e-7c5caaef28d7 " __DATE__ ;
static char __buildInfo[] = "CoInterpreterMT VMMaker.oscog-dtl.3185 uuid: 0e7f07b8-eed6-4362-b223-86c98594ddb9 " __DATE__ ;
char *__interpBuildInfo = __buildInfo;


Expand Down Expand Up @@ -2742,7 +2742,7 @@ sqInt debugCallbackInvokes;
sqInt debugCallbackReturns;
sqInt cannotDeferDisplayUpdates;
sqInt checkedPluginName;
const char *interpreterVersion = "Open Smalltalk Cog MT VM [CoInterpreterMT VMMaker.oscog-mt.3184]";
const char *interpreterVersion = "Open Smalltalk Cog MT VM [CoInterpreterMT VMMaker.oscog-dtl.3185]";
sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */;
char expensiveAsserts = 0;
int (*showSurfaceFn)(sqIntptr_t, int, int, int, int);
Expand Down Expand Up @@ -35362,6 +35362,7 @@ primitiveIdentityHash(void)
EXPORT(sqInt)
primitiveImageFormatVersion(void)
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
unsigned int integerValue;
usqInt newLargeInteger;
usqInt newObj;
usqInt numBytes;
Expand All @@ -35370,10 +35371,20 @@ primitiveImageFormatVersion(void)
char *sp;

/* begin pop:thenPush: */
if (GIV(multipleBytecodeSetsActive)) {
integerValue = ((sqInt) (6521 /* imageFormatVersion */ | MultipleBytecodeSetsBitmask));
goto l6;
}
else {
/* begin imageFormatVersion */
integerValue = 6521;
goto l6;
}
l6: /* end imageFormatVersionForSnapshot */;
/* begin maybeInlinePositive32BitIntegerFor: */
assert(!((hasSixtyFourBitImmediates())));
if ((((unsigned int) 6521 /* imageFormatVersion */)) <= (MaxSmallInteger)) {
oop = (((usqInt)6521 /* imageFormatVersion */ << 1) | 1);
if ((((unsigned int) integerValue)) <= (MaxSmallInteger)) {
oop = ((integerValue << 1) | 1);
goto l5;
}
/* begin eeInstantiateSmallClassIndex:format:numSlots: */
Expand Down Expand Up @@ -35408,7 +35419,7 @@ primitiveImageFormatVersion(void)
/* Memory is 8 byte aligned in Spur, make sure that oversized bytes are set to zero */
/* eem 4/28/2016 questionable; they should never be read */
/* begin storeLong32:ofObject:withValue: */
long32Atput((newLargeInteger + BaseHeaderSize), SQ_SWAP_4_BYTES_IF_BIGENDIAN(6521 /* imageFormatVersion */));
long32Atput((newLargeInteger + BaseHeaderSize), SQ_SWAP_4_BYTES_IF_BIGENDIAN(integerValue));
/* begin storeLong32:ofObject:withValue: */
long32Atput((newLargeInteger + BaseHeaderSize) + (4), 0);
oop = newLargeInteger;
Expand Down
Loading

0 comments on commit ad970a9

Please sign in to comment.