/[cmucl]/src/code/macros.lisp
ViewVC logotype

Diff of /src/code/macros.lisp

Parent Directory Parent Directory | Revision Log Revision Log | View Patch Patch

revision 1.30 by wlott, Tue Mar 31 05:26:39 1992 UTC revision 1.31 by wlott, Thu Apr 2 02:01:40 1992 UTC
# Line 951  Line 951 
951                         (get-setf-method place env)                         (get-setf-method place env)
952      (let ((newval (gensym))      (let ((newval (gensym))
953            (ptemp (gensym))            (ptemp (gensym))
954            (def-temp (gensym)))            (def-temp (if default (gensym))))
955        (values `(,@temps ,(car stores) ,ptemp ,@(if default `(,def-temp)))        (values `(,@temps ,ptemp ,@(if default `(,def-temp)))
956                `(,@values ,get ,prop ,@(if default `(,default)))                `(,@values ,prop ,@(if default `(,default)))
957                `(,newval)                `(,newval)
958                `(progn (setq ,(car stores)                `(let ((,(car stores) (%putf ,get ,ptemp ,newval)))
959                              (%putf ,(car stores) ,ptemp ,newval))                   ,set
960                        ,set                   ,newval)
961                        ,newval)                `(getf ,get ,ptemp ,@(if default `(,def-temp)))))))
               `(getf ,(car stores) ,ptemp ,@(if default `(,def-temp)))))))  
962    
963  (define-setf-method get (symbol prop &optional default)  (define-setf-method get (symbol prop &optional default)
   "Get turns into %put. Don't put in the default unless it really is supplied  
    and non-nil, so that we can transform into the get instruction whenever  
    possible."  
964    (let ((symbol-temp (gensym))    (let ((symbol-temp (gensym))
965          (prop-temp (gensym))          (prop-temp (gensym))
966          (def-temp (gensym))          (def-temp (gensym))

Legend:
Removed from v.1.30  
changed lines
  Added in v.1.31

  ViewVC Help
Powered by ViewVC 1.1.5