I'm not sure where in the execution trace you're looking at a stack
that's <alien> <alien> <ns-rect> "foo:". Could you be more specific?
Maybe the second alien is the selector, and "foo:" is about to get
dropped. If you pasted a return stack trace with the -> included, I
could be more helpful. My guess is, though, that you're looking at an
implementation detail. You shouldn't really have to care about send
directly, even, just the -> operator to send messages.
Dan
On Jan 24, 2008 9:42 AM, Joel Reymont <[EMAIL PROTECTED]> wrote:
> The stack effect for send is the following:
>
> send ( args... receiver selector -- return... )
>
> I've been staring at this piece of code from cocoa-tests.factor for a
> while and I can't reconcile it with the send stack effect:
>
> : test-foo
> Foo -> alloc -> init
> dup 1.0 2.0 101.0 102.0 <NSRect> -> foo:
> -> release ;
>
> I used the walker to inspect the stack, just in case I was missing
> something and the stack seems to contain <alien> <alien> <ns-rect>
> "foo:" just before invocation.
>
> The signature of foo: is { "id" "SEL" "NSRect" }
>
> "foo:", the selector, is at the top of the stack before invocation but
> it's followed by an instance of NSRect (<ns-rect>) whereas the
> receiver is <alien>.
>
> Is the stack effect declaration wrong or am I missing something?
>
> Thanks, Joel
>
> --
> http://wagerlabs.com
>
>
>
>
>
>
> -------------------------------------------------------------------------
> This SF.net email is sponsored by: Microsoft
> Defy all challenges. Microsoft(R) Visual Studio 2008.
> http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
> _______________________________________________
> Factor-talk mailing list
> [email protected]
> https://lists.sourceforge.net/lists/listinfo/factor-talk
>
-------------------------------------------------------------------------
This SF.net email is sponsored by: Microsoft
Defy all challenges. Microsoft(R) Visual Studio 2008.
http://clk.atdmt.com/MRT/go/vse0120000070mrt/direct/01/
_______________________________________________
Factor-talk mailing list
[email protected]
https://lists.sourceforge.net/lists/listinfo/factor-talk