groovy-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Remi Forax <fo...@univ-mlv.fr>
Subject Re: Support of Java 11 using ASM 6.2.1 and ASM 7
Date Sun, 02 Sep 2018 16:06:24 GMT
Forget to ling to the related bug:
https://issues.apache.org/jira/browse/GROOVY-8727

cheers,
Rémi

----- Mail original -----
> De: "Remi Forax" <forax@univ-mlv.fr>
> À: "dev" <dev@groovy.apache.org>
> Envoyé: Dimanche 2 Septembre 2018 18:04:12
> Objet: Support of Java 11 using ASM 6.2.1 and ASM 7

> Hi all,
> Java 11 introduces several new forward incompatible features* in the class file.
> 
> Currently javac only uses one of them, nestmates [1], which allows to declare
> that several classes are part of the same nest thus allow access to private
> members in between them, obviously changing the semantics of the private access
> for invokevirtual (see [2] if you want more info) if not forward compatible.
> 
> Even if NestMates are declared as class attributes, we have decided in ASM to
> not ignore them if there are present in the bytecode (a class compiled with
> javac 11) because this change for the VM is far from innocuous, if you scrap
> those attributes, you get IllegalAccessError laters, so if you use a
> ClassVisitor configured with the ASM6 API and ASM see a nestmate related
> attributes (NestHost or NestMembers) it will fail with an
> UnsuportedOperationException.
> 
> Moreover, even if the support of Java 11 will came with ASM7, we have decided to
> introduce a new experimental API version (currently ASM7_EXPERIMENTAL) which
> let you parse Java 11 using ASM6 (6.2+), so if you want your favorite language
> to support Java 11, all visitors need to be upgraded to the api version
> ASM7_EXPERIMENTAL.
> You can also decide as before to wait until we release ASM7 (the first week end
> after the release of Java as usual, so at the end of September) to use the ASM7
> api.
> 
> regards,
> Rémi
> 
> * see also Constant Dynamic (http://openjdk.java.net/jeps/309) and Preview
> Feature (http://openjdk.java.net/jeps/12)
> 
> [1] http://openjdk.java.net/jeps/181
> [2] https://youtu.be/-k_IicifbxQ?list=PLX8CzqL3ArzVnxC6PYxMlngEMv3W1pIkn

Mime
View raw message