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

Simplify strict.pm #22848

Open
wants to merge 4 commits into
base: blead
Choose a base branch
from
Open

Simplify strict.pm #22848

wants to merge 4 commits into from

Conversation

ap
Copy link
Contributor

@ap ap commented Dec 8, 2024

strict.pm is slightly confusing to follow. Restructuring it to make it more legible makes it more apparent that there are some optimizations to be had, which make it no harder to understand, so I’ve taken that opportunity as well.

  • This set of changes does not require a perldelta entry.

ap added 4 commits December 8, 2024 02:04
This avoids the weird action at a distance where bits() modifies $^H
itself but then also returns a value to be NANDed or ORed with it.

Inlining the bits() logic in this way also turns up an optimization
opportunity which the next commit will exploit.
@jkeenan
Copy link
Contributor

jkeenan commented Dec 10, 2024

Needs a version bump in lib/strict.pm.

@ap
Copy link
Contributor Author

ap commented Dec 12, 2024

@jkeenan Yes, but that’s the least of the problems. Turns out strict::bits() does get used as API so I have to redo the whole thing a bit differently.

@ap
Copy link
Contributor Author

ap commented Dec 12, 2024

(OTOH this has unearthed the fact that some of the use of strict::bits() as API predates and contradicts some of the changes made to it over time – and cleaning that up will be a good thing.)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants