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] Expand InByVal ICs to cover integer indices as well #17704

Conversation

Constellation
Copy link
Member

@Constellation Constellation commented Sep 12, 2023

17e3401

[JSC] Expand InByVal ICs to cover integer indices as well
https://bugs.webkit.org/show_bug.cgi?id=226619
rdar://79172384

Reviewed by Keith Miller.

Inline Cache for InByVal should cover indexed accesses too so that we can handle multiple indexed-shaped arrays efficiently at one InByVal site.

* Source/JavaScriptCore/bytecode/AccessCase.cpp:
(JSC::AccessCase::create):
(JSC::AccessCase::guardedByStructureCheckSkippingConstantIdentifierCheck const):
(JSC::AccessCase::requiresIdentifierNameMatch const):
(JSC::AccessCase::requiresInt32PropertyCheck const):
(JSC::AccessCase::forEachDependentCell const):
(JSC::AccessCase::doesCalls const):
(JSC::AccessCase::canReplace const):
(JSC::AccessCase::runWithDowncast):
(JSC::AccessCase::canBeShared):
(JSC::AccessCase::needsScratchFPR const): Deleted.
* Source/JavaScriptCore/bytecode/AccessCase.h:
* Source/JavaScriptCore/bytecode/InByStatus.cpp:
(JSC::InByStatus::computeForStubInfoWithoutExitSiteFeedback):
* Source/JavaScriptCore/bytecode/InlineCacheCompiler.cpp:
(JSC::toTypedArrayType):
(JSC::forResizableTypedArray):
(JSC::needsScratchFPR):
(JSC::forInBy):
(JSC::InlineCacheCompiler::generateWithGuard):
(JSC::InlineCacheCompiler::generateImpl):
(JSC::InlineCacheCompiler::regenerate):
* Source/JavaScriptCore/bytecode/Repatch.cpp:
(JSC::tryCacheArrayInByVal):
(JSC::repatchArrayInByVal):
* Source/JavaScriptCore/bytecode/Repatch.h:
* Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* Source/JavaScriptCore/jit/JITOperations.cpp:
(JSC::JSC_DEFINE_JIT_OPERATION):
* Source/JavaScriptCore/runtime/CommonSlowPaths.h:
(JSC::CommonSlowPaths::opInByVal):

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

58b65d8

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

@Constellation Constellation self-assigned this Sep 12, 2023
@Constellation Constellation added the JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues. label Sep 12, 2023
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Sep 12, 2023
@Constellation Constellation removed the merging-blocked Applied to prevent a change from being merged label Sep 12, 2023
@Constellation Constellation force-pushed the eng/JSC-Expand-InByVal-ICs-to-cover-integer-indices-as-well branch from db0eeff to 37258e1 Compare September 12, 2023 20:48
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Sep 12, 2023
@Constellation Constellation removed the merging-blocked Applied to prevent a change from being merged label Sep 12, 2023
@Constellation Constellation force-pushed the eng/JSC-Expand-InByVal-ICs-to-cover-integer-indices-as-well branch from 37258e1 to dc3771b Compare September 12, 2023 21:58
@Constellation Constellation marked this pull request as ready for review September 12, 2023 22:48
@Constellation Constellation requested a review from a team as a code owner September 12, 2023 22:48
@Constellation Constellation force-pushed the eng/JSC-Expand-InByVal-ICs-to-cover-integer-indices-as-well branch from dc3771b to 69cad80 Compare September 13, 2023 00:36
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Sep 13, 2023
@Constellation Constellation removed the merging-blocked Applied to prevent a change from being merged label Sep 13, 2023
@Constellation Constellation force-pushed the eng/JSC-Expand-InByVal-ICs-to-cover-integer-indices-as-well branch from 69cad80 to 4c3a468 Compare September 13, 2023 00:49
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Sep 13, 2023
@Constellation Constellation removed the merging-blocked Applied to prevent a change from being merged label Sep 13, 2023
@Constellation Constellation force-pushed the eng/JSC-Expand-InByVal-ICs-to-cover-integer-indices-as-well branch from 4c3a468 to 1d9c5c1 Compare September 13, 2023 04:13
@webkit-ews-buildbot webkit-ews-buildbot added the merging-blocked Applied to prevent a change from being merged label Sep 13, 2023
@Constellation Constellation removed the merging-blocked Applied to prevent a change from being merged label Sep 13, 2023
@Constellation Constellation force-pushed the eng/JSC-Expand-InByVal-ICs-to-cover-integer-indices-as-well branch from 1d9c5c1 to 58b65d8 Compare September 13, 2023 23:12
Copy link
Contributor

@kmiller68 kmiller68 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 Sep 14, 2023
https://bugs.webkit.org/show_bug.cgi?id=226619
rdar://79172384

Reviewed by Keith Miller.

Inline Cache for InByVal should cover indexed accesses too so that we can handle multiple indexed-shaped arrays efficiently at one InByVal site.

* Source/JavaScriptCore/bytecode/AccessCase.cpp:
(JSC::AccessCase::create):
(JSC::AccessCase::guardedByStructureCheckSkippingConstantIdentifierCheck const):
(JSC::AccessCase::requiresIdentifierNameMatch const):
(JSC::AccessCase::requiresInt32PropertyCheck const):
(JSC::AccessCase::forEachDependentCell const):
(JSC::AccessCase::doesCalls const):
(JSC::AccessCase::canReplace const):
(JSC::AccessCase::runWithDowncast):
(JSC::AccessCase::canBeShared):
(JSC::AccessCase::needsScratchFPR const): Deleted.
* Source/JavaScriptCore/bytecode/AccessCase.h:
* Source/JavaScriptCore/bytecode/InByStatus.cpp:
(JSC::InByStatus::computeForStubInfoWithoutExitSiteFeedback):
* Source/JavaScriptCore/bytecode/InlineCacheCompiler.cpp:
(JSC::toTypedArrayType):
(JSC::forResizableTypedArray):
(JSC::needsScratchFPR):
(JSC::forInBy):
(JSC::InlineCacheCompiler::generateWithGuard):
(JSC::InlineCacheCompiler::generateImpl):
(JSC::InlineCacheCompiler::regenerate):
* Source/JavaScriptCore/bytecode/Repatch.cpp:
(JSC::tryCacheArrayInByVal):
(JSC::repatchArrayInByVal):
* Source/JavaScriptCore/bytecode/Repatch.h:
* Source/JavaScriptCore/dfg/DFGSpeculativeJIT64.cpp:
(JSC::DFG::SpeculativeJIT::compile):
* Source/JavaScriptCore/jit/JITOperations.cpp:
(JSC::JSC_DEFINE_JIT_OPERATION):
* Source/JavaScriptCore/runtime/CommonSlowPaths.h:
(JSC::CommonSlowPaths::opInByVal):

Canonical link: https://commits.webkit.org/267991@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/JSC-Expand-InByVal-ICs-to-cover-integer-indices-as-well branch from 58b65d8 to 17e3401 Compare September 14, 2023 16:29
@webkit-commit-queue
Copy link
Collaborator

Committed 267991@main (17e3401): https://commits.webkit.org/267991@main

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

@webkit-commit-queue webkit-commit-queue merged commit 17e3401 into WebKit:main Sep 14, 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 Sep 14, 2023
@Constellation Constellation deleted the eng/JSC-Expand-InByVal-ICs-to-cover-integer-indices-as-well branch September 14, 2023 16:32
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