Changeset 8864


Ignore:
Timestamp:
Mar 22, 2008, 4:54:32 AM (11 years ago)
Author:
gb
Message:

NOTE-FUNXTION-INFO: split some functionality into RECORD-FUNCTION-INFO.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/source/level-1/l1-readloop.lisp

    r8759 r8864  
    317317    lambda-expression))
    318318
    319 ; This is different from AUGMENT-ENVIRONMENT.
    320 ; If "info" is a lambda expression, then
    321 ;  record a cons whose CAR is (encoded-lfun-bits . keyvect) and whose cdr
    322 ;  is the lambda expression iff the function named by "name" is
    323 ;  declared/proclaimed INLINE in env
     319
     320       
     321
     322;;; This is different from AUGMENT-ENVIRONMENT.
     323;;; If "info" is a lambda expression, then
     324;;;  record a cons whose CAR is (encoded-lfun-bits . keyvect) and whose cdr
     325;;;  is the lambda expression iff the function named by "name" is
     326;;;  declared/proclaimed INLINE in env
    324327(defun note-function-info (name lambda-expression env)
    325   (let ((definition-env (definition-environment env)))
    326     (if definition-env
    327       (let* ((already (assq (setq name (maybe-setf-function-name name))
    328                             (defenv.defined definition-env)))
    329              (info nil))
    330         (when (lambda-expression-p lambda-expression)
    331           (multiple-value-bind (lfbits keyvect) (encode-lambda-list (cadr lambda-expression) t)
    332             (setq info (cons (cons lfbits keyvect)
    333                              (retain-lambda-expression name lambda-expression env)))))
    334           (if already
    335             (if info (%rplacd already info))
    336             (push (cons name info) (defenv.defined definition-env)))))
    337     name))
    338 
    339 ; And this is different from FUNCTION-INFORMATION.
     328  (let* ((info nil)
     329         (name (maybe-setf-function-name name)))
     330    (when (lambda-expression-p lambda-expression)
     331      (multiple-value-bind (lfbits keyvect) (encode-lambda-list (cadr lambda-expression) t)
     332        (setq info (cons (cons lfbits keyvect)
     333                         (retain-lambda-expression name lambda-expression env)))))
     334    (record-function-info name info env))
     335  name)
     336
     337
     338;;; And this is different from FUNCTION-INFORMATION.
    340339(defun retrieve-environment-function-info (name env)
    341340 (let ((defenv (definition-environment env)))
     
    347346    name))
    348347
    349 ; Must differ from -something-, but not sure what ...
     348;;; Must differ from -something-, but not sure what ...
    350349(defun note-variable-info (name info env)
    351350  (let ((definition-env (definition-environment env)))
Note: See TracChangeset for help on using the changeset viewer.