You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@commons.apache.org by Kohsuke Kawaguchi <kk...@kohsuke.org> on 2005/09/09 08:31:48 UTC

[javaflow] changed the way constructor invocations are instrumented

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: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


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

Posted by Torsten Curdt <tc...@apache.org>.
> 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


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

Posted by Torsten Curdt <tc...@apache.org>.
>>> 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

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

Posted by Kohsuke Kawaguchi <kk...@kohsuke.org>.
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: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org


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

Posted by Mario Ivankovits <ma...@ops.co.at>.
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: commons-dev-unsubscribe@jakarta.apache.org
For additional commands, e-mail: commons-dev-help@jakarta.apache.org