Status: New
Owner: ----
New issue 3535 by [email protected]: Array.prototype.{indexOf,
lastIndexOf, reverse, ...}: Accessors with side-effects not handled in
sparse variants
https://code.google.com/p/v8/issues/detail?id=3535
The optimized versions for sparse arrays need to handle accessor properties.
Expected: Returns 9998
Actual: Returns -1
Test case:
---
a=[0];
a.length=10000;
o={};
Object.defineProperty(a, "9999", {get:function(){this[9998] = o}});
a.lastIndexOf(o)
---
Expected: Returns 9999
Actual: Returns -1
Test case:
---
a=[0];
a.length=10000;
o={};
Object.defineProperty(a, "9998", {get:function(){this[9999] = o}});
a.indexOf(o)
---
Expected: Returns array [0, 123]
Actual: Returns array [,]
Test case:
---
a=[];
a.length=10000;
Object.defineProperty(a, "9999", {
get: function(){
this[9998] = 123;
delete this[9999];
return 0
},
configurable: true
});
a.reverse();
a.length = 2;
a
---
--
You received this message because this project is configured to send all
issue notifications to this address.
You may adjust your notification preferences at:
https://code.google.com/hosting/settings
--
--
v8-dev mailing list
[email protected]
http://groups.google.com/group/v8-dev
---
You received this message because you are subscribed to the Google Groups "v8-dev" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.