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

Change row and column numbers to be reported with NonZeroU64. #551

Merged
merged 1 commit into from
Feb 15, 2021

Conversation

khuey
Copy link
Contributor

@khuey khuey commented Feb 14, 2021

This allows for more compact representation of their values (the return values of line() and column() should both be representable in a single u64 now) and makes it clear to users that Some(0) and ColumnType::Column(0) are never returned.

This allows for more compact representation of their values (the return values of line() and column() should both be representable in a single u64 now) and makes it clear to users that Some(0) and ColumnType::Column(0) are never returned.
Copy link
Collaborator

@philipc philipc left a comment

Choose a reason for hiding this comment

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

Thanks!

@philipc philipc merged commit 5bc1f4b into gimli-rs:master Feb 15, 2021
@philipc
Copy link
Collaborator

philipc commented Feb 15, 2021

If we're doing breaking changes here and size is a concern, then maybe we should change to NonZeroU32 while we're at it? From memory, I don't think llvm or gcc use more than u32 when emitting these. addr2line already does this conversion.

@khuey
Copy link
Contributor Author

khuey commented Feb 15, 2021

I cared more about the representable but unused Some(0) case than the size. That's just a bonus.

Also registers for most people will be 64 bits these days so dropping to a u32 doesn't really save anything.

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.

None yet

2 participants