anchor.diff:      (compile-body (list bst-name))
       (package-as-form)))	
   
  -(defun compile-bst-function (bst-name function-definition stream)
  -  (let ((*currently-compiled-function* bst-name)
  -	(lisp-name (bst-name-to-lisp-name bst-name :function)))
  +(defun print-bst-function-info (bst-function stream)
  +  "Print information on arity and side effects of BST-FUNCTION to
  +STREAM as Lisp comments."
  +  (let ((side-effects (bst-function-side-effects bst-function)))
  +    #-clisp
  +    (format stream
  +	    "~%~<;; ~@;~:S --> ~:S ~:[~;with side-effects ~]~:[~;~%with assignment to~:*~{ ~S~}~]~:[~;~%with possible assignment to~:*~{ ~S~}~]~:[~;~%with reference to~:*~{ ~S~}~]~:[~;~%with reference-before-assignment to~:*~{ ~S~}~]~:>"
  +	    (list (bst-function-argument-types bst-function)
  +		  (bst-function-result-types bst-function)
  +		  (side-effects-side-effects-p side-effects)
  +		  (side-effects-unconditionally-assigned-variables side-effects)
  +		  (set-difference (side-effects-assigned-variables side-effects)
  +				  (side-effects-unconditionally-assigned-variables side-effects)
  +				  :test 'equalp)			
  +		  (side-effects-used-variables side-effects)
  +		  (side-effects-variables-used-before-assigned side-effects)))))  
  +
  +(defun compile-bst-function (bst-function)
  +  (let* ((bst-name (bst-function-name bst-function))
  +	 (*currently-compiled-function* bst-name)
  +	 (lisp-name (bst-name-to-lisp-name bst-name :function)))
       (handler-case 
   	(multiple-value-bind (defun-form argument-types
   				 result-types side-effects)
  -	    (bst-compile-defun lisp-name function-definition)
  -	  #-clisp    ; CLISP does not seem to handle ~< ... ~:> properly
  -	  (format stream
  -		  "~%~<;; ~@;~:S --> ~:S ~:[~;with side-effects ~]~:[~;~%with assignment to~:*~{ ~S~}~]~:[~;~%with possible assignment to~:*~{ ~S~}~]~:[~;~%with reference to~:*~{ ~S~}~]~:>"
  -		  (list argument-types result-types
  -			(side-effects-side-effects-p side-effects)
  -			(side-effects-unconditionally-assigned-variables side-effects)
  -			(set-difference (side-effects-assigned-variables side-effects)
  -					(side-effects-unconditionally-assigned-variables side-effects)
  -					:test 'equalp)			
  -			(side-effects-used-variables side-effects)))
  -	  (lisp-write defun-form)
  -	  (setf (gethash (string bst-name) *bst-functions*)
  -		(make-bst-function :name (string bst-name)
  -				   :lisp-name lisp-name
  -				   :type 'compiled-wiz-defined
  -				   :argument-types argument-types
  -				   :result-types result-types
  -				   :side-effects side-effects)))
  +	    (bst-compile-defun lisp-name
  +			       (bst-function-body bst-function))
  +	  #-clisp  ; CLISP does not seem to handle ~< ... ~:> properly
  +	  
  +	  (setf (bst-function-lisp-name bst-function)
  +		lisp-name
  +		(bst-function-type bst-function)
  +		'compiled-wiz-defined
  +		(bst-function-argument-types bst-function)
  +		argument-types
  +		(bst-function-result-types bst-function)
  +		result-types
  +		(bst-function-side-effects bst-function)
  +		side-effects
  +		(bst-function-defun-form bst-function)
  +		defun-form))
         (bst-compiler-error (condition)
   	(format *error-output*
   		"While compiling wizard-defined function `~S':~%~A~%"
  
positive.code: 		   ;; is NIL->STRING.
  		   ;; FIXME: This could be easily generalized on a better day.
  		   (format *error-output*
  			   "While compiling wizard-defined function `~S':~% Warning: Employing the producer/modifier while loop trick.~%"
  			   *currently-compiled-function*)			   
  		   (do ((then-arg-types (reverse then-arg-types) (cdr then-arg-types))
  			(else-arg-types (reverse else-arg-types) (cdr else-arg-types)))
  
negative.code:     (dolist (var str-vars)
        (register-bst-global-var var var 'str-global-var '(string) "" *bst-functions*))
      (bst-compile-defun nil definition)))
  
  (defun make-some-variables-lexical ()
    ;; If in every function where variable X is used, it is assigned
    ;; before any reference, then there cannot be inter-function data
    ;; flow through variable X.  Hence, we can make the variable lexical
    ;; in every function where it is used.
    (loop for bst-function being each hash-value in *bst-functions*
  	when (member (bst-function-type bst-function)
  		     '(str-global-var int-global-var))
  	do (setf (bst-function-lexical-p bst-function) t))
    (loop for bst-function being each hash-value in *bst-functions*
  	when (eq (bst-function-type bst-function) 'compiled-wiz-defined)
  	do (dolist (variable (side-effects-variables-used-before-assigned
  			      (bst-function-side-effects bst-function)))
  	     (let ((bst-function (get-bst-function variable)))
  	       (setf (bst-function-lexical-p bst-function) nil))))
    (loop for bst-function being each hash-value in *bst-functions*
  	when (and (member (bst-function-type bst-function)
  			  '(str-global-var int-global-var))
  		  (bst-function-lexical-p bst-function))
  	collect (bst-function-name bst-function)))
  
  
  #|
  
  