i see something wrong in primitiveAdd:Hi Eliot,if i look at spur64src/vm/cointerp.c generated from VMMaker.oscog-eem.2277
static void
primitiveAdd(void)
{ DECL_MAYBE_SQ_GLOBAL_STRUCT
sqInt integerResult;
char *sp;
/* begin pop2AndPushIntegerIfOK: */======================================
See below: we test if primitive failed before we tried...======================================
if (!GIV(primFailCode)) {
integerResult = (stackIntegerValue(1)) + (stackIntegerValue(0));
if ((((((usqInt) integerResult) >> 60) + 1) & 15) <= 1) {
/* begin pop:thenPush: */
longAtput((sp = GIV(stackPointer) + ((2 - 1) * BytesPerWord)), (((usqInt)integerResult << 3) | 1));
GIV(stackPointer) = sp;
}
else {
/* begin success: */
/* Don't overwrite an error code that has already been set. */
if (!GIV(primFailCode)) {
GIV(primFailCode) = 1;
}
}
}
}Note that I could comment the commit in github API.Unfortunately, diff are too big, and comments uneasy to find/view/scan.