On 2020-01-26 13:18, Michael Paus wrote:
Am 26.01.20 um 13:00 schrieb core-libs-dev-requ...@openjdk.java.net:
Message: 1
Date: Sat, 25 Jan 2020 09:07:23 -0800
From: Mandy Chung <mandy.ch...@oracle.com>

This would help the reflective support for inline classes and
new VM/language feature such that adding support in MethodHandle
will work both both.

In that case watch out for GraalVM. Native-image does not fully support MethodHandles.

See: https://github.com/oracle/graal/blob/master/substratevm/LIMITATIONS.md#invokedynamic-bytecode-and-method-handles


I think the issue for native-image is to add generic support for
indy/MH, since you can combine these to do all manner of dynamic things,
which makes them very hard to statically reason about in the general
case.

For specific things, like lambdas and this reflection proposal, they can
(and in the case of lambdas already do) desugar the simple and
straightforward indy/MH usage into something that can be statically
compiled.

Their reflection implementation is probably already implemented
differently from the OpenJDK, though, so my guess is that if something
along the lines of Peter's prototype is brought in, they likely won't
need to pick up the changes and native-image users wouldn't notice
anything's changed.

/Claes

Reply via email to