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] Combine FTL code generation into one #25617

Conversation

Constellation
Copy link
Member

@Constellation Constellation commented Mar 8, 2024

3feec6a

[JSC] Combine FTL code generation into one
https://bugs.webkit.org/show_bug.cgi?id=270684
rdar://124259821

Reviewed by Justin Michaud.

This patch simplifies FTL code generation. Previously we were always generating two codes, one for normal code and one for arity check etc.
But just generating both into one is easy and simple. This patch cleans up around it and use of LinkBuffer / AssemblerData etc. gets simplified.
Originally we were doing so since FTL part is generated by LLVM, and we generate arity check as a separate code, but now both are generated by JSC's
JIT compiler. So we do not need to separate them.

* Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:
* Source/JavaScriptCore/b3/air/AirDisassembler.cpp:
(JSC::B3::Air::Disassembler::dump):
* Source/JavaScriptCore/ftl/FTLCompile.cpp:
(JSC::FTL::compile):
* Source/JavaScriptCore/ftl/FTLGeneratedFunction.h: Removed.
* Source/JavaScriptCore/ftl/FTLJITCode.cpp:
(JSC::FTL::JITCode::~JITCode):
(JSC::FTL::JITCode::initializeAddressForArityCheck):
(JSC::FTL::JITCode::addressForCall):
(JSC::FTL::JITCode::initializeArityCheckEntrypoint): Deleted.
* Source/JavaScriptCore/ftl/FTLJITCode.h:
* Source/JavaScriptCore/ftl/FTLJITFinalizer.h:
* Source/JavaScriptCore/ftl/FTLLink.cpp:
(JSC::FTL::link):
* Source/JavaScriptCore/ftl/FTLState.h:

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

455fa32

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

@Constellation Constellation requested a review from a team as a code owner March 8, 2024 08:56
@Constellation Constellation self-assigned this Mar 8, 2024
@Constellation Constellation added the JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues. label Mar 8, 2024
@Constellation Constellation force-pushed the eng/JSC-Combine-FTL-code-generation-into-one branch from 56e6cef to 65b5530 Compare March 8, 2024 08:56
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Mar 8, 2024
@Constellation Constellation removed the merging-blocked Applied to prevent a change from being merged label Mar 8, 2024
@Constellation Constellation force-pushed the eng/JSC-Combine-FTL-code-generation-into-one branch from 65b5530 to 455fa32 Compare March 8, 2024 18:29
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 9, 2024
https://bugs.webkit.org/show_bug.cgi?id=270684
rdar://124259821

Reviewed by Justin Michaud.

This patch simplifies FTL code generation. Previously we were always generating two codes, one for normal code and one for arity check etc.
But just generating both into one is easy and simple. This patch cleans up around it and use of LinkBuffer / AssemblerData etc. gets simplified.
Originally we were doing so since FTL part is generated by LLVM, and we generate arity check as a separate code, but now both are generated by JSC's
JIT compiler. So we do not need to separate them.

* Source/JavaScriptCore/JavaScriptCore.xcodeproj/project.pbxproj:
* Source/JavaScriptCore/b3/air/AirDisassembler.cpp:
(JSC::B3::Air::Disassembler::dump):
* Source/JavaScriptCore/ftl/FTLCompile.cpp:
(JSC::FTL::compile):
* Source/JavaScriptCore/ftl/FTLGeneratedFunction.h: Removed.
* Source/JavaScriptCore/ftl/FTLJITCode.cpp:
(JSC::FTL::JITCode::~JITCode):
(JSC::FTL::JITCode::initializeAddressForArityCheck):
(JSC::FTL::JITCode::addressForCall):
(JSC::FTL::JITCode::initializeArityCheckEntrypoint): Deleted.
* Source/JavaScriptCore/ftl/FTLJITCode.h:
* Source/JavaScriptCore/ftl/FTLJITFinalizer.h:
* Source/JavaScriptCore/ftl/FTLLink.cpp:
(JSC::FTL::link):
* Source/JavaScriptCore/ftl/FTLState.h:

Canonical link: https://commits.webkit.org/275868@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/JSC-Combine-FTL-code-generation-into-one branch from 455fa32 to 3feec6a Compare March 9, 2024 03:00
@webkit-commit-queue
Copy link
Collaborator

Committed 275868@main (3feec6a): https://commits.webkit.org/275868@main

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

@webkit-commit-queue webkit-commit-queue merged commit 3feec6a into WebKit:main Mar 9, 2024
@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 9, 2024
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
5 participants