RFR: 8306950: [REDO] JDK-8305252 make_method_handle_intrinsic may call java code under a lock [v6]
Coleen Phillimore
coleenp at openjdk.org
Fri Apr 28 13:35:00 UTC 2023
On Fri, 28 Apr 2023 12:44:17 GMT, David Holmes <dholmes at openjdk.org> wrote:
>> By that logic, all loops should be while (true) with a break in the middle for the condition?
>
> As you know we spent some time trying to express this loop correctly and using the "obvious" loop conditions did not work because we had to re-check the condition after the loop to figure out whether we needed to return or not. The `while(true)` captured the fact there there was no simple/obvious loop termination condition here and that you need to check the loop body to see exactly what conditions exit the loop and in what way. Picking one of those conditions gives a false impression about the operation of the loop IMO and doesn't aid in understandability. YMMV.
It was a lot of work to reason about this loop. I changed it back.
-------------
PR Review Comment: https://git.openjdk.org/jdk/pull/13681#discussion_r1180400564
More information about the hotspot-runtime-dev
mailing list