Closed LinqLover closed 3 months ago
I committed a simpler fix. Thanks though!
Oh this broke stuff. Committing a real fix ...
BTW the reason I did not want to use null
to indicate failure was so that the code stays monomorphic from the POV of the JS JIT.
Note that the new implementation still fails for negative receivers just like all other bit manipulation primitives (OSVM does support this). I'm not sure why this has been designed this way, but even though the primitive is marked as essential, the fallback code seems to handle negative receivers correctly.
However, the following example failed and simulated an infinite recursion without this fix:
I was not able to find a simpler way to reproduce this.