Commit [04a651] Maximize Restore History

fix source information for functions from EVAL

* Removed the breathtaking (NAMED-LAMBDA (EVAL (DEFUN FOO)) ...) hack, which
caused inconsistent source locations, and broke the built-in debugger
source command for evaluated functions.

Replace it with *SOURCE-FORM-CONTEXT-ALIST*, which allows the simple
evaluator to communicate the original context to the compiler without
messing with the function source.

This also means we no longer have to wrap named-lambdas and lambdas in
another lambda, but can instead compile them directly -- which in turn
allows FUNCTION-LAMBDA-EXPRESSION to work correctly for definitions from
EVAL and LOAD.

* Additionally, use a handler to muffle any compiler notes from EVAL instead
of using a declaration: those can leak to the user via F-L-E.

* Change ACTUALLY-COMPILE to return a function signaling an error instead of
returning NIL when compilation fails fatally. Doing this in
ACTUALLY-COMPILE allows us to rely on COMPILE-IN-LEXENV always returning a
function, and gives easy access to a better error message.

* Properly associate COMPILER-ERRORS with their SIGNAL-ERROR restart.

* Adjust debug.impure.lisp to be less dependent on the details of
%SIMPLE-EVAL.

* Test cases. Pay special attention to TEST-DEBUGGER in debug.impure.lisp.

* New docstring for COMPILE. Added a sneaky teaser about COMPILE being able
to recompile things, which is new starting to look feasible.

Nikodemus Siivola Nikodemus Siivola 2012-05-17

changed src/code/eval.lisp
changed src/compiler/compiler-error.lisp
changed src/compiler/debug-dump.lisp
changed src/compiler/ir1report.lisp
changed src/compiler/target-main.lisp
changed tests/debug.impure.lisp
changed tests/eval.impure.lisp
changed NEWS
src/code/eval.lisp Diff Switch to side-by-side view
Loading...
src/compiler/compiler-error.lisp Diff Switch to side-by-side view
Loading...
src/compiler/debug-dump.lisp Diff Switch to side-by-side view
Loading...
src/compiler/ir1report.lisp Diff Switch to side-by-side view
Loading...
src/compiler/target-main.lisp Diff Switch to side-by-side view
Loading...
tests/debug.impure.lisp Diff Switch to side-by-side view
Loading...
tests/eval.impure.lisp Diff Switch to side-by-side view
Loading...
NEWS Diff Switch to side-by-side view
Loading...