On Tue, 29 Apr 2025 13:07:35 GMT, Nikita Gubarkov <ngubar...@openjdk.org> wrote:
> J2dTrace macros have multiple overloads specifying number of arguments, > making it less convent to change number of arguments. There were cases when > existing macros were not enough and people had to add new variants with even > more arguments. We could simply use variadic macros instead. > > Also, currently those macros expand to a { code block }, which doesn't > require a semicolon at the end, so it can sometimes be missed, leading to an > inconsistent code style. We could expand it directly to the function, forcing > user to insert a semicolon after that, in a function-like style. This pull request has now been integrated. Changeset: 251f2ac7 Author: Nikita Gubarkov <ngubar...@openjdk.org> Committer: Alexey Ushakov <a...@openjdk.org> URL: https://git.openjdk.org/jdk/commit/251f2ac785708a7ebf713d3fdc7d66317f1b2c2e Stats: 1148 lines in 64 files changed: 65 ins; 104 del; 979 mod 8355904: Use variadic macros for J2dTrace Reviewed-by: aivanov, serb, prr, avu ------------- PR: https://git.openjdk.org/jdk/pull/24949