Skip to content
Snippets Groups Projects
Commit 070aad83 authored by wlott's avatar wlott
Browse files

Added def-ir1-translator for compiler-option-bind. Not for randoms to use.

parent 065709dd
No related branches found
No related tags found
No related merge requests found
...@@ -7,7 +7,7 @@ ...@@ -7,7 +7,7 @@
;;; Scott Fahlman or slisp-group@cs.cmu.edu. ;;; Scott Fahlman or slisp-group@cs.cmu.edu.
;;; ;;;
(ext:file-comment (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 @@ ...@@ -2281,6 +2281,28 @@
start cont; Ignore hack start cont; Ignore hack
(compiler-error "Misplaced declaration.")) (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: ;;;; %Primitive:
;;; ;;;
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment