;;; -*- Mode:Lisp; Readtable:ZL; Package:USER; Base:8; Patch-File:T -*-
;;; Patch file for System version 126.3
;;; Reason:
;;;  Change these macros (used by cross compiler) to allow watching *open-frames*
;;;  change a bit easier.
;;; Written 27-Jul-88 20:24:24 by RWK (Robert W. Kerns) at site Gigamos Cambridge
;;; while running on Claude Debussy from band 3
;;; with ZWEI 125.5, ZMail 73.0, Local-File 75.0, File-Server 24.0, Unix-Interface 13.0, Tape 24.2, Lambda-Diag 17.0, Experimental System 126.2, microcode 1762, SDU Boot Tape 3.14, SDU ROM 102, Kenv 7/22/88.



; From modified file DJ: L.SYS; QCDEFS.LISP#238 at 27-Jul-88 20:24:31
#8R COMPILER#: 
(COMPILER-LET ((*PACKAGE* (PKG-FIND-PACKAGE "COMPILER")))
  (PATCH-SOURCE-FILE "SYS: SYS; QCDEFS  "

(defmacro discarding-open-frames ((level destination) &body body)
  `(let ((*stack-slots* *stack-slots*))
     (with-frames
       (clean-up-open-frames ,level :discard ,destination)
       ,@body)))

))

; From modified file DJ: L.SYS; QCDEFS.LISP#238 at 27-Jul-88 20:24:54
#8R COMPILER#: 
(COMPILER-LET ((*PACKAGE* (PKG-FIND-PACKAGE "COMPILER")))
  (PATCH-SOURCE-FILE "SYS: SYS; QCDEFS  "

(defmacro with-frames (&body body)
  (let ((old-frames (gensymbol "OLD-FRAMES")))
    `(let* ((,old-frames *open-frames*)
	    (*open-frames* *open-frames*))
       (multiple-value-prog1 (progn ,@body)
			     ;; Let the person debugging the compiler notice that
			     ;; the frames list is being modified.
			     (restore-frame ,old-frames)))))

))
