Title: [236175] releases/WebKitGTK/webkit-2.22/Source/_javascript_Core
- Revision
- 236175
- Author
- [email protected]
- Date
- 2018-09-19 05:33:56 -0700 (Wed, 19 Sep 2018)
Log Message
Merge r235778 - [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):
Modified Paths
Diff
Modified: releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/ChangeLog (236174 => 236175)
--- releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/ChangeLog 2018-09-19 12:33:52 UTC (rev 236174)
+++ releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/ChangeLog 2018-09-19 12:33:56 UTC (rev 236175)
@@ -1,3 +1,17 @@
+2018-09-06 Yusuke Suzuki <[email protected]>
+
+ [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):
+
2018-09-06 Michael Saboff <[email protected]>
Improper speculation type for Math.pow(NaN, 0) in Abstract Interpreter
Modified: releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/runtime/ArgList.h (236174 => 236175)
--- releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/runtime/ArgList.h 2018-09-19 12:33:52 UTC (rev 236174)
+++ releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/runtime/ArgList.h 2018-09-19 12:33:56 UTC (rev 236175)
@@ -34,12 +34,11 @@
friend class VM;
friend class ArgList;
-private:
+public:
using Base = RecordOverflow;
static const size_t inlineCapacity = 8;
typedef HashSet<MarkedArgumentBuffer*> ListSet;
-public:
// Constructor for a read-write list, to which you may append values.
// FIXME: Remove all clients of this API, then remove this API.
MarkedArgumentBuffer()
Modified: releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/wasm/js/WebAssemblyFunction.cpp (236174 => 236175)
--- releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/wasm/js/WebAssemblyFunction.cpp 2018-09-19 12:33:52 UTC (rev 236174)
+++ releases/WebKitGTK/webkit-2.22/Source/_javascript_Core/wasm/js/WebAssemblyFunction.cpp 2018-09-19 12:33:56 UTC (rev 236175)
@@ -83,7 +83,7 @@
if (Options::useTracePoints())
traceScope.emplace(WebAssemblyExecuteStart, WebAssemblyExecuteEnd);
- Vector<JSValue> boxedArgs;
+ Vector<JSValue, MarkedArgumentBuffer::inlineCapacity> boxedArgs;
JSWebAssemblyInstance* instance = wasmFunction->instance();
Wasm::Instance* wasmInstance = &instance->instance();
// When we don't use fast TLS to store the context, the JS
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes