> On Feb 9, 2020, at 2:08 PM, John Rose <john.r.r...@oracle.com> wrote:
>
> Good point. For our purposes the abstract ctor must always resolve to Object.
> And it must have the empty signature right?
Right. The abstract constructor is an indication that "instances of this class
require no initialization", so there's nothing to be done with parameters.
(Equivalently, your search will always end up at Object, so it must match the
Object descriptor.)
>
> A small remaining point: There might be other use cases in the future for
> other configurations which make logical sense in the same way. If so we can
> expand the permissions to other constructors besides Object::<init>()V. For
> now that’s the only one we care about delegating you.
>
> Have I got it now?
Yeah, I think so.
What I'm most worried about is *yet another* ad hoc method search being
performed by invokespecial. Special-case handling of Object is one thing; a
full search mechanism is another.
Something else we might want to do with this feature is a 'new' that executes
no code but produces a fully-formed object. It can't be the current 'new'
(verifier can't tell if a class requires instance initialization or not), and
maybe this is subsumed by a 'new-and-init' instruction, but something to think
about...