Mercurial > hg > xemacs-beta
annotate src/console-stream-impl.h @ 4686:cdabd56ce1b5
Fix various small issues with the multiple-value implementation.
lisp/ChangeLog addition:
2009-08-31 Aidan Kehoe <kehoea@parhasard.net>
* byte-optimize.el (byte-optimize-form-code-walker):
Be careful about discarding multiple values when optimising
#'prog1 calls.
(byte-optimize-or):
Preserve any trailing nil, as this is a supported way to
explicitly discard multiple values.
(byte-optimize-cond-1):
Discard multiple values with a singleton followed by no more
clauses.
* bytecomp.el (progn):
(prog1):
(prog2):
Be careful about discarding multiple values in the byte-hunk
handler of these three forms.
* bytecomp.el (byte-compile-prog1, byte-compile-prog2):
Don't call #'values explicitly, use `(or ,(pop form) nil) instead,
since that compiles to bytecode, not a funcall.
* bytecomp.el (byte-compile-values):
With one non-const argument, byte-compile to `(or ,(second form)
nil), not an explicit #'values call.
* bytecomp.el (byte-compile-insert-header):
Be nicer in the error message to emacs versions that don't
understand our bytecode.
src/ChangeLog addition:
2009-08-31 Aidan Kehoe <kehoea@parhasard.net>
* eval.c (For, Fand):
Don't declare val as REGISTER in these functions, for some reason
it breaks the non-DEBUG union build. These functions are only
called from interpreted code, the performance implication doesn't
matter. Thank you Robert Delius Royar!
* eval.c (Fmultiple_value_list_internal):
Error on too many arguments.
tests/ChangeLog addition:
2009-08-31 Aidan Kehoe <kehoea@parhasard.net>
* automated/lisp-tests.el (Assert-rounding):
Remove an overly-verbose failure message here.
Correct a couple of tests which were buggy in themselves. Add
three new tests, checking the behaviour of #'or and #'and when
passed zero arguments, and a Known-Bug-Expect-Failure call
involving letf and values. (The bug predates the C-level
multiple-value implementation.)
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Sun, 06 Sep 2009 19:36:02 +0100 |
parents | 141c2920ea48 |
children | e0db3c197671 |
rev | line source |
---|---|
872 | 1 /* Define stream specific console, device, and frame object for XEmacs. |
2 Copyright (C) 1995 Board of Trustees, University of Illinois. | |
3 Copyright (C) 1995 Free Software Foundation, Inc. | |
1204 | 4 Copyright (C) 2002 Ben Wing. |
872 | 5 |
6 This file is part of XEmacs. | |
7 | |
8 XEmacs is free software; you can redistribute it and/or modify it | |
9 under the terms of the GNU General Public License as published by the | |
10 Free Software Foundation; either version 2, or (at your option) any | |
11 later version. | |
12 | |
13 XEmacs is distributed in the hope that it will be useful, but WITHOUT | |
14 ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or | |
15 FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License | |
16 for more details. | |
17 | |
18 You should have received a copy of the GNU General Public License | |
19 along with XEmacs; see the file COPYING. If not, write to | |
20 the Free Software Foundation, Inc., 59 Temple Place - Suite 330, | |
21 Boston, MA 02111-1307, USA. */ | |
22 | |
23 /* Synched up with: Not in FSF. */ | |
24 | |
25 /* Written by Ben Wing. */ | |
26 | |
27 #ifndef INCLUDED_console_stream_impl_h_ | |
28 #define INCLUDED_console_stream_impl_h_ | |
29 | |
30 #include "console-impl.h" | |
31 #include "console-stream.h" | |
32 | |
33 DECLARE_CONSOLE_TYPE (stream); | |
34 | |
35 struct stream_console | |
36 { | |
3092 | 37 #ifdef NEW_GC |
38 struct lrecord_header header; | |
39 #endif /* NEW_GC */ | |
872 | 40 FILE *in; |
41 FILE *out; | |
42 FILE *err; | |
43 int needs_newline; | |
1204 | 44 Lisp_Object instream; |
872 | 45 }; |
46 | |
3092 | 47 #ifdef NEW_GC |
48 typedef struct stream_console Lisp_Stream_Console; | |
49 | |
50 DECLARE_LRECORD (stream_console, Lisp_Stream_Console); | |
51 | |
52 #define XSTREAM_CONSOLE(x) \ | |
53 XRECORD (x, stream_console, Lisp_Stream_Console) | |
54 #define wrap_stream_console(p) wrap_record (p, stream_console) | |
55 #define STREAM_CONSOLE_P(x) RECORDP (x, stream_console) | |
56 #endif /* NEW_GC */ | |
57 | |
872 | 58 #define CONSOLE_STREAM_DATA(con) CONSOLE_TYPE_DATA (con, stream) |
59 | |
60 #endif /* INCLUDED_console_stream_impl_h_ */ |