Changeset 4451


Ignore:
Timestamp:
10/18/03 22:57:25 (19 years ago)
Author:
piso
Message:

COMPILE-SEXP: cleanup.

File:
1 edited

Legend:

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

    r4449 r4451  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: compiler.lisp,v 1.54 2003-10-18 22:33:08 piso Exp $
     4;;; $Id: compiler.lisp,v 1.55 2003-10-18 22:57:25 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    262262  (if (atom form) form
    263263      (let ((first (car form)))
    264         (when (local-macro-function first)
    265 ;;           (format t "form = ~S~%" form)
    266           (let ((expansion (expand-local-macro form)))
    267 ;;             (format t "expansion = ~S~%" expansion)
    268             (return-from compile-sexp expansion)))
    269 ;;         (unless (and (symbolp first) (fboundp first))
    270 ;;           (return-from compile-sexp form))
    271         (cond ((eq first 'LAMBDA)
    272                (list* 'LAMBDA (second form)
    273                       (mapcar #'compile-sexp (cddr form))))
    274               ((and (symbolp first) (special-operator-p first))
    275                (compile-special form))
    276               ((and (symbolp first) (macro-function first))
    277                (compile-sexp (expand-macro form)))
    278               (t
    279                (let ((args (mapcar #'compile-sexp (cdr form))))
    280                  (cons first args)))))))
     264        (when (symbolp first)
     265          (cond ((local-macro-function first)
     266                 (return-from compile-sexp (expand-local-macro form)))
     267                ((eq first 'LAMBDA)
     268                 (return-from compile-sexp (list* 'LAMBDA (second form)
     269                                                  (mapcar #'compile-sexp (cddr form)))))
     270                ((special-operator-p first)
     271                 (return-from compile-sexp (compile-special form)))
     272                ((macro-function first)
     273                 (return-from compile-sexp (compile-sexp (expand-macro form))))))
     274        (cons first (mapcar #'compile-sexp (cdr form))))))
    281275
    282276(defun %compile (name &optional definition)
Note: See TracChangeset for help on using the changeset viewer.