RFR: 8294982: Implementation of Classfile API [v20]
Adam Sotona
asotona at openjdk.org
Tue Feb 28 16:20:06 UTC 2023
On Thu, 16 Feb 2023 14:41:16 GMT, Maurizio Cimadamore <mcimadamore at openjdk.org> wrote:
>> Adam Sotona has updated the pull request incrementally with one additional commit since the last revision:
>>
>> added 4-byte Unicode text to Utf8EntryTest
>
> src/java.base/share/classes/jdk/internal/classfile/impl/ConcreteEntry.java line 58:
>
>> 56: import jdk.internal.classfile.jdktypes.PackageDesc;
>> 57:
>> 58: public abstract sealed class ConcreteEntry {
>
> Why the name `concrete` ? Am I missing something (e.g. existence of "non-concrete" pool entries?)
XyzEntryImpl naming convention would be better, I'll adjust it.
> src/java.base/share/classes/jdk/internal/classfile/impl/DirectCodeBuilder.java line 658:
>
>> 656: mruParent = parent;
>> 657: mruParentTable = table;
>> 658: return mruParentTable[lab.getContextInfo()] - 1;
>
> Am I correct that this code can misbehave e.g. if `computeIfAbsent` ends up creating a brand new `table` array - in which case, all array elements are set to `0` - meaning we end up returning `-1`. Is that what we want?
Yes, -1 indicates the label has not been resolved yet.
-------------
PR: https://git.openjdk.org/jdk/pull/10982
More information about the build-dev
mailing list