RFR: 8276563: Undefined Behaviour in class Assembler
Andrew Haley
aph at openjdk.java.net
Tue Nov 9 11:51:33 UTC 2021
On Tue, 9 Nov 2021 06:00:43 GMT, Thomas Stuefe <stuefe at openjdk.org> wrote:
> I know this is probably not what you want, but I just mention it: how about making Register a plain type (e.g. int)? We could replace calls to `r->encoding` and `r->value()` with just `r`. Then, to add functionality and to group it nicely, make todays Register subclasses utility wrappers which wrap around such an Register. You'd have to create those things on the fly when you need them, but at least the compiler would optimze them away.
>
> I know that would mean a ton of changes. But it would be exactly what you want to express, would not be UB, would be portable and easy to understand.
Oh totally, but it's a pretty extreme case of spec inflation. My goal right now is to make the UB go away without causing extra work for anyone else. And I have some other ideas that would improve efficiency, probably more beneficial than this, I want to get on with. (I hope - more later.)
-------------
PR: https://git.openjdk.java.net/jdk/pull/6280
More information about the hotspot-compiler-dev
mailing list