diff --git a/compiler/ir1tran.lisp b/compiler/ir1tran.lisp index d8c67ad5394bfc692ea9779dbe1388113a213730..a508ea680e993e866ca00289a1185d57f12d2589 100644 --- a/compiler/ir1tran.lisp +++ b/compiler/ir1tran.lisp @@ -7,7 +7,7 @@ ;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; (ext:file-comment - "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/ir1tran.lisp,v 1.48 1991/05/24 01:03:52 ram Exp $") + "$Header: /Volumes/share2/src/cmucl/cvs2git/cvsroot/src/compiler/ir1tran.lisp,v 1.49 1991/07/18 02:08:51 wlott Exp $") ;;; ;;; ********************************************************************** ;;; @@ -2281,6 +2281,28 @@ start cont; Ignore hack (compiler-error "Misplaced declaration.")) + +;;; COMPILER-OPTION-BIND +;;; +(def-ir1-translator compiler-option-bind ((bindings &body body) start cont) + "Compiler-Option-Bind ({(Name Value-Form)}*) Body-Form* + Establish the specified compiler options for the (lexical) duration of + the body. The Value-Forms are evaluated at compile time." + (let ((*lexical-environment* + (make-lexenv :options + (mapcar #'(lambda (binding) + (unless (and (listp binding) + (cdr binding) + (listp (cdr binding)) + (null (cddr binding))) + (compiler-error "Bogus binding for ~ + COMPILER-OPTION-BIND: ~S" + binding)) + (cons (car binding) + (eval (cadr binding)))) + bindings)))) + (ir1-convert-progn-body start cont body))) + ;;;; %Primitive: ;;;