From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Marius Vollmer Newsgroups: gmane.lisp.guile.devel Subject: Re: new-model.text, please comment Date: 13 Sep 2002 22:22:03 +0200 Sender: guile-devel-admin@gnu.org Message-ID: <87sn0dr66s.fsf@zagadka.ping.de> References: <871y80tn9r.fsf@zagadka.ping.de> <87elby23fl.fsf@raven.i.defaultvalue.org> NNTP-Posting-Host: localhost.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1031948581 18917 127.0.0.1 (13 Sep 2002 20:23:01 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Fri, 13 Sep 2002 20:23:01 +0000 (UTC) Cc: guile-devel@gnu.org 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 17pwxw-0004ux-00 for ; Fri, 13 Sep 2002 22:23:00 +0200 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10) id 17pwy5-0004Xg-00; Fri, 13 Sep 2002 16:23:09 -0400 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 17pwx2-0004LK-00 for guile-devel@gnu.org; Fri, 13 Sep 2002 16:22:04 -0400 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 17pwx0-0004L8-00 for guile-devel@gnu.org; Fri, 13 Sep 2002 16:22:03 -0400 Original-Received: from dialin.speedway42.dip100.dokom.de ([195.138.42.100] helo=zagadka.ping.de) by monty-python.gnu.org with smtp (Exim 4.10) id 17pwwz-0004J8-00 for guile-devel@gnu.org; Fri, 13 Sep 2002 16:22:01 -0400 Original-Received: (qmail 3538 invoked by uid 1000); 13 Sep 2002 20:22:03 -0000 Original-To: Rob Browning In-Reply-To: <87elby23fl.fsf@raven.i.defaultvalue.org> Original-Lines: 49 User-Agent: Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 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:1337 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:1337 Rob Browning writes: > > The compiler is free to reuse top-level frames for several top-level > > forms, even when executing a form will change the name/module mapping > > used in the next. You must explicitely tell the compiler that it must > > construct a new top-level frame. You can do this with the > > > > (:module-barrier) XXX - need better name > > > > compiler directive. The directive guarantees that code prior to it is > > fully executed before top-level frames for forms after it are > > constructed. The directive must be a top-level form. > > Could you provide a bit of elaboration here. More specifically, what > does "fully executed" mean? There is no special meaning to "fully" here. I could have just said "executed". > For example, does the above mean that given the following code: > > (foo ...) > (do-something-that-changes-the-current-module!) > (bar ...) > > the results would be undefined because the compiler is within its > rights to presume that do-something *doesn't* change the current > module unless a without a :module-barrier call like so: > > (foo ...) > (do-something-that-changes-the-current-module!) > (:module-barrier) > (bar ...) > > This seems to be implied by the later examples of use-modules, etc., > but I just wanted to make sure I understood what you were stating. Yes, this is what I had in mind. Without this :module-barrier statement, the compiler would have to assume that any call can change the module setup (which will make a lot optimizations impossible). Or we would have to have a different kind of module system. We could have also use declarations to communicate the module barrier to the compiler. I.e., the variable named do-something-that-changes-the-current-module! has a declaration that the compiler understands. -- GPG: D5D4E405 - 2F9B BCCC 8527 692A 04E3 331E FAF8 226A D5D4 E405 _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel