Commit | Line | Data |
---|---|---|
81345200 A |
1 | function foo(o) { |
2 | return typeof o === "undefined"; | |
3 | } | |
4 | ||
5 | noInline(foo); | |
6 | ||
7 | function test(o, expected) { | |
8 | var result = foo(o); | |
9 | if (result != expected) | |
10 | throw new Error("bad result: " + result); | |
11 | } | |
12 | ||
13 | for (var i = 0; i < 10000; ++i) { | |
14 | test(void 0, true); | |
15 | test(null, false); | |
16 | test(42, false); | |
17 | test({}, false); | |
18 | test("undefined", false); | |
19 | test(makeMasquerader(), true); | |
20 | } |