Re: A "RecursiveConstants" attribute

2018-03-01 Thread Dan Smith
> On Feb 23, 2018, at 4:47 PM, Dan Smith wrote: > > I'll ask our code gen experts about what they'd expect from Dynamic, and > whether it's easy to assume they always point in one direction or the other. Feedback from Maurizio: - javac prototypes that use condy will emit static arguments befor

Re: A "RecursiveConstants" attribute

2018-02-23 Thread Dan Smith
> On Feb 17, 2018, at 4:01 AM, Remi Forax wrote: > >> Most classes should naturally use backward references exclusively, since >> entries tend to be generated bottom-up. >> (In theory. If there are counter examples produced by any mainstream >> bytecode generators, that would be good to know.)

Re: A "RecursiveConstants" attribute

2018-02-17 Thread Remi Forax
ue in the future if by example a NameAndType can reference a constant with cycle, the code of javac and ecj will have to be changed. Rémi - Mail original - > De: "daniel smith" > À: "valhalla-spec-experts" > Envoyé: Samedi 17 Février 2018 00:32:17 > Objet: Re

Re: A "RecursiveConstants" attribute

2018-02-17 Thread Remi Forax
I like this approach, this is fine for me. Rémi - Mail original - > De: "daniel smith" > À: "valhalla-spec-experts" > Envoyé: Samedi 17 Février 2018 00:32:17 > Objet: Re: A "RecursiveConstants" attribute >> On Jan 31, 2018, at 2:50 P

Re: A "RecursiveConstants" attribute

2018-02-16 Thread Dan Smith
> On Jan 31, 2018, at 2:50 PM, Brian Goetz wrote: > > OK, so the goal is clearly to *prohibit* cyclic constants by enforcing a > depth constraint on condy-in-condy nesting. I like this goal much better, > and I see how the solution addresses it. > > Still, I have to wonder whether its worth t

Re: A "RecursiveConstants" attribute

2018-01-31 Thread Brian Goetz
OK, so the goal is clearly to *prohibit* cyclic constants by enforcing a depth constraint on condy-in-condy nesting.  I like this goal much better, and I see how the solution addresses it. Still, I have to wonder whether its worth the complexity of capturing it explicitly with a new (stackmap-

Re: A "RecursiveConstants" attribute

2018-01-31 Thread Dan Smith
> On Jan 31, 2018, at 1:39 PM, Brian Goetz wrote: > > It seems to me that the rational thing to do is, in SE 11, to implicitly > assume max-depth is zero, and be done. (IE, pretend to implement this > proposal, but don't actually allow classfiles to have the attribute.) Then > we won't get a

Re: A "RecursiveConstants" attribute

2018-01-31 Thread Brian Goetz
It seems to me that the rational thing to do is, in SE 11, to implicitly assume max-depth is zero, and be done.  (IE, pretend to implement this proposal, but don't actually allow classfiles to have the attribute.)  Then we won't get any classfiles that have cycles, and the full spectrum of cycl

Re: A "RecursiveConstants" attribute

2018-01-19 Thread John Rose
On Jan 19, 2018, at 1:40 PM, Dan Smith wrote: > > The followup question is: when should we try to deliver it? > > - SE 11: get it in when condy is introduced, avoid allowing any cyclical > constant pools to escape into the wild > - Sometime soon after 11: address compatibility by easing into it

Re: A "RecursiveConstants" attribute

2018-01-19 Thread Dan Smith
> On Jan 19, 2018, at 2:24 PM, John Rose wrote: > > On Jan 19, 2018, at 12:11 PM, Dan Smith wrote: >> >> To flesh the attribute idea out, here's a possible spec. Mentions >> CONSTANT_Dynamic for now, and would be modified in the future to name other >> constant types that allow cycles. >> >>

Re: A "RecursiveConstants" attribute

2018-01-19 Thread John Rose
On Jan 19, 2018, at 12:11 PM, Dan Smith wrote: > > To flesh the attribute idea out, here's a possible spec. Mentions > CONSTANT_Dynamic for now, and would be modified in the future to name other > constant types that allow cycles. > > Is this a happy solution to the problems raised in previous

Re: A "RecursiveConstants" attribute

2018-01-19 Thread Karen Kinnear
Dan H, Thank you for the suggestion. I need to study this in more detail. Would it work for you if we finalize the latest Condy JVMS that Dan S sent out and look into recursion handling in more detail as part of a future cycle? http://mail.openjdk.java.net/pipermail/valhalla-spec-experts/2018-

A "RecursiveConstants" attribute

2018-01-19 Thread Dan Smith
We had the following discussion in the Dec 20 meeting: > On Jan 3, 2018, at 9:11 AM, Karen Kinnear wrote: > > Dan S: Cycle handling > Array types can have cycles > - rather than relying on ordering - perhaps tell tree depth - e.g. > component type & dimensions - all in the CP > John: perhaps