better reader-errors for COMPILE-FILE
authorNikodemus Siivola <nikodemus@random-state.net>
Tue, 24 Apr 2012 06:16:47 +0000 (09:16 +0300)
committerNikodemus Siivola <nikodemus@random-state.net>
Tue, 24 Apr 2012 07:54:37 +0000 (10:54 +0300)
commitac93aa515b197d751dad85d70432ebc87fac420a
treededfc69e1c0b184cd6f1c649a305b1d5858c6185
parentbf69a011740c082566642b2335a9968b441cadec
better reader-errors for COMPILE-FILE

 * Make SIMPLE-READER-PACKAGE-ERROR a subclass of PACKAGE-ERROR.

 * Make reader signal a SIMPLE-READER-PACKAGE-ERROR for missing packages,
   instead of a vanilla PACKAGE-ERROR: that way get the position reported as
   well.

 * Factor out line and column reporting logic for reader-errors into a
   separate function, and allow using other than current file position.

 * READ-FOR-COMPILE-FILE needs to use COMPILER-ERROR, and
   INPUT-ERROR-IN-COMPILE-FILE is a subclass of READER-ERROR, not a
   FATAL-COMPILER-CONDITION.

 * *COMPILER-ERROR-BAILOUT* binding in SUB-COMPILE-FILE was missing the
   condition argument from the lambda-list, and should not mumble to
   *STANDARD-OUTPUT*.

 This patch converts all input errors into COMPILE-FILE failures without
 dropping into the debugger. That might be taking things too far, though --
 but the question of "which errors should we let enter the debugger" has no
 obvious answers to me at least. Perhaps *COMPILER-HANDLED-ERRORS* is the way
 to go?

 Fixes lp#493380
NEWS
src/code/condition.lisp
src/code/reader.lisp
src/compiler/compiler-error.lisp
src/compiler/main.lisp
tests/compiler-test-util.lisp
tests/compiler.impure.lisp
tests/reader.impure.lisp