|
From: | Paul F. Dietz |
Subject: | Re: [Gcl-devel] New random tester failures |
Date: | Tue, 07 Dec 2004 18:58:29 -0600 |
User-agent: | Mozilla/5.0 (X11; U; Linux i686; en-US; rv:1.7.2) Gecko/20040803 |
Camm Maguire wrote:
Greetings, and thanks again as always, Paul! I have a fix for this, as yet uncommitted. But I realize as I chase these down that I need very frequently to rebind arguments in a let* using gensymmed temporaries, and this has reminded me of a longstanding performance problem with this I'd like to fix. In brief, doing this destroys any type information that may exist for the rebound variable via declaration or proclamation. I have plan A and plan B, and would like to solicit your opinion: A) When the compiler expands macros, or funcalls compiler macro functions, detect whether new bindings are introduced, and if so, recursively macroexpand the form, determine whether the binding is changed in the body of the new let, and if not, add a declaration read from a stack when appropriate at the head of the let. Advantage -- centralized -- disadvantage -- could be slightly tricky.
Isn't this just a special case of the more general procedure of adding declarations for locals that are not later assigned? There's no need for those locals to have been introduced by a macro.
B) Push declarations onto the environment passed to macroexpand, and rewrite each relevant macro (mostly setf expanders and compiler macros) to insert the declarations where appropriate. I'm leaning toward A, but am quite open minded.
Either one sounds ok, although the first could be made more general.
Remember your aluding to an Allegro proposal by Duane Rettig (?) when we discussed this before, but never could find this.
It's in the ACL 7.0 release notes. http://www.franz.com/support/documentation/7.0/doc/environments.htm Paul
[Prev in Thread] | Current Thread | [Next in Thread] |