WebKit Bugzilla
New
Browse
Log In
×
Sign in with GitHub
or
Remember my login
Create Account
·
Forgot Password
Forgotten password account recovery
RESOLVED FIXED
289114
[JSC] emitEncodeStructureID should be a no-op when the structureIDMask is -1
https://bugs.webkit.org/show_bug.cgi?id=289114
Summary
[JSC] emitEncodeStructureID should be a no-op when the structureIDMask is -1
David Degazio
Reported
2025-03-04 13:59:22 PST
Currently in AssemblyHelpers::emitEncodeStructureID, we generate a 64-bit AND to mask the structure ID to the significant bits. However, this mask is currently just 32-bit -1, which under the current macro assembler semantics ends up just getting sign-extended, meaning we do a 64-bit AND with a 64-bit -1 which is a no-op. This is fine, since the structure ID is a 32-bit quantity anyway, and we don't use the full 64-bit register after encoding anywhere in the codebase I can find - effectively, since we're using the lower 32-bit half of the register, we are getting the masking for free. But since that's the case, we should elide this AND since it's not doing anything useful.
Attachments
Add attachment
proposed patch, testcase, etc.
Radar WebKit Bug Importer
Comment 1
2025-03-04 13:59:30 PST
<
rdar://problem/146142200
>
David Degazio
Comment 2
2025-03-04 14:17:11 PST
Pull request:
https://github.com/WebKit/WebKit/pull/41876
EWS
Comment 3
2025-03-06 10:39:47 PST
Committed
291713@main
(b6667ac3e18f): <
https://commits.webkit.org/291713@main
> Reviewed commits have been landed. Closing PR #41876 and removing active labels.
Note
You need to
log in
before you can comment on or make changes to this bug.
Top of Page
Format For Printing
XML
Clone This Bug