[webkit-changes] [WebKit/WebKit] 65807a: [JSC] Embed globals into Wasm::Instance directly
Yusuke Suzuki
noreply at github.com
Wed Jan 4 16:56:51 PST 2023
Branch: refs/heads/main
Home: https://github.com/WebKit/WebKit
Commit: 65807af2d4b48ae08d50fe973c6896507ebda5fb
https://github.com/WebKit/WebKit/commit/65807af2d4b48ae08d50fe973c6896507ebda5fb
Author: Yusuke Suzuki <ysuzuki at apple.com>
Date: 2023-01-04 (Wed, 04 Jan 2023)
Changed paths:
M Source/JavaScriptCore/wasm/WasmAirIRGeneratorBase.h
M Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp
M Source/JavaScriptCore/wasm/WasmInstance.cpp
M Source/JavaScriptCore/wasm/WasmInstance.h
M Source/JavaScriptCore/wasm/WasmModuleInformation.h
Log Message:
-----------
[JSC] Embed globals into Wasm::Instance directly
https://bugs.webkit.org/show_bug.cgi?id=250027
rdar://103836165
Reviewed by Saam Barati.
This patch embeds globals into Wasm::Instance instead of separately holding it.
By doing so, we can remove one-level indirect load for GetGlobal / SetGlobal in
BBQ and OMG tiers. To keep LLInt efficiencly, we keep m_globals pointer which points
to Wasm::Instance's globals array.
* Source/JavaScriptCore/wasm/WasmAirIRGeneratorBase.h:
(JSC::Wasm::ExpressionType>::getGlobal):
(JSC::Wasm::ExpressionType>::setGlobal):
* Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::getGlobal):
(JSC::Wasm::B3IRGenerator::setGlobal):
* Source/JavaScriptCore/wasm/WasmInstance.cpp:
(JSC::Wasm::Instance::Instance):
(JSC::Wasm::Instance::create):
(JSC::Wasm::Instance::extraMemoryAllocated const):
(JSC::Wasm::Instance::setGlobal):
(JSC::Wasm::Instance::linkGlobal):
(): Deleted.
(JSC::Wasm::Instance::~Instance): Deleted.
* Source/JavaScriptCore/wasm/WasmInstance.h:
(JSC::Wasm::Instance::loadI32Global const):
(JSC::Wasm::Instance::loadI64Global const):
(JSC::Wasm::Instance::setGlobal):
(JSC::Wasm::Instance::loadV128Global const):
(JSC::Wasm::Instance::getGlobalBinding):
(JSC::Wasm::Instance::offsetOfGlobalPtr):
(JSC::Wasm::Instance::allocationSize):
* Source/JavaScriptCore/wasm/WasmModuleInformation.h:
(JSC::Wasm::ModuleInformation::globalCount const):
Canonical link: https://commits.webkit.org/258460@main
More information about the webkit-changes
mailing list