[Pharo-project] Context reflection regression?
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.
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 <siguctua@gmail.com> 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
On 11 April 2010 12:41, Lukas Renggli <renggli@gmail.com> 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 <siguctua@gmail.com> 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 Pharo-project@lists.gforge.inria.fr http://lists.gforge.inria.fr/cgi-bin/mailman/listinfo/pharo-project
-- Best regards, Igor Stasenko AKA sig.
participants (2)
-
Igor Stasenko -
Lukas Renggli