summaryrefslogtreecommitdiffstats
path: root/js/src/jit-test/tests/ion/bug701958.js
blob: 6320ef3a6c78635950d89901075dc51c5e0f57e8 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
function f(v)
{
    return v.x + v.x + v.y;
}

assertEq(f({ x: 1, y: 2 }), 4);
assertEq(f({ __proto__: {x: 1, y: 2} }), 4);
assertEq(f({ __proto__: {x: 0, y: 2}, x: 1 }), 4);

// Ensure there is no aliasing.
var global = 1;
assertEq(f(Object.defineProperty({ y : 2 }, "x", { get : function(){ return global++; } })), 5);