Closed C0D3-M4513R closed 2 months ago
I think this PR is fundamentally flawed because you're trying to use a FieldType
out of convenience (i.e it represents approximately the things you care about) rather than out of correctness. If you need to have a more strongly typed operand here for the opcodes, I'd suggest creating a new type to represent that more exactly. Let me know if you disagree!
I think this is entirely justified. See the bytecode in #41. You have some types there that entirely match the FieldType.
I think this is entirely justified.
Are you referring to your PR, or my response?
See the bytecode in #41. You have some types there that entirely match the FieldType.
But would those types (in the case where they are valid) be used for these opcodes? And even if there is some overlap, I wouldn't want to use the type unless it is semantically equivalent, which it doesn't seem like it is. In my experience reusing code for syntactic/structural reasons usually ends up getting a mistake. I'm happy to explain more in detail if you'd like what I mean by that.
I implemented this to my satisfaction in https://github.com/staktrace/cafebabe/pull/49.
I wanted to include a more exhaustive test, but that was prevented by #41