Changeset 12768


Ignore:
Timestamp:
06/27/10 10:10:38 (13 years ago)
Author:
ehuelsmann
Message:

Fix elimination of unused local functions:
macroexpand before scanning the body.

Found by: William Wadsworth (will wadsworth 10 at gmail com)

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/precompiler.lisp

    r12749 r12768  
    789789        (operator (car form))
    790790        (locals (cadr form))
    791         (body (cddr form)))
     791        ;; precompile (thus macro-expand) the body before inspecting it
     792        ;; for the use of our locals and optimizing them away
     793        (body (mapcar #'precompile1 (cddr form))))
    792794    (dolist (local locals)
    793795      (let* ((name (car local))
     
    821823    (list* (car form)
    822824           (precompile-local-functions locals)
    823            (mapcar #'precompile1 body))))
     825           body)))
    824826
    825827(defun precompile-function (form)
Note: See TracChangeset for help on using the changeset viewer.