comparison: js/src/jit-test/tests/ion/getprop-constant.js
js/src/jit-test/tests/ion/getprop-constant.js
- changeset 0
- 6474c204b198
equal
deleted
inserted
replaced
|
1 // |jit-test| error: TypeError |
|
2 |
|
3 /* GETPROP of a known constant where the lvalue may not be an object. */ |
|
4 |
|
5 function foo(ox) { |
|
6 var x = ox; |
|
7 var n = 0; |
|
8 for (var i = 0; i < 90; i++) { |
|
9 n += x.f.g; |
|
10 if (i >= 80) |
|
11 x = undefined; |
|
12 } |
|
13 print(n); |
|
14 } |
|
15 var n = 1; |
|
16 function f() {} |
|
17 function g() {} |
|
18 g.g = 1; |
|
19 f.prototype = {f:g}; |
|
20 foo(new f()); |