Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[JSC] Remove Wasm::PinnedRegisterInfo #8900

Conversation

Constellation
Copy link
Member

@Constellation Constellation commented Jan 21, 2023

4dae653

[JSC] Remove Wasm::PinnedRegisterInfo
https://bugs.webkit.org/show_bug.cgi?id=250920
rdar://104496000

Reviewed by Mark Lam.

This patch removes Wasm::PinnedRegisterInfo since we no longer have TLS version.
So, these register information can be defined at compile time. We should just define them in GPRInfo,
easy to read what is specified in each architecture.

* Source/JavaScriptCore/jit/AssemblyHelpers.cpp:
(JSC::AssemblyHelpers::loadWasmContextInstance):
(JSC::AssemblyHelpers::storeWasmContextInstance):
* Source/JavaScriptCore/jit/GPRInfo.h:
* Source/JavaScriptCore/jit/RegisterSet.cpp:
(JSC::RegisterSetBuilder::wasmPinnedRegisters):
* Source/JavaScriptCore/jit/RegisterSet.h:
* Source/JavaScriptCore/wasm/WasmAirIRGeneratorBase.h:
(JSC::Wasm::ExpressionType>::AirIRGeneratorBase):
(JSC::Wasm::ExpressionType>::restoreWebAssemblyGlobalState):
(JSC::Wasm::ExpressionType>::addCall):
(JSC::Wasm::ExpressionType>::emitIndirectCall):
* Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::restoreWebAssemblyGlobalState):
(JSC::Wasm::B3IRGenerator::emitIndirectCall):
(JSC::Wasm::B3IRGenerator::addCall):
* Source/JavaScriptCore/wasm/WasmBinding.cpp:
(JSC::Wasm::wasmToWasm):
* Source/JavaScriptCore/wasm/WasmMemoryInformation.cpp:
(JSC::Wasm::PinnedRegisterInfo::get): Deleted.
(JSC::Wasm::PinnedRegisterInfo::PinnedRegisterInfo): Deleted.
* Source/JavaScriptCore/wasm/WasmMemoryInformation.h:
(JSC::Wasm::PinnedRegisterInfo::toSave const): Deleted.
* Source/JavaScriptCore/wasm/WasmOperations.cpp:
(JSC::Wasm::JSC_DEFINE_JIT_OPERATION):
* Source/JavaScriptCore/wasm/js/JSToWasm.cpp:
(JSC::Wasm::marshallJSResult):
(JSC::Wasm::createJSToWasmWrapper):
* Source/JavaScriptCore/wasm/js/WasmToJS.cpp:
(JSC::Wasm::materializeImportJSCell):
(JSC::Wasm::wasmToJS):
* Source/JavaScriptCore/wasm/js/WebAssemblyFunction.cpp:
(JSC::WebAssemblyFunction::calleeSaves const):
(JSC::WebAssemblyFunction::jsCallEntrypointSlow):

Canonical link: https://commits.webkit.org/259161@main

a3d215e

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios   πŸ›  mac βœ… πŸ›  wpe   πŸ›  πŸ§ͺ win
βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug βœ… πŸ›  gtk βœ… πŸ›  wincairo
βœ… πŸ§ͺ webkitperl   πŸ§ͺ ios-wk2   πŸ§ͺ api-mac   πŸ§ͺ gtk-wk2
  πŸ§ͺ api-ios   πŸ§ͺ mac-wk1   πŸ§ͺ api-gtk
  πŸ›  πŸ§ͺ jsc   πŸ›  tv   πŸ§ͺ mac-wk2 βœ… πŸ›  jsc-armv7
  πŸ›  πŸ§ͺ jsc-arm64 βœ… πŸ›  tv-sim   πŸ§ͺ mac-AS-debug-wk2   πŸ§ͺ jsc-armv7-tests
βœ… πŸ›  watch   πŸ§ͺ mac-wk2-stress βœ… πŸ›  jsc-mips
βœ… πŸ›  watch-sim   πŸ§ͺ jsc-mips-tests
βœ… πŸ›  πŸ§ͺ unsafe-merge

@Constellation Constellation requested a review from a team as a code owner January 21, 2023 00:13
@Constellation Constellation self-assigned this Jan 21, 2023
@Constellation Constellation added the JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues. label Jan 21, 2023
@Constellation Constellation marked this pull request as draft January 21, 2023 00:17
@Constellation Constellation force-pushed the eng/JSC-Remove-WasmPinnedRegisterInfo branch from 674bb03 to d294d0c Compare January 21, 2023 00:22
@Constellation Constellation marked this pull request as ready for review January 21, 2023 00:22
@Constellation Constellation force-pushed the eng/JSC-Remove-WasmPinnedRegisterInfo branch from d294d0c to 99bf8ee Compare January 21, 2023 00:42
Copy link

@MenloDorian MenloDorian left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

r=me

Source/JavaScriptCore/jit/RegisterSet.cpp Outdated Show resolved Hide resolved
Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp Outdated Show resolved Hide resolved
Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp Outdated Show resolved Hide resolved
Source/JavaScriptCore/wasm/WasmAirIRGenerator64.cpp Outdated Show resolved Hide resolved
Source/JavaScriptCore/wasm/WasmAirIRGenerator64.cpp Outdated Show resolved Hide resolved
@Constellation Constellation force-pushed the eng/JSC-Remove-WasmPinnedRegisterInfo branch from 99bf8ee to a3d215e Compare January 21, 2023 02:50
@Constellation Constellation added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jan 21, 2023
https://bugs.webkit.org/show_bug.cgi?id=250920
rdar://104496000

Reviewed by Mark Lam.

This patch removes Wasm::PinnedRegisterInfo since we no longer have TLS version.
So, these register information can be defined at compile time. We should just define them in GPRInfo,
easy to read what is specified in each architecture.

* Source/JavaScriptCore/jit/AssemblyHelpers.cpp:
(JSC::AssemblyHelpers::loadWasmContextInstance):
(JSC::AssemblyHelpers::storeWasmContextInstance):
* Source/JavaScriptCore/jit/GPRInfo.h:
* Source/JavaScriptCore/jit/RegisterSet.cpp:
(JSC::RegisterSetBuilder::wasmPinnedRegisters):
* Source/JavaScriptCore/jit/RegisterSet.h:
* Source/JavaScriptCore/wasm/WasmAirIRGeneratorBase.h:
(JSC::Wasm::ExpressionType>::AirIRGeneratorBase):
(JSC::Wasm::ExpressionType>::restoreWebAssemblyGlobalState):
(JSC::Wasm::ExpressionType>::addCall):
(JSC::Wasm::ExpressionType>::emitIndirectCall):
* Source/JavaScriptCore/wasm/WasmB3IRGenerator.cpp:
(JSC::Wasm::B3IRGenerator::B3IRGenerator):
(JSC::Wasm::B3IRGenerator::restoreWebAssemblyGlobalState):
(JSC::Wasm::B3IRGenerator::emitIndirectCall):
(JSC::Wasm::B3IRGenerator::addCall):
* Source/JavaScriptCore/wasm/WasmBinding.cpp:
(JSC::Wasm::wasmToWasm):
* Source/JavaScriptCore/wasm/WasmMemoryInformation.cpp:
(JSC::Wasm::PinnedRegisterInfo::get): Deleted.
(JSC::Wasm::PinnedRegisterInfo::PinnedRegisterInfo): Deleted.
* Source/JavaScriptCore/wasm/WasmMemoryInformation.h:
(JSC::Wasm::PinnedRegisterInfo::toSave const): Deleted.
* Source/JavaScriptCore/wasm/WasmOperations.cpp:
(JSC::Wasm::JSC_DEFINE_JIT_OPERATION):
* Source/JavaScriptCore/wasm/js/JSToWasm.cpp:
(JSC::Wasm::marshallJSResult):
(JSC::Wasm::createJSToWasmWrapper):
* Source/JavaScriptCore/wasm/js/WasmToJS.cpp:
(JSC::Wasm::materializeImportJSCell):
(JSC::Wasm::wasmToJS):
* Source/JavaScriptCore/wasm/js/WebAssemblyFunction.cpp:
(JSC::WebAssemblyFunction::calleeSaves const):
(JSC::WebAssemblyFunction::jsCallEntrypointSlow):

Canonical link: https://commits.webkit.org/259161@main
@webkit-commit-queue
Copy link
Collaborator

Committed 259161@main (4dae653): https://commits.webkit.org/259161@main

Reviewed commits have been landed. Closing PR #8900 and removing active labels.

@webkit-early-warning-system webkit-early-warning-system merged commit 4dae653 into WebKit:main Jan 21, 2023
@webkit-commit-queue webkit-commit-queue removed the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Jan 21, 2023
@Constellation Constellation deleted the eng/JSC-Remove-WasmPinnedRegisterInfo branch January 22, 2023 01:07
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues.
Projects
None yet
4 participants