[Top][All Lists]

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: [OT] Re: Question on mutability of argument lists

From: Andy Wingo
Subject: Re: [OT] Re: Question on mutability of argument lists
Date: Thu, 20 Mar 2014 22:02:02 +0100
User-agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux)

On Thu 20 Mar 2014 11:06, Marco Maggi <address@hidden> writes:

>   Something  similar can  be done  for return  values[1]; in
> Vicare every function call site has 2 return points: one for
> single return value; the other for 0, 2, more return values.
> One return  point goes  on with  the computation,  the other
> raises an exception.
> [1]  Ashley and  Dybvig.   "An  Efficient Implementation  of
> Multiple Return Values in  Scheme".  Proceedings of the 1994
> ACM Conference on Lisp  and Functional Programming, 140-149,
> Orlando, June 1994.

Incidentally I think this is not such a nice approach -- multiple-value
returns kill the return-branch buffer.  I suspect this is a very 1994
strategy.  For example, it's common to call a function and discard its
arguments.  This is trivial with a single return location.  With MV you
miss the return-branch buffer and you still play jump games.  The
single-value return is also very easy -- just check the
number-of-return-values register (or, if values are on the stack, check
the stack pointer) and branch to error if you didn't get the right
number.  Branch prediction helps here.


reply via email to

[Prev in Thread] Current Thread [Next in Thread]