Skip to content

Commit 62c4d5f

Browse files
committed
CogVM source as per VMMaker.oscog-eem.3704
Fix the same slip in both of the uninitialized new primitives which on failure did not test the class's format correctly and hence produced an invalid primitive failure code.
1 parent 1e3a0de commit 62c4d5f

File tree

30 files changed

+404
-488
lines changed

30 files changed

+404
-488
lines changed

src/spur32.cog.lowcode/cointerp.c

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,10 @@
11
/* Automatically generated by
2-
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3703 uuid: 85364028-fc2e-4da5-88f8-910243509f86
2+
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3704 uuid: 76f8e8e4-1676-409b-8f48-2feaea583e80
33
(Cog-eem.504, Compiler-eem.526)
44
from
5-
CoInterpreter VMMaker.oscog-eem.3703 uuid: 85364028-fc2e-4da5-88f8-910243509f86
5+
CoInterpreter VMMaker.oscog-eem.3704 uuid: 76f8e8e4-1676-409b-8f48-2feaea583e80
66
*/
7-
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.3703 uuid: 85364028-fc2e-4da5-88f8-910243509f86 " __DATE__ ;
7+
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.3704 uuid: 76f8e8e4-1676-409b-8f48-2feaea583e80 " __DATE__ ;
88
char *__interpBuildInfo = __buildInfo;
99

1010

