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

2020-10-20 Thread Kim Barrett
On Tue, 20 Oct 2020 16:35:02 GMT, Mandy Chung wrote: >>> @kimbarrett your reworded text is okay. I think "if it initially had some >>> other referent value" can be dropped. >>> >>> For a `Reference` constructed with a `null` referent, we can clarify in the >>> spec that such reference object w

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

2020-10-20 Thread Mandy Chung
On Tue, 20 Oct 2020 05:22:57 GMT, Kim Barrett wrote: >> @kimbarrett your reworded text is okay. I think "if it initially had some >> other referent value" can be dropped. >> >> For a `Reference` constructed with a `null` referent, we can clarify in the >> spec that such reference object will

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

2020-10-20 Thread David Holmes
On 20/10/2020 5:51 pm, Kim Barrett wrote: On Oct 20, 2020, at 3:21 AM, David Holmes wrote: On 20/10/2020 5:01 pm, Kim Barrett wrote: On Oct 20, 2020, at 2:09 AM, David Holmes wrote: I think that can be addressed by considering a Reference created with a null referent to be immediately clear

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

2020-10-20 Thread Kim Barrett
> On Oct 20, 2020, at 3:21 AM, David Holmes wrote: > > On 20/10/2020 5:01 pm, Kim Barrett wrote: >>> On Oct 20, 2020, at 2:09 AM, David Holmes wrote: >>> >>> I think that can be addressed by considering a Reference created with a >>> null referent to be immediately cleared. >> I think if it’s

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

2020-10-20 Thread David Holmes
On 20/10/2020 5:01 pm, Kim Barrett wrote: On Oct 20, 2020, at 2:09 AM, David Holmes wrote: On 20/10/2020 3:26 pm, Kim Barrett wrote: On Tue, 20 Oct 2020 03:25:45 GMT, Mandy Chung wrote: @kimbarrett your reworded text is okay. I think "if it initially had some other referent value" can be dr

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

