]>
Commit | Line | Data |
---|---|---|
81345200 A |
1 | function foo(o) { |
2 | return o.f; | |
3 | } | |
4 | ||
5 | noInline(foo); | |
6 | ||
7 | function Foo() { } | |
8 | Foo.prototype.f = 42; | |
9 | ||
10 | for (var i = 0; i < 100000; ++i) { | |
11 | if (i & 1) { | |
12 | var result = foo(new Foo()); | |
13 | if (result != 42) | |
14 | throw "Error: bad result for new Foo(): " + result; | |
15 | } else { | |
16 | var result = foo({f:24}); | |
17 | if (result != 24) | |
18 | throw "Error: bad result for {f:24}: " + result; | |
19 | } | |
20 | } |