Debian Codegraph @

js/src/jit-test/tests/ion/inline-Math-random-before-called.js

raw
1 // |jit-test| --ion-eager
2
3 function ionCompiledEagerly() {
4 Math.random; // establish Math.random's identity for inlining
5 return function() {
6 return +Math.random(); // call will be inlined
7 };
8 }
9
10 var alreadyIonCompiled = ionCompiledEagerly();
11 assertEq(alreadyIonCompiled() < 1, true);