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: Syntax checks Date: Sat, 6 Apr 2002 08:25:52 +0200 (MEST) Sender: guile-devel-admin@gnu.org Message-ID: NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: TEXT/PLAIN; charset=US-ASCII X-Trace: main.gmane.org 1018074441 16841 127.0.0.1 (6 Apr 2002 06:27:21 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Sat, 6 Apr 2002 06:27:21 +0000 (UTC) Original-Received: from fencepost.gnu.org ([199.232.76.164]) by main.gmane.org with esmtp (Exim 3.33 #1 (Debian)) id 16tjfV-0004NW-00 for ; Sat, 06 Apr 2002 08:27:21 +0200 Original-Received: from localhost ([127.0.0.1] helo=fencepost.gnu.org) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16tjfE-000799-00; Sat, 06 Apr 2002 01:27:04 -0500 Original-Received: from marvin.ida.ing.tu-bs.de ([134.169.132.60]) by fencepost.gnu.org with esmtp (Exim 3.34 #1 (Debian)) id 16tje6-00074g-00 for ; Sat, 06 Apr 2002 01:25:54 -0500 Original-Received: from localhost (dirk@localhost) by marvin.ida.ing.tu-bs.de (8.11.0/8.11.0/SuSE Linux 8.11.0-0.4) with ESMTP id g366PqA25271 for ; Sat, 6 Apr 2002 08:25:52 +0200 X-Authentication-Warning: marvin.ida.ing.tu-bs.de: dirk owned process doing -bs Original-To: Guile Development List Errors-To: guile-devel-admin@gnu.org X-BeenThere: guile-devel@gnu.org X-Mailman-Version: 2.0.8 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:310 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:310 Hello everybody, in the evaluator, there are a lot of syntax checks performed that could probably better be performed in a previous syntax checking phase, keeping the evaluator itself free of such checks. As an example, there is the 'do loop construct: In the body of the do loop you only have to execute expressions that can have a side effect. We do not have a proper analysis for which expressions can have a side effect and which don't, but there is a simple syntactic criterion that can be used: If the expression is not a list, then it is an object or a variable reference and can't have sideeffects. Thus, the body of the do loop could be scanned in the macro transformer and freed of unnecessary expressions. Then, the corresponding check in the evaluator could be removed. I would like to apply such changes, but I have some questions: * Removing unnecessary expressions from code would change the source in a way that can't be restored by unmemoizing. Do we care? In the long run we will probably want to allow more transformations on the source anyway for the sake of optimization. Then, memoization/unmemoization won't work and we will have to provide a different mechanism to record the relationship between transformed code and the source. * Should warnings be issued when dead code is eliminated from the source? Best regards Dirk Herrmann _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel