summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/selfhosted-too-many-args.js
blob: 120fdf12ee8c3167ee378e0b10cad848227b1b28 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
// Calling self-hosted functions that use GetArgument(i) with more arguments than
// we support for inlining.
function f() {
    var arr = [1, 2, 3];
    var add1 = x => x + 1;
    for (var i = 0; i < 2000; i++) {
        assertEq(arr.map(add1).toString(), "2,3,4");
        assertEq(arr.map(add1, 1, 2, 3).toString(), "2,3,4");
        assertEq(Reflect.get(arr, 1), 2);
        assertEq(Reflect.get(arr, 1, 2), 2);
        assertEq(Reflect.get(arr, 1, 2, 3, 4), 2);
    }
}
f();