Status: Accepted
Owner: [email protected]
CC: [email protected]
Labels: Type-Bug Priority-Medium

New issue 2164 by [email protected]: C++ builtin ArraySlice is not spec conformant
http://code.google.com/p/v8/issues/detail?id=2164

It is expected to load property values with [[GetProperty]] (http://es5.github.com/#x15.4.4.10) which should lead to prototype lookup and execution of getters. Instead it apparently copies fast backing store as is:

var i = 0;
Object.defineProperty(Array.prototype, "1", {get: function () { return ++i; } });

var a = new Array(10); // 10 holes
assertTrue("1" in a);
assertFalse(a.hasOwnProperty("1"));
assertFalse(a[1] === a[1]);
var v = a[1];
assertEquals(i, v);
var b = a.slice();
assertTrue("1" in b);
assertTrue(b.hasOwnProperty("1"));
assertTrue(b[1] === b[1]);

--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev

Reply via email to