Title: [273662] trunk/Source/_javascript_Core
- Revision
- 273662
- Author
- [email protected]
- Date
- 2021-03-01 11:29:56 -0800 (Mon, 01 Mar 2021)
Log Message
[JSC] WebAssembly: make Wasm::Signature 32bit friendly
https://bugs.webkit.org/show_bug.cgi?id=222543
Patch by Xan Lopez <[email protected]> on 2021-03-01
Reviewed by Yusuke Suzuki.
The Wasm code uses the address of a Signature object as its
index. To make this work in 32bit just change Wasm::SignatureIndex
to be a uintptr_t instead of uint64_t. Also, remove some
unnecessary includes while we are at it.
* wasm/WasmModule.h:
* wasm/WasmSignature.h:
* wasm/js/JSWebAssemblyModule.h:
Modified Paths
Diff
Modified: trunk/Source/_javascript_Core/ChangeLog (273661 => 273662)
--- trunk/Source/_javascript_Core/ChangeLog 2021-03-01 19:21:41 UTC (rev 273661)
+++ trunk/Source/_javascript_Core/ChangeLog 2021-03-01 19:29:56 UTC (rev 273662)
@@ -1,3 +1,19 @@
+2021-03-01 Xan Lopez <[email protected]>
+
+ [JSC] WebAssembly: make Wasm::Signature 32bit friendly
+ https://bugs.webkit.org/show_bug.cgi?id=222543
+
+ Reviewed by Yusuke Suzuki.
+
+ The Wasm code uses the address of a Signature object as its
+ index. To make this work in 32bit just change Wasm::SignatureIndex
+ to be a uintptr_t instead of uint64_t. Also, remove some
+ unnecessary includes while we are at it.
+
+ * wasm/WasmModule.h:
+ * wasm/WasmSignature.h:
+ * wasm/js/JSWebAssemblyModule.h:
+
2021-03-01 Yusuke Suzuki <[email protected]>
[JSC] Throw TypeError when getFunctionRealm hits revoked Proxy
Modified: trunk/Source/_javascript_Core/wasm/WasmModule.h (273661 => 273662)
--- trunk/Source/_javascript_Core/wasm/WasmModule.h 2021-03-01 19:21:41 UTC (rev 273661)
+++ trunk/Source/_javascript_Core/wasm/WasmModule.h 2021-03-01 19:29:56 UTC (rev 273662)
@@ -41,7 +41,7 @@
struct Context;
struct ModuleInformation;
-using SignatureIndex = uint64_t;
+using SignatureIndex = uintptr_t;
class Module : public ThreadSafeRefCounted<Module> {
public:
Modified: trunk/Source/_javascript_Core/wasm/WasmSignature.h (273661 => 273662)
--- trunk/Source/_javascript_Core/wasm/WasmSignature.h 2021-03-01 19:21:41 UTC (rev 273661)
+++ trunk/Source/_javascript_Core/wasm/WasmSignature.h 2021-03-01 19:29:56 UTC (rev 273662)
@@ -27,13 +27,9 @@
#if ENABLE(WEBASSEMBLY)
-#include "B3Type.h"
#include "WasmOps.h"
#include <cstdint>
-#include <cstring>
#include <wtf/CheckedArithmetic.h>
-#include <wtf/HashMap.h>
-#include <wtf/HashSet.h>
#include <wtf/HashTraits.h>
#include <wtf/StdLibExtras.h>
#include <wtf/ThreadSafeRefCounted.h>
@@ -48,7 +44,7 @@
namespace Wasm {
using SignatureArgCount = uint32_t;
-using SignatureIndex = uint64_t;
+using SignatureIndex = uintptr_t;
class Signature : public ThreadSafeRefCounted<Signature> {
WTF_MAKE_FAST_ALLOCATED;
Modified: trunk/Source/_javascript_Core/wasm/js/JSWebAssemblyModule.h (273661 => 273662)
--- trunk/Source/_javascript_Core/wasm/js/JSWebAssemblyModule.h 2021-03-01 19:21:41 UTC (rev 273661)
+++ trunk/Source/_javascript_Core/wasm/js/JSWebAssemblyModule.h 2021-03-01 19:29:56 UTC (rev 273662)
@@ -42,7 +42,7 @@
class Module;
struct ModuleInformation;
class Plan;
-using SignatureIndex = uint64_t;
+using SignatureIndex = uintptr_t;
}
class SymbolTable;
_______________________________________________
webkit-changes mailing list
[email protected]
https://lists.webkit.org/mailman/listinfo/webkit-changes