[webkit-changes] [WebKit/WebKit] 0ebf89: [JSC] Add wasm fixed-sized FuncRefTable
Yusuke Suzuki
noreply at github.com
Wed Jan 25 09:09:18 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 0ebf892b7ecf2a75dfcb9fe1d281afe60ba8deff
https://github.com/WebKit/WebKit/commit/0ebf892b7ecf2a75dfcb9fe1d281afe60ba8deff
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2023-01-25 (Wed, 25 Jan 2023)
Changed paths:
M Source/JavaScriptCore/wasm/WasmAirIRGeneratorBase.h
M Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp
M Source/JavaScriptCore/wasm/WasmTable.cpp
M Source/JavaScriptCore/wasm/WasmTable.h
Log Message:
-----------
[JSC] Add wasm fixed-sized FuncRefTable
https://bugs.webkit.org/show_bug.cgi?id=251136
rdar://104634169
Reviewed by Mark Lam.
In many cases, FuncRefTable is fixed-sized (initial size matches against maximum size).
This patch adds FixedSized optimization for FuncRefTable:
1. We allocate function's buffer as a tail of FuncRefTable memory.
2. In BBQ and OMG code, we avoid one-level indirection of load if we know that table is fixed-sized and
it is not imported table.
* Source/JavaScriptCore/wasm/WasmAirIRGeneratorBase.h:
(JSC::Wasm::ExpressionType>::addCallIndirect):
* Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::addCallIndirect):
* Source/JavaScriptCore/wasm/WasmTable.cpp:
(JSC::Wasm::Table::Table):
(JSC::Wasm::Table::tryCreate):
(JSC::Wasm::FuncRefTable::FuncRefTable):
(JSC::Wasm::FuncRefTable::~FuncRefTable):
(JSC::Wasm::FuncRefTable::createFixedSized):
* Source/JavaScriptCore/wasm/WasmTable.h:
(JSC::Wasm::Table::isFixedSized const):
Canonical link: https://commits.webkit.org/259363@main
More information about the webkit-changes
mailing list