Re: RFR: 8331744: java.lang.classfile.TypeKind improvements [v4]

2024-05-09 Thread Claes Redestad
On Thu, 9 May 2024 12:29:40 GMT, Adam Sotona wrote: >> I actually am not sure of the reason; it is indeed a tableswitch in >> bytecode. @cl4es might know it better? > > Generally I agree with the API changes and with the > `descriptor.isPrimitive()` test before requesting a descriptor string.

Re: RFR: 8331744: java.lang.classfile.TypeKind improvements [v4]

2024-05-09 Thread Adam Sotona
On Thu, 9 May 2024 12:07:22 GMT, Chen Liang wrote: >> src/java.base/share/classes/java/lang/classfile/TypeKind.java line 139: >> >>> 137: case 'V' -> TypeKind.VoidType; >>> 138: default -> throw new IllegalArgumentException("Bad type: " >>> + s); >>> 139: }; >>

Re: RFR: 8331744: java.lang.classfile.TypeKind improvements [v4]

2024-05-09 Thread Chen Liang
On Thu, 9 May 2024 07:23:16 GMT, Adam Sotona wrote: >> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Hash table, use fixed random seed > > src/java.base/share/classes/java/lang/classfile/TypeKind.java line 139: > >> 137:

Re: RFR: 8331744: java.lang.classfile.TypeKind improvements [v4]

2024-05-09 Thread Adam Sotona
On Tue, 7 May 2024 15:23:10 GMT, Chen Liang wrote: >> A peek into TypeKind during the research for #19105 reveals that TypeKind >> has a few issues: >> 1. Name mismatch for `newarraycode` and `fromNewArrayCode`: Renamed both to >> use "newarray code" >> 2. `fromDescriptor` can throw IOOBE if

Re: RFR: 8331744: java.lang.classfile.TypeKind improvements [v4]

2024-05-07 Thread Chen Liang
> A peek into TypeKind during the research for #19105 reveals that TypeKind has > a few issues: > 1. Name mismatch for `newarraycode` and `fromNewArrayCode`: Renamed both to > use "newarray code" > 2. `fromDescriptor` can throw IOOBE if the input string is empty: changed to > throw IAE and