On Tue, 25 Mar 2025 22:19:39 GMT, Doug Simon <dnsi...@openjdk.org> wrote:
>> src/hotspot/share/opto/output.cpp line 39: >> >>> 37: #include "opto/block.hpp" >>> 38: #include "opto/c2_MacroAssembler.hpp" >>> 39: #include "opto/c2compiler.hpp" >> >> Hmm. >> >> #include "opto/c2_MacroAssembler.hpp" >> #include "opto/c2compiler.hpp" >> >> Here _ comes before lower-case letters. From other places I see that _ comes >> after upper-case letters. I realize that this is caused by the ASCII value, >> but it is a bit unfortunate (IMHO). OTOH, maybe this will be consistent (the >> way I would like it, at least) if the sorting was done on lower-cased >> strings. > > I think it's simplest to follow ASCII sorting but don't have a strong opinion > if others would prefer for strings to be lower-cased before sorting. The > important thing is that the same order is used everywhere. I register my vote for using lower-casing the strings before sorting. Note that lower-casing before sorting retain the current prevailing sort-order of sorting `_` before the letters. This is also what you get if you use java's `String.CASE_INSENSITIVE_ORDER` (but not if you use `sort -f`, which upper-cases the strings). ------------- PR Review Comment: https://git.openjdk.org/jdk/pull/24180#discussion_r2013575848