[WebAssembly] Optimize JS to Wasm call by removing Vector allocation
authoryusukesuzuki@slowstart.org <yusukesuzuki@slowstart.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Sep 2018 04:40:12 +0000 (04:40 +0000)
committeryusukesuzuki@slowstart.org <yusukesuzuki@slowstart.org@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 7 Sep 2018 04:40:12 +0000 (04:40 +0000)
commit45e2113eaa8026ee420063d6e2d392f63d8a5cd2
treec020edbb27cd95107c95fc07aa707c0d495f4ac5
parent39d8ad4940c41b25c93e394b57ee7a8fe80c20c5
[WebAssembly] Optimize JS to Wasm call by removing Vector allocation
https://bugs.webkit.org/show_bug.cgi?id=189353

Reviewed by Mark Lam.

JS to Wasm call always allocates Vector for the arguments. This is really costly if the wasm function is small.
This patch adds an initial size parameter to the Vector to avoid allocations for small sized arguments.

* runtime/ArgList.h:
* wasm/js/WebAssemblyFunction.cpp:
(JSC::callWebAssemblyFunction):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@235778 268f45cc-cd09-0410-ab3c-d52691b4dbfc
Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/runtime/ArgList.h
Source/JavaScriptCore/wasm/js/WebAssemblyFunction.cpp