Re: recalculating stack frames in Java 9
Remi Forax <[email protected]> Wed, 21 Dec 2016 19:17:48 +0100 (CET)
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <[email protected]> |
Hi Yanic, > De: "Yanic Inghelbrecht" <[email protected]> > À: [email protected] > Envoyé: Mercredi 21 Décembre 2016 15:11:35 > Objet: [asm] recalculating stack frames in Java 9 > Hi all, > I'm wondering what other people are planning to do with regards to stack frame > recalculation in Java 9. > Having ASM do the recalculation instead of hand-crafting it is very convenient > but needs the common superclass information. > For me this is common-super-class calculation is one of the more worrying > aspects of the new module system in Java 9, i.e. that the information might not > be available to the instrumenting agent. Agents are kings in Java 9, they can redefine a module http://download.java.net/java/jdk9/docs/api/java/lang/instrument/Instrumentation.html#redefineModule-java.lang.reflect.Module-java.util.Set-java.util.Map-java.util.Map-java.util.Set-java.util.Map- so give access to themselves. > I've seen two ways of getting it, either (force)load the relevant class and > query it, or have ASM parse the ancestors' .class files (without actually > loading them). > Will these two ways still work with Java 9? yes, within a module you can enforce a better control on the resources associated with that module with the exception that classfile (.class) are always accessible by anyone. see http://download.java.net/java/jdk9/docs/api/java/lang/ClassLoader.html#getResourceAsStream-java.lang.String- > As I understood it a couple of months ago, the file format for the new module > system is deliberately left undocumented. And the forced-loading solution might > not be possible either because of access restrictions on the module level. > So unless I'm missing something, I would expect most libraries that depend on > ASM for their bytecode manipulation will need a work-around for Java 9. > So is there another way to get the common superclass information? > Best regards, cheers, Rémi > Yanic > -- > Trace Modeler - the fastest way to create UML sequence diagrams > http://www.tracemodeler.com > -- > 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