]>
Commit | Line | Data |
---|---|---|
ed1e77d3 A |
1 | function bar() { |
2 | if (foo.arguments[0] === void 0) | |
3 | throw "Error: foo.arguments[0] should not be undefined but is." | |
4 | } | |
5 | ||
6 | noInline(bar); | |
7 | ||
8 | function foo(a, p) { | |
9 | var tmp = a; | |
10 | effectful42(); | |
11 | for (var i = 0; i < 10; ++i) { | |
12 | bar(); | |
13 | a = i; | |
14 | } | |
15 | if (p) { | |
16 | var tmp = arguments; | |
17 | } | |
18 | return a; | |
19 | } | |
20 | ||
21 | noInline(foo); | |
22 | ||
23 | for (var i = 0; i < 10000; ++i) { | |
24 | var result = foo(0, false); | |
25 | if (result != 9) | |
26 | throw "Error: bad result: " + result; | |
27 | } |