;;; -*- Mode:LISP; Base:10; Readtable:ZL -*-


(defun foo (a)
  (bar a))

(defconstant *c* 'five)
(defvar *v*)
(defconst *cc* 'seven)
(defun foo-1 (*v*)
  (bar *cc*))


(defun foo-2 (*v* &optional (b *v*))
  (bar *v*))


(defun yuck (x)
  (+ x 'b))

(defun parallel-bind-test-1 ()
  (let ((a 3)
	(b 4))
    (print (list a b))))

(defun parallel-bind-test-2 ()
  (let ((a 7))
    (print a)
  (let ((a 3)
	(b a)
	(c 5))
    (declare (special b))
    (print c)
    (print (list a b c)))))


;;; This has the potential to lose open frames from the pool if we aren't
;;; careful to return them when returning out from where they were started.

(defun return-test (flag)
  (block foo
    (+ 3 (if flag
	     (return-from foo 'lose)
	   2))))



;;; This has to clean up a tail-open.  To do this, we do:
;;; (TAIL-CALL (0 0) NIL NEXT-PC-PC+1)
;;; (TAIL-OPEN-CALL (0 0) NIL NEXT-PC-PC+1)
;;; The analysis is:
;;;                   O A R
;;; Initial state:    A A R  ; O had better have the same as A, on *ANY* tail-call.
;;; Tail open:        F A R  ; F is new from heap.
;;; Tail open:        F F A  ; R goes to heap.
;;; Tail open-call:   A A F  ; Once again in a valid state; with a different R reg.

(defun tail-punt (flag)
  (tagbody loop
      (cons 'a (when flag (go loop)))))

(defun multiple-value-test-1 (a b c)
  (values a b c))
