From: <cli...@li...> - 2005-01-20 22:08:10
|
Send clisp-cvs mailing list submissions to cli...@li... To subscribe or unsubscribe via the World Wide Web, visit https://lists.sourceforge.net/lists/listinfo/clisp-cvs or, via email, send a message with subject or body 'help' to cli...@li... You can reach the person managing the list at cli...@li... When replying, please edit your Subject line so it is more specific than "Re: Contents of clisp-cvs digest..." CLISP CVS commits for today Today's Topics: 1. clisp/src io.d,1.272,1.273 ChangeLog,1.4094,1.4095 (Bruno Haible) 2. clisp/utils clispload.lsp,1.41,1.42 (Bruno Haible) 3. clisp/src ChangeLog,1.4095,1.4096 (Bruno Haible) 4. clisp/src charstrg.d,1.112,1.113 ChangeLog,1.4096,1.4097 (Bruno Haible) 5. clisp/src io.d,1.273,1.274 lispbibl.d,1.603,1.604 ChangeLog,1.4097,1.4098 (Bruno Haible) 6. clisp/src TODO,1.56,1.57 (Bruno Haible) 7. clisp/src ChangeLog,1.4098,1.4099 makemake.in,1.498,1.499 (Bruno Haible) 8. clisp/src stream.d,1.494,1.495 ChangeLog,1.4099,1.4100 (Bruno Haible) 9. clisp/tests bind.tst,1.6,1.7 ChangeLog,1.307,1.308 (Sam Steingold) 10. clisp/src ChangeLog,1.4100,1.4101 eval.d,1.184,1.185 (Bruno Haible) 11. clisp/src TODO,1.57,1.58 (Bruno Haible) 12. clisp/src control.d,1.118,1.119 ChangeLog,1.4101,1.4102 (Sam Steingold) 13. clisp/src control.d,1.119,1.120 ChangeLog,1.4102,1.4103 (Sam Steingold) --__--__-- Message: 1 From: Bruno Haible <ha...@us...> To: cli...@li... Subject: clisp/src io.d,1.272,1.273 ChangeLog,1.4094,1.4095 Date: Thu, 20 Jan 2005 12:24:00 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv22560 Modified Files: io.d ChangeLog Log Message: (let ((*read-suppress* t)) (read-from-string "#'foo")) must return nil. Index: io.d =================================================================== RCS file: /cvsroot/clisp/clisp/src/io.d,v retrieving revision 1.272 retrieving revision 1.273 diff -u -d -r1.272 -r1.273 --- io.d 12 Jan 2005 19:52:49 -0000 1.272 +++ io.d 20 Jan 2005 12:23:54 -0000 1.273 @@ -2645,13 +2645,18 @@ # can trigger GC local maygc Values list2_reader (const gcv_object_t* stream_) { var object obj = read_recursive_no_dot(stream_); # read Object - pushSTACK(obj); - pushSTACK(allocate_cons()); # second List-cons - var object new_cons1 = allocate_cons(); # first List-cons - var object new_cons2 = popSTACK(); # second List-cons - Car(new_cons2) = popSTACK(); # new_cons2 = (cons obj nil) - Cdr(new_cons1) = new_cons2; Car(new_cons1) = STACK_0; # new_cons1 = (cons symbol new_cons2) - VALUES1(new_cons1); skipSTACK(2); + if (!nullpSv(read_suppress)) { /* *READ-SUPPRESS* /= NIL ? */ + VALUES1(NIL); /* yes -> don't cons up a list, just return NIL */ + } else { + pushSTACK(obj); + pushSTACK(allocate_cons()); # second List-cons + var object new_cons1 = allocate_cons(); # first List-cons + var object new_cons2 = popSTACK(); # second List-cons + Car(new_cons2) = popSTACK(); # new_cons2 = (cons obj nil) + Cdr(new_cons1) = new_cons2; Car(new_cons1) = STACK_0; # new_cons1 = (cons symbol new_cons2) + VALUES1(new_cons1); + } + skipSTACK(2); } # (set-macro-character #\' Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.4094 retrieving revision 1.4095 diff -u -d -r1.4094 -r1.4095 --- ChangeLog 19 Jan 2005 22:02:23 -0000 1.4094 +++ ChangeLog 20 Jan 2005 12:23:56 -0000 1.4095 @@ -1,3 +1,7 @@ +2005-01-20 Bruno Haible <br...@cl...> + + * io.d (list2_reader): If *read-suppress* is true, return NIL. + 2005-01-19 Sam Steingold <sd...@gn...> * control.d (make_variable_frame): the initial special binding is --__--__-- Message: 2 From: Bruno Haible <ha...@us...> To: cli...@li... Subject: clisp/utils clispload.lsp,1.41,1.42 Date: Thu, 20 Jan 2005 12:37:56 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/utils In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25796/utils Modified Files: clispload.lsp Log Message: A few more expected failures, due to an ANSI CL blunder. Index: clispload.lsp =================================================================== RCS file: /cvsroot/clisp/clisp/utils/clispload.lsp,v retrieving revision 1.41 retrieving revision 1.42 diff -u -d -r1.41 -r1.42 --- clispload.lsp 5 Jan 2005 14:51:28 -0000 1.41 +++ clispload.lsp 20 Jan 2005 12:37:53 -0000 1.42 @@ -159,6 +159,15 @@ ;; an argument"; so only one argument is consumed (by the V, not by ~[). FORMATTER.COND.14 |FORMATTER.COND:.7| + ;; Paul Dietz assumes that the reader constructs an array of element type T + ;; for #1a"abcd" and #1a#*000110. This could be what ANSI CL 2.4.8.12 is + ;; saying. + ;; CLISP constructs arrays whose element type reflect the syntax; this is + ;; consistent with the printer's behaviour (cf. ANSI CL 22.1.3.8) and + ;; achieves a better PRINT-READ consistency. + SYNTAX.SHARP-A.4 SYNTAX.SHARP-A.6 SYNTAX.SHARP-A.7 SYNTAX.SHARP-A.22 + SYNTAX.SHARP-A.23 + ;; Paul Dietz assumes that (ROOM NIL) prints non-empty information. ;; In CLISP, it prints an empty information and returns some values. ROOM.2 --__--__-- Message: 3 From: Bruno Haible <ha...@us...> To: cli...@li... Subject: clisp/src ChangeLog,1.4095,1.4096 Date: Thu, 20 Jan 2005 12:37:55 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv25796/src Modified Files: ChangeLog Log Message: A few more expected failures, due to an ANSI CL blunder. Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.4095 retrieving revision 1.4096 diff -u -d -r1.4095 -r1.4096 --- ChangeLog 20 Jan 2005 12:23:56 -0000 1.4095 +++ ChangeLog 20 Jan 2005 12:37:52 -0000 1.4096 @@ -1,3 +1,7 @@ +2004-01-20 Bruno Haible <br...@cl...> + + * utils/clispload.lsp (*expected-failures*): Update. + 2005-01-20 Bruno Haible <br...@cl...> * io.d (list2_reader): If *read-suppress* is true, return NIL. --__--__-- Message: 4 From: Bruno Haible <ha...@us...> To: cli...@li... Subject: clisp/src charstrg.d,1.112,1.113 ChangeLog,1.4096,1.4097 Date: Thu, 20 Jan 2005 14:16:51 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv18509 Modified Files: charstrg.d ChangeLog Log Message: Remove obsolete code. Index: charstrg.d =================================================================== RCS file: /cvsroot/clisp/clisp/src/charstrg.d,v retrieving revision 1.112 retrieving revision 1.113 diff -u -d -r1.112 -r1.113 --- charstrg.d 17 Dec 2004 12:09:31 -0000 1.112 +++ charstrg.d 20 Jan 2005 14:16:47 -0000 1.113 @@ -2465,9 +2465,6 @@ TheSnstring(new_string)->data[0] = char_code(obj); return new_string; } - /* (VECTOR NIL) is a string, so #A(NIL (0)) is acceptable instead of "" */ - if (nil_vector_p(obj) && vector_length(obj) == 0) - return O(empty_string); pushSTACK(NIL); /* no PLACE */ pushSTACK(obj); /* TYPE-ERROR slot DATUM */ pushSTACK(O(type_stringsymchar)); /* TYPE-ERROR slot EXPECTED-TYPE */ Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.4096 retrieving revision 1.4097 diff -u -d -r1.4096 -r1.4097 --- ChangeLog 20 Jan 2005 12:37:52 -0000 1.4096 +++ ChangeLog 20 Jan 2005 14:16:48 -0000 1.4097 @@ -1,5 +1,9 @@ 2004-01-20 Bruno Haible <br...@cl...> + * charstrg.d (test_stringsymchar_arg): Remove redundant code. + +2004-01-20 Bruno Haible <br...@cl...> + * utils/clispload.lsp (*expected-failures*): Update. 2005-01-20 Bruno Haible <br...@cl...> --__--__-- Message: 5 From: Bruno Haible <ha...@us...> To: cli...@li... Subject: clisp/src io.d,1.273,1.274 lispbibl.d,1.603,1.604 ChangeLog,1.4097,1.4098 Date: Thu, 20 Jan 2005 14:19:55 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv19210 Modified Files: io.d lispbibl.d ChangeLog Log Message: It is stupid, but ANSI CL does not forbid strings and characters as slot names in the syntax for structures! Index: lispbibl.d =================================================================== RCS file: /cvsroot/clisp/clisp/src/lispbibl.d,v retrieving revision 1.603 retrieving revision 1.604 diff -u -d -r1.603 -r1.604 --- lispbibl.d 11 Jan 2005 17:12:47 -0000 1.603 +++ lispbibl.d 20 Jan 2005 14:19:52 -0000 1.604 @@ -12460,7 +12460,7 @@ < result: argument as string can trigger GC */ extern maygc object test_stringsymchar_arg (object obj, bool invert); -/* used by PACKAGE */ +/* used by IO, PACKAGE */ # UP: tests two equally long strings for equality # > string1,offset1: Chars in String1 start from here Index: io.d =================================================================== RCS file: /cvsroot/clisp/clisp/src/io.d,v retrieving revision 1.273 retrieving revision 1.274 diff -u -d -r1.273 -r1.274 --- io.d 20 Jan 2005 12:23:54 -0000 1.273 +++ io.d 20 Jan 2005 14:19:49 -0000 1.274 @@ -4138,7 +4138,7 @@ } { var object slot = Car(args); - if (!symbolp(slot)) { + if (!(symbolp(slot) || stringp(slot) || charp(slot))) { pushSTACK(*stream_); # STREAM-ERROR slot STREAM pushSTACK(*(stream_ STACKop -2)); # name pushSTACK(slot); @@ -4158,10 +4158,9 @@ } if (matomp(Cdr(args))) goto dotted; - { - var object kw = intern_keyword(Symbol_name(slot)); # Slotname as Keyword - pushSTACK(kw); # Keyword into STACK - } + slot = test_stringsymchar_arg(slot,false); # Slotname as string + var object kw = intern_keyword(slot); # Slotname as Keyword + pushSTACK(kw); # Keyword into STACK } args = *(stream_ STACKop -1); # again the same remaining Args args = Cdr(args); Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.4097 retrieving revision 1.4098 diff -u -d -r1.4097 -r1.4098 --- ChangeLog 20 Jan 2005 14:16:48 -0000 1.4097 +++ ChangeLog 20 Jan 2005 14:19:53 -0000 1.4098 @@ -1,5 +1,10 @@ 2004-01-20 Bruno Haible <br...@cl...> + * io.d (structure_reader): Accept also strings and characters as slot + names, and use test_stringsymchar_arg for converting them to a string. + +2004-01-20 Bruno Haible <br...@cl...> + * charstrg.d (test_stringsymchar_arg): Remove redundant code. 2004-01-20 Bruno Haible <br...@cl...> --__--__-- Message: 6 From: Bruno Haible <ha...@us...> To: cli...@li... Subject: clisp/src TODO,1.56,1.57 Date: Thu, 20 Jan 2005 15:05:28 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv31897 Modified Files: TODO Log Message: When referring to external URLs, copy the important contents from there to here. The URLs might go away, just as suddenly as developer.netscape.com went away. Index: TODO =================================================================== RCS file: /cvsroot/clisp/clisp/src/TODO,v retrieving revision 1.56 retrieving revision 1.57 diff -u -d -r1.56 -r1.57 --- TODO 18 Jan 2005 18:25:17 -0000 1.56 +++ TODO 20 Jan 2005 15:05:24 -0000 1.57 @@ -4,17 +4,38 @@ MUST-FIX BEFORE NEXT RELEASE ============================ +:modern declaration in DEFPACKAGE + Contagion warnings emitted by many floating-point operations. Even though the warnings are off by default now, the user who enables them will report bug <http://sourceforge.net/tracker/index.php?func=detail&aid=945469&group_id=1355&atid=101355> +Examples: +(LOG -3/4) +(cosh #c(1d0 2d0)) +(expt 0.7877386934673366d0 0.4131787330316742d0) Passing --with-...-prefix=... configure argument to modules/.../configure <http://article.gmane.org/gmane.lisp.clisp.devel:13286> +how do I add options like "--with-libpari-prefix" to configure? +I tried putting +AC_LIB_LINKFLAGS_BODY([pari]) +into pari/configure.in +and it would have worked if pari/configure were passed +--with-libpari-prefix which was gived to the top-level configure. Modules on 64-bit platforms: <http://article.gmane.org/gmane.lisp.clisp.devel:13255> +with debug, modules do not build: +calls.c:1866: incompatible types in initialization +calls.c:1866: initializer element is not constant +calls.c:1866: (near initialization for `module__syscalls__subr_tab._subr_posix_bogomips.GCself.one_o') <http://sourceforge.net/tracker/index.php?func=detail&aid=981623&group_id=1355&atid=101355> +It it crucial to extend DEBUG_GCSAFETY functionality to +modules because they are often written by less careful +prople (like myself) than the core developers (like you). +Right now, genclisph.d produces clisp.h which is +inconsistent with lispbibl.d when DEBUG_GCSAFETY is enabled. MUST-FIX BEFORE RELEASE 2.35 @@ -30,6 +51,19 @@ binary stdio <http://article.gmane.org/gmane.lisp.clisp.devel:12268> +one of the common issues with CLISP is +*** - (SETF STREAM-ELEMENT-TYPE) on #<IO TERMINAL-STREAM> is illegal +i.e., inability to use binary IO in stdio. +it all boils down to regular_handle_p(FD): +when the handle is found to be "regular", the appropriate +*STANDARD-*PUT* stream becomes a handle stream whose element type can be +changed, otherwise a TERMINAL-STREAM is used. +Right now, `regular' means "file on disk", as in +[unix] (S_ISREG(statbuf.st_mode) || S_ISBLK(statbuf.st_mode)) +[win32] (filetype == FILE_TYPE_DISK) +what about pipes? +while MAKE-STREAM should provide a universal solution to these issues, +it still might make sense to change regular_handle_p(). URGENT PROBLEMS @@ -52,6 +86,11 @@ Cannot remove symbolic links to directories with either DELETE-FILE or DELETE-DIR. <http://article.gmane.org/gmane.lisp.clisp.devel:13452> +the case of symlinks to directories, there is absolutely no way out. +you cannot get the name of the link, +you cannot delete it (with either delete-file or delete-dir), +and you cannot even probe it! (with either probe-file or probe-directory) +(note BTW a naming inconsistency between probe-directory and delete-dir). CLISP_LANGUAGE=german LC_ALL=C clisp -q @@ -100,6 +139,18 @@ LAMBDA: erst alle Argumente auswerten, dann erst die vorhandenen Parameter binden, dann jeweils initform und binden. <http://groups-beta.google.com/group/comp.lang.lisp/browse_thread/thread/6a9841771d95feb2?tvc=2> +(setf (symbol-value 'x) 6) +(defun foo (x) ;a lexical binding of x + (print x) + (let ((x (1+ x))) ;a special binding of x + (declare (special x)) ;and a lexical reference + (bar)) + (1+ x)) +(defun bar () + (print (locally (declare (special x)) x))) +(foo 10) +>> 10 11 => 11 +in clisp 2.33.1 it is 10 7 => 11 Another example is: (let ((x 5)) (let ((x (1+ x))) (declare (special x)) (print x))) should print 6. @@ -167,6 +218,8 @@ etc. can do the same as TRACE without needing to hack clisp's TRACE, COMPILE, DISASSEMBLE, DEFUN, DEFGENERIC. <http://article.gmane.org/gmane.lisp.clisp.devel:12837> +Such a def-fwrapper is what we need, so that profilers +etc. that are ported to ACL can be ported to clisp with minimal effort. <http://www.franz.com/support/documentation/6.2/doc/fwrappers-and-advice.htm> @@ -175,14 +228,27 @@ larger fixnums on 64-bit platforms <https://sourceforge.net/tracker/index.php?func=detail&aid=999750&group_id=1355&atid=351355> +should be able to get 48-bit fixnums error recovery <https://sourceforge.net/tracker/index.php?func=detail&aid=946463&group_id=1355&atid=351355> +The ability not to lose the computation on error is +crucial for any serious task. +Therefore, we need to be able to recover from ALL errors. +There are two independent issues here: +1. "retry" restart on i/o, see +<https://sourceforge.net/mailarchive/message.php?msg_id=7607066> +2. "return-from" restart that will return the specified +values from the given function on the stack. we +already have that in interpreted functions, but we must +also have it in compiled functions. +<http://thread.gmane.org/gmane.lisp.clisp.devel/11448> GENERATIONAL_GC on Cygwin <http://sourceforge.net/tracker/index.php?func=detail&aid=1104677&group_id=1355&atid=101355> +the mmap() autoconf test fails but maybe one can work around it? local function (LABEL/FLET) calls waste heap (COPY-CLOSURE). --__--__-- Message: 7 From: Bruno Haible <ha...@us...> To: cli...@li... Subject: clisp/src ChangeLog,1.4098,1.4099 makemake.in,1.498,1.499 Date: Thu, 20 Jan 2005 15:58:11 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13538 Modified Files: ChangeLog makemake.in Log Message: Simplify last patch. Put comments instead of hyperlinks into the web. Index: makemake.in =================================================================== RCS file: /cvsroot/clisp/clisp/src/makemake.in,v retrieving revision 1.498 retrieving revision 1.499 diff -u -d -r1.498 -r1.499 --- makemake.in 19 Jan 2005 14:47:58 -0000 1.498 +++ makemake.in 20 Jan 2005 15:58:08 -0000 1.499 @@ -1341,8 +1341,9 @@ fi if [ ${HSYSOS} = win32gcc -o ${HSYSOS} = cygwin ]; then - # this is necessary for g++ to handle w32shell - # <http://article.gmane.org/gmane.comp.gnu.mingw.user/8213> + # This is necessary for g++ to handle w32shell.c: The member lpVtbl is not + # defined by the w32api include files if + # defined(__cplusplus) && !defined(CINTERFACE) case "$CC" in *"g++"* ) XCFLAGS=$XCFLAGS' -DCINTERFACE'; ;; esac fi @@ -1376,13 +1377,26 @@ XCFLAGS=$XCFLAGS' -DSUN4_29' fi fi -# <http://article.gmane.org/gmane.lisp.clisp.devel:10411> -# IF platform frequently comes without compiler and linker -# THEN use BINARY_DISTRIB -# ELSE -# IF platform has strict libc version checking -# THEN use static library distribution -# ELSE use BINARY_DISTRIB +# When to define BINARY_DISTRIB? +# There is no general pro or cons of distributing an executable versus a +# static library, except for the unavailability of the compiler and linker +# on some platforms. +# Other than that, it mostly depends on whether the host you are building +# on has a recent or an old set of system shared libraries. Old is better +# here, since vendors usually only add functions to libc and rarely remove +# some functions. If the host you use for the build is not the oldest OS +# version, then distributing the static library is better: when you distribute +# a Unix executable, it is _certain_ to not run on older versions of the OS +# (thanks to the shared library versioning check), whereas when you distribute +# a static library, it has good chances to link and work fine on older versions +# of the OS. +# So the general rule is: +# IF platform frequently comes without compiler and linker +# THEN use BINARY_DISTRIB +# ELSE +# IF platform has strict libc version checking +# THEN use static library distribution +# ELSE use BINARY_DISTRIB if [ $CROSS = false ] ; then case "$host_os" in solaris*) @@ -2254,10 +2268,10 @@ echotab "echo $ARGQ#define $x \"\$($x)\"$ARGQ >> cflags.h.new" done if [ $TSYS = win32msvc ] ; then -echotab '$(RM) cflags.h' -echotab '$(CP) cflags.h.new cflags.h' + echotab '$(RM) cflags.h' + echotab '$(MV) cflags.h.new cflags.h' else -echotab 'if cmp cflags.h.new cflags.h > /dev/null 2>&1; then ${RM} cflags.h.new; else ${MV} cflags.h.new cflags.h; fi' + echotab 'if cmp cflags.h.new cflags.h > /dev/null 2>&1; then ${RM} cflags.h.new; else ${MV} cflags.h.new cflags.h; fi' fi echotab '$(TOUCH) cflags.h.stamp' echol Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.4098 retrieving revision 1.4099 diff -u -d -r1.4098 -r1.4099 --- ChangeLog 20 Jan 2005 14:19:53 -0000 1.4098 +++ ChangeLog 20 Jan 2005 15:58:05 -0000 1.4099 @@ -1,5 +1,9 @@ 2004-01-20 Bruno Haible <br...@cl...> + * makemake.in (cflags.h.stamp): Use $(MV), not $(CP). + +2004-01-20 Bruno Haible <br...@cl...> + * io.d (structure_reader): Accept also strings and characters as slot names, and use test_stringsymchar_arg for converting them to a string. --__--__-- Message: 8 From: Bruno Haible <ha...@us...> To: cli...@li... Subject: clisp/src stream.d,1.494,1.495 ChangeLog,1.4099,1.4100 Date: Thu, 20 Jan 2005 16:02:17 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv14578 Modified Files: stream.d ChangeLog Log Message: Simplify last patch. Index: stream.d =================================================================== RCS file: /cvsroot/clisp/clisp/src/stream.d,v retrieving revision 1.494 retrieving revision 1.495 diff -u -d -r1.494 -r1.495 --- stream.d 19 Jan 2005 14:47:59 -0000 1.494 +++ stream.d 20 Jan 2005 16:01:39 -0000 1.495 @@ -4975,17 +4975,15 @@ } #elif defined(WIN32_NATIVE) begin_system_call(); - { - int wont_hang = fd_read_wont_hang_p(handle); - if (wont_hang == 0) { - end_system_call(); return ls_wait; - } - if (wont_hang == 2) { - end_system_call(); return ls_eof; - } - if (wont_hang == 3) { - end_system_call(); return ls_avail; - } + var int wont_hang = fd_read_wont_hang_p(handle); + if (wont_hang == 0) { + end_system_call(); return ls_wait; + } + if (wont_hang == 2) { + end_system_call(); return ls_eof; + } + if (wont_hang == 3) { + end_system_call(); return ls_avail; } # try to read a byte var uintB b; Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.4099 retrieving revision 1.4100 diff -u -d -r1.4099 -r1.4100 --- ChangeLog 20 Jan 2005 15:58:05 -0000 1.4099 +++ ChangeLog 20 Jan 2005 16:01:51 -0000 1.4100 @@ -1,5 +1,9 @@ 2004-01-20 Bruno Haible <br...@cl...> + * stream.d (listen_handle): Use 'var'. + +2004-01-20 Bruno Haible <br...@cl...> + * makemake.in (cflags.h.stamp): Use $(MV), not $(CP). 2004-01-20 Bruno Haible <br...@cl...> --__--__-- Message: 9 From: Sam Steingold <sd...@us...> To: cli...@li... Subject: clisp/tests bind.tst,1.6,1.7 ChangeLog,1.307,1.308 Date: Thu, 20 Jan 2005 20:03:57 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/tests In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv13138/tests Modified Files: bind.tst ChangeLog Log Message: added LOCALLY tests Index: bind.tst =================================================================== RCS file: /cvsroot/clisp/clisp/tests/bind.tst,v retrieving revision 1.6 retrieving revision 1.7 diff -u -d -r1.6 -r1.7 --- bind.tst 19 Jan 2005 21:07:21 -0000 1.6 +++ bind.tst 20 Jan 2005 20:03:54 -0000 1.7 @@ -79,6 +79,32 @@ Z)))) 7 +;; same as above, with LOCALLY +(let ((x 5)) + (progv '(x y) '(20 120) + (let ((x (1+ x)) (y (1+ x)) (z (1+ x))) + (declare (special x)) + (list z (locally (declare (special y)) y) x y)))) +(6 120 6 6) +(let ((x 5)) + (progv '(x y) '(20 120) + (let* ((x (1+ x)) (y (1+ x)) (z (1+ x))) + (declare (special x)) + (list z (locally (declare (special y)) y) x y)))) +(7 120 6 7) +(let ((x 5)) + (progv '(x y) '(20 120) + (multiple-value-bind (x y z) (values (1+ x) (1+ x) (1+ x)) + (declare (special x)) + (list z (locally (declare (special y)) y) x y)))) +(6 120 6 6) +(let ((x 5)) + (progv '(x y) '(20 120) + ((lambda (&optional (x (1+ x)) (y (1+ x)) (z (1+ x))) + (declare (special x)) + (list z (locally (declare (special y)) y) x y))))) +(7 120 6 7) + ;; CLHS 3.3.4 - a "free" declaration (LET ((X 5)) (PROGV '(X) '(20) Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/tests/ChangeLog,v retrieving revision 1.307 retrieving revision 1.308 diff -u -d -r1.307 -r1.308 --- ChangeLog 19 Jan 2005 21:07:23 -0000 1.307 +++ ChangeLog 20 Jan 2005 20:03:54 -0000 1.308 @@ -1,3 +1,7 @@ +2005-01-20 Sam Steingold <sd...@gn...> + + * bind.tst: added LOCALLY tests + 2005-01-19 Bruno Haible <br...@cl...> * bind.tst: Add more tests with global variables. --__--__-- Message: 10 From: Bruno Haible <ha...@us...> To: cli...@li... Subject: clisp/src ChangeLog,1.4100,1.4101 eval.d,1.184,1.185 Date: Thu, 20 Jan 2005 20:43:31 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv24341 Modified Files: ChangeLog eval.d Log Message: Fix binds_sym_p: it was using variables other than its argument - bad style! Index: eval.d =================================================================== RCS file: /cvsroot/clisp/clisp/src/eval.d,v retrieving revision 1.184 retrieving revision 1.185 diff -u -d -r1.184 -r1.185 --- eval.d 19 Jan 2005 20:53:50 -0000 1.184 +++ eval.d 20 Jan 2005 20:43:28 -0000 1.185 @@ -748,13 +748,13 @@ { /* Does the binding at bindptr bind the symbol sym? */ #ifdef NO_symbolflags - #define binds_sym_p(bindptr) \ - (eq(*(bindptr STACKop 1),sym) && /* the right symbol? */ \ - eq(*(bindingsptr STACKop 0),fixnum(bit(active_bit)))) /* active & static? */ + #define binds_sym_p(bindingptr) \ + (eq(*(bindingptr STACKop 1),sym) /* the right symbol? */ \ + && eq(*(bindingptr STACKop 0),fixnum(bit(active_bit)))) /* active & static? */ #else var object cmp = as_object(as_oint(sym) | wbit(active_bit_o)); /* for comparison: binding must be active */ - #define binds_sym_p(bindptr) \ - (eq(*(bindingsptr STACKop 0),cmp)) /* right symbol & active & static? */ + #define binds_sym_p(bindingptr) \ + (eq(*(bindingptr STACKop 0),cmp)) /* right symbol & active & static? */ #endif next_env: if (framepointerp(venv)) { Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.4100 retrieving revision 1.4101 diff -u -d -r1.4100 -r1.4101 --- ChangeLog 20 Jan 2005 16:01:51 -0000 1.4100 +++ ChangeLog 20 Jan 2005 20:43:22 -0000 1.4101 @@ -1,5 +1,9 @@ 2004-01-20 Bruno Haible <br...@cl...> + * eval.d (symbol_env_search): Fix definition of binds_sym_p. + +2004-01-20 Bruno Haible <br...@cl...> + * stream.d (listen_handle): Use 'var'. 2004-01-20 Bruno Haible <br...@cl...> --__--__-- Message: 11 From: Bruno Haible <ha...@us...> To: cli...@li... Subject: clisp/src TODO,1.57,1.58 Date: Thu, 20 Jan 2005 20:50:01 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv26205 Modified Files: TODO Log Message: %HANDLER-BIND. Index: TODO =================================================================== RCS file: /cvsroot/clisp/clisp/src/TODO,v retrieving revision 1.57 retrieving revision 1.58 diff -u -d -r1.57 -r1.58 --- TODO 20 Jan 2005 15:05:24 -0000 1.57 +++ TODO 20 Jan 2005 20:49:58 -0000 1.58 @@ -6,6 +6,8 @@ :modern declaration in DEFPACKAGE +Fix the %HANDLER-BIND walker problem by using a function syntax for it. + Contagion warnings emitted by many floating-point operations. Even though the warnings are off by default now, the user who enables them will report bug --__--__-- Message: 12 From: Sam Steingold <sd...@us...> To: cli...@li... Subject: clisp/src control.d,1.118,1.119 ChangeLog,1.4101,1.4102 Date: Thu, 20 Jan 2005 22:03:02 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12106/src Modified Files: control.d ChangeLog Log Message: (LET, LET*, MULTIPLE-VALUE-BIND): simplified control flow Index: control.d =================================================================== RCS file: /cvsroot/clisp/clisp/src/control.d,v retrieving revision 1.118 retrieving revision 1.119 diff -u -d -r1.118 -r1.119 --- control.d 19 Jan 2005 22:02:22 -0000 1.118 +++ control.d 20 Jan 2005 22:02:50 -0000 1.119 @@ -655,11 +655,9 @@ var object symbol = *(markptr STACKop varframe_binding_sym); /* variable */ var object newval = *(markptr STACKop varframe_binding_value); /* new value */ *(markptr STACKop varframe_binding_value) = TheSymbolflagged(symbol)->symvalue; /* save old value in frame */ - *markptr = as_object(as_oint(*markptr) | wbit(active_bit_o)); /* activate binding */ TheSymbolflagged(symbol)->symvalue = newval; /* new value */ - } else { - *markptr = as_object(as_oint(*markptr) | wbit(active_bit_o)); /* activate binding */ } + *markptr = as_object(as_oint(*markptr) | wbit(active_bit_o)); /* activate binding */ } while (--count); } } @@ -696,12 +694,11 @@ if (as_oint(*markptr) & wbit(dynam_bit_o)) { /* binding dynamic? */ var object symbol = *(markptr STACKop varframe_binding_sym); /* variable */ *initptr = TheSymbolflagged(symbol)->symvalue; /* save old value in frame */ - *markptr = as_object(as_oint(*markptr) | wbit(active_bit_o)); /* activate binding */ TheSymbolflagged(symbol)->symvalue = newval; /* new value */ } else { *initptr = newval; /* new value into the frame */ - *markptr = as_object(as_oint(*markptr) | wbit(active_bit_o)); /* activate binding */ } + *markptr = as_object(as_oint(*markptr) | wbit(active_bit_o)); /* activate binding */ } while (--count); } /* interpret body: */ @@ -1752,16 +1749,14 @@ { var gcv_object_t* valptr = &Next(frame_pointer); \ frame_pointer skipSTACKop -varframe_binding_size; \ {var gcv_object_t* markptr = &Before(frame_pointer); \ - if (as_oint(*markptr) & wbit(dynam_bit_o)) { \ - /* activate dynamic binding: */ \ + if (as_oint(*markptr) & wbit(dynam_bit_o)) { /* dynamic binding: */ \ var object sym = *(markptr STACKop varframe_binding_sym); /* var */ \ *valptr = TheSymbolflagged(sym)->symvalue; /* old val into the frame */ \ - *markptr = as_object(as_oint(*markptr) | wbit(active_bit_o)); /* activate binding */ \ TheSymbolflagged(sym)->symvalue = (value); /* new value into the value cell */ \ - } else { /* activate static binding : */ \ + } else /* static binding : */ \ *valptr = (value); /* new value into the frame */ \ - *markptr = as_object(as_oint(*markptr) | wbit(active_bit_o)); /* activate binding */ \ - }}} + *markptr = as_object(as_oint(*markptr) | wbit(active_bit_o)); /* activate binding */ \ + }} /* bind the r:=bind_count variables to the s:=mv_count values: (if there are not enough variables: discard remaining values; if there are not enough values: fill with NIL.) Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.4101 retrieving revision 1.4102 diff -u -d -r1.4101 -r1.4102 --- ChangeLog 20 Jan 2005 20:43:22 -0000 1.4101 +++ ChangeLog 20 Jan 2005 22:02:53 -0000 1.4102 @@ -1,3 +1,7 @@ +2005-01-20 Sam Steingold <sd...@gn...> + + * control.d (LET, LET*, MULTIPLE-VALUE-BIND): simplified control flow + 2004-01-20 Bruno Haible <br...@cl...> * eval.d (symbol_env_search): Fix definition of binds_sym_p. --__--__-- Message: 13 From: Sam Steingold <sd...@us...> To: cli...@li... Subject: clisp/src control.d,1.119,1.120 ChangeLog,1.4102,1.4103 Date: Thu, 20 Jan 2005 22:06:40 +0000 Reply-To: cli...@li... Update of /cvsroot/clisp/clisp/src In directory sc8-pr-cvs1.sourceforge.net:/tmp/cvs-serv12877/src Modified Files: control.d ChangeLog Log Message: (activate_bindings): new function (extracted from LET) (LET, LOCALLY): use it Index: control.d =================================================================== RCS file: /cvsroot/clisp/clisp/src/control.d,v retrieving revision 1.119 retrieving revision 1.120 diff -u -d -r1.119 -r1.120 --- control.d 20 Jan 2005 22:02:50 -0000 1.119 +++ control.d 20 Jan 2005 22:06:37 -0000 1.120 @@ -622,6 +622,23 @@ } } +/* activate the bindings created by make_variable_frame() + > frame_pointer, count: values returned from make_variable_frame() + count must be positive */ +local void activate_bindings (gcv_object_t* frame_pointer, uintC count) { + do { + frame_pointer skipSTACKop -varframe_binding_size; + var gcv_object_t* markptr = &Before(frame_pointer); + if (as_oint(*markptr) & wbit(dynam_bit_o)) { /* binding dynamic? */ + var object symbol = *(markptr STACKop varframe_binding_sym); /* variable */ + var object newval = *(markptr STACKop varframe_binding_value); /* new value */ + *(markptr STACKop varframe_binding_value) = TheSymbolflagged(symbol)->symvalue; /* save old value in frame */ + TheSymbolflagged(symbol)->symvalue = newval; /* new value */ + } + *markptr = as_object(as_oint(*markptr) | wbit(active_bit_o)); /* activate binding */ + } while (--count); +} + LISPSPECFORM(let, 1,0,body) { /* (LET ({varspec}) {decl} {form}), CLTL p. 110 */ /* separate {decl} {form}: */ @@ -645,21 +662,7 @@ frame_pointer skipSTACKop -(varframe_binding_size-1); } while (--count); } - { /* Then, activate the bindings: */ - var gcv_object_t* frame_pointer = bind_ptr; - var uintC count = bind_count; - do { - frame_pointer skipSTACKop -varframe_binding_size; - var gcv_object_t* markptr = &Before(frame_pointer); - if (as_oint(*markptr) & wbit(dynam_bit_o)) { /* binding dynamic? */ - var object symbol = *(markptr STACKop varframe_binding_sym); /* variable */ - var object newval = *(markptr STACKop varframe_binding_value); /* new value */ - *(markptr STACKop varframe_binding_value) = TheSymbolflagged(symbol)->symvalue; /* save old value in frame */ - TheSymbolflagged(symbol)->symvalue = newval; /* new value */ - } - *markptr = as_object(as_oint(*markptr) | wbit(active_bit_o)); /* activate binding */ - } while (--count); - } + activate_bindings(bind_ptr,bind_count); } /* interpret body: */ implicit_progn(popSTACK(),NIL); @@ -722,6 +725,7 @@ var gcv_object_t* bind_ptr; var uintC bind_count; make_variable_frame(S(locally),NIL,&bind_ptr,&bind_count); + if (bind_count) activate_bindings(bind_ptr,bind_count); /* interpret body: */ implicit_progn(popSTACK(),NIL); /* unwind frames: */ Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.4102 retrieving revision 1.4103 diff -u -d -r1.4102 -r1.4103 --- ChangeLog 20 Jan 2005 22:02:53 -0000 1.4102 +++ ChangeLog 20 Jan 2005 22:06:37 -0000 1.4103 @@ -1,5 +1,10 @@ 2005-01-20 Sam Steingold <sd...@gn...> + * control.d (activate_bindings): new function (extracted from LET) + (LET, LOCALLY): use it + +2005-01-20 Sam Steingold <sd...@gn...> + * control.d (LET, LET*, MULTIPLE-VALUE-BIND): simplified control flow 2004-01-20 Bruno Haible <br...@cl...> --__--__-- _______________________________________________ clisp-cvs mailing list cli...@li... https://lists.sourceforge.net/lists/listinfo/clisp-cvs End of clisp-cvs Digest |