1 ;;; -*- Mode: Lisp; Syntax: Common-Lisp; Package: CL-USER; -*-
2 ;;; ---------------------------------------------------------------------------
4 ;;; Created: 1999-05-25 22:32
5 ;;; Author: Gilbert Baumann <unk6@rz.uni-karlsruhe.de>
6 ;;; License: Lisp-LGPL (See file COPYING for details).
7 ;;; ---------------------------------------------------------------------------
8 ;;; (c) copyright 1999 by Gilbert Baumann
10 ;;; This code is free software; you can redistribute it and/or modify it
11 ;;; under the terms of the version 2.1 of the GNU Lesser General Public
12 ;;; License as published by the Free Software Foundation, as clarified
13 ;;; by the "Preamble to the Gnu Lesser General Public License" found in
16 ;;; This code is distributed in the hope that it will be useful,
17 ;;; but without any warranty; without even the implied warranty of
18 ;;; merchantability or fitness for a particular purpose. See the GNU
19 ;;; Lesser General Public License for more details.
21 ;;; Version 2.1 of the GNU Lesser General Public License is in the file
22 ;;; COPYING that was distributed with this file. If it is not present,
23 ;;; you can access it from http://www.gnu.org/copyleft/lesser.txt (until
24 ;;; superseded by a newer version) or write to the Free Software
25 ;;; Foundation, Inc., 59 Temple Place, Suite 330, Boston, MA 02111-1307 USA
29 #-
(or allegro openmcl
)
30 (defmacro definline
(name args
&body body
)
32 (declaim (inline ,name
))
33 (defun ,name
,args .
,body
)))
36 (defmacro runes
::definline
(fun args
&body body
)
41 (defun ,fun
,args .
,body
)
42 (define-compiler-macro ,fun
(&rest .args.
)
43 (cons '(lambda ,args .
,body
)
47 (defmacro definline
(fun args
&body body
)
48 (if (and (consp fun
) (eq (car fun
) 'setf
))
49 (let ((fnam (intern (concatenate 'string
"(SETF " (symbol-name (cadr fun
)) ")")
50 (symbol-package (cadr fun
)))))
52 (defsetf ,(cadr fun
) (&rest ap
) (new-value) (list* ',fnam new-value ap
))
53 (definline ,fnam
,args .
,body
)))
55 (and (consp x
) (eq (car x
) 'declare
))))
57 (defun ,fun
,args .
,body
)
58 (define-compiler-macro ,fun
(&rest .args.
)
60 ,@(remove-if-not #'declp body
)
62 ,@(remove-if #'declp body
)))