From: Nikodemus S. <de...@us...> - 2007-07-20 23:43:24
|
Update of /cvsroot/sbcl/sbcl/src/compiler In directory sc8-pr-cvs8.sourceforge.net:/tmp/cvs-serv26105/src/compiler Modified Files: ir1opt.lisp Log Message: 1.0.7.34: adjust lexenv frobbing in TRANSFORM-CALL to happen earlier * Need to replace the call lexenv with the frobbed one before WITH-IR1-ENVIRONMENT-FROM-NODE so that IR1-CONVERT-INLINE-LAMBDA gets a consistent *LEXENV* binding. (This has been around since 0.9.17.5, but since it only affects known functions with optional arguments and transformations it suddenly become a lot more easy to hit with the new MEMBER and ASSOC transforms.) * Test case. Index: ir1opt.lisp =================================================================== RCS file: /cvsroot/sbcl/sbcl/src/compiler/ir1opt.lisp,v retrieving revision 1.122 retrieving revision 1.123 diff -u -d -r1.122 -r1.123 --- ir1opt.lisp 19 Jul 2007 13:44:58 -0000 1.122 +++ ir1opt.lisp 20 Jul 2007 23:43:21 -0000 1.123 @@ -1125,9 +1125,24 @@ (aver (and (legal-fun-name-p source-name) (not (eql source-name '.anonymous.)))) (node-ends-block call) + ;; The internal variables of a transform are not going to be + ;; interesting to the debugger, so there's no sense in + ;; suppressing the substitution of variables with only one use + ;; (the extra variables can slow down constraint propagation). + ;; + ;; This needs to be done before the WITH-IR1-ENVIRONMENT-FROM-NODE, + ;; so that it will bind *LEXENV* to the right environment. + (setf (combination-lexenv call) + (make-lexenv :default (combination-lexenv call) + :policy (process-optimize-decl + '(optimize + (preserve-single-use-debug-variables 0)) + (lexenv-policy + (combination-lexenv call))))) (with-ir1-environment-from-node call (with-component-last-block (*current-component* (block-next (node-block call))) + (let ((new-fun (ir1-convert-inline-lambda res :debug-name (debug-name 'lambda-inlined source-name) @@ -1135,17 +1150,6 @@ (ref (lvar-use (combination-fun call)))) (change-ref-leaf ref new-fun) (setf (combination-kind call) :full) - ;; The internal variables of a transform are not going to be - ;; interesting to the debugger, so there's no sense in - ;; suppressing the substitution of variables with only one use - ;; (the extra variables can slow down constraint propagation). - (setf (combination-lexenv call) - (make-lexenv :default (combination-lexenv call) - :policy (process-optimize-decl - '(optimize - (preserve-single-use-debug-variables 0)) - (lexenv-policy - (combination-lexenv call))))) (locall-analyze-component *current-component*)))) (values)) |