]>
git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/poly-call-exit-this.js
596af3e33e1a2331885f7db4824a8b9be26ad74c
2 function foo(x
) { return 1 + this.f
; }
3 function bar(x
) { return x
+ this.f
; }
4 function baz(x
) { return x
+ 1 + this.f
; }
8 var result
= (function(o
) {
9 var f
= {fun:foo
, f:1};
10 var g
= {fun:bar
, f:2};
11 var h
= {fun:baz
, f:3};
14 for (var i
= 0; i
< n
; ++i
) {
27 if (result
!= ((n
/ 2 - 1) * (42 + 2)) + (n
/ 2 * (1 + 1) + (42 + 1 + 3)))
28 throw "Error: bad result: " + result
;