Re: RFR: 8294982: Implementation of Classfile API [v15]

2023-03-07 Thread Adam Sotona
On Wed, 15 Feb 2023 14:24:18 GMT, Adam Sotona wrote: >> src/java.base/share/classes/jdk/internal/classfile/instruction/CharacterRange.java >> line 47: >> >>> 45: * {@return the start of the instruction range} >>> 46: */ >>> 47: Label startScope(); >> >> I noticed that this patter

Re: RFR: 8294982: Implementation of Classfile API [v15]

2023-03-02 Thread Paul Sandoz
On Wed, 15 Feb 2023 14:12:21 GMT, Adam Sotona wrote: >> src/java.base/share/classes/jdk/internal/classfile/instruction/ConstantInstruction.java >> line 63: >> >>> 61: * aload_0}). >>> 62: */ >>> 63: sealed interface IntrinsicConstantInstruction extends >>> ConstantInstruction >>

Re: RFR: 8294982: Implementation of Classfile API [v15]

2023-02-17 Thread Adam Sotona
On Thu, 9 Feb 2023 14:07:32 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> AttributeElement.Kind removal (#48) > > src/java.base/share/classes/jdk/internal/classfile/constantpool/MethodHan

Re: RFR: 8294982: Implementation of Classfile API [v15]

2023-02-17 Thread Adam Sotona
On Thu, 16 Feb 2023 10:48:49 GMT, Adam Sotona wrote: >> The main difference is that if the given entry is not directly applicable >> (when it comes from 3rd constant pool or when the pool is not shared during >> transformation) - a new or matching entry to the target pool is returned. >> This i

Re: RFR: 8294982: Implementation of Classfile API [v15]

2023-02-16 Thread Adam Sotona
On Thu, 16 Feb 2023 10:46:23 GMT, Adam Sotona wrote: >> As I read the javadoc (I have not looked at impl yet), this method can >> effectively be used to add an entry to the constant pool (if the entry does >> not yet exist - in which case existing entry is returned). >> >> After having looked

Re: RFR: 8294982: Implementation of Classfile API [v15]

2023-02-16 Thread Adam Sotona
On Thu, 16 Feb 2023 10:25:04 GMT, Maurizio Cimadamore wrote: >> I'm not quite sure what exactly do you propose. >> `ConstantPool` should not accept anything as it is read-only, so "accept" >> would be confusing. >> `ConstantPoolBuilder::maybeClone` is rather a `Function`, where the name >> mig

Re: RFR: 8294982: Implementation of Classfile API [v15]

2023-02-16 Thread Maurizio Cimadamore
On Wed, 15 Feb 2023 08:20:19 GMT, Adam Sotona wrote: >> src/java.base/share/classes/jdk/internal/classfile/constantpool/ConstantPoolBuilder.java >> line 537: >> >>> 535: * @param the type of the entry >>> 536: */ >>> 537: T maybeClone(T entry); >> >> This feels a more primitive

Re: RFR: 8294982: Implementation of Classfile API [v15]

2023-02-16 Thread Adam Sotona
On Fri, 10 Feb 2023 11:16:22 GMT, Adam Sotona wrote: >> src/java.base/share/classes/jdk/internal/classfile/constantpool/Utf8Entry.java >> line 47: >> >>> 45: * @param s the string to compare to >>> 46: */ >>> 47: boolean equalsString(String s); >> >> Whatif the provided string co

Re: RFR: 8294982: Implementation of Classfile API [v15]

2023-02-15 Thread Adam Sotona
On Thu, 9 Feb 2023 14:05:10 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> AttributeElement.Kind removal (#48) > > src/java.base/share/classes/jdk/internal/classfile/constantpool/MemberRef

Re: RFR: 8294982: Implementation of Classfile API [v15]

2023-02-15 Thread Adam Sotona
On Wed, 15 Feb 2023 14:45:32 GMT, Adam Sotona wrote: >> src/java.base/share/classes/jdk/internal/classfile/constantpool/MemberRefEntry.java >> line 62: >> >>> 60: * {@return whether this member is a method} >>> 61: */ >>> 62: boolean isMethod(); >> >> this seems surprising - afte

Re: RFR: 8294982: Implementation of Classfile API [v15]

2023-02-15 Thread Adam Sotona
On Thu, 9 Feb 2023 14:04:22 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> AttributeElement.Kind removal (#48) > > src/java.base/share/classes/jdk/internal/classfile/constantpool/MemberRef

Re: RFR: 8294982: Implementation of Classfile API [v15]

2023-02-15 Thread Adam Sotona
On Thu, 9 Feb 2023 14:18:56 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> AttributeElement.Kind removal (#48) > > src/java.base/share/classes/jdk/internal/classfile/instruction/CharacterR

Re: RFR: 8294982: Implementation of Classfile API [v15]

2023-02-15 Thread Adam Sotona
On Thu, 9 Feb 2023 14:24:58 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> AttributeElement.Kind removal (#48) > > src/java.base/share/classes/jdk/internal/classfile/instruction/ConstantIn

Re: RFR: 8294982: Implementation of Classfile API [v15]

2023-02-15 Thread Adam Sotona
On Thu, 9 Feb 2023 15:07:01 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> AttributeElement.Kind removal (#48) > > src/java.base/share/classes/jdk/internal/classfile/instruction/TypeCheckI

Re: RFR: 8294982: Implementation of Classfile API [v15]

2023-02-15 Thread Adam Sotona
On Thu, 9 Feb 2023 13:17:30 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> AttributeElement.Kind removal (#48) > > src/java.base/share/classes/jdk/internal/classfile/Classfile.java line 66

Re: RFR: 8294982: Implementation of Classfile API [v15]

2023-02-15 Thread Adam Sotona
On Thu, 9 Feb 2023 13:10:43 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> AttributeElement.Kind removal (#48) > > src/java.base/share/classes/jdk/internal/classfile/constantpool/ConstantP

Re: RFR: 8294982: Implementation of Classfile API [v15]

2023-02-15 Thread Adam Sotona
On Thu, 9 Feb 2023 14:01:10 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> AttributeElement.Kind removal (#48) > > src/java.base/share/classes/jdk/internal/classfile/constantpool/ConstantP

Re: RFR: 8294982: Implementation of Classfile API [v15]

2023-02-15 Thread Adam Sotona
On Thu, 9 Feb 2023 13:01:57 GMT, Maurizio Cimadamore wrote: >> src/java.base/share/classes/jdk/internal/classfile/constantpool/ClassEntry.java >> line 80: >> >>> 78: * Return a List composed by appending the additions to the base >>> list. >>> 79: * @param base The base elements for

Re: RFR: 8294982: Implementation of Classfile API [v15]

2023-02-14 Thread Adam Sotona
On Thu, 9 Feb 2023 12:54:42 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> AttributeElement.Kind removal (#48) > > src/java.base/share/classes/jdk/internal/classfile/constantpool/ConstantP

Re: RFR: 8294982: Implementation of Classfile API [v15]

2023-02-10 Thread Maurizio Cimadamore
On Fri, 10 Feb 2023 11:12:25 GMT, Adam Sotona wrote: >> src/java.base/share/classes/jdk/internal/classfile/constantpool/AnnotationConstantValueEntry.java >> line 33: >> >>> 31: * which includes the four kinds of primitive constants, and UTF8 >>> constants. >>> 32: */ >>> 33: public sealed in

Re: RFR: 8294982: Implementation of Classfile API [v15]

2023-02-10 Thread Adam Sotona
On Thu, 9 Feb 2023 15:01:03 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> AttributeElement.Kind removal (#48) > > src/java.base/share/classes/jdk/internal/classfile/instruction/MonitorIns

Re: RFR: 8294982: Implementation of Classfile API [v15]

2023-02-10 Thread Adam Sotona
On Thu, 9 Feb 2023 14:11:36 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> AttributeElement.Kind removal (#48) > > src/java.base/share/classes/jdk/internal/classfile/constantpool/Utf8Entry

Re: RFR: 8294982: Implementation of Classfile API [v15]

2023-02-10 Thread Adam Sotona
On Thu, 9 Feb 2023 13:03:46 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> AttributeElement.Kind removal (#48) > > src/java.base/share/classes/jdk/internal/classfile/constantpool/Annotatio

Re: RFR: 8294982: Implementation of Classfile API [v15]

2023-02-09 Thread Maurizio Cimadamore
On Thu, 9 Feb 2023 08:44:41 GMT, Adam Sotona wrote: >> This is root pull request with Classfile API implementation, tests and >> benchmarks initial drop into JDK. >> >> Following pull requests consolidating JDK class files parsing, generating, >> and transforming >> ([JDK-8294957](https://bug

Re: RFR: 8294982: Implementation of Classfile API [v15]

2023-02-09 Thread Maurizio Cimadamore
On Thu, 9 Feb 2023 12:57:19 GMT, Maurizio Cimadamore wrote: >> Adam Sotona has updated the pull request incrementally with one additional >> commit since the last revision: >> >> AttributeElement.Kind removal (#48) > > src/java.base/share/classes/jdk/internal/classfile/constantpool/ClassEntr

Re: RFR: 8294982: Implementation of Classfile API [v15]

2023-02-09 Thread Maurizio Cimadamore
On Thu, 9 Feb 2023 08:44:41 GMT, Adam Sotona wrote: >> This is root pull request with Classfile API implementation, tests and >> benchmarks initial drop into JDK. >> >> Following pull requests consolidating JDK class files parsing, generating, >> and transforming >> ([JDK-8294957](https://bug

Re: RFR: 8294982: Implementation of Classfile API [v15]

2023-02-09 Thread Adam Sotona
> This is root pull request with Classfile API implementation, tests and > benchmarks initial drop into JDK. > > Following pull requests consolidating JDK class files parsing, generating, > and transforming ([JDK-8294957](https://bugs.openjdk.org/browse/JDK-8294957)) > will chain to this one. >