[webkit-changes] [WebKit/WebKit] dda754: [JSC] Fix references in new wasm BBQ
Yusuke Suzuki
noreply at github.com
Sat Feb 18 10:51:21 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: dda75455221d063750b4a33c49961155750ef774
https://github.com/WebKit/WebKit/commit/dda75455221d063750b4a33c49961155750ef774
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2023-02-18 (Sat, 18 Feb 2023)
Changed paths:
M Source/JavaScriptCore/wasm/WasmBBQJIT.cpp
Log Message:
-----------
[JSC] Fix references in new wasm BBQ
https://bugs.webkit.org/show_bug.cgi?id=252529
rdar://105628460
Reviewed by Mark Lam.
1. wasm references are JS values. So use uint64_t instead of pointers.
2. call_indirect should throw BadSignature error when signature is wrong.
3. addRefIsNull was using loadIfNecessary, but it does not work when value is constant. This patch changes it to use EMIT_UNARY.
In subsequent patches, we need to scan loadIfNecessary and fix this issue since there are uses of loadIfNecessary without checking
isConstant.
* Source/JavaScriptCore/wasm/WasmBBQJIT.cpp:
(JSC::Wasm::BBQJIT::Value::asRef const):
(JSC::Wasm::BBQJIT::Value::fromRef):
(JSC::Wasm::BBQJIT::Value::size const):
(JSC::Wasm::BBQJIT::addConstant):
(JSC::Wasm::BBQJIT::addRefIsNull):
(JSC::Wasm::BBQJIT::addRefAsNonNull):
(JSC::Wasm::BBQJIT::addRefFunc):
(JSC::Wasm::BBQJIT::addTopLevel):
(JSC::Wasm::BBQJIT::addCallIndirect):
(JSC::Wasm::BBQJIT::emitStoreConst):
(JSC::Wasm::BBQJIT::emitMoveConst):
Canonical link: https://commits.webkit.org/260516@main
More information about the webkit-changes
mailing list