From mboxrd@z Thu Jan 1 00:00:00 1970 Path: main.gmane.org!not-for-mail From: Mikael Djurfeldt Newsgroups: gmane.lisp.guile.devel Subject: Re: expansion, memoization, and evaluation... Date: Wed, 04 Dec 2002 11:55:20 +0100 Sender: guile-devel-admin@gnu.org Message-ID: References: <87r8cyh5ec.fsf@raven.i.defaultvalue.org> <15853.47140.340761.46290@localhost.localdomain> Reply-To: djurfeldt@nada.kth.se NNTP-Posting-Host: main.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: main.gmane.org 1038999793 20905 80.91.224.249 (4 Dec 2002 11:03:13 GMT) X-Complaints-To: usenet@main.gmane.org NNTP-Posting-Date: Wed, 4 Dec 2002 11:03:13 +0000 (UTC) Cc: djurfeldt@nada.kth.se, Dirk Herrmann , guile-devel@gnu.org, Rob Browning 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 18JXJ8-0005Qd-00 for ; Wed, 04 Dec 2002 12:03:10 +0100 Original-Received: from localhost ([127.0.0.1] helo=monty-python.gnu.org) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18JXIJ-0002pC-00; Wed, 04 Dec 2002 06:02:19 -0500 Original-Received: from list by monty-python.gnu.org with tmda-scanned (Exim 4.10.13) id 18JXHp-0001nK-00 for guile-devel@gnu.org; Wed, 04 Dec 2002 06:01:49 -0500 Original-Received: from mail by monty-python.gnu.org with spam-scanned (Exim 4.10.13) id 18JXHi-0001Wu-00 for guile-devel@gnu.org; Wed, 04 Dec 2002 06:01:46 -0500 Original-Received: from kvast.blakulla.net ([213.212.20.77]) by monty-python.gnu.org with esmtp (Exim 4.10.13) id 18JXHi-0001TS-00 for guile-devel@gnu.org; Wed, 04 Dec 2002 06:01:42 -0500 Original-Received: from barbara.blakulla.net ([213.212.21.238] helo=linnaeus) by kvast.blakulla.net with esmtp (Exim 3.36 #1 (Debian)) id 18JXBZ-0003mQ-00; Wed, 04 Dec 2002 11:55:21 +0100 Original-Received: from mdj by linnaeus with local (Exim 3.36 #1 (Debian)) id 18JXBY-0002oB-00; Wed, 04 Dec 2002 11:55:20 +0100 Original-To: pessy@chez.com Original-Cc: djurfeldt@nada.kth.se In-Reply-To: <15853.47140.340761.46290@localhost.localdomain> (klaus schilling's message of "Wed, 4 Dec 2002 09:09:08 +0100") User-Agent: Gnus/5.090008 (Oort Gnus v0.08) Emacs/21.2 (i386-pc-linux-gnu) 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:1799 X-Report-Spam: http://spam.gmane.org/gmane.lisp.guile.devel:1799 klaus schilling writes: > Mikael Djurfeldt writes: > > If the optimizer does source --> source transformation it's reasonably > > easy to use it together with an offline compiler. It's more difficult > > to explain the memoized code to the compiler... > > How is code generated at run-time evaluated by eval , eval-string, > or local-eval handled by the optimizer? Clarification: The particular optimizer we're talking about here sits just before method code is run for the first time, that is as a part of the application of a generic method. It is supposed to mainly do goops-specific optimizations. Answer: The only way for eval, eval-string or local-eval to get to code generated by the optimizer is by invoking a generic function. This GF does type dispatch on its arguments. If the offline compiler, through code analysis, has concluded that code will be needed for a certain combination of arguments, the GF can select precompiled code. If not, there are different possible alternatives to choose from: Alt 1: Handle it as in the interpreter. Alt 2: Same as alt 1, but invoke the compiler dynamically on the output of the optimizer. Alt 3: Invoke an unoptimized version of the method (with all internal type dispatch intact). Alt 3 is the "vanilla" way to do compilation. You see, I'm not talking about peculiarities of goops putting constraints on how you can do compilation. You can compile things standardly alright. Rather, it's about novel opportunities. M _______________________________________________ Guile-devel mailing list Guile-devel@gnu.org http://mail.gnu.org/mailman/listinfo/guile-devel