[constant-folding] More indy experiments
amaembo at gmail.com
Thu May 11 04:41:40 UTC 2017
Thank you for your answers!
As for (2) - the extra boxing you are observing is caused by the fact that
> Intrinsic.invokedynamic is not (yet) a polymorphic signature method (note
> that the polysig annotation is mentioned in the JEP). When it will be,
> boxing will disappear. But I think that if we go down the polysig path,
> then an explicit cast for the return type would be necessary (as it is for
> i.e. MethodHandle.invokeExact).
I'm not aware about concrete implementation details in javac, but from an
outsider point of view it should be doable. For normal generic return value
javac is capable to automatically insert proper checkcast bytecode after
call. The same type exactly should be used as MethodType return type for
polysig invokedynamic if explicit cast is absent.
With best regards,
More information about the amber-dev