wanted: *evaluator-mode* :compile-lambdas

Bug #654412 reported by Nikodemus Siivola
6
This bug affects 1 person
Affects Status Importance Assigned to Milestone
SBCL
Triaged
Wishlist
Unassigned

Bug Description

The reason *EVALUATOR-MODE* defaults to :COMPILE is that otherwise DEFUNs compiled in the REPL would be very slow -- which would be a nasty surprise to many people, we think.

:COMPILE-LAMBDAS would be a halfway house. When evaluating

 (eval `(let ((x 0)) (values (lambda () (incf x)) (incf x)))

instead of wrapping the whole thing in a LAMBDA and doing COMPILE & FUNCALL, do something like

 (values (funcall (compile nil `(lambda (#:x)
                                  (symbol-macrolet ((x (var-value #:x)))
                                    (lambda () (incf x))))
                  x-var)
         (eval-in-env `(incf x) env-with-x-as-x-var))

which allows everything but the LAMBDA to be elided from compilation.

The idea is that functions would be relatively speaking slow to eval but fast to run, and everything else would be fast to eval.

Tags: eval feature
To post a comment you must log in.
This report contains Public information  
Everyone can see this information.

Other bug subscribers

Remote bug watches

Bug watches keep track of this bug in other bug trackers.