Re: ASM6 and non standard attribute

[email protected] Mon, 22 May 2017 17:44:22 +0200 (CEST)
Newsgroups gmane.comp.java.objectweb.asm
Message-ID <832609273.253856131.1495467862704.JavaMail.root@zimbra73-e12.priv.proxad.net>
I think we should use subclasses of Attribute to support them, as was done in ASM 2 for stack map frames (http://asm.ow2.org/asm223/javadoc/user/org/objectweb/asm/attrs/package-summary.html).

Eric

----- Mail original -----
> De: "Remi Forax" <[email protected]>
> À: "asm" <[email protected]>
> Envoyé: Vendredi 19 Mai 2017 10:37:58
> Objet: [asm] ASM6 and non standard attribute
> 
> Hi all,
> Java 9 introduces some new standard bytecode attributes and those are
> already recognized by ASM6, but the OpenJDK (not Java) also
> introduces two new non standard attributes ModuleHashes and
> ModuleTarget that are specific to jmod which like tools like javac
> or java has features that are not described by the JLS or the JVMS.
> The problem of these two non standard attributes is that the default
> mechanism for unrecognized attributes of ASM is to copy the bytes of
> the attributes, it works well with ModuleTarget because it only
> contains two Strings but ModuleHashes associate a hash (a String) to
> a module name so if someone use the Remapper to rename modules (like
> by exmple the shade plugin of Maven of the shadow plugin of gradle),
> the module name will not be changed in the attribute by ASM.
> 
> The plan is that at some point in the future, the jmod file format
> will be standardized, currently it's based on zip and the idea is to
> move to a format more close to the dex format of android (with one
> constant pool shared by several classes) so maybe those attributes
> may change/disappear.
> 
> So the question is not should be support those non standard
> attributes or not, because here i think we have no choice but
> support them, the question is more how we should support those
> attributes,
> as methods of the ModuleVisitor like the other attributes, or should
> we use another design that shows that those attribute are non
> standard an may change in the future.
> 
> regards,
> Rémi
> 
> 
> --
> You receive this message as a subscriber of the [email protected] mailing
> list.
> To unsubscribe: mailto:[email protected]
> For general help: mailto:[email protected]?subject=help
> OW2 mailing lists service home page: http://www.ow2.org/wws
>


-- 
You receive this message as a subscriber of the [email protected] mailing list.
To unsubscribe: mailto:[email protected]
For general help: mailto:[email protected]?subject=help
OW2 mailing lists service home page: http://www.ow2.org/wws