[Ecls-list] declaim question

Marko Kocić marko.kocic at gmail.com
Mon Feb 14 09:30:43 UTC 2011


I just tried it with the latest git build. Declaim is still ignored,
at least in this case.

c:\development\cvstree\ecl-shootout>cat compile.lisp
(require 'cmp)

(defun create-exec (file)
  (let ((c::*cc-flags* " -O3 -march=core2 -fomit-frame-pointer -fPIC
-Ic:/usr/local/include "))
    (c::builder :program file
                :lisp-files (list (compile-file file :system-p t))
                :epilogue-code '(quit))))

c:\development\cvstree\ecl-shootout>cat n-body.lisp | grep declaim
(declaim (optimize (speed 3) (safety 0) (debug 0)))
;; declaim is the first non comment lisp line

c:\development\cvstree\ecl-shootout>ecl -norc -load compile.lisp -eval
"(create-exec \"n-body\")" -eval "(quit)"
;;; Loading "c:/development/cvstree/ecl-shootout/compile.lisp"
;;; Loading #P"c:/opt/ecl/cmp.fas"
;;;
;;; Compiling n-body.
;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0
;;;
...

Regards,
Marko Kocić

On Sat, Feb 12, 2011 at 8:12 PM, Juan Jose Garcia-Ripoll
<juanjose.garciaripoll at googlemail.com> wrote:
> On Tue, Feb 1, 2011 at 3:02 PM, Marko Kocić <marko.kocic at gmail.com> wrote:
>>
>> I have lisp file some.lisp which have the following at the beginning:
>>
>> (declaim (optimize (speed 3) (safety 0) (debug 0)))
>>
>> When I call (compile-file "some.lisp"), declarations in file are
>> ignored while compiling file.
>
> I just checked with a toy example (see below) and the code is indeed
> generated differently when I change the declaim statement in the file. Do
> those problems still persist in your copy of ECL?
> Juanjo
> (declaim (optimize (speed 3) (safety 0) (debug 0)))
> (defun faa (x)
>  (print (cos x)))
>
> --
> Instituto de Física Fundamental, CSIC
> c/ Serrano, 113b, Madrid 28006 (Spain)
> http://juanjose.garciaripoll.googlepages.com
>




More information about the ecl-devel mailing list