[OpenJDK 2D-Dev] RFR: 8253795: Implementation of JEP 391: macOS/AArch64 Port [v21]

Anton Kozlov akozlov at openjdk.java.net
Mon Mar 15 18:56:17 UTC 2021

On Wed, 10 Mar 2021 11:21:44 GMT, Andrew Haley <aph at openjdk.org> wrote:

>> We always check for `R18_RESERVED` with `#if(n)def`, is there any reason to define the value for the macro?
> Robustness, clarity, maintainability, convention. Why not?

I've tried to implement the suggestion, but it pulled more unnecessary changes. It makes the intended way to check the condition less clear (`#ifdef` and not `#if`). The rest of the defines in this file follows the pattern: a define without a value to be checked with `#ifdef` and define with a value to be checked with `#if`. To be consistent, I would need to add `#define R18_RESERVED false` to the `#else` clause and change every `#ifdef R18_RESERVED`/`#ifndef R18_RESERVED` to `#if R18_RESERVED`/`#if !R18_RESERVED`. I think we'll win in clarity in the long term if I will not implement the suggestion without related changes. (And related changes would introduce additional noise, which we are fighting with).


PR: https://git.openjdk.java.net/jdk/pull/2200

More information about the 2d-dev mailing list