Changeset 5243


Ignore:
Timestamp:
12/22/03 17:18:47 (18 years ago)
Author:
piso
Message:

Work in progress.

File:
1 edited

Legend:

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

    r5136 r5243  
    22;;;
    33;;; Copyright (C) 2003 Peter Graves
    4 ;;; $Id: precompiler.lisp,v 1.22 2003-12-15 01:39:28 asimon Exp $
     4;;; $Id: precompiler.lisp,v 1.23 2003-12-22 17:18:47 piso Exp $
    55;;;
    66;;; This program is free software; you can redistribute it and/or
     
    295295(defun precompile-local-functions (defs)
    296296  (let ((result nil))
    297     (dolist (def defs)
    298       (setq result (append result (list (precompile-local-function-def def)))))
    299     result))
    300 
    301 (defun precompile-flet/labels (form)
     297    (dolist (def defs (nreverse result))
     298      (push (precompile-local-function-def def) result))))
     299
     300(defun precompile-flet (form)
     301  (let ((locals (cadr form))
     302        (body (cddr form)))
     303    (list* (car form)
     304           (precompile-local-functions locals)
     305           (mapcar #'precompile1 body))))
     306
     307(defun precompile-labels (form)
    302308  (let ((locals (cadr form))
    303309        (body (cddr form)))
     
    484490(install-handler 'do*                  'precompile-do/do*)
    485491
    486 (install-handler 'flet                 'precompile-flet/labels)
    487 (install-handler 'labels               'precompile-flet/labels)
     492(install-handler 'flet                 'precompile-flet)
     493(install-handler 'labels               'precompile-labels)
    488494
    489495(install-handler 'do-symbols           'precompile-do-symbols)
     
    533539            (%set-arglist mac (arglist (symbol-function name)))
    534540            (setf (fdefinition name) mac))
    535           (progn 
     541          (progn
    536542            (setf (fdefinition name) result)
    537543            (%set-arglist result (arglist definition)))))
Note: See TracChangeset for help on using the changeset viewer.