blob: 992283708e16264f9779e86ca9f63dd6712ad459 [file] [log] [blame]
mark.lam@apple.com598a7732016-11-14 18:27:41 +00001//@ if $jitTests then runNoCJIT("--useDFGJIT=false", "--useLLInt=false") else skip end
fpizlo@apple.com343b6f12015-09-24 19:23:58 +00002
3function foo(o) {
4 return o.f;
5}
6
7var p1 = {};
8p1.f = 42;
9
10var crazy = {};
11crazy.f = 1;
12crazy.g = 2;
13
14var p2 = Object.create(p1);
15
16var crazy = Object.create(p1);
17crazy.f = 1;
18crazy.g = 2;
19
20function make() {
21 return Object.create(p2);
22}
23
24for (var i = 0; i < 100; ++i)
25 foo(make());
26
27for (var i = 0; i < 10000; ++i)
28 p2["i" + i] = i;
29p2.f = 43;
30
31for (var i = 0; i < 100; ++i)
32 foo({f:24});
33
34var result = foo(make());
35if (result != 43)
36 throw "Error: bad result: " + result;