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] Make JSToWasmICCallee one of Wasm::Callee #8087

Conversation

Constellation
Copy link
Member

@Constellation Constellation commented Dec 28, 2022

08ce70f

[JSC] Make JSToWasmICCallee one of Wasm::Callee
https://bugs.webkit.org/show_bug.cgi?id=204960
rdar://problem/103740549

Reviewed by Mark Lam.

This patch replaces JSCell based JSToWasmICCallee with Wasm::Callee based JSToWasmICCallee,
so we do not need to have a bit weird JS cell type for that.

* JSTests/stress/sampling-profiler-wasm-name-section.js:
(platformSupportsSamplingProfiler.vm.isWasmSupported):
* JSTests/stress/sampling-profiler-wasm.js:
(platformSupportsSamplingProfiler.vm.isWasmSupported):
* JSTests/wasm/function-tests/nameSection.js:
* Source/JavaScriptCore/CMakeLists.txt:
* Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:
* Source/JavaScriptCore/Sources.txt:
* Source/JavaScriptCore/heap/Heap.h:
* Source/JavaScriptCore/heap/HeapSubspaceTypes.h:
* Source/JavaScriptCore/interpreter/Interpreter.cpp:
(JSC::UnwindFunctor::operator() const):
* Source/JavaScriptCore/interpreter/StackVisitor.cpp:
(JSC::StackVisitor::Frame::calleeSaveRegistersForUnwinding):
* Source/JavaScriptCore/runtime/JSFunction.cpp:
(JSC::getCalculatedDisplayName):
* Source/JavaScriptCore/runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildrenImpl):
* Source/JavaScriptCore/runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::webAssemblyFunctionStructure const):
(JSC::JSGlobalObject::jsToWasmICCalleeStructure const): Deleted.
* Source/JavaScriptCore/wasm/WasmCallee.cpp:
(JSC::Wasm::Callee::runWithDowncast):
(JSC::Wasm::JITCallee::JITCallee):
(JSC::Wasm::JSToWasmICCallee::previousInstanceOffset):
(JSC::Wasm::JSToWasmICCallee::previousInstance):
* Source/JavaScriptCore/wasm/WasmCallee.h:
(JSC::Wasm::JITCallee::setEntrypoint):
* Source/JavaScriptCore/wasm/WasmCompilationMode.cpp:
(JSC::Wasm::makeString):
* Source/JavaScriptCore/wasm/WasmCompilationMode.h:
(JSC::Wasm::isOSREntry):
(JSC::Wasm::isAnyBBQ):
(JSC::Wasm::isAnyOMG):
* Source/JavaScriptCore/wasm/js/JSToWasmICCallee.cpp: Removed.
* Source/JavaScriptCore/wasm/js/JSToWasmICCallee.h: Removed.
* Source/JavaScriptCore/wasm/js/WebAssemblyFunction.cpp:
(JSC::WebAssemblyFunction::jsCallEntrypointSlow):
(JSC::WebAssemblyFunction::visitChildrenImpl):
(JSC::WebAssemblyFunction::previousInstanceOffset const): Deleted.
(JSC::WebAssemblyFunction::previousInstance): Deleted.
* Source/JavaScriptCore/wasm/js/WebAssemblyFunction.h:

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

d5520a7

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 December 28, 2022 11:30
@Constellation Constellation self-assigned this Dec 28, 2022
@Constellation Constellation added the JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues. label Dec 28, 2022
@Constellation Constellation changed the title [JSC] Remove JSToWasmICCallee [JSC] Make JSToWasmICCallee one of Wasm::Callee Dec 28, 2022
@MenloDorian
Copy link

This patch replaces JSCell based JSToWasmICCallee to Wasm::Callee based JSToWasmICCallee,
so we do not need to have a bit weird JS cell type for that.

/replace ... to .../replace ... with .../

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

@Constellation Constellation added the unsafe-merge-queue Applied to send a pull request to merge-queue, but skip building and testing label Dec 31, 2022
https://bugs.webkit.org/show_bug.cgi?id=204960
rdar://problem/103740549

Reviewed by Mark Lam.

This patch replaces JSCell based JSToWasmICCallee with Wasm::Callee based JSToWasmICCallee,
so we do not need to have a bit weird JS cell type for that.

* JSTests/stress/sampling-profiler-wasm-name-section.js:
(platformSupportsSamplingProfiler.vm.isWasmSupported):
* JSTests/stress/sampling-profiler-wasm.js:
(platformSupportsSamplingProfiler.vm.isWasmSupported):
* JSTests/wasm/function-tests/nameSection.js:
* Source/JavaScriptCore/CMakeLists.txt:
* Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:
* Source/JavaScriptCore/Sources.txt:
* Source/JavaScriptCore/heap/Heap.h:
* Source/JavaScriptCore/heap/HeapSubspaceTypes.h:
* Source/JavaScriptCore/interpreter/Interpreter.cpp:
(JSC::UnwindFunctor::operator() const):
* Source/JavaScriptCore/interpreter/StackVisitor.cpp:
(JSC::StackVisitor::Frame::calleeSaveRegistersForUnwinding):
* Source/JavaScriptCore/runtime/JSFunction.cpp:
(JSC::getCalculatedDisplayName):
* Source/JavaScriptCore/runtime/JSGlobalObject.cpp:
(JSC::JSGlobalObject::init):
(JSC::JSGlobalObject::visitChildrenImpl):
* Source/JavaScriptCore/runtime/JSGlobalObject.h:
(JSC::JSGlobalObject::webAssemblyFunctionStructure const):
(JSC::JSGlobalObject::jsToWasmICCalleeStructure const): Deleted.
* Source/JavaScriptCore/wasm/WasmCallee.cpp:
(JSC::Wasm::Callee::runWithDowncast):
(JSC::Wasm::JITCallee::JITCallee):
(JSC::Wasm::JSToWasmICCallee::previousInstanceOffset):
(JSC::Wasm::JSToWasmICCallee::previousInstance):
* Source/JavaScriptCore/wasm/WasmCallee.h:
(JSC::Wasm::JITCallee::setEntrypoint):
* Source/JavaScriptCore/wasm/WasmCompilationMode.cpp:
(JSC::Wasm::makeString):
* Source/JavaScriptCore/wasm/WasmCompilationMode.h:
(JSC::Wasm::isOSREntry):
(JSC::Wasm::isAnyBBQ):
(JSC::Wasm::isAnyOMG):
* Source/JavaScriptCore/wasm/js/JSToWasmICCallee.cpp: Removed.
* Source/JavaScriptCore/wasm/js/JSToWasmICCallee.h: Removed.
* Source/JavaScriptCore/wasm/js/WebAssemblyFunction.cpp:
(JSC::WebAssemblyFunction::jsCallEntrypointSlow):
(JSC::WebAssemblyFunction::visitChildrenImpl):
(JSC::WebAssemblyFunction::previousInstanceOffset const): Deleted.
(JSC::WebAssemblyFunction::previousInstance): Deleted.
* Source/JavaScriptCore/wasm/js/WebAssemblyFunction.h:

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

Committed 258368@main (08ce70f): https://commits.webkit.org/258368@main

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

@webkit-early-warning-system webkit-early-warning-system merged commit 08ce70f into WebKit:main Dec 31, 2022
@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 Dec 31, 2022
@Constellation Constellation deleted the eng/JSC-Remove-JSToWasmICCallee branch December 31, 2022 12:25
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