RFR: JDK-8199781: Don't use naked == for comparing oops

Andrew Dinn adinn at redhat.com
Thu Mar 29 09:39:04 UTC 2018

On 29/03/18 10:14, Roman Kennke wrote:
> > http://cr.openjdk.java.net/~eosterlund/8199781/webrev.02/src/hotspot/share/oops/accessBackend.new.hpp.html
. . .
> Also, it would be nice to get ok from John and Andrew. :-)
Wrong Andrew here, I am afraid. However, I am butting in just to place
on record that this /one file/ is quite probably the most unmaintainable
piece of code I have ever been witness to in 35 years of professional
software development (and, yes, that includes the Interlisp-D machine's
reference counting GC which had invisible microcode support (Pope's
'butterfly on a wheel' [1] springs to mind :-).

Although I am very glad to hear (and even more glad to take it on
assurance ;-) that the compiler understands enough to inline it all
away, my real concern is whether anyone else will still understand it in
6 months or 1 year if (when?) a bug manifests. Especially if bug is
caused by misguided and/or unexpected usage in the JIT or (more likely)
JVM runtime code.

Anyway, that's enough of my contrarian, old man griping. You young uns
can just carry on with whatever it is you are doing :-)

[1] https://en.wikipedia.org/wiki/Who_breaks_a_butterfly_upon_a_wheel%3F

Andrew Dinn
Senior Principal Software Engineer
Red Hat UK Ltd
Registered in England and Wales under Company Registration No. 03798903
Directors: Michael Cunningham, Michael ("Mike") O'Neill, Eric Shander

More information about the hotspot-runtime-dev mailing list