summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/self-hosting/relazify.js
blob: b335f8026c4d795921e7c6a9fe5d2cb8b339f25f (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
// |jit-test| skip-if: isLcovEnabled()

// Self-hosted builtins use a special form of lazy function, but still can be
// delazified in some cases.

let obj = [];
let fun = obj.map;
assertEq(isLazyFunction(fun), true);

// Delazify
fun.call(obj, x => x);
assertEq(isLazyFunction(fun), false);

// Relazify
relazifyFunctions(obj);
assertEq(isLazyFunction(fun), true);