Changeset 4449
- Timestamp:
- 10/18/03 22:33:08 (19 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
trunk/j/src/org/armedbear/lisp/compiler.lisp
r4448 r4449 2 2 ;;; 3 3 ;;; Copyright (C) 2003 Peter Graves 4 ;;; $Id: compiler.lisp,v 1.5 3 2003-10-18 17:28:19piso Exp $4 ;;; $Id: compiler.lisp,v 1.54 2003-10-18 22:33:08 piso Exp $ 5 5 ;;; 6 6 ;;; This program is free software; you can redistribute it and/or … … 145 145 (setf compiled-body (compile-progn body)) 146 146 ;; (format t "compiled-body = ~S~%" compiled-body) 147 (setf res (list* 'macrolet (reverse res) compiled-body)) 147 ;; (setf res (list* 'macrolet (reverse res) compiled-body)) 148 ;; res)) 149 (setf res (list* 'progn compiled-body)) 148 150 res)) 149 ;; (setf res (list* 'progn compiled-body))150 ;; res))151 151 152 152 (defun compile-special (form) … … 210 210 (cons 'tagbody (compile-tagbody body)))) 211 211 (LABELS 212 (let ((locals (cadr form)) 213 (body (cddr form))) 214 (append '(labels) (list (compile-locals locals)) (compile-progn body)))) 212 ;; (format t "LABELS *local-macros* = ~S~%" *local-macros*) 213 (let* ((locals (cadr form)) 214 (body (cddr form)) 215 (compiled-locals (compile-locals locals)) 216 (compiled-body (compile-progn body))) 217 ;; (format t "body = ~S~%" body) 218 ;; (format t "compiled-body = ~S~%" compiled-body) 219 (append '(labels) (list compiled-locals) compiled-body))) 215 220 (RETURN 216 221 (if (cdr form) … … 262 267 ;; (format t "expansion = ~S~%" expansion) 263 268 (return-from compile-sexp expansion))) 264 (unless (and (symbolp first) (fboundp first))265 (return-from compile-sexp form))269 ;; (unless (and (symbolp first) (fboundp first)) 270 ;; (return-from compile-sexp form)) 266 271 (cond ((eq first 'LAMBDA) 267 272 (list* 'LAMBDA (second form) 268 273 (mapcar #'compile-sexp (cddr form)))) 269 (( special-operator-p first)274 ((and (symbolp first) (special-operator-p first)) 270 275 (compile-special form)) 271 (( macro-function first)276 ((and (symbolp first) (macro-function first)) 272 277 (compile-sexp (expand-macro form))) 273 278 (t
Note: See TracChangeset
for help on using the changeset viewer.