Changeset 4888


Ignore:
Timestamp:
11/24/03 17:15:00 (18 years ago)
Author:
piso
Message:

PRECOMPILE-LAMBDA: refactoring.

File:
1 edited

Legend:

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

    r4881 r4888  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: precompiler.lisp,v 1.12 2003-11-23 20:28:48 piso Exp $
     4;;; $Id: precompiler.lisp,v 1.13 2003-11-24 17:15:00 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    166166  (let* ((args (cdr form))
    167167         (lambda-list (car args))
     168         (body (cdr args))
    168169         (auxvars (memq '&AUX lambda-list)))
    169     (if auxvars
    170         (append (list 'LAMBDA (subseq lambda-list 0 (position '&AUX lambda-list))
    171                       (append (list 'LET*
    172                                     (cdr auxvars))
    173                               (mapcar #'precompile1 (cdr args)))))
    174         (list* 'LAMBDA lambda-list (mapcar #'precompile1 (cdr args))))))
     170    (when auxvars
     171      (setf lambda-list (subseq lambda-list 0 (position '&AUX lambda-list)))
     172      (setf body (list (append (list 'LET* (cdr auxvars)) body))))
     173    (list* 'LAMBDA lambda-list (mapcar #'precompile1 body))))
    175174
    176175(defun define-local-macro (name lambda-list body)
Note: See TracChangeset for help on using the changeset viewer.