Move empty elements canonicalization from call sites of
AllocateUninitializedJSArrayWithElements into the method. Prior to the change, if the caller forgets to handle empty case on their side, AllocateUninitializedJSArrayWithElements would allocate a new empty FixedArray rather than return the canonical one. This refactor shifts the burden of canonicalization from the callers to AllocateUninitializedJSArrayWithElements. Bug: v8:6777 Change-Id: I1246cb288861b65b51938414a454f21af78f8399 Reviewed-on: https://chromium-review.googlesource.com/c/v8/v8/+/1480330Reviewed-by: Jakob Gruber <jgruber@chromium.org> Reviewed-by: Benedikt Meurer <bmeurer@chromium.org> Commit-Queue: Irina Yatsenko <irinayat@microsoft.com> Cr-Commit-Position: refs/heads/master@{#60015}
Showing
Please
register
or
sign in
to comment