Re: Using ASM for invokedynamic bytecode generation

Mark Wielaard <[email protected]> Sun, 11 Sep 2011 23:53:07 +0200
Newsgroups gmane.comp.java.classpath.devel
Message-ID <[email protected]>
On Fri, Sep 09, 2011 at 02:35:12PM +0300, Pekka Enberg wrote:
> Hi Mark,
> 
> On Thu, Sep 8, 2011 at 10:33 PM, Mark Wielaard <[email protected]> wrote:
> > I don't know much about what is needed for invoke dynamic byte code
> > generation. Note that java/lang/reflect/Proxy.java for example also can
> > generate byte code, but just does it by hand. Is such an approach
> > possible?
> 
> It's possible, sure. I was thinking of using ASM because I suspect the
> generated bytecode won't be trivial. I'll see how quickly I hit limitations
> with generating bytecode by hand. Is a light-weight GNU Classpath
> specific bytecode helper API totally out of the question?

Lets start by with what we have in Proxy and what you have added
for invoke dynamic. From that we can hopefully extract a minimal
API. If it really totally explodes we can always see if we can
adopt ASM if that becomes way too large.

Cheers,

Mark