hg: valhalla/valhalla: 8222711: [lworld] Initial skeletal implementation of inline class instance construction via <init>
Harold Seigel
harold.seigel at oracle.com
Mon Apr 29 13:52:26 UTC 2019
Hi,
Here's a slightly updated version of John's patch to support static
<init> factory methods for inline types.
Open Webrev: http://cr.openjdk.java.net/~hseigel/lworld_8222787/webrev/
Please note the following:
1. The patch hard-wires the Javac noStaticInitValueFactory option to
always be 'on'.
2. Two hotspot JTReg compiler/valhalla tests fail with this change:
1. compiler/valhalla/valuetypes/TestBasicFunctionality.java
2. compiler/valhalla/valuetypes/TestLWorld.java
3. Verifier 'withfield' tests are commented out until withfield's fate
is decided
Any review comments would be welcome.
Thanks, Harold
On 4/24/2019 4:01 PM, Harold Seigel wrote:
> Hi John,
>
> 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.
>
> Thanks, Harold
>
> On 4/24/2019 2:00 PM, John Rose wrote:
>> Thanks, Harold! I'm doing a small update to the patch which
>> removed "is_object_method_signature". I think it's simpler and
>> easier to replace all the uses of s->is_object_method_signature()
>> with !s->is_void_method_signature(). It makes a small difference
>> in the spec., which is (I think) a good difference. I'm working on
>> an EG mail about the spec. as a whole.
>>
>> The webrev is updated in place:
>> http://cr.openjdk.java.net/~jrose/jvm/JDK-8222787
>>
>> — John
>>
>> On Apr 23, 2019, at 8:17 AM, Harold Seigel <harold.seigel at oracle.com>
>> wrote:
>>> Hi John,
>>>
>>>>> Anybody want to co-pilot these changes?
>>> I'll take a stab at it but will certainly ask core libs and others
>>> for help.
>>>
>>> Harold
>>>
>>> On 4/21/2019 2:57 AM, John Rose wrote:
>>>> http://cr.openjdk.java.net/~jrose/jvm/JDK-8222787/
>>>>
>>>> This seems to work. It builds in fastdebug mode and passes
>>>> the eight jtreg tests in test/jdk/valhalla/*. It also passes
>>>> most of the tests in test/hotspot/jtreg/runtime/valhalla/*.
>>>>
>>>> I hacked your option logic, Srikanth, to force javac to use
>>>> the new mode all the time. This made it easier to verify
>>>> that things were working—and that change is yours to
>>>> roll back.
>>>>
>>>> The method handle logic changes are untested and
>>>> probably broken.
>>>>
>>>> (Anybody want to co-pilot these changes? :-)
>>>>
>>>> — John
>>>>
>>>> P.S. To those celebrating, Happy Easter!
>>>>
>>>> On Apr 20, 2019, at 11:48 AM, John Rose <john.r.rose at oracle.com>
>>>> wrote:
>>>>> I've been wanting to do this for some time. I'll take a crack at it.
>>>>>
>>>>>> On Apr 20, 2019, at 8:19 AM, Srikanth
>>>>>> <srikanth.adayapalam at oracle.com> wrote:
>>>>>>
>>>>>> JVM folk:
>>>>>>
>>>>>> I have raised https://bugs.openjdk.java.net/browse/JDK-8222787
>>>>>> ([lworld] JVM should be enhanced to work with static <init>
>>>>>> factory methods for inline types) in connection with this.
More information about the valhalla-dev
mailing list