Object.assign calls Object.getOwnPropertyNames & Object.getOwnPropertySymbols to collect all the names. But exposing the private API that collects both at the same time makes the API efficient when the given Object has so many non-indexed properties. Since Object.assign is so generic API (some form of utility API), the form of the given Object is not expected. This is why I think this optimization is required.
Created attachment 257471 [details] Patch
Comment on attachment 257471 [details] Patch r=me It seems like we might want to add caching for these property name lists. We have caching for enumerable property names, but not for these other varieties.
Comment on attachment 257471 [details] Patch Thank you for your review. Your thought is right. (And actually, many `// FIXME: Use the enumeration cache.` exist in ObjectConstructor.cpp) We need to extend the existing caching system to use it in these enumeration APIs.
Comment on attachment 257471 [details] Patch Clearing flags on attachment: 257471 Committed r187363: <http://trac.webkit.org/changeset/187363>
All reviewed patches have been landed. Closing bug.