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

Rewrite std::bitv using classes #2341

Closed
catamorphism opened this issue May 3, 2012 · 3 comments
Closed

Rewrite std::bitv using classes #2341

catamorphism opened this issue May 3, 2012 · 3 comments
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one.

Comments

@catamorphism
Copy link
Contributor

A very old -- but still accurate -- FIXME in std::bitv suggests rewriting the module to use recursive object types -- aka "classes". Now that we have classes, it's possible to do this.

I'd enjoy working on this, but if someone else wants to try out classes, that would be cool too.

@catamorphism
Copy link
Contributor Author

I've implemented this, but am still debugging it

@Dretch
Copy link
Contributor

Dretch commented Jul 21, 2012

I've implemented this, but am still debugging it

Are you by any chance getting Invalid read/write errors during the test suite?

I have added some code to std::bitv for #2964 and I am now getting such errors, and also some assertion failures during the tests I have added. Curiously enough the code/tests I have added seem to work correctly outside of the std::bitv module - so I think something weird is happening here.

@catamorphism
Copy link
Contributor Author

@Dretch No -- I'm getting wrong results. It's not too surprising that you could get different behavior inside and outside the bitv module, as the compiler does some things differently for inside-the-crate vs. outside-the-crate things (though if it changes observable behavior, that's a bug).

@catamorphism catamorphism removed their assignment Jun 16, 2014
bors added a commit to rust-lang-ci/rust that referenced this issue Sep 22, 2022
rustup; ptr atomics

Adds support for the operations added in rust-lang#96935.
I made the pointer-binops always return the provenance of the *left* argument; `@thomcc` I hope that is what you intended. I have honestly no idea if it has anything to do with what LLVM does...

I also simplified our pointer comparison code while I was at it -- now that *all* comparison operators support wide pointers, we can unify those branches.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
C-enhancement Category: An issue proposing an enhancement or a PR with one.
Projects
None yet
Development

No branches or pull requests

2 participants