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] Consume unused Values #10840

Merged

Conversation

Constellation
Copy link
Member

@Constellation Constellation commented Mar 1, 2023

2e8f9e4

[JSC] Consume unused Values
https://bugs.webkit.org/show_bug.cgi?id=253125
rdar://106060228

Reviewed by Justin Michaud.

These values are used for checking exception status. And they do not exist on WasmFunctionParser side's stack.
So we should immediately consume these values to release them from temp stack. locationOf will find these values.
And it is possible that they have different types & registers from the expected values' types & registers.

* Source/JavaScriptCore/wasm/WasmBBQJIT.cpp:
(JSC::Wasm::BBQJIT::addTableSet):
(JSC::Wasm::BBQJIT::addTableInit):
(JSC::Wasm::BBQJIT::addTableFill):
(JSC::Wasm::BBQJIT::addTableCopy):
(JSC::Wasm::BBQJIT::addMemoryFill):
(JSC::Wasm::BBQJIT::addMemoryCopy):
(JSC::Wasm::BBQJIT::addMemoryInit):
(JSC::Wasm::BBQJIT::clobbersForDivX86):
(JSC::Wasm::BBQJIT::allocateWithHint):
(JSC::Wasm::BBQJIT::bind):
(JSC::Wasm::BBQJIT::evictGPR):
(JSC::Wasm::BBQJIT::ScratchScope::bindGPRToScratch):
(JSC::Wasm::BBQJIT::ScratchScope::unbindGPRFromScratch):
(JSC::Wasm::BBQJIT::ScratchScope::initializedPreservedSet):

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

6579ae2

Misc iOS, tvOS & watchOS macOS Linux Windows
βœ… πŸ§ͺ style βœ… πŸ›  ios   πŸ›  mac   πŸ›  wpe   πŸ›  wincairo
βœ… πŸ›  ios-sim βœ… πŸ›  mac-AS-debug βœ… πŸ›  gtk
βœ… πŸ§ͺ 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 March 1, 2023 01:14
@Constellation Constellation self-assigned this Mar 1, 2023
@Constellation Constellation added the JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues. label Mar 1, 2023
Copy link
Contributor

@justinmichaud justinmichaud 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

@Constellation Constellation added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Mar 1, 2023
https://bugs.webkit.org/show_bug.cgi?id=253125
rdar://106060228

Reviewed by Justin Michaud.

These values are used for checking exception status. And they do not exist on WasmFunctionParser side's stack.
So we should immediately consume these values to release them from temp stack. locationOf will find these values.
And it is possible that they have different types & registers from the expected values' types & registers.

* Source/JavaScriptCore/wasm/WasmBBQJIT.cpp:
(JSC::Wasm::BBQJIT::addTableSet):
(JSC::Wasm::BBQJIT::addTableInit):
(JSC::Wasm::BBQJIT::addTableFill):
(JSC::Wasm::BBQJIT::addTableCopy):
(JSC::Wasm::BBQJIT::addMemoryFill):
(JSC::Wasm::BBQJIT::addMemoryCopy):
(JSC::Wasm::BBQJIT::addMemoryInit):
(JSC::Wasm::BBQJIT::clobbersForDivX86):
(JSC::Wasm::BBQJIT::allocateWithHint):
(JSC::Wasm::BBQJIT::bind):
(JSC::Wasm::BBQJIT::evictGPR):
(JSC::Wasm::BBQJIT::ScratchScope::bindGPRToScratch):
(JSC::Wasm::BBQJIT::ScratchScope::unbindGPRFromScratch):
(JSC::Wasm::BBQJIT::ScratchScope::initializedPreservedSet):

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

Committed 260979@main (2e8f9e4): https://commits.webkit.org/260979@main

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

@webkit-commit-queue webkit-commit-queue merged commit 2e8f9e4 into WebKit:main Mar 1, 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 Mar 1, 2023
@Constellation Constellation deleted the eng/JSC-Consume-unused-Values branch March 1, 2023 02:43
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