Changeset 11682


Ignore:
Timestamp:
Feb 4, 2009, 5:48:41 PM (11 years ago)
Author:
gz
Message:

make fcomp-macroexpand-1 handle warnings like the compiler

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl/lib/nfcomp.lisp

    r11658 r11682  
    940940
    941941(defun fcomp-macroexpand-1 (form env)
    942   (multiple-value-bind (new win) (macroexpand-1 form env)
    943     (when win
    944       (fcomp-note-source-transformation form new))
    945     (values new win)))
     942  (handler-bind ((warning (lambda (c)
     943                            (nx1-whine :program-error c)
     944                            (muffle-warning c)))
     945                 (program-error (lambda (c)
     946                                  (if *fasl-break-on-program-errors*
     947                                    (cerror "continue compilation ignoring this form" c)
     948                                    (progn
     949                                      (when (typep c 'compile-time-program-error)
     950                                        (setq c (make-condition 'simple-program-error
     951                                                  :format-control (simple-condition-format-control c)
     952                                                  :format-arguments (simple-condition-format-arguments c))))
     953                                      (nx1-whine :program-error c)))
     954                                  (return-from fcomp-macroexpand-1 (values nil t)))))
     955    (multiple-value-bind (new win) (macroexpand-1 form env)
     956      (when win
     957        (fcomp-note-source-transformation form new))
     958      (values new win))))
    946959
    947960(defun fcomp-transform (form env)
Note: See TracChangeset for help on using the changeset viewer.