[lworld] Dropping jdk.incubator.mvt and MVT change in MethodHandle and reflection

Karen Kinnear karen.kinnear at oracle.com
Tue Feb 27 17:20:35 UTC 2018


Mandy,

Many thanks for doing these changes!

I had a couple of questions on the source changes:

1) java/lang/invoke/MethodType.java
  leadingReferenceParameter()

The way we are modeling this, a value type is a reference. It sometimes requires
special handling - like arrays or interfaces do - but it is still a subtype of java.lang.Object,
so still a reference.

I am not sure of the uses of leadingReferenceParameter - but I would expect it to
only throw an exception for primitives.

2) java/lang/invoke/MethodHandles.java

There should be no constructor for value types. 
I believe Srikanth is ensuring that in javac, and the jvm will be ensuring that at runtime.
So maybe that means that no constructor will be found.

Would it make sense for findConstructor to check for isValue and throw NoSuchMethodException
directly? Or does that fall out of the ResolveOrFail call?

It would be good to have an explicit test for this if you are collecting test cases.

thanks,
Karen



> On Feb 23, 2018, at 11:45 AM, mandy chung <mandy.chung at oracle.com> wrote:
> 
> http://cr.openjdk.java.net/~mchung/valhalla/webrevs/lworld-drop-mvt
> 
> This is the first pass to remove jdk.incubator.mvt module and
> MVT support in MethodHandle and reflection.  I have also added
> Class::isValue method to determine if it's a value class.  Fields
> of a value class are immutable and Field::setXXX methods will
> throw IAE if the declaring class is a value class.
> 
> Mandy
> 




More information about the valhalla-dev mailing list