gh-105481: refactor instr flag related code into a new InstructionFlags class#105950
gh-105481: refactor instr flag related code into a new InstructionFlags class#105950iritkatriel merged 5 commits into
Conversation
gvanrossum
left a comment
There was a problem hiding this comment.
I like refactoring this, but I'd like to go a little beyond just packaging up the old code in a class.
Sorry, something went wrong.
gvanrossum
left a comment
There was a problem hiding this comment.
LGTM!
Sorry, something went wrong.
|
It's doing this now that I removed the hash and eq: |
Sorry, something went wrong.
Oh dang. Dataclasses don't generate a hash by default. You can either put the |
Sorry, something went wrong.
gvanrossum
left a comment
There was a problem hiding this comment.
That works too!
Sorry, something went wrong.
|
I changed it to not hash the data class object but the bitmap representation. It's just for an assertion that all the flags of a pseudo-op's targets are the same. |
Sorry, something went wrong.
This will help later when we want to use the flags for things like generating hasarg, etc.