Juan Jose Garcia-Ripoll <juanjose.garciarip...@googlemail.com> writes:
> On Sun, Aug 1, 2010 at 4:24 PM, Pascal J. Bourguignon > <p...@informatimago.com> wrote: >> I guess if the optimizer determines that a variable is of a given >> type, it should also initialize with a value valid for that type. > > No, this is the resposability of the programmer. (LET (A)) is > equivalent to (LET ((A NIL))) not just in the rethorical sense of > "equivalence" but in the sense of direct translation from one to the > other. > > In this case the problem may well be that the macroexpansion of FIND > or NTH is not correct. You're right, the problem is with FIND (notice that FIND is a function, so that would be in the open-coding of FIND, not a macro-expansion): ---(a.lisp)------------------------------------------------------------- (defun f (tag list) (find tag list)) ------------------------------------------------------------------------ > (compile-file "/tmp/a.lisp") ;;; ;;; Compiling /tmp/a.lisp. ;;; OPTIMIZE levels: Safety=2, Space=0, Speed=3, Debug=0 ;;; ;;; Compiling (DEFUN F ...). ;;; Warning: ;;; in file a.lisp, position 0 ;;; at (DEFUN F ...) ;;; ! In LET/LET* bindings, the type of the form NIL is SYMBOL, not FIXNUM. ;;; End of Pass 1. ;;; Emitting code for F. ;;; Note: ;;; Invoking external command: ;;; gcc "-I/home/pjb/opt/include/" -D_GNU_SOURCE -D_FILE_OFFSET_BITS=64 -I/usr/lib64/libffi-3.0.9/include/ -fPIC -D_THREAD_SAFE -Dlinux -O2 -w -c "/tmp/a.c" -o "/tmp/a.o" ;;; ;;; Note: ;;; Invoking external command: ;;; gcc -o "/tmp/a.fas" -L"/home/pjb/opt/lib/" "/tmp/a.o" "-Wl,--rpath,/home/pjb/opt/lib/" -shared -lffi -lecl -lgmp -lgc -lpthread -ldl -lm ;;; ;;; Finished compiling /tmp/a.lisp. ;;; #P"/tmp/a.fas" T NIL > -- __Pascal Bourguignon__ http://www.informatimago.com/ ------------------------------------------------------------------------------ This SF.net email is sponsored by Make an app they can't live without Enter the BlackBerry Developer Challenge http://p.sf.net/sfu/RIM-dev2dev _______________________________________________ Ecls-list mailing list Ecls-list@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/ecls-list