Actually - I was unclear - apologies. K
> On Jan 31, 2019, at 3:54 PM, fo...@univ-mlv.fr wrote:
>
>
>
> De: "Karen Kinnear" <karen.kinn...@oracle.com>
> À: "Remi Forax" <fo...@univ-mlv.fr>
> Cc: "John Rose" <john.r.r...@oracle.com>, "valhalla-spec-experts"
> <valhalla-spec-experts@openjdk.java.net>
> Envoyé: Jeudi 31 Janvier 2019 21:36:09
> Objet: Re: An example of substituability test that is recursive
> Option #1 was what I was suggesting in the meeting two weeks ago - if this
> starts
> to recurse too deeply, create a worklist - which should give you the same
> result.
>
> If you switch to .Equals - you might get a different result …
>
> yes, you are right, i did not understand what you mean by "expected
> behavior", my bad on that.
>
>
> thanks,
> Karen
>
> regards,
> Rémi
>
>
> On Jan 31, 2019, at 1:46 PM, fo...@univ-mlv.fr
> <mailto:fo...@univ-mlv.fr>wrote:
>
>
>
> De: "John Rose" <john.r.r...@oracle.com <mailto:john.r.r...@oracle.com>>
> À: "Remi Forax" <fo...@univ-mlv.fr <mailto:fo...@univ-mlv.fr>>
> Cc: "Karen Kinnear" <karen.kinn...@oracle.com
> <mailto:karen.kinn...@oracle.com>>, "valhalla-spec-experts"
> <valhalla-spec-experts@openjdk.java.net
> <mailto:valhalla-spec-experts@openjdk.java.net>>
> Envoyé: Jeudi 31 Janvier 2019 19:05:33
> Objet: Re: An example of substituability test that is recursive
> On Jan 31, 2019, at 6:34 AM, fo...@univ-mlv.fr <mailto:fo...@univ-mlv.fr>
> wrote:
>
> The other solution is to say that == should do an upcall to equals (after the
> null checking and the class checking), if equals throw a StackOverflow, it's
> the expected behavior because the user is in control of that behavior.
>
> What you are doing here, I think, is exposing a requirement
> that we *don't* use the control stack for recursion on subst.
> testing (or hashing). That's a reasonable requirement.
> It leads to a worklist algorithm for doing this tricky thing,
> just like we had to do many times in the JIT.
>
>
>
> IMO that the other solution,
> solution 1: you use a worklist (and also perhaps a marking algorithm to avoid
> to crawle the DAG)
> solution 2: you claim it's too complex and you just let the user deal with it
> by calling equals() (and provide a way for a user to call the default subst).
>
> Rémi