Changeset 4665


Ignore:
Timestamp:
11/07/03 18:26:32 (18 years ago)
Author:
piso
Message:

COMPILE-SETQ

File:
1 edited

Legend:

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

    r4654 r4665  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: compiler.lisp,v 1.58 2003-11-05 19:34:56 piso Exp $
     4;;; $Id: compiler.lisp,v 1.59 2003-11-07 18:26:32 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    3333  (when (oddp (length exprs))
    3434    (error "odd number of arguments to SETQ"))
    35   (do* ((result '(setq))
    36         (sym (car exprs) (car exprs))
    37         (val (cadr exprs) (cadr exprs)))
    38     ((null exprs) result)
    39     (setq result (append result (list sym) (list (compile-sexp val))))
    40     (setq exprs (cddr exprs))))
     35  (if (= 2 (length exprs))
     36      (list 'SETQ (car exprs) (compile-sexp (cadr exprs)))
     37      (do* ((result '(setq))
     38            (sym (car exprs) (car exprs))
     39            (val (cadr exprs) (cadr exprs)))
     40           ((null exprs) result)
     41        (setq result (append result (list sym) (list (compile-sexp val))))
     42        (setq exprs (cddr exprs)))))
    4143
    4244(defun compile-cond (clauses)
Note: See TracChangeset for help on using the changeset viewer.