|
View:
New views
1 Messages
—
Rating Filter:
Alert me
|
|
|
clisp-cvs Digest, Vol 42, Issue 24Send clisp-cvs mailing list submissions to
clisp-cvs@... 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 clisp-cvs-request@... You can reach the person managing the list at clisp-cvs-owner@... 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 ChangeLog,1.7180,1.7181 stream.d,1.666,1.667 (Sam Steingold) 2. clisp/src ChangeLog,1.7181,1.7182 stream.d,1.667,1.668 (Sam Steingold) 3. clisp/tests ChangeLog,1.643,1.644 streams.tst,1.60,1.61 (Sam Steingold) 4. clisp/src ChangeLog,1.7182,1.7183 compiler.lisp,1.350,1.351 (Sam Steingold) ---------------------------------------------------------------------- Message: 1 Date: Thu, 29 Oct 2009 13:40:47 +0000 From: Sam Steingold <sds@...> Subject: clisp/src ChangeLog,1.7180,1.7181 stream.d,1.666,1.667 To: clisp-cvs@... Message-ID: <E1N3VF9-0001vw-IS@...> Update of /cvsroot/clisp/clisp/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv7418/src Modified Files: ChangeLog stream.d Log Message: (handle_set, handle_isset): use nullp(.) instead of eq(NIL,.) Index: stream.d =================================================================== RCS file: /cvsroot/clisp/clisp/src/stream.d,v retrieving revision 1.666 retrieving revision 1.667 diff -u -d -r1.666 -r1.667 --- stream.d 28 Oct 2009 22:15:18 -0000 1.666 +++ stream.d 29 Oct 2009 13:40:45 -0000 1.667 @@ -14378,7 +14378,7 @@ var SOCKET in_sock = INVALID_SOCKET; var SOCKET out_sock = INVALID_SOCKET; var uintL ret = 0, avail = 0; - if (eq(NIL,parse_sock_list(socket,&sock,&dir)) && need_new_list) + if (nullp(parse_sock_list(socket,&sock,&dir)) && need_new_list) *need_new_list = true; stream_handles(sock,true,NULL, READ_P(dir) ? &in_sock : NULL, @@ -14419,7 +14419,7 @@ if (FD_ISSET(in_sock,errorfds)) return S(Kerror); if (socket_server_p(sock)) { ret = FD_ISSET(in_sock,readfds) ? T : NIL; - if (!eq(NIL,status_cons)) Cdr(status_cons) = ret; + if (!nullp(status_cons)) Cdr(status_cons) = ret; return ret; } else if (uint_p(sock)) { if (FD_ISSET(in_sock,readfds)) rd = LISTEN_AVAIL; @@ -14441,7 +14441,7 @@ case LISTEN_WAIT: ret = wr ? S(Koutput) : NIL; break; case LISTEN_ERROR: ret = S(Kerror); break; } - if (!eq(NIL,status_cons)) Cdr(status_cons) = ret; + if (!nullp(status_cons)) Cdr(status_cons) = ret; return ret; } Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.7180 retrieving revision 1.7181 diff -u -d -r1.7180 -r1.7181 --- ChangeLog 28 Oct 2009 22:15:17 -0000 1.7180 +++ ChangeLog 29 Oct 2009 13:40:44 -0000 1.7181 @@ -1,8 +1,12 @@ +2009-10-29 Sam Steingold <sds@...> + + * stream.d (handle_set, handle_isset): use nullp(.) instead of eq(NIL,.) + 2009-10-29 Vladimir Tzankov <vtzankov@...> [MULTITHREAD]: fix GC safety issue in SOCKET-STATUS * stream.d (parse_sock_list): do not return pointer in heap, rather - return the cons which cdr should be filled with socket status + return the cons whose cdr should be filled with socket status (handle_set, handle_isset): use new return from parse_sock_list and preserve it across maygc calls ------------------------------ Message: 2 Date: Thu, 29 Oct 2009 20:07:35 +0000 From: Sam Steingold <sds@...> Subject: clisp/src ChangeLog,1.7181,1.7182 stream.d,1.667,1.668 To: clisp-cvs@... Message-ID: <E1N3bHT-0007gN-Jv@...> Update of /cvsroot/clisp/clisp/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29508/src Modified Files: ChangeLog stream.d Log Message: (fresh_line_low): replaces elastic_newline_pending_p (fresh_line): use it for all legwork so that fresh-line is called individually on each constituent stream of a BROADCAST-STREAM instead of broadcasting a newline to all streams when only one needs it Index: stream.d =================================================================== RCS file: /cvsroot/clisp/clisp/src/stream.d,v retrieving revision 1.667 retrieving revision 1.668 diff -u -d -r1.667 -r1.668 --- stream.d 29 Oct 2009 13:40:45 -0000 1.667 +++ stream.d 29 Oct 2009 20:07:33 -0000 1.668 @@ -16825,12 +16825,17 @@ } } -/* Tests whether the stream has an elastic newline pending. - elastic_newline_pending_p(stream) +/* do the actual legwork of fresh_line + fresh_line_low(stream) > stream: Stream - < result: true if a newline should be output first + < result: true if a newline has been output can trigger GC */ -local maygc bool elastic_newline_pending_p (object stream) { +local maygc bool fresh_line_low (const gcv_object_t* stream_) { + /* Test whether an elastic newline is pending, so that + (ELASTIC-NEWLINE stream) followed by (FRESH-LINE stream) always leads + to exactly one newline being output. */ + #define TERPRI_IF(cond) return cond ? (terpri(stream_), true) : false + var object stream = *stream_; check_SP(); start: if (builtin_stream_p(stream)) @@ -16838,20 +16843,20 @@ case strmtype_synonym: /* Synonym-Stream: follow further */ resolve_as_synonym(stream); goto start; - case strmtype_broad: /* Broadcast-Stream: */ - /* The OR of the individual streams. */ - { - pushSTACK(TheStream(stream)->strm_broad_list); - while (consp(STACK_0)) { - if (elastic_newline_pending_p(Car(STACK_0))) { - skipSTACK(1); - return true; - } - STACK_0 = Cdr(STACK_0); - } + case strmtype_broad: { /* Broadcast-Stream: */ + /* FRESH-LINE is a "control", not an "output" operation, + so do it one by one on the individual constituent streams. */ + var bool ret = false; + pushSTACK(TheStream(stream)->strm_broad_list); + while (consp(STACK_0)) { + pushSTACK(Car(STACK_0)); + ret = fresh_line_low(&STACK_0); skipSTACK(1); - return false; + STACK_0 = Cdr(STACK_0); } + skipSTACK(1); + return ret; + } case strmtype_twoway: case strmtype_echo: #ifdef SOCKET_STREAMS @@ -16861,18 +16866,20 @@ stream = TheStream(stream)->strm_twoway_output; goto start; default: /* normal stream */ - return eq(TheStream(stream)->strm_wr_ch,P(wr_ch_pending_newline)); + TERPRI_IF(eq(TheStream(stream)->strm_wr_ch,P(wr_ch_pending_newline)) + || !eq(get_line_position(*stream_),Fixnum_0)); } - else { - /* Test (SLOT-VALUE stream '$penl): */ + else { /* Test (SLOT-VALUE stream '$penl): */ var object stream_forwarded = stream; instance_un_realloc(stream_forwarded); instance_update(stream,stream_forwarded); var object cv = TheInstance(stream_forwarded)->inst_class_version; var object clas = TheClassVersion(cv)->cv_class; var object slotinfo = gethash(S(penl),TheClass(clas)->slot_location_table,false); - return !nullp(TheSrecord(stream_forwarded)->recdata[posfixnum_to_V(slotinfo)]); + TERPRI_IF(!nullp(TheSrecord(stream_forwarded)->recdata[posfixnum_to_V(slotinfo)]) + || !eq(get_line_position(stream_forwarded),Fixnum_0)); } + #undef TERPRI_IF } /* Writes a newline on a stream, if it is not already positioned at column 0. @@ -16908,16 +16915,7 @@ } } } - /* Test whether an elastic newline is pending, so that - (ELASTIC-NEWLINE stream) followed by (FRESH-LINE stream) always leads - to exactly one newline being output. */ - if (elastic_newline_pending_p(*stream_) - || !eq(get_line_position(*stream_),Fixnum_0)) { - terpri(stream_); - return true; - } else { - return false; - } + return fresh_line_low(stream_); } /* Writes a newline on a stream, delayed and nullified if the next character Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.7181 retrieving revision 1.7182 diff -u -d -r1.7181 -r1.7182 --- ChangeLog 29 Oct 2009 13:40:44 -0000 1.7181 +++ ChangeLog 29 Oct 2009 20:07:33 -0000 1.7182 @@ -1,5 +1,12 @@ 2009-10-29 Sam Steingold <sds@...> + * stream.d (fresh_line_low): replaces elastic_newline_pending_p + (fresh_line): use it for all legwork so that fresh-line is called + individually on each constituent stream of a BROADCAST-STREAM instead + of broadcasting a newline to all streams when only one needs it + +2009-10-29 Sam Steingold <sds@...> + * stream.d (handle_set, handle_isset): use nullp(.) instead of eq(NIL,.) 2009-10-29 Vladimir Tzankov <vtzankov@...> ------------------------------ Message: 3 Date: Thu, 29 Oct 2009 20:07:35 +0000 From: Sam Steingold <sds@...> Subject: clisp/tests ChangeLog,1.643,1.644 streams.tst,1.60,1.61 To: clisp-cvs@... Message-ID: <E1N3bHT-0007gR-HU@...> Update of /cvsroot/clisp/clisp/tests In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv29508/tests Modified Files: ChangeLog streams.tst Log Message: (fresh_line_low): replaces elastic_newline_pending_p (fresh_line): use it for all legwork so that fresh-line is called individually on each constituent stream of a BROADCAST-STREAM instead of broadcasting a newline to all streams when only one needs it Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/tests/ChangeLog,v retrieving revision 1.643 retrieving revision 1.644 diff -u -d -r1.643 -r1.644 --- ChangeLog 19 Oct 2009 16:03:31 -0000 1.643 +++ ChangeLog 29 Oct 2009 20:07:33 -0000 1.644 @@ -1,3 +1,7 @@ +2009-10-29 Sam Steingold <sds@...> + + * streams.tst: test FRESH-LINE on broadcast streams + 2009-10-19 Sam Steingold <sds@...> * excepsit.tst, ffi.tst, path.tst: fix #-UNICODE Index: streams.tst =================================================================== RCS file: /cvsroot/clisp/clisp/tests/streams.tst,v retrieving revision 1.60 retrieving revision 1.61 diff -u -d -r1.60 -r1.61 --- streams.tst 16 Dec 2008 16:36:23 -0000 1.60 +++ streams.tst 29 Oct 2009 20:07:33 -0000 1.61 @@ -1216,6 +1216,31 @@ '(t nil)) ("1212345" "1212345") +;; fresh-line on broadcast streams +(let* ((s1 (make-string-output-stream)) + (s2 (make-string-output-stream)) + (b (make-broadcast-stream s1 s2))) + (write-char #\a s1) + (list (fresh-line b) + (get-output-stream-string s1) + (get-output-stream-string s2))) +(NIL + "a +" + "") + +(let* ((s1 (make-string-output-stream)) + (s2 (make-string-output-stream)) + (b (make-broadcast-stream s2 s1))) + (write-char #\a s1) + (list (fresh-line b) + (get-output-stream-string s1) + (get-output-stream-string s2))) +(T + "a +" + "") + (progn (symbol-cleanup 's) (symbol-cleanup 's1) ------------------------------ Message: 4 Date: Thu, 29 Oct 2009 21:41:26 +0000 From: Sam Steingold <sds@...> Subject: clisp/src ChangeLog,1.7182,1.7183 compiler.lisp,1.350,1.351 To: clisp-cvs@... Message-ID: <E1N3ckI-0002qS-7T@...> Update of /cvsroot/clisp/clisp/src In directory ddv4jf1.ch3.sourceforge.com:/tmp/cvs-serv10892/src Modified Files: ChangeLog compiler.lisp Log Message: (ignore-check, value-form-index): revert last patch: 3.2.5 prescribes style-warning here, the writeup is not normative Index: compiler.lisp =================================================================== RCS file: /cvsroot/clisp/clisp/src/compiler.lisp,v retrieving revision 1.350 retrieving revision 1.351 diff -u -d -r1.350 -r1.351 --- compiler.lisp 28 Oct 2009 19:59:03 -0000 1.350 +++ compiler.lisp 29 Oct 2009 21:41:24 -0000 1.351 @@ -3578,7 +3578,9 @@ (c-warn (TEXT "Binding variable ~S can cause side effects despite IGNORE declaration since it is declared SPECIAL.") sym) (when (var-for-value-usedp var) - (c-warn (TEXT "variable ~S is used despite IGNORE declaration.") + ;; style-warning as per 3.2.5, although + ;; COMPILER-DIAGNOSTICS:USE-HANDLER calls it a warning + (c-style-warn (TEXT "variable ~S is used despite IGNORE declaration.") sym))) ;; var not ignore-declared (unless (memq sym *ignorables*) @@ -8035,7 +8037,9 @@ (when (fnode-p value) (setf (fnode-used value) t) (when (fnode-ignore value) - (c-warn (TEXT "function ~S used despite IGNORE declaration.") + ;; style-warning as per 3.2.5, although + ;; COMPILER-DIAGNOSTICS:USE-HANDLER calls it a warning + (c-style-warn (TEXT "function ~S is used despite IGNORE declaration.") (fnode-name value)))) (let ((const-list (fnode-consts func)) (forms-list (fnode-consts-forms func)) Index: ChangeLog =================================================================== RCS file: /cvsroot/clisp/clisp/src/ChangeLog,v retrieving revision 1.7182 retrieving revision 1.7183 diff -u -d -r1.7182 -r1.7183 --- ChangeLog 29 Oct 2009 20:07:33 -0000 1.7182 +++ ChangeLog 29 Oct 2009 21:41:23 -0000 1.7183 @@ -1,5 +1,10 @@ 2009-10-29 Sam Steingold <sds@...> + * compiler.lisp (ignore-check, value-form-index): revert last patch: + 3.2.5 prescribes style-warning here, the writeup is not normative + +2009-10-29 Sam Steingold <sds@...> + * stream.d (fresh_line_low): replaces elastic_newline_pending_p (fresh_line): use it for all legwork so that fresh-line is called individually on each constituent stream of a BROADCAST-STREAM instead ------------------------------ ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference ------------------------------ _______________________________________________ clisp-cvs mailing list clisp-cvs@... https://lists.sourceforge.net/lists/listinfo/clisp-cvs End of clisp-cvs Digest, Vol 42, Issue 24 ***************************************** ------------------------------------------------------------------------------ Come build with us! The BlackBerry(R) Developer Conference in SF, CA is the only developer event you need to attend this year. Jumpstart your developing skills, take BlackBerry mobile applications to market and stay ahead of the curve. Join us from November 9 - 12, 2009. Register now! http://p.sf.net/sfu/devconference _______________________________________________ clisp-devel mailing list clisp-devel@... https://lists.sourceforge.net/lists/listinfo/clisp-devel |
| Free embeddable forum powered by Nabble | Forum Help |