Changeset 11572


Ignore:
Timestamp:
Jan 2, 2009, 9:56:59 PM (11 years ago)
Author:
gb
Message:

DEFINE-COMPILE-TIME-SYMBOL-MACRO: store the expansion in
defenv.symbol-macros of the definition environment, not
defenv.functions. Check for compile-time conflicts with
constants/specials, too.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/lib/nfcomp.lisp

    r11514 r11572  
    742742  (let ((compile-time-defenv (definition-environment *fasl-compile-time-env*))
    743743        (definition-env (definition-environment env)))
     744    (let* ((info (variable-information name env)))
     745      (when (or (eq info :special)
     746                (eq info :constant))
     747        (signal-program-error "Can't define ~s as a symbol-macro; already defined as a ~a." name (string-downcase info))))
    744748    (when (or definition-env compile-time-defenv)
    745749      (let ((cell (cons name expansion)))
    746750        (when compile-time-defenv
    747           (push cell (defenv.functions compile-time-defenv)))
     751          (push cell (defenv.symbol-macros compile-time-defenv)))
    748752        (when definition-env
    749           (push cell (defenv.functions definition-env)))))
     753          (push cell (defenv.symbol-macros definition-env)))))
    750754    name))
    751755
Note: See TracChangeset for help on using the changeset viewer.