That's not my reading of booleanCheat:. booleanCheat: takes a C boolean argument cond. If the following bytecodes are those of a conditional branch then it either takes or skips those bytecodes based on the value of cond, otherwise it reifies cond as either true or false. i.e. the jump and reification behaviours match (duh!). So I think it *does* show up in both
bytecodePrimGreaterOrEqual
| rcvr arg aBool |
rcvr := self internalStackValue: 1.
arg := self internalStackValue: 0.
(self areIntegers: rcvr and: arg) ifTrue:
["The C code can avoid detagging since tagged integers are still signed.
But this means the simulator must override to do detagging."
self cCode: '' inSmalltalk: [^self booleanCheat: (self integerValueOf: rcvr) >= (self integerValueOf: arg)].
^self booleanCheat: rcvr >= arg].
successFlag := true.
>> "Invert test so that NaN comparisons work correctly."
aBool := self primitiveFloatLess: rcvr thanArg: arg.
successFlag ifTrue: [^self booleanCheat: aBool not]
Because
| aNaN | aNaN := Float nan. nan >= nan
must be false (since nan ~= nan) and because
| aNaN | aNaN := Float nan. nan < nan
is true (because that's what the IEEE spec says (Nicholas can you confirm?)) then the inversion is correct, as with the inversion
| aNaN | aNaN := Float nan. nan >= nan
is false, which is correct, isn't it? (might be, might not be, but IANAIEEE754L)
So before we thrash breaking what looked a few weeks ago to be the right fix can we please write the relevant tests. I nominate Nicholas as he wrote the bug fixes and revamped the tests we have in the first place.