hg: valhalla/valhalla: 8222711: [lworld] Initial skeletal implementation of inline class instance construction via <init>

John Rose john.r.rose at oracle.com
Wed Apr 24 20:10:22 UTC 2019


On Apr 24, 2019, at 1:01 PM, Harold Seigel <harold.seigel at oracle.com> wrote:
> 
> Just an fyi: Karen and I noticed a few small issues.
> 
> Line 969 in ciMethod.cpp needs a '!':
> 
>  967 bool ciMethod::is_static_init_factory() const {
>  968    return (name() == ciSymbol::object_initializer_name()
>  969            && signature()->return_type()->is_void());
> 
>  970 }
> 
> Also, the assert() messages at lines 310 and 319 in javaCalls.cpp and lines 1269 and 1275 in reflection.cpp seemed incorrect.

Good catch!  Fixed code:

bool ciMethod::is_static_init_factory() const {
   return (name() == ciSymbol::object_initializer_name()
           && !signature()->return_type()->is_void());
}

Maybe this fixes a compiler crash; will retest.

I respun the messages, respectively, as:

310:    assert(klass->is_value(), "inline classes must use factory methods");
319:  assert(!klass->is_value(), "classic constructors are only for non-inline classes");
1269:    assert(klass->is_value(), "inline classes must use factory methods");
1275:  assert(!klass->is_value(), "classic constructors are only for non-inline classes");

— John


More information about the valhalla-dev mailing list