Patrick R. Michaud <[EMAIL PROTECTED]> wrote:
> On Sat, Apr 30, 2005 at 10:40:12AM +0200, Leopold Toetsch wrote:

>> And maybe even
>>
>>    foo(x, ...) @TAIL_CALL      # tail function call
>>
>>    o.foo(x, ...) @TAIL_CALL    # tail method call

> This would be *really* nice.  I'm assuming here that @TAIL_CALL also
> causes the current routine's caller to receive back any return values
> from o.foo(x,...) exactly as if this routine had returned it.

Yep.

> I can probably make the .pcc wrappers work when I get to that level
> of optimization if that's what we have available.  Just to make sure
> I have it right, the code

>     (ret) = obj.match(w,x,y,z)
>     .return (ret)

> then becomes

>     # tailcall version of obj.match(w,x,y,z)
>     .pcc_begin prototyped
>     .arg w
>     .arg x
>     .arg y
>     .arg z
>     P2 = obj

it's:

   .invocant obj

>     tailcallmethod "match"
>     .pcc_end

Rest is fine.

> Pm

leo

Reply via email to