Perform and context frame size primitive tests

Previous Topic Next Topic
 
classic Classic list List threaded Threaded
3 messages Options
Reply | Threaded
Open this post in threaded view
|

Perform and context frame size primitive tests

Nicolas Cellier
Here is an interesting bug solved in Pharo affecting Squeak too with
regular (non cog) vm
http://code.google.com/p/pharo/issues/detail?id=3468

A patched CompiledMethod>>needsFrameSize: is in Pharo.

Reply | Threaded
Open this post in threaded view
|

Re: Perform and context frame size primitive tests

Igor Stasenko
Yes, this is one thing, which i discovered during NativeBoost development.

I made the patch which fixes it
http://code.google.com/p/nativeboost/downloads/detail?name=001-perform-framesize.cs

Note that it deals with #perform:withArguments:
but not with #perform:withArguments:inSuperclass:

means that if you use the #perform:withArguments:inSuperclass: , it
also may fail, depending on call site, which may not fit all arguments
into
context stack. See senders of it.

The main reason why it works on Cog i think, that Cog maps contexts to
stack.. so contexts don't have  a hardcoded limits of their stack
sizes.
(but that juts guess , i didn't checked it)

On 1 February 2011 00:09, Nicolas Cellier
<[hidden email]> wrote:
> Here is an interesting bug solved in Pharo affecting Squeak too with
> regular (non cog) vm
> http://code.google.com/p/pharo/issues/detail?id=3468
>
> A patched CompiledMethod>>needsFrameSize: is in Pharo.
>
>



--
Best regards,
Igor Stasenko AKA sig.

Reply | Threaded
Open this post in threaded view
|

Re: Perform and context frame size primitive tests

Eliot Miranda-2


On Tue, Feb 1, 2011 at 1:57 AM, Igor Stasenko <[hidden email]> wrote:
Yes, this is one thing, which i discovered during NativeBoost development.

I made the patch which fixes it
http://code.google.com/p/nativeboost/downloads/detail?name=001-perform-framesize.cs

Note that it deals with #perform:withArguments:
but not with #perform:withArguments:inSuperclass:

means that if you use the #perform:withArguments:inSuperclass: , it
also may fail, depending on call site, which may not fit all arguments
into
context stack. See senders of it.

The main reason why it works on Cog i think, that Cog maps contexts to
stack.. so contexts don't have  a hardcoded limits of their stack
sizes.
(but that juts guess , i didn't checked it)

That's right.  This applies to both the JIT and the StackInterpreter.
 

On 1 February 2011 00:09, Nicolas Cellier
<[hidden email]> wrote:
> Here is an interesting bug solved in Pharo affecting Squeak too with
> regular (non cog) vm
> http://code.google.com/p/pharo/issues/detail?id=3468
>
> A patched CompiledMethod>>needsFrameSize: is in Pharo.
>
>



--
Best regards,
Igor Stasenko AKA sig.