Re: Draft JEP: Reimplement Core Reflection on Method Handles

2021-05-11 Thread Mandy Chung




On 5/11/21 3:14 PM, Remi Forax wrote:

Hi Mandy,
impressive work !

I think that the method that are a caller-sensitive adapter (the one that takes 
a supplementary class as last parameter) should be annotated with a specific 
JDK internal annotation,
so the link between the caller sensitive method and it's adapter is obvious for 
the humans that read the code.


This is exactly what I am considering.  May get to it soon.


Otherwise, i've only taken a look to the parts of the code that are using ASM.

This line is weird, it uses 52 which is Java 8
https://urldefense.com/v3/__https://github.com/mlchung/jdk/commit/320efd2e5697627243f6fe058485fb8708a0cd41*diff-4e4fca8bb2eb6320ff485ee724248e1641b4bb3f6dbae8526e87c5cf15905d9aR1262__;Iw!!GqivPVa7Brio!LiAwZ1SmPNk8ETBmjRBbMoL7c2XB4M4N29I5lhAULQTtwDxEd6B1ERlcn8PyovcSaQ$

Perhaps all versions should be updated to 61 (Java 17), unit the internal 
version of ASM is refreshed so the constant V17 can be used.


Agree.  I will fix that.

Mandy



Rémi

- Mail original -

De: "mandy chung" 
À: "core-libs-dev" , "hotspot compiler" 

Envoyé: Mardi 11 Mai 2021 22:42:01
Objet: Draft JEP: Reimplement Core Reflection on Method Handles
This draft JEP is a proposal to reimplement core reflection on top of
method handles:
    https://bugs.openjdk.java.net/browse/JDK-8266010

Feedback is welcome.  The prototype is at [1].

Mandy
[1] 
https://urldefense.com/v3/__https://github.com/mlchung/jdk/tree/reimplement-method-invoke__;!!GqivPVa7Brio!LiAwZ1SmPNk8ETBmjRBbMoL7c2XB4M4N29I5lhAULQTtwDxEd6B1ERlcn8MsCgr-dg$




Re: Draft JEP: Reimplement Core Reflection on Method Handles

2021-05-11 Thread Mandy Chung




On 5/11/21 2:01 PM, Brian Goetz wrote:

Yes, please!

To add to the list of motivations/things to remove: the current 
implementation relies on the special `MagicAccessorImpl` to relax 
accessibility.  The notes in this class are frightening; getting rid 
of it would be a mercy.





Thanks, great point. I will add that.

Mandy



On 5/11/2021 4:42 PM, Mandy Chung wrote:
This draft JEP is a proposal to reimplement core reflection on top of 
method handles:

https://bugs.openjdk.java.net/browse/JDK-8266010

Feedback is welcome.  The prototype is at [1].

Mandy
[1] https://github.com/mlchung/jdk/tree/reimplement-method-invoke






Re: Draft JEP: Reimplement Core Reflection on Method Handles

2021-05-11 Thread Remi Forax
Hi Mandy,
impressive work !

I think that the method that are a caller-sensitive adapter (the one that takes 
a supplementary class as last parameter) should be annotated with a specific 
JDK internal annotation,
so the link between the caller sensitive method and it's adapter is obvious for 
the humans that read the code.

Otherwise, i've only taken a look to the parts of the code that are using ASM.

This line is weird, it uses 52 which is Java 8
https://github.com/mlchung/jdk/commit/320efd2e5697627243f6fe058485fb8708a0cd41#diff-4e4fca8bb2eb6320ff485ee724248e1641b4bb3f6dbae8526e87c5cf15905d9aR1262

Perhaps all versions should be updated to 61 (Java 17), unit the internal 
version of ASM is refreshed so the constant V17 can be used.

Rémi

- Mail original -
> De: "mandy chung" 
> À: "core-libs-dev" , "hotspot compiler" 
> 
> Envoyé: Mardi 11 Mai 2021 22:42:01
> Objet: Draft JEP: Reimplement Core Reflection on Method Handles

> This draft JEP is a proposal to reimplement core reflection on top of
> method handles:
>    https://bugs.openjdk.java.net/browse/JDK-8266010
> 
> Feedback is welcome.  The prototype is at [1].
> 
> Mandy
> [1] https://github.com/mlchung/jdk/tree/reimplement-method-invoke


Re: Draft JEP: Reimplement Core Reflection on Method Handles

2021-05-11 Thread Brian Goetz

Yes, please!

To add to the list of motivations/things to remove: the current 
implementation relies on the special `MagicAccessorImpl` to relax 
accessibility.  The notes in this class are frightening; getting rid of 
it would be a mercy.




On 5/11/2021 4:42 PM, Mandy Chung wrote:
This draft JEP is a proposal to reimplement core reflection on top of 
method handles:

   https://bugs.openjdk.java.net/browse/JDK-8266010

Feedback is welcome.  The prototype is at [1].

Mandy
[1] https://github.com/mlchung/jdk/tree/reimplement-method-invoke




Draft JEP: Reimplement Core Reflection on Method Handles

2021-05-11 Thread Mandy Chung
This draft JEP is a proposal to reimplement core reflection on top of 
method handles:

   https://bugs.openjdk.java.net/browse/JDK-8266010

Feedback is welcome.  The prototype is at [1].

Mandy
[1] https://github.com/mlchung/jdk/tree/reimplement-method-invoke