[JEP-305] Inefficient compilation of Pattern Matching for instanceof

Evgeny Mandrikov mandrikov at gmail.com
Mon Jan 20 14:39:20 UTC 2020

On Sat, Jan 18, 2020 at 3:41 PM Remi Forax <forax at univ-mlv.fr> wrote:

> you should log a bug against javac, clearly the generated bytecode should
> be cleaned up.

Created https://bugs.openjdk.java.net/browse/JDK-8237528

> But it's too late for Java 14

Indeed too late for 14. Hope it can be addressed in 15 or at least before
end of preview.

BTW I left "fix version" field empty, but maybe it should be set to

> so you will need to workaround that in JavaCoCo.
> Given that it's still a preview feature, the workaround should not stay
> forever.

As you probably know, from bytecode quite tricky to detect if something was
present in source code or was added by compiler.

> By the way, what is the policy for supporting preview features (classfile
> minor version tagged with 65535) for JaCoCo ?

See https://groups.google.com/d/msg/jacoco-dev/edIrAG85jho/xe1yVd2PDgAJ
We do changes to support preview features, but only to verify that we can
support them when they become standard.
One and the only one so far example - is changes that we made for records (
And if records will change in 15, then it is ok for us to change what was
done for preview of 14.

>From the above not even sure that investigation of possibility to do
workaround for JEP-305 is worth the efforts.


More information about the amber-dev mailing list