Re: RFR: 8306697: Add method to obtain String for CONSTANT_Class_info in ClassDesc [v2]

2023-04-22 Thread Chen Liang
> Add a method `internalName` (name subject to discussion) to `ClassDesc`, > which allows easily obtaining a String for representation of a class constant > in CONSTANT_Class_info. > > The motivation of this API is that avoiding frequent String creations via > caching (enabled by this new API,

Re: RFR: 8306697: Add method to obtain String for CONSTANT_Class_info in ClassDesc [v2]

2023-04-23 Thread ExE Boss
On Sat, 22 Apr 2023 18:40:45 GMT, Chen Liang wrote: >> Add a method `internalName` to `ClassDesc`, and unifies handling of string >> representation of a class constant in CONSTANT_Class_info via >> `ofInternalName` and `internalName` APIs, documented in `ClassDesc` itself. >> In particular, `o

Re: RFR: 8306697: Add method to obtain String for CONSTANT_Class_info in ClassDesc [v2]

2023-04-23 Thread Chen Liang
On Sun, 23 Apr 2023 13:13:55 GMT, ExE Boss wrote: >> Chen Liang has updated the pull request incrementally with one additional >> commit since the last revision: >> >> Unify ofInternalName and internalName, document about CONSTANT_Class_info, >> remove misleading JVMS 4.4.1 links > > src/jav

Re: RFR: 8306697: Add method to obtain String for CONSTANT_Class_info in ClassDesc [v2]

2023-04-25 Thread Chen Liang
On Sat, 22 Apr 2023 18:40:45 GMT, Chen Liang wrote: >> Add a method `internalName` to `ClassDesc`, and unifies handling of string >> representation of a class constant in CONSTANT_Class_info via >> `ofInternalName` and `internalName` APIs, documented in `ClassDesc` itself. >> In particular, `o

Re: RFR: 8306697: Add method to obtain String for CONSTANT_Class_info in ClassDesc [v2]

2023-04-25 Thread Mandy Chung
On Sat, 22 Apr 2023 18:40:45 GMT, Chen Liang wrote: >> Add a method `internalName` to `ClassDesc`, and unifies handling of string >> representation of a class constant in CONSTANT_Class_info via >> `ofInternalName` and `internalName` APIs, documented in `ClassDesc` itself. >> In particular, `o

Re: RFR: 8306697: Add method to obtain String for CONSTANT_Class_info in ClassDesc [v2]

2023-04-26 Thread Mandy Chung
On Sat, 22 Apr 2023 18:40:45 GMT, Chen Liang wrote: >> Add a method `internalName` to `ClassDesc`, and unifies handling of string >> representation of a class constant in CONSTANT_Class_info via >> `ofInternalName` and `internalName` APIs, documented in `ClassDesc` itself. >> In particular, `o

Re: RFR: 8306697: Add method to obtain String for CONSTANT_Class_info in ClassDesc [v2]

2023-04-26 Thread Chen Liang
On Wed, 26 Apr 2023 22:10:20 GMT, Mandy Chung wrote: > What is the issue of calling `ClassDesc.ofDescriptor` for arrays? Users would have to check the obtained string from a `CONSTANT_Class_info` and call different factory methods, which feels a bit... weird to me, like calling `a == null ? Op

Re: RFR: 8306697: Add method to obtain String for CONSTANT_Class_info in ClassDesc [v2]

2023-04-26 Thread Mandy Chung
On Sat, 22 Apr 2023 18:40:45 GMT, Chen Liang wrote: >> Add a method `internalName` to `ClassDesc`, and unifies handling of string >> representation of a class constant in CONSTANT_Class_info via >> `ofInternalName` and `internalName` APIs, documented in `ClassDesc` itself. >> In particular, `o

Re: RFR: 8306697: Add method to obtain String for CONSTANT_Class_info in ClassDesc [v2]

2023-04-26 Thread Chen Liang
On Sat, 22 Apr 2023 18:40:45 GMT, Chen Liang wrote: >> Add a method `internalName` to `ClassDesc`, and unifies handling of string >> representation of a class constant in CONSTANT_Class_info via >> `ofInternalName` and `internalName` APIs, documented in `ClassDesc` itself. >> In particular, `o

Re: RFR: 8306697: Add method to obtain String for CONSTANT_Class_info in ClassDesc [v2]

2023-04-26 Thread Mandy Chung
On Sat, 22 Apr 2023 18:40:45 GMT, Chen Liang wrote: >> Add a method `internalName` to `ClassDesc`, and unifies handling of string >> representation of a class constant in CONSTANT_Class_info via >> `ofInternalName` and `internalName` APIs, documented in `ClassDesc` itself. >> In particular, `o

Re: RFR: 8306697: Add method to obtain String for CONSTANT_Class_info in ClassDesc [v2]

2023-04-27 Thread Adam Sotona
On Sat, 22 Apr 2023 18:40:45 GMT, Chen Liang wrote: >> Add a method `internalName` to `ClassDesc`, and unifies handling of string >> representation of a class constant in CONSTANT_Class_info via >> `ofInternalName` and `internalName` APIs, documented in `ClassDesc` itself. >> In particular, `o

Re: RFR: 8306697: Add method to obtain String for CONSTANT_Class_info in ClassDesc [v2]

2023-04-27 Thread Adam Sotona
On Sat, 22 Apr 2023 18:40:45 GMT, Chen Liang wrote: >> Add a method `internalName` to `ClassDesc`, and unifies handling of string >> representation of a class constant in CONSTANT_Class_info via >> `ofInternalName` and `internalName` APIs, documented in `ClassDesc` itself. >> In particular, `o

Re: RFR: 8306697: Add method to obtain String for CONSTANT_Class_info in ClassDesc [v2]

2023-04-27 Thread Adam Sotona
On Sat, 22 Apr 2023 18:40:45 GMT, Chen Liang wrote: >> Add a method `internalName` to `ClassDesc`, and unifies handling of string >> representation of a class constant in CONSTANT_Class_info via >> `ofInternalName` and `internalName` APIs, documented in `ClassDesc` itself. >> In particular, `o

Re: RFR: 8306697: Add method to obtain String for CONSTANT_Class_info in ClassDesc [v2]

2023-04-27 Thread Mandy Chung
On Sat, 22 Apr 2023 18:40:45 GMT, Chen Liang wrote: >> Add a method `internalName` to `ClassDesc`, and unifies handling of string >> representation of a class constant in CONSTANT_Class_info via >> `ofInternalName` and `internalName` APIs, documented in `ClassDesc` itself. >> In particular, `o

Re: RFR: 8306697: Add method to obtain String for CONSTANT_Class_info in ClassDesc [v2]

2023-04-27 Thread Chen Liang
On Sat, 22 Apr 2023 18:40:45 GMT, Chen Liang wrote: >> Add a method `internalName` to `ClassDesc`, and unifies handling of string >> representation of a class constant in CONSTANT_Class_info via >> `ofInternalName` and `internalName` APIs, documented in `ClassDesc` itself. >> In particular, `o

Re: RFR: 8306697: Add method to obtain String for CONSTANT_Class_info in ClassDesc [v2]

2023-04-27 Thread Mandy Chung
On Sat, 22 Apr 2023 18:40:45 GMT, Chen Liang wrote: >> Add a method `internalName` to `ClassDesc`, and unifies handling of string >> representation of a class constant in CONSTANT_Class_info via >> `ofInternalName` and `internalName` APIs, documented in `ClassDesc` itself. >> In particular, `o

Re: RFR: 8306697: Add method to obtain String for CONSTANT_Class_info in ClassDesc [v2]

2023-04-27 Thread Chen Liang
On Thu, 27 Apr 2023 17:23:58 GMT, Mandy Chung wrote: > 4. Return a string representation of internal name for a class or interface > and a descriptor string for a primitive type and array. The method could be > called `classDescString`. The caller can test if this `ClassDesc` is not a > prim

Re: RFR: 8306697: Add method to obtain String for CONSTANT_Class_info in ClassDesc [v2]

2023-04-27 Thread Mandy Chung
On Sat, 22 Apr 2023 18:40:45 GMT, Chen Liang wrote: >> Add a method `internalName` to `ClassDesc`, and unifies handling of string >> representation of a class constant in CONSTANT_Class_info via >> `ofInternalName` and `internalName` APIs, documented in `ClassDesc` itself. >> In particular, `o

Re: RFR: 8306697: Add method to obtain String for CONSTANT_Class_info in ClassDesc [v2]

2023-04-27 Thread Chen Liang
On Thu, 27 Apr 2023 17:58:02 GMT, Mandy Chung wrote: > `ClassDesc.ofClassDescString("I")` can't differentiate if it's a primitive or > an internal name of class `I`. It is always treated as an internal name when it is without a `[` prefix. if class `I` in the unnamed package is stored in a `CO

Re: RFR: 8306697: Add method to obtain String for CONSTANT_Class_info in ClassDesc [v2]

2023-04-27 Thread Brian Goetz
On Sat, 22 Apr 2023 18:40:45 GMT, Chen Liang wrote: >> Add a method `internalName` to `ClassDesc`, and unifies handling of string >> representation of a class constant in CONSTANT_Class_info via >> `ofInternalName` and `internalName` APIs, documented in `ClassDesc` itself. >> In particular, `o

Re: RFR: 8306697: Add method to obtain String for CONSTANT_Class_info in ClassDesc [v2]

2023-04-27 Thread Mandy Chung
On Sat, 22 Apr 2023 18:40:45 GMT, Chen Liang wrote: >> Add a method `internalName` to `ClassDesc`, and unifies handling of string >> representation of a class constant in CONSTANT_Class_info via >> `ofInternalName` and `internalName` APIs, documented in `ClassDesc` itself. >> In particular, `o

Re: RFR: 8306697: Add method to obtain String for CONSTANT_Class_info in ClassDesc [v2]

2023-04-27 Thread Chen Liang
On Sat, 22 Apr 2023 18:40:45 GMT, Chen Liang wrote: >> Add a method `internalName` to `ClassDesc`, and unifies handling of string >> representation of a class constant in CONSTANT_Class_info via >> `ofInternalName` and `internalName` APIs, documented in `ClassDesc` itself. >> In particular, `o

Re: RFR: 8306697: Add method to obtain String for CONSTANT_Class_info in ClassDesc [v2]

2023-04-27 Thread Adam Sotona
On Thu, 27 Apr 2023 18:49:03 GMT, Brian Goetz wrote: > With the upcoming refactor to make parse/build instance methods, there is a > logical place and lifetime for caches. > […](#) @briangoetz This is a different level of caches than the discussed ClassHierarchyResolver cache. Most of the c

Re: RFR: 8306697: Add method to obtain String for CONSTANT_Class_info in ClassDesc [v2]

2023-04-28 Thread Adam Sotona
On Sat, 22 Apr 2023 18:40:45 GMT, Chen Liang wrote: >> Add a method `internalName` to `ClassDesc`, and unifies handling of string >> representation of a class constant in CONSTANT_Class_info via >> `ofInternalName` and `internalName` APIs, documented in `ClassDesc` itself. >> In particular, `o