[javaflow] changed the way constructor invocations are instrumented

classic Classic list List threaded Threaded
5 messages Options
Reply | Threaded
Open this post in threaded view
|

[javaflow] changed the way constructor invocations are instrumented

Kohsuke Kawaguchi

Torsten,

I went ahead and changed the way constructor invocations are instrumented.

Given the bytecode

        NEW
        DUP
        ... constructor argument computation ...
        INVOKESPECIAL

We used to instrument this to

        ... constructor argument computation ...
        ... store arguments to Stack ...
        NEW
        DUP
        ... load arguments from Stack ...
        INVOKESPECIAL

But now it does

        ... constructor argument computation ...
        ... store arguments to local variables ...
        NEW
        DUP
        ... load arguments from local variables ...
        INVOKESPECIAL

Using the local variables have the following benefits:

   - it runs faster, and it has a better chance of JIT optimization
   - the generated byte code is smaller
   - the code runs fine even if it's running outside
     the continuation environment

I also added a test case for this.

I'm hoping that you are OK with this changes. I haven't seen an e-mail
from you for a while, so I'm assuming that you are busy with other
things. That's why I decided to go ahead.

--
Kohsuke Kawaguchi

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [javaflow] changed the way constructor invocations are instrumented

Mario Ivankovits
Kohsuke Kawaguchi wrote:
> I haven't seen an e-mail from you for a while, so I'm assuming that
> you are busy with other things.

He is in costa rica.
His mail from party@:
> Any apache people somewhere in costa rica?
> I'll be spending the next 3 weeks there.
>
> cheers
> --
> Torsten

I wish I were there too ;-)

---
Mario


---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [javaflow] changed the way constructor invocations are instrumented

Kohsuke Kawaguchi
Mario Ivankovits wrote:
> Kohsuke Kawaguchi wrote:
>> I haven't seen an e-mail from you for a while, so I'm assuming that
>> you are busy with other things.
>
> He is in costa rica.

Aaa, isn't that nice!


> His mail from party@:
>> Any apache people somewhere in costa rica?
>> I'll be spending the next 3 weeks there.
>>
>> cheers
>> --
>> Torsten
>
> I wish I were there too ;-)

Me, too. In fact, I'm happy with anywhere if I can get 3 weeks off!

--
Kohsuke Kawaguchi

---------------------------------------------------------------------
To unsubscribe, e-mail: [hidden email]
For additional commands, e-mail: [hidden email]

Reply | Threaded
Open this post in threaded view
|

Re: [javaflow] changed the way constructor invocations are instrumented

Torsten Curdt
In reply to this post by Kohsuke Kawaguchi
> Using the local variables have the following benefits:
>
>   - it runs faster, and it has a better chance of JIT optimization
>   - the generated byte code is smaller
>   - the code runs fine even if it's running outside
>     the continuation environment
>
> I also added a test case for this.

Cool stuff! :)

cheers
--
Torsten


PGP.sig (193 bytes) Download Attachment
Reply | Threaded
Open this post in threaded view
|

Re: [javaflow] changed the way constructor invocations are instrumented

Torsten Curdt
In reply to this post by Kohsuke Kawaguchi
>>> I haven't seen an e-mail from you for a while, so I'm assuming  
>>> that you are busy with other things.
>>>
>> He is in costa rica.
>>
>
> Aaa, isn't that nice!

Yepp - was awesome!

>>> Any apache people somewhere in costa rica?
>>> I'll be spending the next 3 weeks there.
>>>
>>> cheers
>>> --
>>> Torsten
>>>
>> I wish I were there too ;-)
>>
>
> Me, too. In fact, I'm happy with anywhere if I can get 3 weeks off!
Hehe ;)

cheers
--
Torsten

PGP.sig (193 bytes) Download Attachment