From dd39b19a32db682cd7c9781e1159781736b9987d Mon Sep 17 00:00:00 2001 From: jjgarcia Date: Mon, 10 Jan 2005 09:41:06 +0000 Subject: [PATCH] Fixes in various reader macros (#*, #(,#C)). Stream mode smm_closed disappears and closing of files preserves the original type of stream. Implemented METHOD-COMBINATION-ERROR, INVALID-METHOD-ERROR, option :ARGUMENT-PRECEDENCE-ORDER. In loop, iteration statements can now only appear before body statements, otherwise an error is signaled. A DEFTYPE form optional arguments have default value * --- src/CHANGELOG | 38 +++++++++++++ src/c/alloc.d | 2 +- src/c/cinit.d | 3 ++ src/c/file.d | 122 +++++++++++++++++------------------------- src/c/gbc.d | 4 -- src/c/gfun.d | 28 +++++----- src/c/pathname.d | 1 - src/c/print.d | 32 +++++------ src/c/read.d | 90 +++++++++++++++++++------------ src/c/symbols_list.h | 8 +-- src/c/unixsys.d | 2 +- src/clos/builtin.lsp | 3 +- src/clos/combin.lsp | 12 ++++- src/clos/fixup.lsp | 5 +- src/clos/generic.lsp | 29 +++++++--- src/clos/kernel.lsp | 103 ++++++++++++++++++++--------------- src/clos/method.lsp | 8 +-- src/clos/standard.lsp | 2 - src/clos/walk.lsp | 1 + src/cmp/cmpwt.lsp | 2 +- src/cmp/sysfun.lsp | 18 ++++--- src/h/external.h | 5 ++ src/h/object.h | 3 +- src/lsp/loop2.lsp | 16 +++--- src/lsp/predlib.lsp | 16 ++++-- 25 files changed, 318 insertions(+), 235 deletions(-) diff --git a/src/CHANGELOG b/src/CHANGELOG index b3b1c2e7e..821191d10 100644 --- a/src/CHANGELOG +++ b/src/CHANGELOG @@ -18,6 +18,16 @@ ECL 1.0 - The routines in the pretty printer now check the type of the arguments. + - The parser for #* did not accept #0* and also did not signal errors when + invalid characters were found. + + - The parser for #( did not accept empty vectors. + + - The parser for #C did not accept whitespaces between #\C and the list. + + - The reader macros for sharp-single-quote (#') and single-quote (') + did not pay attention to the end of file condition. + * Visible changes: - SI:MKSTEMP now accepts and returns pathnames. @@ -35,6 +45,13 @@ ECL 1.0 - When parsing a physical pathname, version is NIL unless the pathname has a name or a type components, in which case version is :NEWEST. + - The stream mode smm_closed disappears. Instead we add a flag called + stream.closed. Besides this fulfills the fact that CLOSE cannot change + the class of the stream + + - ENSURE-GENERIC-FUNCTION, DEFGENERIC and DEFMETHOD now can operate + on functions which are being traced. + * Internals: - The compiler now uses a more detailed tree to represent the code, keeping @@ -143,6 +160,27 @@ ECL 1.0 Now the keyword arguments of the applicable methods are considered to be valid initargs (ANSI 7.1.2) + - It is now possible to change the class of a generic function using + DEFGENERIC or ENSURE-GENERIC-FUNCTION(-USING-CLASS). + + - Implemented METHOD-COMBINATION-ERROR and INVALID-METHOD-ERROR. + + - ECL now uses the character trait "invalid" (ANSI 2.1.4.2). + + - (LOOP FOR NIL FROM ...) is a valid statement and the presence of NIL + only denotes that we ignore the value. + + - In LOOP, the order of statements in the body is now preserved. Formerly + WHILE and RETURN clauses were not thought to be part of the loop body. + Furthermore, FOR-AS clauses cannot appear after a main clause, such as + WHILE, WHEN, IF, DO, COLLECT, etc... + + - Option sorting of methods now takes into account the generic function + option :ARGUMENT-PRECEDENCE-ORDER. + + - The default value of optional arguments in a DEFTYPE form "defaults" to '* + (ANSI 3.4.8). + * MOP compliance: - ADD-METHOD is now a generic function and implements most of the protocol in diff --git a/src/c/alloc.d b/src/c/alloc.d index d873069ce..7886e8fc5 100644 --- a/src/c/alloc.d +++ b/src/c/alloc.d @@ -315,7 +315,7 @@ ONCE_MORE: break; #endif /* CLOS */ case t_stream: - obj->stream.mode = (short)smm_closed; + obj->stream.mode = (short)smm_broadcast; obj->stream.file = NULL; obj->stream.object0 = OBJNULL; obj->stream.object1 = OBJNULL; diff --git a/src/c/cinit.d b/src/c/cinit.d index 5366d5d04..b5fe15774 100644 --- a/src/c/cinit.d +++ b/src/c/cinit.d @@ -51,6 +51,9 @@ main(int argc, char **args) /* This should be always the first call */ cl_boot(argc, args); +#ifdef ECL_CMU_FORMAT + SYM_VAL(@'*load-verbose*') = Cnil; +#endif SYM_VAL(@'*package*') = cl_core.system_package; SYM_VAL(@'*features*') = CONS(make_keyword("ECL-MIN"), SYM_VAL(@'*features*')); #ifdef CLOS diff --git a/src/c/file.d b/src/c/file.d index 06df825c8..ee4129e5a 100644 --- a/src/c/file.d +++ b/src/c/file.d @@ -62,10 +62,6 @@ BEGIN: if (type_of(strm) != t_stream) FEtype_error_stream(strm); switch ((enum ecl_smmode)strm->stream.mode) { - case smm_closed: - FEclosed_stream(strm); - break; - case smm_io: case smm_input: #ifdef _MSC_VER @@ -113,10 +109,6 @@ BEGIN: if (type_of(strm) != t_stream) FEtype_error_stream(strm); switch ((enum ecl_smmode)strm->stream.mode) { - case smm_closed: - FEclosed_stream(strm); - return(FALSE); - case smm_input: #ifdef _MSC_VER case smm_input_wsock: @@ -163,11 +155,11 @@ BEGIN: if (type_of(strm) == t_instance) funcall(2, @'ext::stream-input-p', strm); #endif - if (type_of(strm) != t_stream) + if (type_of(strm) != t_stream) FEtype_error_stream(strm); - switch ((enum ecl_smmode)strm->stream.mode) { - case smm_closed: + if (strm->stream.closed) FEclosed_stream(strm); + switch ((enum ecl_smmode)strm->stream.mode) { case smm_input: case smm_output: #ifdef _MSC_VER @@ -278,7 +270,7 @@ io_error(cl_object strm) static void wrong_file_handler(cl_object strm) { - FEerror("Internal error: closed stream ~S without smm_mode flag.", 1, strm); + FEerror("Internal error: stream ~S has no valid C file handler.", 1, strm); } #ifdef _MSC_VER @@ -433,6 +425,7 @@ open_stream(cl_object fn, enum ecl_smmode smm, cl_object if_exists, } x = cl_alloc_object(t_stream); x->stream.mode = (short)smm; + x->stream.closed = 0; x->stream.file = fp; x->stream.char_stream_p = char_stream_p; /* Michael, touch this to reactivate support for odd bit sizes! */ @@ -493,13 +486,11 @@ close_stream(cl_object strm, bool abort_flag) /* Not used now! */ #endif if (type_of(strm) != t_stream) FEtype_error_stream(strm); + /* It is permissible to close a closed file */ + if (strm->stream.closed) + return; fp = strm->stream.file; switch ((enum ecl_smmode)strm->stream.mode) { - case smm_closed: - /* It is permissible to close a closed stream, although the output - is unspecified in those cases. */ - break; - case smm_output: if (fp == stdout) FEerror("Cannot close the standard output.", 0); @@ -560,9 +551,8 @@ close_stream(cl_object strm, bool abort_flag) /* Not used now! */ default: error("illegal stream mode"); } - strm->stream.mode = smm_closed; + strm->stream.closed = 1; strm->stream.file = NULL; - strm->stream.object0 = OBJNULL; } cl_object @@ -572,6 +562,7 @@ make_two_way_stream(cl_object istrm, cl_object ostrm) strm = cl_alloc_object(t_stream); strm->stream.mode = (short)smm_two_way; + strm->stream.closed = 0; strm->stream.file = NULL; strm->stream.object0 = istrm; strm->stream.object1 = ostrm; @@ -586,6 +577,7 @@ make_string_input_stream(cl_object strng, cl_index istart, cl_index iend) strm = cl_alloc_object(t_stream); strm->stream.mode = (short)smm_string_input; + strm->stream.closed = 0; strm->stream.file = NULL; strm->stream.object0 = strng; strm->stream.object1 = OBJNULL; @@ -613,6 +605,7 @@ make_string_output_stream_from_string(cl_object s) FEerror("~S is not a string with a fill-pointer.", 1, s); strm = cl_alloc_object(t_stream); strm->stream.mode = (short)smm_string_output; + strm->stream.closed = 0; strm->stream.file = NULL; strm->stream.object0 = s; strm->stream.object1 = OBJNULL; @@ -699,10 +692,9 @@ BEGIN: #endif if (type_of(strm) != t_stream) FEtype_error_stream(strm); - switch ((enum ecl_smmode)strm->stream.mode) { - case smm_closed: + if (strm->stream.closed) FEclosed_stream(strm); - break; + switch ((enum ecl_smmode)strm->stream.mode) { case smm_output: case smm_io: #ifdef _MSC_VER @@ -904,10 +896,9 @@ BEGIN: #endif if (type_of(strm) != t_stream) FEtype_error_stream(strm); - switch ((enum ecl_smmode)strm->stream.mode) { - case smm_closed: + if (strm->stream.closed) FEclosed_stream(strm); - break; + switch ((enum ecl_smmode)strm->stream.mode) { case smm_input: case smm_io: case smm_string_input: @@ -1042,11 +1033,9 @@ BEGIN: #endif if (type_of(strm) != t_stream) FEtype_error_stream(strm); - switch ((enum ecl_smmode)strm->stream.mode) { - case smm_closed: + if (strm->stream.closed) FEclosed_stream(strm); - break; - + switch ((enum ecl_smmode)strm->stream.mode) { case smm_input: case smm_io: { FILE *fp = strm->stream.file; @@ -1158,12 +1147,10 @@ BEGIN: #endif if (type_of(strm) != t_stream) FEtype_error_stream(strm); + if (strm->stream.closed) + FEclosed_stream(strm); fp = strm->stream.file; switch ((enum ecl_smmode)strm->stream.mode) { - case smm_closed: - FEclosed_stream(strm); - break; - case smm_input: case smm_io: if (!strm->stream.char_stream_p) @@ -1252,12 +1239,10 @@ BEGIN: #endif if (type_of(strm) != t_stream) FEtype_error_stream(strm); + if (strm->stream.closed) + FEclosed_stream(strm); fp = strm->stream.file; switch ((enum ecl_smmode)strm->stream.mode) { - case smm_closed: - FEclosed_stream(strm); - break; - case smm_input: case smm_io: if (!strm->stream.char_stream_p) @@ -1332,12 +1317,10 @@ BEGIN: #endif if (type_of(strm) != t_stream) FEtype_error_stream(strm); + if (strm->stream.closed) + FEclosed_stream(strm); fp = strm->stream.file; switch ((enum ecl_smmode)strm->stream.mode) { - case smm_closed: - FEclosed_stream(strm); - break; - case smm_output: case smm_io: if (!strm->stream.char_stream_p) @@ -1602,11 +1585,9 @@ BEGIN: #endif if (type_of(strm) != t_stream) FEtype_error_stream(strm); - switch ((enum ecl_smmode)strm->stream.mode) { - case smm_closed: + if (strm->stream.closed) FEclosed_stream(strm); - break; - + switch ((enum ecl_smmode)strm->stream.mode) { case smm_output: case smm_io: { FILE *fp = strm->stream.file; @@ -1672,12 +1653,10 @@ BEGIN: #endif if (type_of(strm) != t_stream) FEtype_error_stream(strm); + if (strm->stream.closed) + FEclosed_stream(strm); fp = strm->stream.file; switch ((enum ecl_smmode)strm->stream.mode) { - case smm_closed: - FEclosed_stream(strm); - break; - case smm_input: if (fp == NULL) wrong_file_handler(strm); @@ -1737,12 +1716,10 @@ BEGIN: #endif if (type_of(strm) != t_stream) FEtype_error_stream(strm); + if (strm->stream.closed) + FEclosed_stream(strm); fp = strm->stream.file; switch ((enum ecl_smmode)strm->stream.mode) { - case smm_closed: - FEclosed_stream(strm); - break; - case smm_output: #if 0 if (fp == NULL) @@ -1835,11 +1812,9 @@ BEGIN: #endif if (type_of(strm) != t_stream) FEtype_error_stream(strm); - switch ((enum ecl_smmode)strm->stream.mode) { - case smm_closed: + if (strm->stream.closed) FEclosed_stream(strm); - return ECL_LISTEN_EOF; - + switch ((enum ecl_smmode)strm->stream.mode) { case smm_input: case smm_io: fp = strm->stream.file; @@ -1919,11 +1894,9 @@ BEGIN: #endif if (type_of(strm) != t_stream) FEtype_error_stream(strm); - switch ((enum ecl_smmode)strm->stream.mode) { - case smm_closed: + if (strm->stream.closed) FEclosed_stream(strm); - return Cnil; - + switch ((enum ecl_smmode)strm->stream.mode) { case smm_output: case smm_io: case smm_input: { @@ -2004,11 +1977,9 @@ BEGIN: #endif if (type_of(strm) != t_stream) FEtype_error_stream(strm); - switch ((enum ecl_smmode)strm->stream.mode) { - case smm_closed: + if (strm->stream.closed) FEclosed_stream(strm); - return Cnil; - + switch ((enum ecl_smmode)strm->stream.mode) { case smm_input: case smm_output: case smm_io: { @@ -2110,11 +2081,9 @@ BEGIN: #endif if (type_of(strm) != t_stream) FEtype_error_stream(strm); - switch ((enum ecl_smmode)strm->stream.mode) { - case smm_closed: + if (strm->stream.closed) FEclosed_stream(strm); - output = Cnil; - break; + switch ((enum ecl_smmode)strm->stream.mode) { case smm_input: case smm_output: case smm_io: { @@ -2185,11 +2154,9 @@ BEGIN: #endif if (type_of(strm) != t_stream) FEtype_error_stream(strm); - switch ((enum ecl_smmode)strm->stream.mode) { - case smm_closed: + if (strm->stream.closed) FEclosed_stream(strm); - return 0; - + switch ((enum ecl_smmode)strm->stream.mode) { case smm_output: #ifdef _MSC_VER case smm_output_wsock: @@ -2234,6 +2201,7 @@ cl_make_synonym_stream(cl_object sym) assert_type_symbol(sym); x = cl_alloc_object(t_stream); x->stream.mode = (short)smm_synonym; + x->stream.closed = 0; x->stream.file = NULL; x->stream.object0 = sym; x->stream.object1 = OBJNULL; @@ -2262,6 +2230,7 @@ cl_synonym_stream_symbol(cl_object strm) } x = cl_alloc_object(t_stream); x->stream.mode = (short)smm_broadcast; + x->stream.closed = 0; x->stream.file = NULL; x->stream.object0 = cl_nreverse(streams); x->stream.object1 = OBJNULL; @@ -2290,6 +2259,7 @@ cl_broadcast_stream_streams(cl_object strm) } x = cl_alloc_object(t_stream); x->stream.mode = (short)smm_concatenated; + x->stream.closed = 0; x->stream.file = NULL; x->stream.object0 = cl_nreverse(streams); x->stream.object1 = OBJNULL; @@ -2596,7 +2566,7 @@ cl_open_stream_p(cl_object strm) when #'close has been applied on it */ if (type_of(strm) != t_stream) FEwrong_type_argument(@'stream', strm); - @(return (strm->stream.mode != smm_closed ? Ct : Cnil)) + @(return (strm->stream.closed ? Cnil : Ct)) } cl_object @@ -2686,6 +2656,7 @@ ecl_make_stream_from_fd(cl_object fname, int fd, enum ecl_smmode smm) stream = cl_alloc_object(t_stream); stream->stream.mode = (short)smm; + stream->stream.closed = 0; stream->stream.file = fp; stream->stream.object0 = @'base-char'; stream->stream.object1 = fname; /* not really used */ @@ -2711,6 +2682,7 @@ init_file(void) standard_input = cl_alloc_object(t_stream); standard_input->stream.mode = (short)smm_input; + standard_input->stream.closed = 0; standard_input->stream.file = stdin; standard_input->stream.object0 = @'base-char'; standard_input->stream.object1 = make_constant_string("stdin"); @@ -2722,6 +2694,7 @@ init_file(void) standard_output = cl_alloc_object(t_stream); standard_output->stream.mode = (short)smm_output; + standard_output->stream.closed = 0; standard_output->stream.file = stdout; standard_output->stream.object0 = @'base-char'; standard_output->stream.object1= make_constant_string("stdout"); @@ -2738,6 +2711,7 @@ init_file(void) x = cl_alloc_object(t_stream); x->stream.mode = (short)smm_synonym; + x->stream.closed = 0; x->stream.file = NULL; x->stream.object0 = @'*terminal-io*'; x->stream.object1 = OBJNULL; diff --git a/src/c/gbc.d b/src/c/gbc.d index 27a615980..3639aa5ba 100644 --- a/src/c/gbc.d +++ b/src/c/gbc.d @@ -262,10 +262,6 @@ BEGIN: case t_stream: switch ((enum ecl_smmode)x->stream.mode) { - case smm_closed: - /* Rest of fields are NULL */ - mark_next(x->stream.object1); - break; case smm_input: case smm_output: case smm_io: diff --git a/src/c/gfun.d b/src/c/gfun.d index 0f8299ccf..8cd8a66b0 100644 --- a/src/c/gfun.d +++ b/src/c/gfun.d @@ -109,28 +109,28 @@ compute_method(cl_narg narg, cl_object gf, cl_object *args) FEerror("compute_method: Too many arguments, limited to ~A.", 1, MAKE_FIXNUM(ARGTYPE_MAX)); #endif - for (i = 0, spec_no = 0; spec_how_list != Cnil; i++) { + for (spec_no = 0; spec_how_list != Cnil;) { cl_object spec_how = CAR(spec_how_list); - if (spec_how != Cnil) { - if (i >= narg) - FEwrong_num_arguments(gf); - argtype[spec_no++] = - (ATOM(spec_how) || - Null(memql(args[i], spec_how))) ? - cl_class_of(args[i]) : - args[i]; - } + cl_object spec_type = CAR(spec_how); + int spec_position = fix(CDR(spec_how)); + if (spec_position >= narg) + FEwrong_num_arguments(gf); + argtype[spec_no++] = + (ATOM(spec_type) || + Null(memql(args[spec_position], spec_type))) ? + cl_class_of(args[spec_position]) : + args[spec_position]; spec_how_list = CDR(spec_how_list); } e = get_meth_hash(argtype, spec_no, table); - if (e->key == OBJNULL) { + if (e->key == OBJNULL) { /* method not cached */ - cl_object methods, arglist = Cnil; - i = narg; - while (i-- > 0) + cl_object methods, arglist; + for (i = narg, arglist = Cnil; i-- > 0; ) { arglist = CONS(args[i], arglist); + } methods = funcall(3, @'compute-applicable-methods', gf, arglist); func = funcall(4, @'si::compute-effective-method', gf, diff --git a/src/c/pathname.d b/src/c/pathname.d index 3a40ac4c8..629ebb362 100644 --- a/src/c/pathname.d +++ b/src/c/pathname.d @@ -567,7 +567,6 @@ L: case t_stream: switch ((enum ecl_smmode)x->stream.mode) { - case smm_closed: case smm_input: case smm_output: case smm_probe: diff --git a/src/c/print.d b/src/c/print.d index b75571d0e..2686ec52b 100644 --- a/src/c/print.d +++ b/src/c/print.d @@ -1217,71 +1217,67 @@ si_write_ugly_object(cl_object x, cl_object stream) case t_stream: if (ecl_print_readably()) FEprint_not_readable(x); + write_str(x->stream.closed? "#stream.mode) { - case smm_closed: - write_str("#stream.object1, stream); - break; - case smm_input: - write_str("#stream.object1, stream); break; case smm_output: - write_str("#stream.object1, stream); break; #ifdef _MSC_VER case smm_input_wsock: - write_str("#stream.object1, stream); break; case smm_output_wsock: - write_str("#stream.object1, stream); break; #endif case smm_io: - write_str("#stream.object1, stream); break; case smm_probe: - write_str("#stream.object1, stream); break; case smm_synonym: - write_str("#stream.object0, stream); break; case smm_broadcast: - write_str("#stream.object0; k = y->string.fillp; for (ndx = 0; ndx < k && ndx < 16; ndx++) @@ -1292,7 +1288,7 @@ si_write_ugly_object(cl_object x, cl_object stream) break; case smm_string_output: - write_str("# dim) FEreader_error("Too many elements in #(...).", in, 0); - if (dimcount == 0) + if (dim && dimcount == 0) FEreader_error("Cannot fill the vector #().", in, 0); - else last = cl_env.stack_top[-1]; + last = cl_env.stack_top[-1]; } else dim = dimcount; x = cl_alloc_simple_vector(dim, aet_object); @@ -745,9 +753,11 @@ static cl_object sharp_asterisk_reader(cl_object in, cl_object c, cl_object d) { bool fixed_size; + cl_object last, elt, x; cl_index dim, dimcount, i; cl_index sp = cl_stack_index(); - cl_object last, elt, x; + cl_object rtbl = ecl_current_readtable(); + enum ecl_chattrib a; if (read_suppress) { read_constituent(in); @@ -763,17 +773,23 @@ sharp_asterisk_reader(cl_object in, cl_object c, cl_object d) int x = ecl_read_char(in); if (x == EOF) break; - if (x != '0' && x != '1') { + a = cat(rtbl, x); + if (a == cat_terminating || a == cat_whitespace) { ecl_unread_char(x, in); break; - } else { - cl_stack_push(MAKE_FIXNUM(x == '1')); } + if (a == cat_single_escape || a == cat_multiple_escape || + (x != '0' && x != '1')) + { + FEreader_error("Character ~:C is not allowed after #*", + in, 1, CODE_CHAR(x)); + } + cl_stack_push(MAKE_FIXNUM(x == '1')); } if (fixed_size) { if (dimcount > dim) FEreader_error("Too many elements in #*....", in, 0); - if (dimcount == 0) + if (dim && (dimcount == 0)) FEreader_error("Cannot fill the bit-vector #*.", in, 0); else last = cl_env.stack_top[-1]; } else { @@ -848,13 +864,17 @@ M: static cl_object sharp_dot_reader(cl_object in, cl_object c, cl_object d) { - if(d != Cnil && !read_suppress) + if (d != Cnil && !read_suppress) extra_argument('.', in, d); - in = read_object(in); + c = read_object(in); + if (c == OBJNULL) + FEend_of_file(in); if (read_suppress) - @(return Cnil) - in = si_eval_with_env(1, in); - @(return in) + @(return Cnil); + if (symbol_value(@'*read-eval*') == Cnil) + FEreader_error("Cannot evaluate the form #.~A", 1, c); + c = si_eval_with_env(1, c); + @(return c) } static cl_object @@ -1222,10 +1242,7 @@ stream_or_default_input(cl_object stream) return stream; } -@(defun read (&optional (strm Cnil) - (eof_errorp Ct) - eof_value - recursivep) +@(defun read (&optional (strm Cnil) (eof_errorp Ct) eof_value recursivep) cl_object x; @ strm = stream_or_default_input(strm); @@ -1289,8 +1306,9 @@ do_read_delimited_list(int d, cl_object strm) @(defun read_delimited_list (d &optional (strm Cnil) recursivep) cl_object l; - int delimiter = char_code(d); + int delimiter; @ + delimiter = char_code(d); strm = stream_or_default_input(strm); if (Null(recursivep)) l = do_read_delimited_list(delimiter, strm); @@ -1545,8 +1563,6 @@ cl_readtablep(cl_object readtable) @(return ((type_of(readtable) == t_readtable)? Ct : Cnil)) } -/* FIXME! READTABLE-CASE is missing! */ - static struct ecl_readtable_entry* read_table_entry(cl_object rdtbl, cl_object c) { @@ -1555,6 +1571,12 @@ read_table_entry(cl_object rdtbl, cl_object c) return &(rdtbl->readtable.table[char_code(c)]); } +bool +ecl_invalid_character_p(int c) +{ + return (c < 32) || (c == 127); +} + @(defun set_syntax_from_char (tochr fromchr &o (tordtbl ecl_current_readtable()) fromrdtbl) diff --git a/src/c/symbols_list.h b/src/c/symbols_list.h index 1bf93bd46..2a658ca04 100644 --- a/src/c/symbols_list.h +++ b/src/c/symbols_list.h @@ -59,9 +59,9 @@ cl_symbols[] = { {"*ERROR-OUTPUT*", CL_SPECIAL, NULL, -1, OBJNULL}, {"*FEATURES*", CL_SPECIAL, NULL, -1, OBJNULL}, {"*GENSYM-COUNTER*", CL_SPECIAL, NULL, -1, MAKE_FIXNUM(0)}, -{"*LOAD-PATHNAME*", CL_SPECIAL, NULL, -1, OBJNULL}, +{"*LOAD-PATHNAME*", CL_SPECIAL, NULL, -1, Cnil}, {"*LOAD-PRINT*", CL_SPECIAL, NULL, -1, Cnil}, -{"*LOAD-TRUENAME*", CL_SPECIAL, NULL, -1, OBJNULL}, +{"*LOAD-TRUENAME*", CL_SPECIAL, NULL, -1, Cnil}, {"*LOAD-VERBOSE*", CL_SPECIAL, NULL, -1, Ct}, {"*MACROEXPAND-HOOK*", CL_SPECIAL, NULL, -1, OBJNULL}, {"*MODULES*", CL_SPECIAL, NULL, -1, OBJNULL}, @@ -976,14 +976,14 @@ cl_symbols[] = { {"GENERIC-FUNCTION", CL_ORDINARY, NULL, -1, OBJNULL}, {"IF", CL_FORM, NULL, -1, OBJNULL}, {"INITIALIZE-INSTANCE", CL_ORDINARY, NULL, -1, OBJNULL}, -{"INVALID-METHOD-ERROR", CL_ORDINARY, NULL, -1, OBJNULL}, +{"INVALID-METHOD-ERROR", CL_ORDINARY, _D(cl_invalid_method_error), -1, OBJNULL}, {"MAKE-INSTANCE", CL_ORDINARY, NULL, -1, OBJNULL}, {"MAKE-INSTANCES-OBSOLETE", CL_ORDINARY, NULL, -1, OBJNULL}, {"MAKE-LOAD-FORM", CL_ORDINARY, NULL, -1, OBJNULL}, {"MAKE-LOAD-FORM-SAVING-SLOTS", CL_ORDINARY, NULL, -1, OBJNULL}, {"MAKE-METHOD", CL_ORDINARY, NULL, -1, OBJNULL}, {"METHOD", CL_ORDINARY, NULL, -1, OBJNULL}, -{"METHOD-COMBINATION-ERROR", CL_ORDINARY, NULL, -1, OBJNULL}, +{"METHOD-COMBINATION-ERROR", CL_ORDINARY, _D(cl_method_combination_error), -1, OBJNULL}, {"METHOD-COMBINATION", CL_ORDINARY, NULL, -1, OBJNULL}, {"METHOD-QUALIFIERS", CL_ORDINARY, NULL, -1, OBJNULL}, {"NEXT-METHOD-P", CL_ORDINARY, NULL, -1, OBJNULL}, diff --git a/src/c/unixsys.d b/src/c/unixsys.d index 9f8d0fc2c..0bb8eb680 100644 --- a/src/c/unixsys.d +++ b/src/c/unixsys.d @@ -77,7 +77,7 @@ si_close_pipe(cl_object stream) #else if (type_of(stream) == t_stream && stream->stream.object1 == @'si::open-pipe') { - stream->stream.mode = smm_closed; + stream->stream.closed = 1; pclose(stream->stream.file); stream->stream.file = NULL; stream->stream.object0 = OBJNULL; diff --git a/src/clos/builtin.lsp b/src/clos/builtin.lsp index 05da17987..5eeca5d87 100644 --- a/src/clos/builtin.lsp +++ b/src/clos/builtin.lsp @@ -95,7 +95,8 @@ (apply #'change-class instance (find-class new-class) initargs)) (defmethod make-instances-obsolete ((class symbol)) - (make-instances-obsolete (find-class class))) + (make-instances-obsolete (find-class class)) + class) (defmethod make-instance ((class-name symbol) &rest initargs) (apply #'make-instance (find-class class-name) initargs)) diff --git a/src/clos/combin.lsp b/src/clos/combin.lsp index 8fc0c5f4e..ac12f901f 100644 --- a/src/clos/combin.lsp +++ b/src/clos/combin.lsp @@ -21,7 +21,7 @@ ;;; ;;; *effective-method-templates* is a list of effective-method template ;;; entries. Each entry is itself a list of the form: -;;; +;;; ;;; (