Re: Re: Re: Re: Re: Re: Re: Re: ASM 4 is ready ?
Rémi Forax <[email protected]>
| Newsgroups | gmane.comp.java.objectweb.asm |
|---|---|
| Message-ID | <[email protected]> |
On 01/10/2011 08:19 PM, Eric Bruneton wrote: > 08/01/2011 19:35, Rémi Forax wrote: >>> still, the compiler manipulates strings representing >>> class/method/field names and types in the script, not the real objects? >> >> yes, you're right. >> But because the compiler and the runtime are interleaved, you will find >> source files >> that handles both java.dyn.MethodHandle and >> org.objectweb.asm.MethodHandle. > > can you give a concrete example where it is impossible to separate the > compiler and the runtime parts in separate source files, each using > either asm or java.dyn classes? You can always separate in two classes and use a byte array to transfer the bytecodes between the two classes. The question is more Does users will always cleanly separate their code ? As a user of ASM myself, the answer is not always :) I have 3 medium projects that use ASM and method handles and all 3 have at least one class that mix ASM code and java.dyn code. It's more natural in my opinion to return a java.dyn.MethodHandle as result of the generation of the bytecode of a method instead of returning a byte array. There is also the problem of a user choosing the wrong import, as I said this will create a hard to track bug. > > For me the runtime part does not have to manipulate ASM classes. So > the only problem would be if the compiler needs java.dyn classes to > generate code. But I don't see examples. You can use pass a MethodHandle as parameter that will act as a continuation in a CPS style. > > Also the compiler is likely to create MethodType and MethodHandle, but > since the java.dyn classes do not have constructors, there is no risk > of error here. Yes. > > Eric Rémi
message-footer.txt
(text/plain, 238 B)
-- 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