summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/inline-Math-random-before-called.js
blob: 25d801b62f9f681bc45ec75d15804d0bd91aea26 (plain)
1
2
3
4
5
6
7
8
9
10
11
// |jit-test| --ion-eager

function ionCompiledEagerly() {
    Math.random; // establish Math.random's identity for inlining
    return function() {
        return +Math.random(); // call will be inlined
    };
}

var alreadyIonCompiled = ionCompiledEagerly();
assertEq(alreadyIonCompiled() < 1, true);