Skip to content

Fix bitslice printing. #52294

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

Closed

Conversation

nnethercote
Copy link
Contributor

In multiple ways:

  • Two calls to bits_to_string() passed in byte lengths rather than bit
    lengths, which meant only 1/8th of the BitSlice was printed.

  • bit_str's purpose is entirely mysterious. I removed it and changed
    its callers to print the indices in the obvious way.

  • bits_to_string's inner loop was totally wrong, such that it printed
    entirely bogus results.

  • bits_to_string now also adds a '|' between words, which makes the
    output easier to read, e.g.:
    [ff-ff-ff-ff-ff-ff-ff-ff|ff-ff-ff-ff-ff-ff-ff-07].

In multiple ways:

- Two calls to `bits_to_string()` passed in byte lengths rather than bit
  lengths, which meant only 1/8th of the `BitSlice` was printed.

- `bit_str`'s purpose is entirely mysterious. I removed it and changed
  its callers to print the indices in the obvious way.

- `bits_to_string`'s inner loop was totally wrong, such that it printed
  entirely bogus results.

- `bits_to_string` now also adds a '|' between words, which makes the
  output easier to read, e.g.:
  `[ff-ff-ff-ff-ff-ff-ff-ff|ff-ff-ff-ff-ff-ff-ff-07]`.
@rust-highfive
Copy link
Contributor

r? @eddyb

(rust_highfive has picked a reviewer for you, use r? to override)

@rust-highfive rust-highfive added the S-waiting-on-review Status: Awaiting review from the assignee but also interested parties. label Jul 12, 2018
@nnethercote
Copy link
Contributor Author

I ended up folding this in with some other changes in #52335.

@nnethercote nnethercote deleted the fix-bitslice-printing branch July 13, 2018 05:43
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
S-waiting-on-review Status: Awaiting review from the assignee but also interested parties.
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants