[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Gcl-devel] eval-when 'defaults'
From: |
Camm Maguire |
Subject: |
Re: [Gcl-devel] eval-when 'defaults' |
Date: |
07 Jul 2004 18:30:18 -0400 |
User-agent: |
Gnus/5.09 (Gnus v5.9.0) Emacs/21.2 |
Greetings!
Further on this, to be more concrete, in the following should def-op
be run at compile-time?
(defvar *acursor* nil)
(import 'sloop:sloop)
(defmacro def-op (name type op &optional return-type)
`(setf (macro-function ',name) (make-operation ',type ',op
',return-type)))
;;make very sure .type .op and .return are not special!!
(defun make-operation (.type .op .return)
(or .return (setf .return .type))
#'(lambda (bod env) env
(sloop for v in (cdr bod)
when (eq t .type) collect v into body
else
collect `(the , .type ,v) into body
finally (setq body `(, .op ,@ body))
(return
(if (eq t .return) body
`(the , .return ,body))))))
(def-op f+ fixnum +)
(def-op f- fixnum -)
Take care,
Camm Maguire <address@hidden> writes:
> Greetings! Paul, from my brief reading of the spec, it would appear
> that the default behavior for top level forms in a file being
> compiled would be as if they were surrounded by an (eval-when
> (:compile-toplevel :load-toplevel :execute)...). Is this right?
>
> Witness the following comment in gcl_cmptop.lsp:
>
> ;; this default will be as close to the the decision of the x3j13 committee
> ;; as I can make it. Valid values of *eval-when-defaults* are
> ;; a sublist of '(compile eval load)
> (defvar *eval-when-defaults* :defaults)
>
> And in cmpnew/gcl_cmpinit.lsp:
>
> (setq compiler::*eval-when-defaults* '(compile eval load))
>
> Take care,
> --
> Camm Maguire address@hidden
> ==========================================================================
> "The earth is but one country, and mankind its citizens." -- Baha'u'llah
>
>
> _______________________________________________
> Gcl-devel mailing list
> address@hidden
> http://lists.gnu.org/mailman/listinfo/gcl-devel
>
>
>
--
Camm Maguire address@hidden
==========================================================================
"The earth is but one country, and mankind its citizens." -- Baha'u'llah
- [Gcl-devel] eval-when 'defaults', Camm Maguire, 2004/07/07
- Re: [Gcl-devel] eval-when 'defaults',
Camm Maguire <=
- Re: [Gcl-devel] eval-when 'defaults', Paul F. Dietz, 2004/07/07
- Re: [Gcl-devel] eval-when 'defaults', Camm Maguire, 2004/07/07
- RE: [Gcl-devel] eval-when 'defaults', Mike Thomas, 2004/07/07
- [Gcl-devel] Re: eval-when 'defaults', Paul F. Dietz, 2004/07/08
- Re: [Gcl-devel] Re: eval-when 'defaults', Michael Koehne, 2004/07/08
- [Gcl-devel] Stable 2.6.2 binaries on ftp.gnu.org, Camm Maguire, 2004/07/08
- Re: [Gcl-devel] Re: eval-when 'defaults', Camm Maguire, 2004/07/08