-
peterwmwong authored
Two small changes were done as part of the port: - Changes TypedArrayInitializeWithBuffer from a TFS builtin to a macro. It was only called from ConstructByArrayBuffer and this removes the overhead of the TFS call. - Introduces a GetTypedArrayElementsInfo that retrieves both the element size and map. Instead of generating the elements kind switch code ( DispatchTypedArrayByElementsKind) twice, just generate once at the beginning of CreateTypedArray. This reduces overall builtins size by 364 bytes (Mac x64.release) - Before 1364 - TypedArrayInitializeWithBuffer 6468 - CreateTypedArray - After 7468 - CreateTypedArray This also improves performance of TypedArray JSPerf benchmarks (SubarrayNoSpecies, ConstructByArrayBuffer) by 5-8%. Bug: v8:7161 Change-Id: I68eed2ea4db103f44ad9751229c29fba9bc9d24d Reviewed-on: https://chromium-review.googlesource.com/c/1437822 Commit-Queue: Peter Wong <peter.wm.wong@gmail.com> Reviewed-by: Jakob Gruber <jgruber@chromium.org> Cr-Commit-Position: refs/heads/master@{#59135}
8e13ddc6