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] Avoid costly length etc. access for new TypedArray(array) case #15860

Conversation

Constellation
Copy link
Member

@Constellation Constellation commented Jul 15, 2023

@Constellation Constellation requested a review from a team as a code owner July 15, 2023 06:45
@Constellation Constellation self-assigned this Jul 15, 2023
@Constellation Constellation added the JavaScriptCore For bugs in JavaScriptCore, the JS engine used by WebKit, other than kxmlcore issues. label Jul 15, 2023
@Constellation Constellation force-pushed the eng/JSC-Avoid-costly-length-etc--access-for-new-TypedArrayarray-case branch from 2e1c88b to f8779ab Compare July 15, 2023 06:47
Copy link
Member

@rkirsling rkirsling 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 Jul 15, 2023
https://bugs.webkit.org/show_bug.cgi?id=259240
rdar://problem/112310821

Reviewed by Ross Kirsling.

Let's use the fast path and array iterator protocol status to skip "length" and Symbol.iterator access
for `new TypedArray(array)` case.

* Source/JavaScriptCore/runtime/JSGenericTypedArrayViewConstructorInlines.h:
(JSC::constructGenericTypedArrayViewWithArguments):

Canonical link: https://commits.webkit.org/266082@main
@webkit-commit-queue webkit-commit-queue force-pushed the eng/JSC-Avoid-costly-length-etc--access-for-new-TypedArrayarray-case branch from f8779ab to e8629ce Compare July 15, 2023 09:24
@webkit-commit-queue
Copy link
Collaborator

Committed 266082@main (e8629ce): https://commits.webkit.org/266082@main

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

@webkit-commit-queue webkit-commit-queue merged commit e8629ce into WebKit:main Jul 15, 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 Jul 15, 2023
@Constellation Constellation deleted the eng/JSC-Avoid-costly-length-etc--access-for-new-TypedArrayarray-case branch July 15, 2023 10:26
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