@@ -619,7 +619,7 @@ extern char * whereIs(sqInt anOop);
619619
static NoDbgRegParms NeverInline void widowOrForceToBytecodePC(sqInt ctxt);
620620
static NoDbgRegParms int frameIsMarked(sqInt theFPInt);
621621
#if VMInvestigations
622-
EXPORT(int) primitiveAllMethodsCompiledToMachineCode(void);
622+
EXPORT(sqInt) primitiveAllMethodsCompiledToMachineCode(void);
623623
#endif /* VMInvestigations */
624624
#if VMInvestigations
625625
EXPORT(void) primitiveBenchmarkFollowForwardersInStackZone(void);
@@ -1220,7 +1220,7 @@ extern sqInt maxIdentityHash(void);
12201220
extern sqInt maxSlotsForNewSpaceAlloc(void);
12211221
extern sqInt maybeMethodClassOfseemsToBeInstantiating(sqInt methodObj, sqInt format);
12221222
extern sqInt minSlotsForShortening(void);
1223-
static NoDbgRegParms sqInt newHashBitsOf(sqInt objOop);
1223+
static NoDbgRegParms usqInt newHashBitsOf(sqInt objOop);
12241224
static sqInt newSpaceIsEmpty(void);
12251225
extern sqInt nilObject(void);
12261226
static NeverInline void nilUnmarkedWeaklingSlots(void);
@@ -2694,7 +2694,7 @@ sqInt debugCallbackReturns;
26942694
sqInt suppressHeartbeatFlag;
26952695
sqInt cannotDeferDisplayUpdates;
26962696
sqInt checkedPluginName;
2697-
const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.3703]";
2697+
const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.3704]";
26982698
const char * leakCheckFlagsMeanings[] = {
26992699
"1: check full GC", "2: check new space GC", "4: check incremental GC", "8: check become",
27002700
"16: check image segment", "32: check free space", "64: check shorten", "128: check prim call",
@@ -27807,7 +27807,7 @@ ceNewHashOf(sqInt anObject)
2780727807
{
2780827808
assert((isNonImmediate(anObject))
2780927809
&& ((rawHashBitsOf(anObject)) == 0));
27810-
return (((usqInt)(newHashBitsOf(anObject)) << 1) | 1);
27810+
return (((newHashBitsOf(anObject)) << 1) | 1);
2781127811
}
2781227812

2781327813
/* CoInterpreter>>#ceNonLocalReturn: */
@@ -37378,7 +37378,7 @@ frameIsMarked(sqInt theFPInt)
3737837378

3737937379
/* CoInterpreterPrimitives>>#primitiveAllMethodsCompiledToMachineCode */
3738037380
#if VMInvestigations
37381-
EXPORT(int)
37381+
EXPORT(sqInt)
3738237382
primitiveAllMethodsCompiledToMachineCode(void)
3738337383
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
3738437384
sqInt arrayObj;
@@ -40648,7 +40648,7 @@ failed(void)
4064840648
sqInt
4064940649
identityHashOf(sqInt anOop)
4065040650
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
40651-
sqInt hash;
40651+
usqInt hash;
4065240652
usqInt hashUsqInt;
4065340653

4065440654
if (((anOop & (tagMask())) != 0)) {
@@ -47807,7 +47807,7 @@ primitiveIdentical(void)
4780747807
static void
4780847808
primitiveIdentityHash(void)
4780947809
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
47810-
sqInt hash;
47810+
usqInt hash;
4781147811
usqInt hashUsqInt;
4781247812
sqInt integer;
4781347813
char *sp;
@@ -54112,11 +54112,9 @@ l2:;
5411254112
}
5411354113
else {
5411454114
instSpec = (((usqInt)((((longAt((void *)(((longAt(GIV(stackPointer) + (1 * BytesPerWord))) + BaseHeaderSize) + ((((usqInt)(InstanceSpecificationIndex) << (shiftForWord()))))))) >> 1)))) >> (fixedFieldsFieldWidth())) & (formatMask());
54115-
reasonCode = ((/* isIndexableFormat: */
54116-
(instSpec >= (arrayFormat()))
54117-
&& ((instSpec <= (weakArrayFormat()))
54118-
|| (instSpec >= (sixtyFourBitIndexableFormat()))))
54119-
&& (!(instSpec >= (firstCompiledMethodFormat())))
54115+
reasonCode = (/* isPureBitsFormat: */
54116+
(instSpec >= (sixtyFourBitIndexableFormat()))
54117+
&& (instSpec < (firstCompiledMethodFormat()))
5412054118
? PrimErrNoMemory
5412154119
: PrimErrBadReceiver);
5412254120

@@ -54263,11 +54261,9 @@ primitiveUninitializedPinnedNewWithArg(void)
5426354261
}
5426454262
else {
5426554263
instSpec = (((usqInt)((((longAt((void *)(((longAt(GIV(stackPointer) + (1 * BytesPerWord))) + BaseHeaderSize) + ((((usqInt)(InstanceSpecificationIndex) << (shiftForWord()))))))) >> 1)))) >> (fixedFieldsFieldWidth())) & (formatMask());
54266-
reasonCode = ((/* isIndexableFormat: */
54267-
(instSpec >= (arrayFormat()))
54268-
&& ((instSpec <= (weakArrayFormat()))
54269-
|| (instSpec >= (sixtyFourBitIndexableFormat()))))
54270-
&& (!(instSpec >= (firstCompiledMethodFormat())))
54264+
reasonCode = (/* isPureBitsFormat: */
54265+
(instSpec >= (sixtyFourBitIndexableFormat()))
54266+
&& (instSpec < (firstCompiledMethodFormat()))
5427154267
? PrimErrNoMemory
5427254268
: PrimErrBadReceiver);
5427354269

@@ -69243,7 +69239,7 @@ minSlotsForShortening(void)
6924369239
*/
6924469240

6924569241
/* SpurMemoryManager>>#newHashBitsOf: */
69246-
static NoDbgRegParms sqInt
69242+
static NoDbgRegParms usqInt
6924769243
newHashBitsOf(sqInt objOop)
6924869244
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
6924969245
usqInt hash;
@@ -77637,7 +77633,7 @@ bridgeFor(SpurSegmentInfo *aSegment)
7763777633
static NoDbgRegParms void
7763877634
bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil)
7763977635
{
77640-
int bridgeSpan;
77636+
sqInt bridgeSpan;
7764177637
sqInt clifton;
7764277638
usqInt segEnd;
7764377639

@@ -77817,7 +77813,7 @@ prepareForSnapshot(void)
7781777813
sqInt largeChild;
7781877814
sqInt newEndOfMemory;
7781977815
sqInt next;
77820-
sqInt node;
77816+
usqInt node;
7782177817
SpurSegmentInfo *seg;
7782277818
SpurSegmentInfo *selfOfSegSize;
7782377819
sqInt smallChild;

src/spur32.cog.lowcode/cointerp.h

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,5 @@
11
/* Automatically generated by
2-
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3703 uuid: 85364028-fc2e-4da5-88f8-910243509f86
2+
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3704 uuid: 76f8e8e4-1676-409b-8f48-2feaea583e80
33
(Cog-eem.504, Compiler-eem.526)
44
*/
55

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

Lines changed: 19 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -2,12 +2,12 @@
22

33

44
/* Automatically generated by
5-
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3703 uuid: 85364028-fc2e-4da5-88f8-910243509f86
5+
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.3704 uuid: 76f8e8e4-1676-409b-8f48-2feaea583e80
66
(Cog-eem.504, Compiler-eem.526)
77
from
8-
CoInterpreter VMMaker.oscog-eem.3703 uuid: 85364028-fc2e-4da5-88f8-910243509f86
8+
CoInterpreter VMMaker.oscog-eem.3704 uuid: 76f8e8e4-1676-409b-8f48-2feaea583e80
99
*/
10-
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.3703 uuid: 85364028-fc2e-4da5-88f8-910243509f86 " __DATE__ ;
10+
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.3704 uuid: 76f8e8e4-1676-409b-8f48-2feaea583e80 " __DATE__ ;
1111
char *__interpBuildInfo = __buildInfo;
1212

1313

@@ -622,7 +622,7 @@ extern char * whereIs(sqInt anOop);
622622
static NoDbgRegParms NeverInline void widowOrForceToBytecodePC(sqInt ctxt);
623623
static NoDbgRegParms int frameIsMarked(sqInt theFPInt);
624624
#if VMInvestigations
625-
EXPORT(int) primitiveAllMethodsCompiledToMachineCode(void);
625+
EXPORT(sqInt) primitiveAllMethodsCompiledToMachineCode(void);
626626
#endif /* VMInvestigations */
627627
#if VMInvestigations
628628
EXPORT(void) primitiveBenchmarkFollowForwardersInStackZone(void);
@@ -1223,7 +1223,7 @@ extern sqInt maxIdentityHash(void);
12231223
extern sqInt maxSlotsForNewSpaceAlloc(void);
12241224
extern sqInt maybeMethodClassOfseemsToBeInstantiating(sqInt methodObj, sqInt format);
12251225
extern sqInt minSlotsForShortening(void);
1226-
static NoDbgRegParms sqInt newHashBitsOf(sqInt objOop);
1226+
static NoDbgRegParms usqInt newHashBitsOf(sqInt objOop);
12271227
static sqInt newSpaceIsEmpty(void);
12281228
extern sqInt nilObject(void);
12291229
static NeverInline void nilUnmarkedWeaklingSlots(void);
@@ -2697,7 +2697,7 @@ sqInt debugCallbackReturns;
26972697
sqInt suppressHeartbeatFlag;
26982698
sqInt cannotDeferDisplayUpdates;
26992699
sqInt checkedPluginName;
2700-
const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.3703]";
2700+
const char *interpreterVersion = "Open Smalltalk Cog[Spur] VM [CoInterpreterPrimitives VMMaker.oscog-eem.3704]";
27012701
const char * leakCheckFlagsMeanings[] = {
27022702
"1: check full GC", "2: check new space GC", "4: check incremental GC", "8: check become",
27032703
"16: check image segment", "32: check free space", "64: check shorten", "128: check prim call",
@@ -27814,7 +27814,7 @@ ceNewHashOf(sqInt anObject)
2781427814
{
2781527815
assert((isNonImmediate(anObject))
2781627816
&& ((rawHashBitsOf(anObject)) == 0));
27817-
return (((usqInt)(newHashBitsOf(anObject)) << 1) | 1);
27817+
return (((newHashBitsOf(anObject)) << 1) | 1);
2781827818
}
2781927819

2782027820
/* CoInterpreter>>#ceNonLocalReturn: */
@@ -37385,7 +37385,7 @@ frameIsMarked(sqInt theFPInt)
3738537385

3738637386
/* CoInterpreterPrimitives>>#primitiveAllMethodsCompiledToMachineCode */
3738737387
#if VMInvestigations
37388-
EXPORT(int)
37388+
EXPORT(sqInt)
3738937389
primitiveAllMethodsCompiledToMachineCode(void)
3739037390
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
3739137391
sqInt arrayObj;
@@ -40655,7 +40655,7 @@ failed(void)
4065540655
sqInt
4065640656
identityHashOf(sqInt anOop)
4065740657
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
40658-
sqInt hash;
40658+
usqInt hash;
4065940659
usqInt hashUsqInt;
4066040660

4066140661
if (((anOop & (tagMask())) != 0)) {
@@ -47814,7 +47814,7 @@ primitiveIdentical(void)
4781447814
static void
4781547815
primitiveIdentityHash(void)
4781647816
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
47817-
sqInt hash;
47817+
usqInt hash;
4781847818
usqInt hashUsqInt;
4781947819
sqInt integer;
4782047820
char *sp;
@@ -54119,11 +54119,9 @@ l2:;
5411954119
}
5412054120
else {
5412154121
instSpec = (((usqInt)((((longAt((void *)(((longAt(GIV(stackPointer) + (1 * BytesPerWord))) + BaseHeaderSize) + ((((usqInt)(InstanceSpecificationIndex) << (shiftForWord()))))))) >> 1)))) >> (fixedFieldsFieldWidth())) & (formatMask());
54122-
reasonCode = ((/* isIndexableFormat: */
54123-
(instSpec >= (arrayFormat()))
54124-
&& ((instSpec <= (weakArrayFormat()))
54125-
|| (instSpec >= (sixtyFourBitIndexableFormat()))))
54126-
&& (!(instSpec >= (firstCompiledMethodFormat())))
54122+
reasonCode = (/* isPureBitsFormat: */
54123+
(instSpec >= (sixtyFourBitIndexableFormat()))
54124+
&& (instSpec < (firstCompiledMethodFormat()))
5412754125
? PrimErrNoMemory
5412854126
: PrimErrBadReceiver);
5412954127

@@ -54270,11 +54268,9 @@ primitiveUninitializedPinnedNewWithArg(void)
5427054268
}
5427154269
else {
5427254270
instSpec = (((usqInt)((((longAt((void *)(((longAt(GIV(stackPointer) + (1 * BytesPerWord))) + BaseHeaderSize) + ((((usqInt)(InstanceSpecificationIndex) << (shiftForWord()))))))) >> 1)))) >> (fixedFieldsFieldWidth())) & (formatMask());
54273-
reasonCode = ((/* isIndexableFormat: */
54274-
(instSpec >= (arrayFormat()))
54275-
&& ((instSpec <= (weakArrayFormat()))
54276-
|| (instSpec >= (sixtyFourBitIndexableFormat()))))
54277-
&& (!(instSpec >= (firstCompiledMethodFormat())))
54271+
reasonCode = (/* isPureBitsFormat: */
54272+
(instSpec >= (sixtyFourBitIndexableFormat()))
54273+
&& (instSpec < (firstCompiledMethodFormat()))
5427854274
? PrimErrNoMemory
5427954275
: PrimErrBadReceiver);
5428054276

@@ -69250,7 +69246,7 @@ minSlotsForShortening(void)
6925069246
*/
6925169247

6925269248
/* SpurMemoryManager>>#newHashBitsOf: */
69253-
static NoDbgRegParms sqInt
69249+
static NoDbgRegParms usqInt
6925469250
newHashBitsOf(sqInt objOop)
6925569251
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
6925669252
usqInt hash;
@@ -77644,7 +77640,7 @@ bridgeFor(SpurSegmentInfo *aSegment)
7764477640
static NoDbgRegParms void
7764577641
bridgeFromto(SpurSegmentInfo *aSegment, SpurSegmentInfo *nextSegmentOrNil)
7764677642
{
77647-
int bridgeSpan;
77643+
sqInt bridgeSpan;
7764877644
sqInt clifton;
7764977645
usqInt segEnd;
7765077646

@@ -77824,7 +77820,7 @@ prepareForSnapshot(void)
7782477820
sqInt largeChild;
7782577821
sqInt newEndOfMemory;
7782677822
sqInt next;
77827-
sqInt node;
77823+
usqInt node;
7782877824
SpurSegmentInfo *seg;
7782977825
SpurSegmentInfo *selfOfSegSize;
7783077826
sqInt smallChild;

0 commit comments

Comments
 (0)