+ ;; 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)
+ ;; A list associating extra user info to symbols. The entries
+ ;; are of the form (:declare name . value),
+ ;; (:variable name key . value), or (:function name key . value)
+ (user-data nil :type list))
+
+(defun lexenv-policy (lexenv)
+ (or (lexenv-%policy lexenv) *policy*))
+
+(defun null-lexenv-p (lexenv)
+ (not (lexenv-%policy lexenv)))