Ignore:
Timestamp:
Jul 1, 2008, 5:15:00 PM (12 years ago)
Author:
gz
Message:

Make program-errors always cause an immediate error outside of file compilation.

For file compilation, the behavior is now controlled by a new :break-on-program-errors
argument to compile-file, defaulting from ccl::*fasl-break-on-program-errors*:

(defvar *fasl-break-on-program-errors* #+ccl-0711 nil #-ccl-0711 :defer

"Controls what happens when the compiler detects PROGRAM-ERROR's during file compilation.

If T, the compiler signals an error immediately when it detects the program-error.

If :DEFER, program errors are reported as compiler warnings, and in addition, an error

is signalled at the end of file compilation. This allows all warnings for the file
to be reported, but prevents the creation of a fasl file.

If NIL, program errors are treated the same as any other error condition detected by

the compiler, i.e. they are reported as compiler warnings and do not cause any
error to be signalled at compile time.")

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl/compiler/nx0.lisp

    r9764 r9861  
    5050(defparameter *nx-hoist-declarations* t)
    5151(defparameter *nx-loop-nesting-level* 0)
     52(defvar *nx-break-on-program-errors* t)
    5253
    5354(defvar *nx1-vcells* nil)
     
    13611362          (setf (afunc-acode p) (nx1-lambda '(&rest args) `(args ,(runtime-program-error-form c)) nil)))
    13621363      (handler-bind ((warning (lambda (c)
    1363                                 (nx1-whine :program-error c)
    1364                                 (muffle-warning c)))
    1365                      (program-error (lambda (c)
    1366                                       (when (typep c 'compile-time-program-error)
    1367                                         (setq c (make-condition 'simple-program-error
    1368                                                   :format-control (simple-condition-format-control c)
    1369                                                   :format-arguments (simple-condition-format-arguments c))))
    1370                                       (nx1-whine :program-error c)
    1371                                       (throw 'program-error-handler c))))
     1364                                (nx1-whine :program-error c)
     1365                                (muffle-warning c)))
     1366                     (program-error (lambda (c)
     1367                                      (when *nx-break-on-program-errors*
     1368                                        (cerror "continue compilation ignoring this form" c))
     1369                                      (when (typep c 'compile-time-program-error)
     1370                                        (setq c (make-condition 'simple-program-error
     1371                                                                :format-control (simple-condition-format-control c)
     1372                                                                :format-arguments (simple-condition-format-arguments c))))
     1373                                      (unless *nx-break-on-program-errors*
     1374                                        (nx1-whine :program-error c))
     1375                                      (throw 'program-error-handler c))))
    13721376        (multiple-value-bind (body decls)
    13731377            (with-program-error-handler (lambda (c) (runtime-program-error-form c))
Note: See TracChangeset for help on using the changeset viewer.