[asdf-devel] loading a standalone lisp file

Robert Goldman rpgoldman at sift.info
Wed Oct 28 17:49:23 UTC 2009


Faré wrote:
> 2009/10/28 Robert Goldman <rpgoldman at sift.info>:
>> Faré wrote:
>>> 2009/10/28 Gary King <gwking at metabang.com>:
>>>>> Speaking of optimization settings, does anyone see any problem with
>>>>> putting in ASDF something that deterministically (re)sets the
>>>>> optimization setting before each and any perform operation? Otherwise,
>>>>> optimization settings will vary wildly depending on what
>>>>> implementation you use, which files get recompiled, etc.
>>>> I think we should do this; it's on my list.
>>>>
>>> Here's a skeleton of implementation (don't forget a defgeneric).
>>>
>>> (defmethod perform :before (operation component)
>>>     (proclaim-optimization-settings-for operation component))
>>>
>>> (defmethod proclaim-optimization-settings-for (op component)
>>>     (declare (ignorable op component))
>>>     (proclaim `(optimize ,@*default-optimization-settings*)))
>>>
>>> Unrelatedly, a slight refactoring patch is attached. It would makes it
>>> easier for ADG and other ASDF add-ons to reuse in a future-proof way
>>> the ASDF pathname merging algorithm.
>> Do we need a :after method to restore the old settings?  I'm not sure
>> how to do that actually, since I don't believe there's a portable way to
>> record them.  Do you have thoughts about this?
>>
> (rpg replied to me in private but I'm Cc'ing back the list)
> 
> At ITA, we actually use a :around method with
> 
> (defun call-with-local-compilation-settings (thunk)
>   (let
>       #+clozure
>       ((ccl::*nx-speed* ccl::*nx-speed*)
>         (ccl::*nx-space* ccl::*nx-space*)
>         (ccl::*nx-safety* ccl::*nx-safety*)
>         (ccl::*nx-cspeed* ccl::*nx-cspeed*)
>         (ccl::*nx-debug* ccl::*nx-debug*))
>       #+sbcl
>       ((sb-c::*policy* sb-c::*policy*))
>       #-(or clozure sbcl)
>       ()
>     (funcall thunk)))
> 
> (defmacro with-local-compilation-settings (() &body body)
>   `(call-with-local-compilation-settings (lambda () , at body)))

Gary, got some Allegro fu that we could shovel into
with-local-compilation-settings?

best,
r





More information about the asdf-devel mailing list