/[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.8 by ram, Wed May 23 15:04:49 1990 UTC revision 1.9 by ram, Tue May 29 16:53:26 1990 UTC
# Line 846  Line 846 
846  (define-modify-macro decf (&optional (delta 1)) -  (define-modify-macro decf (&optional (delta 1)) -
847    "The first argument is some location holding a number.  This number is    "The first argument is some location holding a number.  This number is
848    decremented by the second argument, DELTA, which defaults to 1.")    decremented by the second argument, DELTA, which defaults to 1.")
 #|  
 (defmacro putf (place indicator value &environment env)  
   "Place may be any place expression acceptable to SETF, and is expected  
   to hold a property list or ().  This list is destructively altered so  
   that (GETF place indicator) will find the specified newvalue.  Returns  
   the new value."  
   (multiple-value-bind (dummies vals newval setter getter)  
                        (foo-get-setf-method place env)  
     (do* ((d dummies (cdr d))  
           (v vals (cdr v))  
           (let-list nil)  
           (ind-temp (gensym))  
           (val-temp (gensym)))  
          ((null d)  
           (push (list (car newval) getter) let-list)  
           (push (list ind-temp indicator) let-list)  
           (push (list val-temp value) let-list)  
           `(let* ,(nreverse let-list)  
              (setq ,(car newval)  
                    (%primitive putf ,(car newval) ,ind-temp ,val-temp))  
              ,setter  
              ,val-temp))  
       (push (list (car d) (car v)) let-list))))  
 |#  
849    
850    
851  (defmacro remf (place indicator &environment env)  (defmacro remf (place indicator &environment env)
# Line 975  Line 951 
951                `(,@values ,get ,prop ,@(if default `(,default)))                `(,@values ,get ,prop ,@(if default `(,default)))
952                `(,newval)                `(,newval)
953                `(progn (setq ,(car stores)                `(progn (setq ,(car stores)
954                              (%primitive putf ,(car stores) ,ptemp ,newval))                              (%putf ,(car stores) ,ptemp ,newval))
955                        ,set                        ,set
956                        ,newval)                        ,newval)
957                `(getf ,(car stores) ,ptemp ,@(if default `(,def-temp)))))))                `(getf ,(car stores) ,ptemp ,@(if default `(,def-temp)))))))

Legend:
Removed from v.1.8  
changed lines
  Added in v.1.9

  ViewVC Help
Powered by ViewVC 1.1.5