Changeset 4706


Ignore:
Timestamp:
11/12/03 20:09:34 (18 years ago)
Author:
piso
Message:

Work in progress.

File:
1 edited

Legend:

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

    r4700 r4706  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: precompiler.lisp,v 1.1 2003-11-11 19:54:13 piso Exp $
     4;;; $Id: precompiler.lisp,v 1.2 2003-11-12 20:09:34 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    9999
    100100(defun precompile-lambda (form)
    101   (let ((args (cdr form)))
    102     (let* ((lambda-list (car args))
    103            (auxvars (memq '&AUX lambda-list))
    104            (body (cdr args)))
    105       (if auxvars
    106           (append (list 'LAMBDA (subseq lambda-list 0 (position '&AUX lambda-list))
    107                         (append (list 'LET*
    108                                       (cdr auxvars))
    109                                 (mapcar #'precompile1 body))))
    110           (list* 'LAMBDA lambda-list (mapcar #'precompile1 body))))))
     101  (let* ((args (cdr form))
     102         (lambda-list (car args))
     103         (auxvars (memq '&AUX lambda-list)))
     104    (if auxvars
     105        (append (list 'LAMBDA (subseq lambda-list 0 (position '&AUX lambda-list))
     106                      (append (list 'LET*
     107                                    (cdr auxvars))
     108                              (mapcar #'precompile1 (cdr args)))))
     109        (list* 'LAMBDA lambda-list (mapcar #'precompile1 (cdr args))))))
    111110
    112111(defun define-local-macro (name lambda-list body)
     
    149148    res))
    150149
    151 (defun precompile-let-vars (vars)
     150(defun precompile-let/let*-vars (vars)
    152151  (let ((result nil))
    153152    (dolist (var vars)
     
    163162(defun precompile-let/let* (form)
    164163  (list* (car form)
    165          (precompile-let-vars (cadr form))
     164         (precompile-let/let*-vars (cadr form))
    166165         (mapcar #'precompile1 (cddr form))))
    167166
Note: See TracChangeset for help on using the changeset viewer.