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: goops and memoization Date: Wed, 20 Nov 2002 19:11:20 +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 1037816118 10567 80.91.224.249 (20 Nov 2002 18:15:18 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 20 Nov 2002 18:15:18 +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 18EZNa-0002kE-00 for ; Wed, 20 Nov 2002 19:15:14 +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 18EZKa-0001eP-00; Wed, 20 Nov 2002 13:12:08 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10) id 18EZJt-0000sr-00 for guile-devel@gnu.org; Wed, 20 Nov 2002 13:11:25 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10) id 18EZJr-0000rX-00 for guile-devel@gnu.org; Wed, 20 Nov 2002 13:11:24 -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 18EZJr-0000rD-00 for guile-devel@gnu.org; Wed, 20 Nov 2002 13:11:23 -0500 Original-Received: from localhost (dirk@localhost) by sallust.ida.ing.tu-bs.de (8.9.3+Sun/8.9.1) with ESMTP id TAA18511; Wed, 20 Nov 2002 19:11:20 +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:1731 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:1731 On 17 Nov 2002, Neil Jerram wrote: > >>>>> "Dirk" == Dirk Herrmann writes: > > Dirk> Is there any goops expert around willing to improve the > Dirk> situation with goops? > > No, but I'm willing to try to become one. > > If you can describe some of the things that you want > investigated/understood as a few specific questions, I'll take a look. First, some explanation about the way my memoizer works: My memoizer code memoizes local variable accesses, that is, replaces the symbols by the corresponding ilocs. Symbols that correspond to accesses to global variables are (at least for now) just left as they are. The executor will memoize them whenever the code is executed. Thus, symbols that are left within the code are known to belong to global variables. Thus, I have changed the executor such that if it finds a symbol in the code it only looks up the module for a binding, not the local environment frames. This conflicts with goops: goops unmemoizes the function code, using 'procedure-source' (look into oop/goops/compile.scm). This will re-create the original code, including all the symbols that refer to local variables. This un-memoized code is then optimized in some way, and re-written into the closure object. Then, if the closure is evaluated, it is not run through the memoizer again (since it is already a closure). Now, if the executor runs over a symbol corresponding to a local variable, it will treat is as a symbol belonging to a global variable and try to find it within the module. It would be great if you could take a look at goops and find a solution for this problem. Best regards, Dirk _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel