Re: Questions on Template Classes proposal

2019-03-14 Thread John Rose
To make the diagram easier to use, I have added a legend that explains its various notations. On Mar 13, 2019, at 8:44 PM, John Rose wrote: > > In the following explanations you may with to consult this diagram of > constant pool relations, which is derived from my current draft: > > http://cr.

Re: Questions on Template Classes proposal

2019-03-14 Thread John Rose
Yes from me to all your points here. A conditional child segment doesn’t need any new holes, just there BSM based predicate you mention. This works equally well for conditional fields, methods, and nested types. Conditional supers seem to require some special pleading with DefaultType to car

Re: Questions on Template Classes proposal

2019-03-14 Thread Brian Goetz
> > (What's an optional member of a template? Ah, that's a good > conversation. I haven't written this one up yet. I think the cleanest > way to formulate those is in terms of *optional child segments*. > I can think of many different ways to gate their optionality, > and BSM-based instantiatio

Re: Questions on Template Classes proposal

2019-03-13 Thread John Rose
This is going to be a fun conversation. As you know, I've been quietly hammering on a new version of templates for weeks and have (re-)discovered a number of hard problems, plus some solutions. Thanks so much for making a close reading of the previous draft; your questions are greatly improving t

Re: Questions on Template Classes proposal

2019-03-13 Thread Brian Goetz
Some quick answers… > Where in the template class file are holes allowed? "almost anywhere in the > constant pool” The constant pool is divided into “segments”, and the holes are a property of the segment. In the original doc, the constraint was that the holes were the first N constants in

Questions on Template Classes proposal

2019-03-13 Thread Karen Kinnear
John, Lois and I have been studying the Template Classes in the VM proposal: http://cr.openjdk.java.net/~jrose/values/template-classes.html We had some questions we were hoping you could either answer in email or in the next draft. thanks, Karen Where in the template class file are holes allowe