Ignore:
Timestamp:
07/12/10 21:05:28 (12 years ago)
Author:
astalla
Message:

Fix r12768: macroexpand the body in an environment augmented with the newly-introduced function definitions to shadow macros with the same names.

File:
1 edited

Legend:

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

    r12768 r12804  
    789789        (operator (car form))
    790790        (locals (cadr 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))))
     791  body)
     792    ;; first augment the environment with the newly-defined local functions
     793    ;; to shadow preexisting macro definitions with the same names
     794    (dolist (local locals)
     795      (environment-add-function-definition *precompile-env*
     796             (car local) (cddr local)))
     797    ;; then precompile (thus macro-expand) the body before inspecting it
     798    ;; for the use of our locals and optimizing them away
     799    (setq body (mapcar #'precompile1 (cddr form)))
    794800    (dolist (local locals)
    795801      (let* ((name (car local))
Note: See TracChangeset for help on using the changeset viewer.