+ ;; the current OPTIMIZE policy. this is null in the null environment,
+ ;; and the global policy is stored in *POLICY*. (Because we want to
+ ;; be able to affect it from :WITH-COMPILATION-UNIT.) NIL here also
+ ;; works as a convenient null-lexenv identifier.
+ (%policy nil :type policy))
+
+(defun lexenv-policy (lexenv)
+ (or (lexenv-%policy lexenv) *policy*))
+
+(defun null-lexenv-p (lexenv)
+ (not (lexenv-%policy lexenv)))