Context reflection regression?

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

Context reflection regression?

Igor Stasenko
I just found that

a: a b: b c: c
   ^ thisContext sender stackPtr

answers 0  :(

while, in order to call the above method , a caller, obviously needs
to push 4 values on stack:
 - push receiver
 - push a
 - push b
 - push c
 - send #a:b:c:

so, a method's caller context stack _should_ contain at least 4 elements.

So, either i wrong, or VM doesn't tracking the context's sp value
correctly anymore.

--
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Context reflection regression?

Lukas Renggli
AFAIK, the values are copied on send to the arguments/temps of
thisContext (1...4), they are not kept in the sending stack frame.

Lukas

On 11 April 2010 11:32, Igor Stasenko <[hidden email]> wrote:

> I just found that
>
> a: a b: b c: c
>   ^ thisContext sender stackPtr
>
> answers 0  :(
>
> while, in order to call the above method , a caller, obviously needs
> to push 4 values on stack:
>  - push receiver
>  - push a
>  - push b
>  - push c
>  - send #a:b:c:
>
> so, a method's caller context stack _should_ contain at least 4 elements.
>
> So, either i wrong, or VM doesn't tracking the context's sp value
> correctly anymore.
>
> --
> Best regards,
> Igor Stasenko AKA sig.
>
>



--
Lukas Renggli
www.lukas-renggli.ch

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
Reply | Threaded
Open this post in threaded view
|

Re: [squeak-dev] Context reflection regression?

Igor Stasenko
On 11 April 2010 12:41, Lukas Renggli <[hidden email]> wrote:
> AFAIK, the values are copied on send to the arguments/temps of
> thisContext (1...4), they are not kept in the sending stack frame.
>
hmm...
then i wonder , how
ContextPart>>jump
and ContextPart>>restart
still working,
because in #jump it using a #pop method, which decrements the sp
value. Obviously, if sp == 0, it fails.

> Lukas
>
> On 11 April 2010 11:32, Igor Stasenko <[hidden email]> wrote:
>> I just found that
>>
>> a: a b: b c: c
>>   ^ thisContext sender stackPtr
>>
>> answers 0  :(
>>
>> while, in order to call the above method , a caller, obviously needs
>> to push 4 values on stack:
>>  - push receiver
>>  - push a
>>  - push b
>>  - push c
>>  - send #a:b:c:
>>
>> so, a method's caller context stack _should_ contain at least 4 elements.
>>
>> So, either i wrong, or VM doesn't tracking the context's sp value
>> correctly anymore.
>>
>> --
>> Best regards,
>> Igor Stasenko AKA sig.
>>
>>
>
>
>
> --
> Lukas Renggli
> www.lukas-renggli.ch
>
> _______________________________________________
> Pharo-project mailing list
> [hidden email]
> http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
>



--
Best regards,
Igor Stasenko AKA sig.

_______________________________________________
Pharo-project mailing list
[hidden email]
http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project