Comment 1 for bug 823014

Revision history for this message
Nikodemus Siivola (nikodemus) wrote :

commit ed066199124c46998798122cc776e615c9c50372
Author: Nikodemus Siivola <email address hidden>
Date: Tue Aug 9 10:57:41 2011 +0300

    LOAD-TIME-VALUE improvements

     * Derive the type of :TOPLEVEL lambdas properly. Without this we were
       never able to utilize the type from COMPILE-LOAD-TIME-STUFF.

     * Use the source-type whenever it is more accurate than the type from
       COMPILE-LOAD-TIME-STUFF -- eg. when using a value cell.

     * Add ALIAS argument to IR1-CONVERT, allowing saving alternate forms
       into *CURRENT-PATH*: this allows

         (defparameter *var* 10)

         (compile nil '(lambda () (the list (load-time-value *var*))))

        to give the warning

          ; Derived type of *VAR* is
          ; (VALUES (INTEGER 10 10) &OPTIONAL),
          ; conflicting with its asserted type
          ; LIST.

        instead of the much less useful

          ; Constant 10 conflicts with its asserted type LIST.

      * Use THE-IN-POLICY directly in LOAD-TIME-VALUE, allowing the file-
        compiler to report the LOAD-TIME-VALUE form for type-conflicts
        instead of (TRULY-THE <type> (%LOAD-TIME-VALUE ...))