summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/basic/teleporting-mutable-proto.js
blob: c9bfd7f28727536c3e97c9283c7b9b2d6ecd45ea (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
var A = {x: 3};
var B = Object.create(A);
var C = Object.create(B);
var D = Object.create(C);

function f() {
    for (var i=0; i<30; i++) {
	assertEq(D.x, (i <= 20) ? 3 : 10);
	if (i === 20) {
	    C.__proto__ = {x: 10};
	}
    }
}
f();