Re: RFR: 8188055: (ref) Add Reference::refersTo predicate [v3]

2020-10-15 Thread Albert Mingkun Yang
On Thu, 15 Oct 2020 03:06:45 GMT, Kim Barrett wrote: >>> See, for example, src/java.base/share/native/libjava/ConstantPool.c. >> >> Got it; thank you. >> >>> I'm not sure what else besides an override one might wonder about? >> >> I don't know; maybe override is the only sensible choice. I

Re: RFR: 8188055: (ref) Add Reference::refersTo predicate [v3]

2020-10-14 Thread Kim Barrett
On Wed, 14 Oct 2020 14:39:40 GMT, Albert Mingkun Yang wrote: >> (1) The "0" suffix is idiomatic for this sort of thing. See, for example, >> src/java.base/share/native/libjava/ConstantPool.c. (2) I'm not sure what >> else besides an override one might wonder >> about? "Default implementation

Re: RFR: 8188055: (ref) Add Reference::refersTo predicate [v3]

2020-10-14 Thread Roger Riggs
On Wed, 14 Oct 2020 04:27:34 GMT, Kim Barrett wrote: >> Finally returning to this review that was started in April 2020. I've >> recast it as a github PR. I think the security concern raised by Gil >> has been adequately answered. >>

Re: RFR: 8188055: (ref) Add Reference::refersTo predicate [v3]

2020-10-14 Thread Daniel Fuchs
On Wed, 14 Oct 2020 18:09:16 GMT, Mandy Chung wrote: >> @mlchung I have often used a `Reference` in tests - but my main usage >> there would be to call `ref.refersTo(null)` >> which works in all cases. My main concern here however is that using `T` in >> `refersTo` seems to go against the >>

Re: RFR: 8188055: (ref) Add Reference::refersTo predicate [v3]

2020-10-14 Thread Mandy Chung
On Tue, 13 Oct 2020 08:49:23 GMT, Daniel Fuchs wrote: >> @dfuch I would expect the users of `refersTo` should know the type of the >> referent to be compared, i.e. it should know >> the parameter type of a Reference object. Do you have any specific use >> case in mind that you have a

Re: RFR: 8188055: (ref) Add Reference::refersTo predicate [v3]

2020-10-14 Thread Albert Mingkun Yang
On Wed, 14 Oct 2020 14:19:59 GMT, Kim Barrett wrote: > See, for example, src/java.base/share/native/libjava/ConstantPool.c. Got it; thank you. > I'm not sure what else besides an override one might wonder about? I don't know; maybe override is the only sensible choice. I just believe saying

Re: RFR: 8188055: (ref) Add Reference::refersTo predicate [v3]

2020-10-14 Thread Kim Barrett
On Wed, 14 Oct 2020 11:18:18 GMT, Albert Mingkun Yang wrote: >> Kim Barrett has updated the pull request incrementally with three additional >> commits since the last revision: >> >> - simplify test >> - cleanup nits from Mandy >> - use Object instead of TestObject > >

Re: RFR: 8188055: (ref) Add Reference::refersTo predicate [v3]

2020-10-14 Thread Albert Mingkun Yang
On Wed, 14 Oct 2020 04:27:34 GMT, Kim Barrett wrote: >> Finally returning to this review that was started in April 2020. I've >> recast it as a github PR. I think the security concern raised by Gil >> has been adequately answered. >>

Re: RFR: 8188055: (ref) Add Reference::refersTo predicate [v3]

2020-10-14 Thread Per Liden
On Wed, 14 Oct 2020 04:27:34 GMT, Kim Barrett wrote: >> Finally returning to this review that was started in April 2020. I've >> recast it as a github PR. I think the security concern raised by Gil >> has been adequately answered. >>

Re: RFR: 8188055: (ref) Add Reference::refersTo predicate [v3]

2020-10-14 Thread Per Liden
On Thu, 8 Oct 2020 14:00:11 GMT, Roger Riggs wrote: >> Can you add a unit test in `test/jdk/java/lang/ref` that serves as a basic >> API test for this new `refersTo` API without >> depending the WhiteBox API? test/hotspot/jtreg/gc` test serves as a more >> white-boxed type and

Re: RFR: 8188055: (ref) Add Reference::refersTo predicate [v3]

2020-10-13 Thread Kim Barrett
> Finally returning to this review that was started in April 2020. I've > recast it as a github PR. I think the security concern raised by Gil > has been adequately answered. > https://mail.openjdk.java.net/pipermail/hotspot-gc-dev/2020-April/029203.html >