Anyone know why it causes a crash?
I cleaned up the javascript a bit by adding whitespace and more meaningful variable names:
https://gist.github.com/mdesson/b87c51ff4caf7bd4d2f74b52e8d6...
I cleaned up the javascript a bit by adding whitespace and more meaningful variable names:
https://gist.github.com/mdesson/b87c51ff4caf7bd4d2f74b52e8d6...
1. Why is there a ternary on the condition that Infinify is truthy ? My instinct is to say that it will always return [], which brings my second point
2. Why is it always using false as an argument ? What is the effect of this on the execution versus just hardcoding it ?
Correct. Only functions that are called often will get optimized.
node --print-bytecode --eval "z=(a)=>{let y = Math.min(Infinity ? [] : Infinity, -0) / 0; if (a) y = -0; return y ? 1 : 0}; z(false); for (let i = 0; i < 0x10000; ++i) z(false);"