Changeset 10730


Ignore:
Timestamp:
Sep 14, 2008, 5:57:44 PM (11 years ago)
Author:
gz
Message:

Make atomic-incf-decf handle let/let*/locally, needed so it can handle %svref (and hence def-accessors)

File:
1 edited

Legend:

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

    r10694 r10730  
    31633163      (ecase sym
    31643164        (the `(the ,(cadr place) (atomic-incf-decf ,(caddr place) ,delta)))
     3165         ;; Needed so can handle %svref (which macroexpands into a LET*)
     3166         ((let let*) (multiple-value-bind (body decls) (parse-body (cddr place) env t)
     3167                       (unless (eql (length body) 1)
     3168                         (error "~S is not a valid atomic-incf/decf place" place))
     3169                       `(,sym ,(cadr place) ,@decls (atomic-incf-decf ,@body ,delta))))
     3170         ;; Ditto
     3171         (locally (multiple-value-bind (body decls) (parse-body (cdr place) env t)
     3172                    (unless (eql (length body) 1)
     3173                      (error "~S is not a valid atomic-incf/decf place" place))
     3174                    `(,sym ,@decls (atomic-incf-decf ,@body ,delta))))
    31653175        (car `(%atomic-incf-car ,(cadr place) ,delta))
    31663176        (cdr `(%atomic-incf-cdr ,(cadr place) ,delta))
    3167         ((svref %svref) `(%atomic-incf-gvector ,@(cdr place) ,delta))))
     3177        (svref `(%atomic-incf-gvector ,@(cdr place) ,delta))))
    31683178    (if (and (symbolp place) (eq :special (variable-information place env)))
    31693179      (let* ((base (gensym))
Note: See TracChangeset for help on using the changeset viewer.