You can actually create, using Object.defineProperty, an array that doesn't
have
foreign accessors as its length anymore. At that point values don't get
deleted
anymore when you reduce the length. This means you can create a "packed
array"
which has elements beyond its length (which you can find just by reading
them).
Also, given that forEach reads the length before starting to loop, it means
that
the array essentially becomes "holey" at the moment you shorted the length
dynamically; in the sense that you have to look for elements beyond the
actual
length of the array. Those elements can come from the prototype chain; and
can
obviously be a getter or so.
https://codereview.chromium.org/22545007/
--
--
v8-dev mailing list
v8-dev@googlegroups.com
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 v8-dev+unsubscr...@googlegroups.com.
For more options, visit https://groups.google.com/groups/opt_out.