Changeset 13218 for trunk/abcl/src/org


Ignore:
Timestamp:
02/13/11 15:29:42 (10 years ago)
Author:
ehuelsmann
Message:

Replace algorithm in EXTRACT-LAMBDA-LIST-KEYWORDS to make a single
iteration through the lambda list.

File:
1 edited

Legend:

Unmodified
Added
Removed
  • trunk/abcl/src/org/armedbear/lisp/clos.lisp

    r13217 r13218  
    26182618  (when (member '&allow-other-keys lambda-list)
    26192619    (return-from extract-lambda-list-keywords t))
    2620   (let* ((keyword-args (cdr (memq '&key lambda-list)))
    2621          (aux-vars (position '&aux keyword-args)))
    2622     (when keyword-args
    2623       (when aux-vars
    2624         (setq keyword-args (subseq keyword-args 0 aux-vars)))
    2625       (let (result)
    2626         (dolist (key keyword-args result)
    2627           (when (listp key)
    2628             (setq key (car key)))
    2629           (push (if (symbolp key) (make-keyword key) (car key)) result))))))
     2620  (loop with keyword-args = (cdr (memq '&key lambda-list))
     2621        for key in keyword-args
     2622        when (eq key '&aux) do (loop-finish)
     2623        when (eq key '&allow-other-keys) do (return t)
     2624        when (listp key) do (setq key (car key))
     2625        collect (if (symbolp key)
     2626                    (make-keyword key)
     2627                  (car key))))
    26302628
    26312629
Note: See TracChangeset for help on using the changeset viewer.