<div dir="ltr"><div dir="ltr">On Thu, Mar 2, 2023 at 5:32 PM Archie Cobbs <<a href="mailto:archie.cobbs@gmail.com">archie.cobbs@gmail.com</a>> wrote:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div dir="ltr">On Tue, Feb 28, 2023 at 9:30 AM Archie Cobbs <<a href="mailto:archie.cobbs@gmail.com" target="_blank">archie.cobbs@gmail.com</a>> wrote:</div><div class="gmail_quote"><blockquote class="gmail_quote" style="margin:0px 0px 0px 0.8ex;border-left:1px solid rgb(204,204,204);padding-left:1ex"><div dir="ltr"><div>Jon and I have been discussing <a href="https://bugs.openjdk.org/browse/JDK-8268622" target="_blank">JDK-8268622</a> via JBS comments, but it's better off being discussed on compiler-dev, so we're moving the discussion here...<br></div></div></blockquote><div><br></div><div>Jon (and anyone else interested),</div><div><br></div><div>Please take a look at <a href="https://github.com/openjdk/jdk/pull/12843" target="_blank">https://github.com/openjdk/jdk/pull/12843</a> and let me know what you think.</div></div></div></blockquote><div><br></div><div>Also here's a "sketch" of a refactoring along the lines of <a href="https://bugs.openjdk.org/browse/JDK-8269957">JDK-8269957</a> "facilitate alternate impls of NameTable and Name".</div><div><div><br></div><div>    <a href="https://github.com/openjdk/jdk/compare/master...archiecobbs:jdk:JDK-8269957">https://github.com/openjdk/jdk/compare/master...archiecobbs:jdk:JDK-8269957</a></div><div><br></div></div><div>Let me know if this is the kind of thing you had in mind. Note, this includes the above patch as well.<br></div><br><div>Overview of changes...</div><div><ul><li>Remove any byte-oriented methods from Name and NameTable API's, except for those that "import" or "export" as UTF-8.</li><li>Refactor SharedNameTable & UnsharedNameTable to have a new common superclass Utf8NameTable</li><li>Fix bug in PoolReader, in that it was not doing any validation when decoding "Modified UTF-8". For example, this bug could result in duplicate Names if a classfile contained the same name encoded two different ways.</li><li>Eliminated an unnecessary extra array allocation in Convert.utf2chars()</li><li>Rename Name.lastIndexOf() -> Name.lastIndexOfAscii() for safety</li></ul></div><div>-Archie<br></div></div><br>-- <br><div dir="ltr" class="gmail_signature">Archie L. Cobbs<br></div></div>