[JSC] Use "destroy" function directly for JSWebAssemblyCodeBlock and WebAssemblyFunction
authorysuzuki@apple.com <ysuzuki@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Aug 2019 19:46:45 +0000 (19:46 +0000)
committerysuzuki@apple.com <ysuzuki@apple.com@268f45cc-cd09-0410-ab3c-d52691b4dbfc>
Fri, 2 Aug 2019 19:46:45 +0000 (19:46 +0000)
https://bugs.webkit.org/show_bug.cgi?id=200385

Reviewed by Mark Lam.

These CellTypes are not using classInfo stored in the cells, so we can just call JSWebAssemblyCodeBlock::destroy
and WebAssemblyFunction::destroy directly.

* wasm/js/JSWebAssemblyCodeBlockHeapCellType.cpp:
(JSC::JSWebAssemblyCodeBlockDestroyFunc::operator() const):
* wasm/js/WebAssemblyFunctionHeapCellType.cpp:
(JSC::WebAssemblyFunctionDestroyFunc::operator() const):

git-svn-id: https://svn.webkit.org/repository/webkit/trunk@248171 268f45cc-cd09-0410-ab3c-d52691b4dbfc

Source/JavaScriptCore/ChangeLog
Source/JavaScriptCore/wasm/js/JSWebAssemblyCodeBlockHeapCellType.cpp
Source/JavaScriptCore/wasm/js/WebAssemblyFunctionHeapCellType.cpp

index e35d7a1..0f62242 100644 (file)
@@ -1,3 +1,18 @@
+2019-08-02  Yusuke Suzuki  <ysuzuki@apple.com>
+
+        [JSC] Use "destroy" function directly for JSWebAssemblyCodeBlock and WebAssemblyFunction
+        https://bugs.webkit.org/show_bug.cgi?id=200385
+
+        Reviewed by Mark Lam.
+
+        These CellTypes are not using classInfo stored in the cells, so we can just call JSWebAssemblyCodeBlock::destroy
+        and WebAssemblyFunction::destroy directly.
+
+        * wasm/js/JSWebAssemblyCodeBlockHeapCellType.cpp:
+        (JSC::JSWebAssemblyCodeBlockDestroyFunc::operator() const):
+        * wasm/js/WebAssemblyFunctionHeapCellType.cpp:
+        (JSC::WebAssemblyFunctionDestroyFunc::operator() const):
+
 2019-08-02  Mark Lam  <mark.lam@apple.com>
 
         Gardening: build fix.
index cf8198d..e05a555 100644 (file)
@@ -38,7 +38,7 @@ struct JSWebAssemblyCodeBlockDestroyFunc {
     ALWAYS_INLINE void operator()(VM&, JSCell* cell) const
     {
         static_assert(std::is_final<JSWebAssemblyCodeBlock>::value, "Otherwise, this code would not be correct.");
-        JSWebAssemblyCodeBlock::info()->methodTable.destroy(cell);
+        JSWebAssemblyCodeBlock::destroy(cell);
     }
 };
 
index 37f914d..da07639 100644 (file)
@@ -38,7 +38,7 @@ struct WebAssemblyFunctionDestroyFunc {
     ALWAYS_INLINE void operator()(VM&, JSCell* cell) const
     {
         static_assert(std::is_final<WebAssemblyFunction>::value, "Otherwise, this code would not be correct.");
-        WebAssemblyFunction::info()->methodTable.destroy(cell);
+        WebAssemblyFunction::destroy(cell);
     }
 };