2020-10-20 Thread Kim Barrett
> On Oct 20, 2020, at 2:09 AM, David Holmes wrote: > > On 20/10/2020 3:26 pm, Kim Barrett wrote: >> On Tue, 20 Oct 2020 03:25:45 GMT, Mandy Chung wrote: >>> @kimbarrett your reworded text is okay. I think "if it initially had some >>> other referent value" can be dropped. >>> >>> For a `Refere

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

2020-10-19 Thread David Holmes
On 20/10/2020 3:26 pm, Kim Barrett wrote: On Tue, 20 Oct 2020 03:25:45 GMT, Mandy Chung wrote: @kimbarrett your reworded text is okay. I think "if it initially had some other referent value" can be dropped. For a `Reference` constructed with a `null` referent, we can clarify in the spec tha

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

2020-10-19 Thread Kim Barrett
On Tue, 20 Oct 2020 03:25:45 GMT, Mandy Chung wrote: > @kimbarrett your reworded text is okay. I think "if it initially had some > other referent value" can be dropped. > > For a `Reference` constructed with a `null` referent, we can clarify in the > spec that such reference object will never

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

2020-10-19 Thread David Holmes
On 20/10/2020 12:40 pm, Kim Barrett wrote: On Oct 19, 2020, at 7:20 PM, Mandy Chung wrote: On Mon, 19 Oct 2020 23:10:23 GMT, Mandy Chung wrote: Looks good. That's the crux of it: what exactly is meant by "the referent"? Does it mean the original object that was used as the referent, or do

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

2020-10-19 Thread Mandy Chung
On Mon, 19 Oct 2020 23:17:32 GMT, Mandy Chung wrote: >>> That's the crux of it: what exactly is meant by "the referent"? Does it >>> mean the original object that was used as the referent, or does it mean >>> the current value of the "referent" field inside the Reference (as get >>> might return)

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

2020-10-19 Thread Kim Barrett
> On Oct 19, 2020, at 7:20 PM, Mandy Chung wrote: > > On Mon, 19 Oct 2020 23:10:23 GMT, Mandy Chung wrote: > >>> Looks good. >> >>> That's the crux of it: what exactly is meant by "the referent"? Does it >>> mean the original object that was used as the referent, or does it mean >>> the curren

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

2020-10-19 Thread David Holmes
Hi Mandy, On 20/10/2020 9:20 am, Mandy Chung wrote: On Mon, 19 Oct 2020 23:10:23 GMT, Mandy Chung wrote: Looks good. That's the crux of it: what exactly is meant by "the referent"? Does it mean the original object that was used as the referent, or does it mean the current value of the "ref

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

2020-10-19 Thread Mandy Chung
On Mon, 19 Oct 2020 23:10:23 GMT, Mandy Chung wrote: >> Looks good. > >> That's the crux of it: what exactly is meant by "the referent"? Does it >> mean the original object that was used as the referent, or does it mean >> the current value of the "referent" field inside the Reference (as get >>

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

2020-10-19 Thread Mandy Chung
On Fri, 16 Oct 2020 17:04:51 GMT, Mandy Chung wrote: >> Kim Barrett has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev >> excludes the unrelated changes brought in by the merge/rebase. The pull >> request contains 11 additional commits sinc

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

2020-10-19 Thread David Holmes
Hi Kim, On 19/10/2020 9:29 pm, Kim Barrett wrote: On Oct 18, 2020, at 5:36 PM, David Holmes wrote: On 17/10/2020 1:23 am, Kim Barrett wrote: src/java.base/share/classes/java/lang/ref/Reference.java line 348: 346: * Tests if this reference object refers to {@code obj}. If {@code obj}

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

2020-10-19 Thread Kim Barrett
> On Oct 18, 2020, at 5:36 PM, David Holmes wrote: > > On 17/10/2020 1:23 am, Kim Barrett wrote: >>> src/java.base/share/classes/java/lang/ref/Reference.java line 348: >>> 346: * Tests if this reference object refers to {@code obj}. If {@code obj} is 347: * {@code null

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

2020-10-18 Thread David Holmes
On 17/10/2020 1:23 am, Kim Barrett wrote: On Fri, 16 Oct 2020 05:41:17 GMT, David Holmes wrote: Kim Barrett has updated the pull request with a new target base due to a merge or a rebase. The incremental webrev excludes the unrelated changes brought in by the merge/rebase. The pull request c

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

2020-10-16 Thread Mandy Chung
On Fri, 16 Oct 2020 18:27:31 GMT, Peter Levart wrote: >> That sounds reasonable to me. Thanks for looking into it. > > I just want to note that if you have a `Reference ref` at hand, you > can not just do: > Referemce r = (Reference) ref; > ...since those generic types are not related. You have

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

2020-10-16 Thread Peter Levart
On Wed, 14 Oct 2020 18:15:19 GMT, Daniel Fuchs wrote: >> For the common cases, the application should know the type of the referent >> and using `T` in `refersTo` will benefit >> from the compiler type checking. For the unknown type case, cast to >> `Reference` is not ideal but reasonable? >>

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

2020-10-16 Thread Mandy Chung
On Thu, 15 Oct 2020 17:04:37 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. >> https://mail.openjdk.java.net/pipermail/hotspot-gc-dev/2020-A

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

2020-10-16 Thread Kim Barrett
On Fri, 16 Oct 2020 05:41:17 GMT, David Holmes wrote: >> Kim Barrett has updated the pull request with a new target base due to a >> merge or a rebase. The incremental webrev >> excludes the unrelated changes brought in by the merge/rebase. The pull >> request contains 11 additional commits sin

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

2020-10-15 Thread David Holmes
On Thu, 15 Oct 2020 17:04:37 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. >> https://mail.openjdk.java.net/pipermail/hotspot-gc-dev/2020-A

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

2020-10-15 Thread David Holmes
On Thu, 15 Oct 2020 17:04:37 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. >> https://mail.openjdk.java.net/pipermail/hotspot-gc-dev/2020-A

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

2020-10-15 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 > https://mail.openjdk.java.net/pipermail/