]>
git.saurik.com Git - apple/javascriptcore.git/blob - tests/stress/put-local-conservative.js
1 function foo(o
, a
, b
, c
) {
2 // Don't do anything real but have some control flow. This causes the PutLocals for a,
3 // b, and c to survive into SSA form. But we don't have any effects, so sinking will be
23 var result = function(p
, q
) {
24 var x
= a
+ b
+ c
+ d
+ e
+ f
+ g
+ h
+ i
+ j
+ k
;
26 // Make it appear that it's possible to clobber those closure variables, so that we
27 // load from them again down below.
28 a
= b
= c
= d
= e
= f
= g
= h
= i
= j
= k
= 42;
34 return x
+ a
+ b
+ c
+ d
+ e
+ f
+ g
+ h
+ i
+ j
+ k
;
42 for (var i
= 0; i
< 100000; ++i
) {
43 var result
= bar(o
, i
)(true, false);
44 if (result
!= 42 + 11 * i
+ 55)
45 throw "Error: bad result: " + result
;