RFR: 8343800: Cleanup definition of NULL_WORD

David Holmes dholmes at openjdk.org
Mon Dec 2 09:08:38 UTC 2024


On Sun, 1 Dec 2024 07:54:49 GMT, Kim Barrett <kbarrett at openjdk.org> wrote:

> Please review this change to how NULL_WORD is defined.  Instead of being a
> macro whose definition is in compiler-specific files with a conditionally
> defined expansion, it is now a simple integral constant with a single shared
> definition.
> 
> Testing: mach5 tier 1-5, GHA sanity tests.

As long as all compilers are happy with this then it is nice to see it simplified. What was the obstacle to doing this sooner?

src/hotspot/share/utilities/globalDefinitions.hpp line 563:

> 561: const jfloat max_jfloat = jfloat_cast(max_jintFloat);
> 562: 
> 563: // A named constant for the integral representation of a Java null.

Some commentary on when/where/why to use this would be good. I see it being used in a lot of places related to oops (exceptions, VMResult) but other uses are not obviously (to me) Java object related.

-------------

PR Review: https://git.openjdk.org/jdk/pull/22468#pullrequestreview-2472119703
PR Review Comment: https://git.openjdk.org/jdk/pull/22468#discussion_r1865475723


More information about the hotspot-dev mailing list