| function foo(o, a, b, c) { |
| // Don't do anything real but have some control flow. This causes the PutLocals for a, |
| // b, and c to survive into SSA form. But we don't have any effects, so sinking will be |
| var result = function(p, q) { |
| var x = a + b + c + d + e + f + g + h + i + j + k; |
| // Make it appear that it's possible to clobber those closure variables, so that we |
| // load from them again down below. |
| a = b = c = d = e = f = g = h = i = j = k = 42; |
| return x + a + b + c + d + e + f + g + h + i + j + k; |
| for (var i = 0; i < 100000; ++i) { |
| var result = bar(o, i)(true, false); |
| if (result != 42 + 11 * i + 55) |
| throw "Error: bad result: " + result; |