diff options
Diffstat (limited to '')
-rw-r--r-- | js/src/jit-test/tests/ion/selfhosted-too-many-args.js | 14 |
1 files changed, 14 insertions, 0 deletions
diff --git a/js/src/jit-test/tests/ion/selfhosted-too-many-args.js b/js/src/jit-test/tests/ion/selfhosted-too-many-args.js new file mode 100644 index 0000000000..120fdf12ee --- /dev/null +++ b/js/src/jit-test/tests/ion/selfhosted-too-many-args.js @@ -0,0 +1,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(); |