https://codereview.chromium.org/22545007/diff/20001/src/array.js
File src/array.js (right):
https://codereview.chromium.org/22545007/diff/20001/src/array.js#newcode1263
src/array.js:1263: if (!isProxy && %HasFastPackedElements(array) || i in
array) {
It is _really_ surprising that the runtime call into
Runtime_HasFastPackedElements is cheaper than the "in" keyword. This
suggests that there is a lot of potential in actually improving "in" in
general. This needs investigation of the generated code!
https://codereview.chromium.org/22545007/diff/20001/src/array.js#newcode1315
src/array.js:1315: if (!IS_UNDEFINED(element) || i in array) {
This is actually wrong as the i-th element might have a getter that
removes the element upon first access but still returns undefined. This
will cause us to do the "in" check on the property after the element has
been removed.
We had this "optimization" for a while and it was removed. The test262
suite should actually cover this case.
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.