Re: Re: Re: [Findbugs-core] toward ASM 4.0?

[email protected]
Newsgroups gmane.comp.java.objectweb.asm
Message-ID <1717744079.8893741313946654514.JavaMail.root@zimbra7-e1.priv.proxad.net>
Rémi Forax" <[email protected]> wrote:
> On 08/19/2011 08:32 PM, Eric Bruneton wrote:
> > being able to use several versions of visitors is only a "by
> product" 
> > of the fact that we want to ensure backward compatibility (which is
> 
> > the main goal). Indeed, ensuring backward compatibility means that
> an 
> > old visitor written by users must still work with recent ClassReader
> 
> > and ClassWriter implementations. But a visitor + a reader and/or a 
> > writer is nothing more than a small "transformation" chain. Thus, 
> > supporting backward compatibility is equivalent to being able to 
> > support transformation chains with a mix of versions.
> > if the VM will be ready, we will switch to method handle.
> 
> I agree. But I see this as trade-of between full compatibility and
> speed.
> As a writer of a findbugs plugin, I want this compatibility, as a
> writer 
> of the runtime
> of PHP.reboot which generate bytecode at runtime, I don't want this 
> compatibility,
> I want full speeeeeed :)

as I said previously, the code ensuring backward comptability will only add a cost for old code. Up to date code will run as fast as with the current API (or even faster since invokevirtual may be faster than invokeinterface).

> >> Anyway, as Eric says, it will take times before having an
> implementation
> >> of that
> >> and we should not delay the release of ASM4.
> >
> > do you think that users cannot wait one month?
> 
> Why waiting ? I see no reason.

in fact it may not even take one month. It took me only one day to do a preliminary version with the proposed approach (I've not added yet the net "getVersion" methods). See attached files (one with ow2 package, the other with objectweb). The biggest changes are when multiple inheritance of the Visitor interfaces were used (EmptyVisitor, MemberNode, TraceClassVisitor, ASMifierClassVisitor, etc). The way I handled this can be changed if necessary. All the tests pass, with both new versions.

I haven't measured yet the performance of this new version, compared to the current one. I just need to run "ant test" to have the results.

> >> The package compat can be added in a following version, by ex.
> 4.1.
> >
> > but it would eventually be removed, yielding yet another
> incompatible 
> > change. This contradicts its goal, which is to avoid incompatible 
> > changes in the future!
> 
> The purpose of such package is to guarantee the backward
> compatibility,
> why do you want to remove it ?
> I don't understand.

If I understand well, you want to keep interfaces in the core package, and add the abstract classes in "compat"? Since the performance of "compat" should be the same as the core API, I don't see the point of "compat", except for not breaking existing code right now (this is why I supposed that "compat" would be removed at some point, when existing code would have been ported to the new API).

Eric
asm4-objectweb-abstractclasses.zip (application/zip, 348.1 KB) - not displayed
asm4-ow2-abstractclasses-src.zip (application/zip, 345.1 KB) - not displayed
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
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.