From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Andy Wingo Newsgroups: gmane.lisp.guile.devel Subject: Re: Patches for wip-rtl Date: Mon, 22 Apr 2013 22:27:29 +0200 Message-ID: <8761zejopa.fsf@pobox.com> References: NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1366662454 1402 80.91.229.3 (22 Apr 2013 20:27:34 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 22 Apr 2013 20:27:34 +0000 (UTC) Cc: guile-devel To: Noah Lavine Original-X-From: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Mon Apr 22 22:27:38 2013 Return-path: Envelope-to: guile-devel@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 1UUNKs-0003Iu-Er for guile-devel@m.gmane.org; Mon, 22 Apr 2013 22:27:38 +0200 Original-Received: from localhost ([::1]:60074 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUNKs-0006lY-24 for guile-devel@m.gmane.org; Mon, 22 Apr 2013 16:27:38 -0400 Original-Received: from eggs.gnu.org ([208.118.235.92]:43000) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUNKp-0006l7-9a for guile-devel@gnu.org; Mon, 22 Apr 2013 16:27:36 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1UUNKn-0000XG-UZ for guile-devel@gnu.org; Mon, 22 Apr 2013 16:27:35 -0400 Original-Received: from a-pb-sasl-quonix.pobox.com ([208.72.237.25]:46245 helo=sasl.smtp.pobox.com) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1UUNKn-0000X3-QV for guile-devel@gnu.org; Mon, 22 Apr 2013 16:27:33 -0400 Original-Received: from sasl.smtp.pobox.com (unknown [127.0.0.1]) by a-pb-sasl-quonix.pobox.com (Postfix) with ESMTP id B17F3CAF9; Mon, 22 Apr 2013 16:27:32 -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=naHY2/6o8iGBeTP0mKHb9l2xS6M=; b=R8HnI/ UBaPKPVzYoylWdpX0pXH2KbxNxDlWqp2Ju5yW0kchPEFzegDV3MraamaOyQuwZxy WVvVAQdaRguhMS4pba+O/sO7gGf3GKwLQGZWPdKLmTzLYhASK2bq38zdtmgFYywG EB7EkuUmsO9Y7Z8Uzxskc2pgPslXwTlObYeqY= 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=efxiPWdHsvKGYaIAGO/2Rglc6lfbmYqM s7F4WybdKvJ7CSjl3MWQQFib8JuLWQVO46iM67MjJ3XyGDM5JCD4vFzcrZ2Q3Ufp JPveCt2GZaAeKH3sAg5GgTygv8FbSbAjFCxa/HfHedrgHFjkT2A80A6rtEen/iDG 9q6pyN9uCFA= 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 A91C2CAF8; Mon, 22 Apr 2013 16:27:32 -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 09967CAF7; Mon, 22 Apr 2013 16:27:31 -0400 (EDT) In-Reply-To: (Noah Lavine's message of "Sun, 21 Apr 2013 11:50:49 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.2 (gnu/linux) X-Pobox-Relay-ID: 0F692830-AB8B-11E2-822C-C8310E5B5709-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-devel@gnu.org X-Mailman-Version: 2.1.14 Precedence: list List-Id: "Developers list for Guile, the GNU extensibility library" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Original-Sender: guile-devel-bounces+guile-devel=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.devel:16286 Archived-At: Hi Noah, On Sun 21 Apr 2013 17:50, Noah Lavine writes: > + ((assemble-program > + '((begin-program foo) > + (assert-nargs-ee/locals 0 1) > + (bind-rest 0) > + ;; nonintuitive, but the output of bind-rest has to count as an > + ;; argument for reserve-locals to work. therefore, even if we > + ;; started with 0 arguments, we end up with one. > + (assert-nargs-ee 1) > + (return 0) > + (end-program))))) Do I understand you correctly that you're just making a sequence of non-idiomatic instructions because you know that doing the assert-nargs-ee will check nargs? I would think in a normal case you'd want to do "assert-nargs-ge 0", then "bind-rest 0", then "reserve-locals 0" (or not; in this case it would not be necessary). However the bug you have seen with bind-rest is probably also present with keyword arguments. We should probably just change the reserve-locals instruction to also take "nargs" as a value, given that we know it statically at compile-time. Does that make sense to you? Andy -- http://wingolog.org/