From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Dirk Herrmann Newsgroups: gmane.lisp.guile.devel Subject: Re: bug in syncase Date: Thu, 21 Nov 2002 18:53:51 +0100 (CET) Sender: guile-devel-admin@gnu.org Message-ID: References: NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: main.gmane.org 1037901334 13204 80.91.224.249 (21 Nov 2002 17:55:34 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Thu, 21 Nov 2002 17:55:34 +0000 (UTC) Cc: Guile Development Return-path: Original-Received: from monty-python.gnu.org ([199.232.76.173]) by main.gmane.org with esmtp (Exim 3.35 #1 (Debian)) id 18EvY3-0003QW-00 for ; Thu, 21 Nov 2002 18:55:31 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 18EvXg-0006Si-00; Thu, 21 Nov 2002 12:55:08 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 18EvWs-0004ZJ-00 for guile-devel@gnu.org; Thu, 21 Nov 2002 12:54:18 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 18EvWi-00049p-00 for guile-devel@gnu.org; Thu, 21 Nov 2002 12:54:15 -0500 Original-Received: from sallust.ida.ing.tu-bs.de ([134.169.132.52]) by monty-python.gnu.org with esmtp (Exim 4.10) id 18EvWg-0003SG-00 for guile-devel@gnu.org; Thu, 21 Nov 2002 12:54:07 -0500 Original-Received: from localhost (dirk@localhost) by sallust.ida.ing.tu-bs.de (8.9.3+Sun/8.9.1) with ESMTP id SAA21253; Thu, 21 Nov 2002 18:53:51 +0100 (CET) Original-To: Neil Jerram In-Reply-To: Errors-To: guile-devel-admin@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.0.11 Precedence: bulk List-Help: List-Post: List-Subscribe: , List-Id: Developers list for Guile, the GNU extensibility library List-Unsubscribe: , List-Archive: Xref: main.gmane.org gmane.lisp.guile.devel:1734 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:1734 Hello Neil, > ;;; NIL-COND expressions have the form: > ;;; > ;;; (nil-cond COND VAL COND VAL ... ELSEVAL) OK, done with that one. > @fop is used to translate an Elisp application, and is complicated in > two ways: > > - When the application is translated, we don't know whether the CAR of > the application represents a function or a macro, and therefore > whether the application arguments need to be translated. > > - The symbol in the CAR may need to be looked up recursively, for > defalias support. > > The Scheme translation code translates (fn arg ...) to (@fop fn > (transformer-macro arg ...)). Then, when (@fop ...) is memoized and > evaluated, > > - scm_m_atfop changes it to (#@apply fnval (transformer-macro arg > ...)) if fnval is a function, or (fnval arg ...) if fnval is a > macro, where fnval is the function or macro obtained from looking up > fn's symbol function slot (recursively if needed) > > - remaining evaluation of (#@apply fnval (transformer-macro arg ...)) > or (fnval arg ...) is done by the evaluator. I have some questions about that one: As you say, scm_m_atfop changes the code in one of two ways, depending on the state of fnval at some point in time. Currently, this time is when the code is _executed_. See the following example: (define foo 1) (define (fn) ) (define (bar) (if (= foo 2) (@fop fn (transformer-macro arg ...))))) (bar) (define foo 2) (defmacro fn args ) (bar) In the current implementation, the decision, how the @fop expression should be changed, would be taken when foo was set to 2. In contrast, with my memoization phase I would like to perform the transformation (including the expansion of the transformer-macro expression) at the point where bar gets defined. In other words: Are there any statements about _when_ the expansion of the @fop macro and the transformer-macro should happen? Best regards, Dirk Herrmann _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel