]>
git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/exit-from-ftl-when-caller-passed-extra-args-then-use-function-dot-arguments.js
9 capturedArgs
= foo
.arguments
;
15 function arraycmp(a
, b
) {
16 if (a
.length
!= b
.length
)
18 for (var i
= 0; i
< a
.length
; ++i
) {
25 for (var i
= 0; i
< 10000; ++i
) {
26 var result
= foo(1, 2, 3, 4, 5, 6);
28 throw "Error: bad result in loop: " + result
;
29 if (!arraycmp(capturedArgs
, [1, 2, 3, 4, 5, 6]))
30 throw "Error: bad captured arguments in loop: " + capturedArgs
;
33 var result
= foo(2000000000, 2000000000, 3, 4, 5, 6);
34 if (result
!= 4000000000)
35 throw "Error: bad result at end: " + result
;
36 if (!arraycmp(capturedArgs
, [2000000000, 2000000000, 3, 4, 5, 6]))
37 throw "Error: bad captured arguments at end: " + Array
.prototype.join
.apply(capturedArgs
, ",");