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

extract the save area #75

Merged
merged 7 commits into from
Jan 14, 2025
Merged

extract the save area #75

merged 7 commits into from
Jan 14, 2025

Conversation

folkertdev
Copy link
Collaborator

and give a bunch of fields a smaller type. Can be reviewed commit-by-commit.

This PR brings a minor reduction in instructions, and no other performance changes.

@folkertdev folkertdev requested a review from bjorn3 January 13, 2025 15:35
Copy link

codecov bot commented Jan 13, 2025

Codecov Report

Attention: Patch coverage is 98.94737% with 1 line in your changes missing coverage. Please review.

Files with missing lines Patch % Lines
libbz2-rs-sys/src/bzlib.rs 94.11% 1 Missing ⚠️
Files with missing lines Coverage Δ
bzip2.rs 83.50% <100.00%> (-0.07%) ⬇️
libbz2-rs-sys/src/decompress.rs 93.79% <100.00%> (-0.35%) ⬇️
libbz2-rs-sys/src/huffman.rs 96.81% <100.00%> (-0.06%) ⬇️
libbz2-rs-sys/src/bzlib.rs 92.62% <94.11%> (ø)

@@ -579,7 +579,6 @@ pub(crate) struct SaveArea {
pub es: i32,
pub N: i32,
pub curr: i32,
pub zt: i32,
Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

👍 also unused in the original C code.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

yeah, I'm really not sure what is happening there.

Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

as in, why would they leave that field around if it's unused

Copy link
Collaborator

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

My guess would be that it was used in the past and the compiler didn't give a warning when it became unused due to the store/restore dance.

@folkertdev folkertdev merged commit 7802792 into main Jan 14, 2025
21 checks passed
@folkertdev folkertdev deleted the save-area branch January 14, 2025 08:42
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