The AllowUndefinedAsNaN optimization is pretty tricky, and more extensive than
just kElementsCantBeAdded.

kElementsCantBeAdded will trigger when SetFastElement is applied to exactly
Array.prototype. We won't be able to warm up an IC for Array.prototype using a
different object, since it has a unique map. The same goes for Crankshaft.
(Unlike in your case).

Additionally, if you do something like Array.prototype.length = 1, it'll
deoptimize due to a prototype chain change, since it will make the map go from
FAST_SMI_ELEMENTS to FAST_HOLEY_SMI_ELEMENTS. The prototype-chain check is
added, but will most likely be elided and replaced by prototype dependency.

https://codereview.chromium.org/198533007/

--
--
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.

Reply via email to