RFR(M): 8156915: introduce MethodHandle factory for array length

Vladimir Ivanov vladimir.x.ivanov at oracle.com
Wed May 18 11:32:30 UTC 2016


Uwe,

> P.S.: I am not so familiar with the intrinsic stuff, so here is my question: The intrinsic for the array accesses is always created before caching the MH; so why do we need the static implementation methods at all? I had the same question also about the old element getters and setters. Or is the intrinsic only used after the MH is called multiple times as "optimization"? If the latter is the case, the test should ensure that the intrinsics are tested, too.
Intrinsics (in j.l.i sense) are just markers for bytecode generator 
(j.l.i.InvokerBytecodeGenerator or IBG) which signals there's a more 
efficient way to represent the behavior on bytecode level.

There are 2 execution modes supported for LambdaForms:
   - interpreter (LFI)
   - compiled (to bytecode by IGB)

Static implementation methods are needed for LFI.

Since 8u40, all LFs are always precompiled to bytecode before usage ( 
invocation threshold == 0) thus bypassing interpretation phase.

The test case could be extended to test LFI scenario, but I don't think 
it's worth it.

It's more productive to include additional test configuration with 
-Djava.lang.invoke.MethodHandle.COMPILE_THRESHOLD=30 when testing j.l.i 
changes to ensure LFI isn't broken.

Best regards,
Vladimir Ivanov

>> -----Original Message-----
>> From: core-libs-dev [mailto:core-libs-dev-bounces at openjdk.java.net] On
>> Behalf Of Michael Haupt
>> Sent: Wednesday, May 18, 2016 9:53 AM
>> To: Core-Libs-Dev <core-libs-dev at openjdk.java.net>
>> Subject: RFR(M): 8156915: introduce MethodHandle factory for array length
>>
>> Dear all,
>>
>> please review this change.
>> RFE: https://bugs.openjdk.java.net/browse/JDK-8156915
>> Webrev: http://cr.openjdk.java.net/~mhaupt/8156915/webrev.00/
>>
>> Thanks,
>>
>> Michael
>>
>> --
>>
>>  <http://www.oracle.com/>
>> Dr. Michael Haupt | Principal Member of Technical Staff
>> Phone: +49 331 200 7277 | Fax: +49 331 200 7561
>> Oracle Java Platform Group | LangTools Team | Nashorn
>> Oracle Deutschland B.V. & Co. KG | Schiffbauergasse 14 | 14467 Potsdam,
>> Germany
>>
>> ORACLE Deutschland B.V. & Co. KG | Hauptverwaltung: Riesstraße 25, D-
>> 80992 München
>> Registergericht: Amtsgericht München, HRA 95603
>>
>> Komplementärin: ORACLE Deutschland Verwaltung B.V. | Hertogswetering
>> 163/167, 3543 AS Utrecht, Niederlande
>> Handelsregister der Handelskammer Midden-Nederland, Nr. 30143697
>> Geschäftsführer: Alexander van der Ven, Jan Schultheiss, Val Maher
>>  <http://www.oracle.com/commitment>	Oracle is committed to
>> developing practices and products that help protect the environment
>



More information about the core-libs-dev mailing list