On 19/02/14 17:13, Thiago H de Paula Figueiredo wrote:
> On Wed, 19 Feb 2014 11:48:10 -0300, Philip Aston <phil...@mail.com>
> wrote:
>
>>> I don't know. My ASM/bytecode experience is almost null. Is Plastic
>>> missing methods  or other stuff so you can use some specific
>>> instructions? As far as I know, Howard created Plastic so he didn't
>>> need to use ASM directly in Tapestry-IoC.
>>
>> Yes - that's exactly the problem. It provides enough for
>> Howard/Tapestry, but getMethodVisitor() would open up direct use of ASM
>> and make Plastic more generally useful.
>
> I'm not sure if direct use of ASM in Plastic would actually work.
>
> What instructions are you missing?I think adding them is a better
> choice than going directly to ASM.


I need ANEWARRAY, and AASTORE. In an earlier factoring of my code, I was
also found the need for IADD. But that's just me. This just scratches
the surface of what someone might want. As a rough estimate, I'd say
InstructionBuilder uses about 25% of the 200 byte code instructions. It
could be extended to add 150 or so methods of the form:

    public InstructionBuilder arrayLength()
    {
        check();
        v.visitInsn(ARRAYLENGTH);
        return this;
    }

But this dilutes the higher level fluent interface that
InstructionBuilder provides.

This is why I prefer getMethodVisitor() be added as an "escape tunnel".

Regards,

- Phil

---------------------------------------------------------------------
To unsubscribe, e-mail: users-unsubscr...@tapestry.apache.org
For additional commands, e-mail: users-h...@tapestry.apache.org

Reply via email to