Changeset 8781


Ignore:
Timestamp:
Mar 14, 2008, 11:13:51 AM (11 years ago)
Author:
gb
Message:

Split NOTE-FUNCTION-INFO into a lower-level part (that deals with recording
info); deal with SETF names and encoding lambda lists here.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • branches/working-0711/ccl/level-1/l1-readloop.lisp

    r8771 r8781  
    315315    lambda-expression))
    316316
    317 ; This is different from AUGMENT-ENVIRONMENT.
    318 ; If "info" is a lambda expression, then
    319 ;  record a cons whose CAR is (encoded-lfun-bits . keyvect) and whose cdr
    320 ;  is the lambda expression iff the function named by "name" is
    321 ;  declared/proclaimed INLINE in env
     317;;; This is different from AUGMENT-ENVIRONMENT.
     318;;; If "info" is a lambda expression, then
     319;;;  record a cons whose CAR is (encoded-lfun-bits . keyvect) and whose cdr
     320;;;  is the lambda expression iff the function named by "name" is
     321;;;  declared/proclaimed INLINE in env
    322322(defun note-function-info (name lambda-expression env)
    323   (let ((definition-env (definition-environment env)))
    324     (if definition-env
    325       (let* ((already (assq (setq name (maybe-setf-function-name name))
    326                             (defenv.defined definition-env)))
    327              (info nil))
    328         (when (lambda-expression-p lambda-expression)
    329           (multiple-value-bind (lfbits keyvect) (encode-lambda-list (cadr lambda-expression) t)
    330             (setq info (cons (cons lfbits keyvect)
    331                              (retain-lambda-expression name lambda-expression env)))))
    332           (if already
    333             (if info (%rplacd already info))
    334             (push (cons name info) (defenv.defined definition-env)))))
    335     name))
     323  (let* ((info nil)
     324         (name (maybe-setf-function-name name)))
     325    (when (lambda-expression-p lambda-expression)
     326      (multiple-value-bind (lfbits keyvect) (encode-lambda-list (cadr lambda-expression) t)
     327        (setq info (cons (cons lfbits keyvect)
     328                         (retain-lambda-expression name lambda-expression env)))))
     329    (record-function-info name info env))
     330  name)
    336331
    337332; And this is different from FUNCTION-INFORMATION.
Note: See TracChangeset for help on using the changeset viewer.