X-Git-Url: http://repo.macrolet.net/gitweb/?a=blobdiff_plain;f=src%2Fcompiler%2Fltv.lisp;h=e64cc8ac81dc31915f1e5cc32ad7d45b3fd001ff;hb=45bc305be4e269d2e1a477c8e0ae9a64df1ccd1c;hp=9ed48c8743a07206013ffd7327bc954e8bb759b4;hpb=57e21c4b62e8c1a1ee7ef59ed2abb0c864fb06bc;p=sbcl.git diff --git a/src/compiler/ltv.lisp b/src/compiler/ltv.lisp index 9ed48c8..e64cc8a 100644 --- a/src/compiler/ltv.lisp +++ b/src/compiler/ltv.lisp @@ -20,29 +20,30 @@ as if it were a constant. If READ-ONLY-P is non-NIL, then the resultant object is guaranteed to never be modified, so it can be put in read-only storage." - (if (producing-fasl-file) - (multiple-value-bind (handle type) - (compile-load-time-value (if read-only-p - form - `(make-value-cell ,form))) - (declare (ignore type)) - (ir1-convert start next result - (if read-only-p - `(%load-time-value ',handle) - `(value-cell-ref (%load-time-value ',handle))))) - (let ((value - (handler-case (eval form) - (error (condition) - (compiler-error "(during EVAL of LOAD-TIME-VALUE)~%~A" - condition))))) - (ir1-convert start next result - (if read-only-p - `',value - `(value-cell-ref ',(make-value-cell value))))))) + (let ((*allow-instrumenting* nil)) + (if (producing-fasl-file) + (multiple-value-bind (handle type) + (compile-load-time-value (if read-only-p + form + `(make-value-cell ,form))) + (declare (ignore type)) + (ir1-convert start next result + (if read-only-p + `(%load-time-value ',handle) + `(value-cell-ref (%load-time-value ',handle))))) + (let ((value + (handler-case (eval form) + (error (condition) + (compiler-error "(during EVAL of LOAD-TIME-VALUE)~%~A" + condition))))) + (ir1-convert start next result + (if read-only-p + `',value + `(value-cell-ref ',(make-value-cell value)))))))) (defoptimizer (%load-time-value ir2-convert) ((handle) node block) (aver (constant-lvar-p handle)) (let ((lvar (node-lvar node)) - (tn (make-load-time-value-tn (lvar-value handle) - *universal-type*))) + (tn (make-load-time-value-tn (lvar-value handle) + *universal-type*))) (move-lvar-result node block (list tn) lvar)))