Thu, 22 Jan 2015 13:21:57 +0100
Incorporate requested changes from Mozilla in review:
https://bugzilla.mozilla.org/show_bug.cgi?id=1123480#c6
1 // Same thing but it needs to reconstruct multiple stack frames (so,
2 // multiple functions called inside the loop)
3 function testSlowArrayPopMultiFrame() {
4 var a = [];
5 for (var i = 0; i < 9; i++)
6 a[i] = [0];
7 a[8].__defineGetter__("0", function () { return 23; });
9 function child(a, i) {
10 return a[i].pop(); // reenters interpreter in getter
11 }
12 function parent(a, i) {
13 return child(a, i);
14 }
15 function gramps(a, i) {
16 return parent(a, i);
17 }
19 var last;
20 for (var i = 0; i < 9; i++)
21 last = gramps(a, i);
22 return last;
23 }
24 assertEq(testSlowArrayPopMultiFrame(), 23);