fitzgen labeled issue #3685:
We've talked a bit
- about leveraging types better during lowering to make it easier to statically catch bugs (and help verification efforts) and
- differentiating between plain ol' moves and register-class-converting moves.
I think adding newtype wrappers around
Reg
for general purpose registers vs XMM registers, etc... would help both these things a lot. Basically every register class should have its own newtype wrapper.I'm spending too much time debugging dynamic errors where I'm accidentally implicitly moving between register classes (either via mov mitosis or otherwise) and it would be way easier to fix this kind of thing if it was a compile time type error that specified exactly where in the sources I'm doing the wrong thing.
fitzgen opened issue #3685:
We've talked a bit
- about leveraging types better during lowering to make it easier to statically catch bugs (and help verification efforts) and
- differentiating between plain ol' moves and register-class-converting moves.
I think adding newtype wrappers around
Reg
for general purpose registers vs XMM registers, etc... would help both these things a lot. Basically every register class should have its own newtype wrapper.I'm spending too much time debugging dynamic errors where I'm accidentally implicitly moving between register classes (either via mov mitosis or otherwise) and it would be way easier to fix this kind of thing if it was a compile time type error that specified exactly where in the sources I'm doing the wrong thing.
alexcrichton commented on issue #3685:
I believe this was implemented in #3752, so closing.
alexcrichton closed issue #3685:
We've talked a bit
- about leveraging types better during lowering to make it easier to statically catch bugs (and help verification efforts) and
- differentiating between plain ol' moves and register-class-converting moves.
I think adding newtype wrappers around
Reg
for general purpose registers vs XMM registers, etc... would help both these things a lot. Basically every register class should have its own newtype wrapper.I'm spending too much time debugging dynamic errors where I'm accidentally implicitly moving between register classes (either via mov mitosis or otherwise) and it would be way easier to fix this kind of thing if it was a compile time type error that specified exactly where in the sources I'm doing the wrong thing.
fitzgen commented on issue #3685:
This isn't complete yet, #3752 was just the first half. I'll have a PR up for the other half sometime soon ish.
fitzgen reopened issue #3685:
We've talked a bit
- about leveraging types better during lowering to make it easier to statically catch bugs (and help verification efforts) and
- differentiating between plain ol' moves and register-class-converting moves.
I think adding newtype wrappers around
Reg
for general purpose registers vs XMM registers, etc... would help both these things a lot. Basically every register class should have its own newtype wrapper.I'm spending too much time debugging dynamic errors where I'm accidentally implicitly moving between register classes (either via mov mitosis or otherwise) and it would be way easier to fix this kind of thing if it was a compile time type error that specified exactly where in the sources I'm doing the wrong thing.
fitzgen closed issue #3685:
We've talked a bit
- about leveraging types better during lowering to make it easier to statically catch bugs (and help verification efforts) and
- differentiating between plain ol' moves and register-class-converting moves.
I think adding newtype wrappers around
Reg
for general purpose registers vs XMM registers, etc... would help both these things a lot. Basically every register class should have its own newtype wrapper.I'm spending too much time debugging dynamic errors where I'm accidentally implicitly moving between register classes (either via mov mitosis or otherwise) and it would be way easier to fix this kind of thing if it was a compile time type error that specified exactly where in the sources I'm doing the wrong thing.
Last updated: Dec 23 2024 at 13:07 UTC