Changeset 11794


Ignore:
Timestamp:
04/28/09 21:09:29 (13 years ago)
Author:
ehuelsmann
Message:

Precompile lambda-list initforms.

File:
1 edited

Legend:

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

    r11788 r11794  
    707707              rv))))))
    708708
     709(defun precompile-lambda-list (form)
     710  (let (new)
     711    (dolist (arg form (nreverse new))
     712       (if (or (atom arg) (> 2 (length arg)))
     713          (push arg new)
     714          ;; must be a cons of more than 1 cell
     715          (let ((new-arg (copy-list arg)))
     716             (setf (second new-arg)
     717                   (precompile1 (second arg)))
     718             (push new-arg new))))))
     719
    709720(defun precompile-lambda (form)
    710721  (setq form (maybe-rewrite-lambda form))
    711722  (let ((body (cddr form))
     723        (precompiled-lambda-list
     724           (precompile-lambda-list (cadr form)))
    712725        (*inline-declarations* *inline-declarations*))
    713726    (process-optimization-declarations body)
    714     (list* 'LAMBDA (cadr form) (mapcar #'precompile1 body))))
     727    (list* 'LAMBDA precompiled-lambda-list
     728           (mapcar #'precompile1 body))))
    715729
    716730(defun precompile-named-lambda (form)
     
    718732    (setf lambda-form (maybe-rewrite-lambda lambda-form))
    719733    (let ((body (cddr lambda-form))
     734          (precompiled-lambda-list
     735           (precompile-lambda-list (cadr lambda-form)))
    720736          (*inline-declarations* *inline-declarations*))
    721737      (process-optimization-declarations body)
    722       (list* 'NAMED-LAMBDA (cadr form) (cadr lambda-form)
     738      (list* 'NAMED-LAMBDA (cadr form) precompiled-lambda-list
    723739             (mapcar #'precompile1 body)))))
    724740
Note: See TracChangeset for help on using the changeset viewer.