From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.user Subject: Re: [OT] Re: Question on mutability of argument lists Date: Thu, 20 Mar 2014 22:02:02 +0100 Message-ID: <8761n8y46t.fsf@pobox.com> References: <874n2unmvo.fsf@governatore.luna> <87txauouru.fsf@yeeloong.lan> <87zjklgp5x.fsf_-_@governatore.luna> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1395349339 9150 80.91.229.3 (20 Mar 2014 21:02:19 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Thu, 20 Mar 2014 21:02:19 +0000 (UTC) Cc: guile-user@gnu.org, Niels =?utf-8?Q?M=C3=B6ller?= To: marco.maggi-ipsu@poste.it Original-X-From: guile-user-bounces+guile-user=m.gmane.org@gnu.org Thu Mar 20 22:02:29 2014 Return-path: Envelope-to: guile-user@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1WQk6e-0005zO-U8 for guile-user@m.gmane.org; Thu, 20 Mar 2014 22:02:29 +0100 Original-Received: from localhost ([::1]:49370 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQk6e-0006eA-J7 for guile-user@m.gmane.org; Thu, 20 Mar 2014 17:02:28 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:56373) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQk6P-0006U6-8o for guile-user@gnu.org; Thu, 20 Mar 2014 17:02:18 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1WQk6K-0003xw-2F for guile-user@gnu.org; Thu, 20 Mar 2014 17:02:13 -0400 Original-Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:64456 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1WQk6J-0003xi-NI for guile-user@gnu.org; Thu, 20 Mar 2014 17:02:07 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 297D8F81C; Thu, 20 Mar 2014 17:02:07 -0400 (EDT) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; s=sasl; bh=0f7k0KoTrJmfd+TPNXFaPwavVx8=; b=LPboLz DHwt+hWwR4Owk61ajoNlbmzUp6D6MIVJc/jD+WJYECeRFqg07c9BANNS3ijjAaIA SzfbaT+nCU1LgxXpUChEfQQmj/mOEeckdhN5KQmM/ny8r2l5IfEhotN3hM7nbMw0 82u+VWFW40tcxdn1Z60D8Dc1iLcIcBqMvdeic= DomainKey-Signature: a=rsa-sha1; c=nofws; d=pobox.com; h=from:to:cc :subject:references:date:in-reply-to:message-id:mime-version :content-type; q=dns; s=sasl; b=LsO0bzOPJDOJPwhVpuBXux6dhzSfcMUA xrYcUo/+O/Q0VBe8AS7C7AwIZsKcLWgWH2zFexTdEJqvL2Xt6gqt8AanPNJIRieJ GTSPVXp2m3UKTEDO21b7X+YDT8ppvQDFiJc5UBy/OqNfhU8XnD5dDYb+JKSunCQ5 LyvNOVG2mxY= Original-Received: from a-pb-sasl-quonix.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id 1F937F81B; Thu, 20 Mar 2014 17:02:07 -0400 (EDT) Original-Received: from badger (unknown [88.160.190.192]) (using TLSv1 with cipher DHE-RSA-AES256-SHA (256/256 bits)) (No client certificate requested) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTPSA id 55C0EF81A; Thu, 20 Mar 2014 17:02:06 -0400 (EDT) In-Reply-To: <87zjklgp5x.fsf_-_@governatore.luna> (Marco Maggi's message of "Thu, 20 Mar 2014 11:06:18 +0100") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.3 (gnu/linux) X-Pobox-Relay-ID: E4ED401C-B072-11E3-8CED-873F0E5B5709-02397024!a-pb-sasl-quonix.pobox.com X-detected-operating-system: by eggs.gnu.org: Solaris 10 X-Received-From: 208.72.237.25 X-BeenThere: guile-user@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: General Guile related discussions List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-user-bounces+guile-user=m.gmane.org@gnu.org Original-Sender: guile-user-bounces+guile-user=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.user:11147 Archived-At: On Thu 20 Mar 2014 11:06, Marco Maggi 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. Andy -- http://wingolog.org/