Changeset 4684


Ignore:
Timestamp:
11/09/03 14:50:30 (18 years ago)
Author:
piso
Message:

Work in progress.

File:
1 edited

Legend:

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

    r4683 r4684  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: transform.lisp,v 1.6 2003-11-09 14:28:31 piso Exp $
     4;;; $Id: transform.lisp,v 1.7 2003-11-09 14:50:30 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    5454         (body (cdr args)))
    5555    (if auxvars
    56         (append (list 'LAMBDA (subseq lambda-list 0 (position '&AUX lambda-list))
    57                       (append (list 'LET*
    58                                     (cdr auxvars))
    59                               (mapcar #'transform1 body))))
    60         (append (list 'LAMBDA lambda-list) (mapcar #'transform1 body)))))
     56        (list* 'LAMBDA (subseq lambda-list 0 (position '&AUX lambda-list))
     57               (list* 'LET*
     58                      (cdr auxvars))
     59               (mapcar #'transform1 body))
     60        (list* 'LAMBDA lambda-list (mapcar #'transform1 body)))))
    6161
    6262(defun transform1 (form)
     
    7575      (return-from transform1 (transform1 form)))
    7676    (cond ((eq op 'TAGBODY)
    77            (append (list 'TAGBODY) (mapcar #'transform1 args)))
     77           (list* 'TAGBODY (mapcar #'transform1 args)))
    7878          ((eq op 'PROGN)
    79            (append (list 'PROGN) (mapcar #'transform1 args)))
     79           (list* 'PROGN (mapcar #'transform1 args)))
    8080          ((eq op 'RETURN-FROM)
    8181           (append (list 'RETURN-FROM) (list (car args))
     
    9494                  (error "wrong number of arguments for IF"))))
    9595          ((eq op 'LET)
    96            (append (list 'LET (car args)) (mapcar #'transform1 (cdr args))))
     96           (list* 'LET (car args) (mapcar #'transform1 (cdr args))))
    9797          ((eq op 'LET*)
    98            (append (list 'LET* (car args)) (mapcar #'transform1 (cdr args))))
     98           (list* 'LET* (car args) (mapcar #'transform1 (cdr args))))
    9999          ((eq op 'LAMBDA)
    100100           (transform-lambda args))
Note: See TracChangeset for help on using the changeset viewer.