Commit
StackInterpreter: Fix a regression on Cygwin. Cygwin's setjmp.h defines _setjmp. Undefine to get to our own definition. Ensure various definitions for error agree to the letter. b3dMain.c should not need to define warning.
- Loading branch information
There are no files selected for viewing
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,9 +1,9 @@ | ||
/* Automatically generated by | ||
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2802 uuid: 599172af-2cce-44a4-9004-23bd36c89807 | ||
CCodeGeneratorGlobalStructure VMMaker.oscog-eem.2803 uuid: 6584359e-d7b8-46dd-bb76-b631d9977a57 | ||
from | ||
CoInterpreter VMMaker.oscog-eem.2802 uuid: 599172af-2cce-44a4-9004-23bd36c89807 | ||
CoInterpreter VMMaker.oscog-eem.2803 uuid: 6584359e-d7b8-46dd-bb76-b631d9977a57 | ||
*/ | ||
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2802 uuid: 599172af-2cce-44a4-9004-23bd36c89807 " __DATE__ ; | ||
static char __buildInfo[] = "CoInterpreter VMMaker.oscog-eem.2803 uuid: 6584359e-d7b8-46dd-bb76-b631d9977a57 " __DATE__ ; | ||
char *__interpBuildInfo = __buildInfo; | ||
|
||
|
||
|
@@ -55,6 +55,11 @@ warningat(const char *s, int l) { /* ditto with line number. */ | |
} | ||
#pragma auto_inline(on) | ||
|
||
/* Some setjmp.h's, e.g. cygwin's define _setjmp. Undefine to get to our own. */ | ||
#if defined(_setjmp) | ||
# undef _setjmp | ||
#endif | ||
This comment has been minimized.
Sorry, something went wrong.
This comment has been minimized.
Sorry, something went wrong.
eliotmiranda
Author
Contributor
|
||
|
||
/* end StackInterpreter class>>preambleCCode */ | ||
|
||
|
||
|
@@ -1256,7 +1261,7 @@ extern sqInt nonIndexablePointerFormat(void); | |
static sqInt noUnscannedEphemerons(void); | ||
static sqInt NoDbgRegParms numBytesOfBytes(sqInt objOop); | ||
extern sqInt numBytesOf(sqInt objOop); | ||
extern usqInt numPointerSlotsOf(sqInt objOop); | ||
extern sqInt numPointerSlotsOf(sqInt objOop); | ||
static usqInt NoDbgRegParms numSlotsOfAny(sqInt objOop); | ||
extern usqInt numSlotsOf(sqInt objOop); | ||
static sqInt NoDbgRegParms numStrongSlotsOfInephemeral(sqInt objOop); | ||
|
@@ -2616,7 +2621,7 @@ sqInt debugCallbackInvokes; | |
sqInt debugCallbackReturns; | ||
sqInt ffiExceptionResponse; | ||
sqInt checkedPluginName; | ||
const char *interpreterVersion = "Newspeak Virtual Machine [ Open Smalltalk, Spur] CoInterpreterPrimitives_VMMaker.oscog-eem.2802"; | ||
const char *interpreterVersion = "Newspeak Virtual Machine [ Open Smalltalk, Spur] CoInterpreterPrimitives_VMMaker.oscog-eem.2803"; | ||
sqInt minBackwardJumpCountForCompile = MinBackwardJumpCountForCompile /* 40 */; | ||
int displayWidth; | ||
int displayDepth; | ||
|
@@ -41391,7 +41396,7 @@ followForwardedObjectFieldstoDepth(sqInt objOop, sqInt depth) | |
sqInt header1; | ||
sqInt i; | ||
sqInt numLiterals; | ||
usqInt numSlots; | ||
sqInt numSlots; | ||
usqInt numSlots1; | ||
sqInt oop; | ||
sqInt referent; | ||
|
@@ -49120,7 +49125,7 @@ copyObjtoAddrstopAtsavedFirstFieldsindex(sqInt objOop, sqInt segAddr, sqInt endS | |
sqInt iLimiT; | ||
sqInt methodHeader; | ||
sqInt numLiterals; | ||
usqInt numMediatedSlots; | ||
sqInt numMediatedSlots; | ||
usqInt numSlots; | ||
usqInt numSlots1; | ||
sqInt oop; | ||
|
@@ -55655,7 +55660,7 @@ numBytesOf(sqInt objOop) | |
Works with CompiledMethods, as well as ordinary objects. */ | ||
|
||
/* SpurMemoryManager>>#numPointerSlotsOf: */ | ||
usqInt | ||
sqInt | ||
numPointerSlotsOf(sqInt objOop) | ||
{ DECL_MAYBE_SQ_GLOBAL_STRUCT | ||
sqInt contextSize; | ||
|
@@ -58891,7 +58896,7 @@ printReferencesTo(sqInt anOop) | |
assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); | ||
contextSize = (sp >> 3); | ||
l12: /* end fetchStackPointerOf: */; | ||
i = ((usqInt) (CtxtTempFrameStart + contextSize)); | ||
i = CtxtTempFrameStart + contextSize; | ||
goto l13; | ||
} | ||
/* begin numSlotsOf: */ | ||
|
@@ -58924,7 +58929,7 @@ printReferencesTo(sqInt anOop) | |
/* begin literalCountOfMethodHeader: */ | ||
assert((((header) & 7) == 1)); | ||
numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; | ||
i = ((usqInt) (numLiterals + LiteralStart)); | ||
i = numLiterals + LiteralStart; | ||
l13: /* end numPointerSlotsOf: */; | ||
while (((i -= 1)) >= 0) { | ||
if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { | ||
|
@@ -58979,7 +58984,7 @@ printReferencesTo(sqInt anOop) | |
assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop1))); | ||
contextSize = (sp >> 3); | ||
l14: /* end fetchStackPointerOf: */; | ||
i = ((usqInt) (CtxtTempFrameStart + contextSize)); | ||
i = CtxtTempFrameStart + contextSize; | ||
goto l15; | ||
} | ||
/* begin numSlotsOf: */ | ||
|
@@ -59012,7 +59017,7 @@ printReferencesTo(sqInt anOop) | |
/* begin literalCountOfMethodHeader: */ | ||
assert((((header) & 7) == 1)); | ||
numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; | ||
i = ((usqInt) (numLiterals + LiteralStart)); | ||
i = numLiterals + LiteralStart; | ||
l15: /* end numPointerSlotsOf: */; | ||
while (((i -= 1)) >= 0) { | ||
if (anOop == (longAt((objOop1 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { | ||
|
@@ -59068,7 +59073,7 @@ printReferencesTo(sqInt anOop) | |
assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(objOop11))); | ||
contextSize = (sp >> 3); | ||
l16: /* end fetchStackPointerOf: */; | ||
i = ((usqInt) (CtxtTempFrameStart + contextSize)); | ||
i = CtxtTempFrameStart + contextSize; | ||
goto l17; | ||
} | ||
/* begin numSlotsOf: */ | ||
|
@@ -59101,7 +59106,7 @@ printReferencesTo(sqInt anOop) | |
/* begin literalCountOfMethodHeader: */ | ||
assert((((header) & 7) == 1)); | ||
numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; | ||
i = ((usqInt) (numLiterals + LiteralStart)); | ||
i = numLiterals + LiteralStart; | ||
l17: /* end numPointerSlotsOf: */; | ||
while (((i -= 1)) >= 0) { | ||
if (anOop == (longAt((objOop11 + BaseHeaderSize) + (((sqInt)((usqInt)(i) << (shiftForWord()))))))) { | ||
|
@@ -62234,10 +62239,10 @@ updatePointers(void) | |
sqInt numLiterals1; | ||
sqInt numLiterals2; | ||
sqInt numLiterals3; | ||
usqInt numPointerSlots; | ||
usqInt numPointerSlots1; | ||
usqInt numPointerSlots2; | ||
usqInt numPointerSlots3; | ||
sqInt numPointerSlots; | ||
sqInt numPointerSlots1; | ||
sqInt numPointerSlots2; | ||
sqInt numPointerSlots3; | ||
usqInt numSlots; | ||
usqInt numSlots1; | ||
usqInt numSlots11; | ||
|
@@ -62812,7 +62817,7 @@ updatePointersInsavedFirstFieldPointer(sqInt obj, sqInt firstFieldPtr) | |
assert((ReceiverIndex + ((sp >> 3))) < (lengthOf(obj))); | ||
contextSize = (sp >> 3); | ||
l6: /* end fetchStackPointerOf: */; | ||
numPointerSlots = ((usqInt) (CtxtTempFrameStart + contextSize)); | ||
numPointerSlots = CtxtTempFrameStart + contextSize; | ||
goto l10; | ||
} | ||
/* begin numSlotsOf: */ | ||
|
@@ -62842,7 +62847,7 @@ updatePointersInsavedFirstFieldPointer(sqInt obj, sqInt firstFieldPtr) | |
/* begin literalCountOfMethodHeader: */ | ||
assert((((header) & 7) == 1)); | ||
numLiterals = ((header >> 3)) & AlternateHeaderNumLiteralsMask; | ||
numPointerSlots = ((usqInt) (numLiterals + LiteralStart)); | ||
numPointerSlots = numLiterals + LiteralStart; | ||
l10: /* end numPointerSlotsWhileCompactingOf:withFormat:savedFirstFieldPointer: */; | ||
if ((fmt <= 5 /* lastPointerFormat */) | ||
&& (numPointerSlots > 0)) { | ||
|
@@ -67420,8 +67425,8 @@ static sqInt | |
getErrorObjectFromPrimFailCode(void) | ||
{ DECL_MAYBE_SQ_GLOBAL_STRUCT | ||
sqInt classIndex; | ||
usqInt clone; | ||
usqInt errObj; | ||
sqInt clone; | ||
sqInt errObj; | ||
sqInt fieldIndex; | ||
sqInt i; | ||
usqInt newObj; | ||
|
Hi Eliot,
unfortunately, it does not seem to work for mingw target (which is what we use, cygwin is just the compiling host, not the target).
Shouldn't we use a conflict-less
osvm_setjmp
andosvm_longjmp
(or use sq prefix if you prefer) - and either define them as setjmp longjmp where it fits, or use our own implementation when it does not fit ?