On 08.09.2014, at 18:28, Bert Freudenberg bert@freudenbergs.de wrote:
On 08.09.2014, at 16:45, David Corking lists@dcorking.com wrote:
Did you have to work around it when designing SqueakJS ?
Yes: https://github.com/bertfreudenberg/SqueakJS/commit/6d694d0733
Yikes. I just spotted another bug in that function. Can you see it, too?
I think it should be using an unsigned right shift like this:
if ((shifted>>>shiftCount) === smallInt) return shifted;
Dave
(SmallIntegerTests did not uncover that bug, they all pass. Most tests assume a correct VM)
(IntegerTest and IntegerDigitLogicTest contain too many brute-force tests, which time out on a slow VM. SqueakJS passes 44 of 60)
(SqueakJS could use testers. But it's not much fun, opening a TestRunner in 4.5 takes like 30 seconds)
- Bert -