*** empty log message ***
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
4d81111e
KR
12004-04-25 Kevin Ryde <user42@zip.com.au>
2
da8bcb2f
KR
3 * chars.c (scm_char_upcase, scm_char_downcase, scm_c_upcase,
4 scm_c_downcase): Use ctype.h toupper and tolower. This will be useful
5 in 8-bit locales, and ensures consistency with char-upper-case? and
6 char-lower-case? which already use ctype.h.
7 (scm_c_upcase_table, scm_c_downcase_table, scm_lowers, scm_uppers):
8 Remove.
9 * chars.c, chars.h, init.c (scm_tables_prehistory): Remove.
10
4d81111e
KR
11 * socket.c (VALIDATE_INET6): Correction to bignum_in_ipv6_range_p
12 call. Reported by Hyperdivision.
13
14 * threads.c (scm_yield): Correction, actually call scm_thread_yield.
15 Reported by Hyperdivision.
16
17 * unif.c (s_scm_make_uve): Remove unused local variable. Reported by
18 Hyperdivision.
19
7e6e6b37
DH
202004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
21
22 Hide the implementation of ilocs and isyms in eval.c.
23
24 * deprecated.h (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
25 SCM_ICDRP), eval.c (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
26 SCM_ICDRP), eval.h (SCM_ICDR, SCM_IFRINC, SCM_IFRAME, SCM_IDIST,
27 SCM_ICDRP): Deprecated and added to deprecated.h. Moved from
28 eval.h to eval.c.
29
30 * deprecated.c (scm_isymnames), deprecated.h (scm_isymnames,
31 SCM_ISYMNUM, SCM_ISYMCHARS), eval.c (SCM_ISYMNUM, isymnames,
32 scm_unmemocopy, CEVAL), print.c (scm_isymnames), tags.h
33 (SCM_ISYMNUM, scm_isymnames, SCM_ISYMCHARS): Deprecated
34 scm_isymnames, SCM_ISYMNUM and SCM_ISYMCHARS and added to
35 deprecated.[hc]. Moved scm_isymnames from print.c to eval.c and
36 renamed to isymnames. Moved SCM_ISYMNUM from tags.h to eval.c and
37 renamed to ISYMNUM.
38
39 * eval.c (scm_i_print_iloc, scm_i_print_isym), eval.h
40 (scm_i_print_iloc, scm_i_print_isym), print.c (scm_iprin1):
41 Extracted printing of ilocs and isyms to guile internal functions
42 scm_i_print_iloc, scm_i_print_isym of eval.c.
43
caab294f
KR
442004-04-22 Kevin Ryde <user42@zip.com.au>
45
7aaf4758
KR
46 * numbers.c (scm_bit_extract): Use SCM_SRS for signed right shift.
47
caab294f
KR
48 * numbers.c (scm_round): Test for x already an integer, to avoid bad
49 rounding in x+0.5 when x is a big value already an integer. In
50 certain hardware rounding cases x+0.5 can give an adjacent integer,
51 leading to that as the result, when we really just wanted x itself.
52
b1cb24ff
DH
532004-04-19 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
54
55 * eval.c (scm_unmemocopy): Fixed unmemoization of let*.
56
57 (deval_args, CEVAL): Minor improvements: Reduced variable scopes,
58 added const qualifiers, cast intentionally unused expressions to
59 void for emphasis, improved comment.
60
5065b40d
DH
612004-04-18 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
62
63 * tags.h (scm_tags, scm_tc8_tags, scm_tc9_flag, scm_tc8_flag,
64 scm_tc8_isym): Renamed scm_tags to scm_tc8_tags. Renamed
65 scm_tc9_flag to scm_tc8_flag. Introduced new identifier
66 scm_tc8_isym. Defined tc8-tags relative to scm_tc3_imm24.
67 Defined the tc8-tag for flags to be 0x04, which will mean that
68 SCM_BOOL_F will also have the value 0x04 instead of 0x013c. Due
69 to the reduced number of bits and the simpler bit pattern for
70 SCM_BOOL_F, certain machines may be able to use more efficient
71 processor instructions to deal with SCM_BOOL_F.
72
73 (SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA): Removed. These have
74 never been defined in a released version, thus no need to
75 deprecate them.
76
77 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Flags now use tc8
78 instead of tc9 tags.
79
80 (SCM_ISYMP, SCM_MAKISYM, SCM_ISYMNUM): Isyms now use tc8 instead
81 of tc9 tags.
82
83 (SCM_MAKSPCSYM): Removed. It is almost impossible that user code
84 could have used this definition.
85
86 (SCM_IM_AND, SCM_IM_BEGIN, SCM_IM_CASE, SCM_IM_COND, SCM_IM_DO,
87 SCM_IM_IF, SCM_IM_LAMBDA, SCM_IM_LET, SCM_IM_LETSTAR,
88 SCM_IM_LETREC, SCM_IM_OR, SCM_IM_QUOTE, SCM_IM_SET_X): Now encoded
89 as isyms, as special isyms don't exist any more.
90
9fa6c119
KR
912004-04-18 Kevin Ryde <user42@zip.com.au>
92
e08d2eee
KR
93 * filesys.c (scm_readdir): Use readdir_r when available, for thread
94 safety.
95
9fa6c119
KR
96 * numbers.c (scm_max, scm_min): For big/real, use SCM_SWAP rather than
97 explicit swapping code.
98
c9cdd396
KR
992004-04-15 Kevin Ryde <user42@zip.com.au>
100
101 * cpp_sig_symbols.in: Add SIGSYS.
102
103 * list.c (scm_append_x): Use iterative style, to avoid non-tail
104 recursion.
105
106 * numbers.c (scm_max, scm_min): For inum/frac, frac/inum, big/frac,
107 frac/big and frac/frac, use scm_less_p for exact comparison.
108
83ac9c59
KR
109 * numbers.c (scm_gcd): For inum/big, use mpz_gcd_ui by sharing code
110 with big/inum.
111
84a4be9a
KR
112 * numbers.c (xisinf): Add a comment about solaris 7 lacking isinf.
113
84fad130
HWN
1142004-04-06 Han-Wen Nienhuys <hanwen@xs4all.nl>
115
6b69393d
HWN
116 * inline.h (scm_cell): use SCM_GC_CELL_WORD for checking tag.
117
84fad130
HWN
118 * chars.h (scm_init_chars): change scm_{upcase,downcase} to
119 scm_c_{up,down}case.
120 (SCM_MAKE_CHAR): add (unsigned char) cast. This prevents havoc
121 when hi-bit ASCII is subjected to SCM_MAKE_CHAR().
122
c3110a30
KR
1232004-04-06 Kevin Ryde <user42@zip.com.au>
124
0b288f36
KR
125 * numbers.c (scm_ash): Remove stray "}" in docstring.
126
ea2508c8
KR
127 * numbers.c (scm_make_ratio): For inum/bignum integer detection, use
128 x==SCM_MOST_NEGATIVE_FIXNUM explicitly, for clarity and to avoid
129 calling mpz_cmp_ui in most cases.
130
c3110a30
KR
131 * numbers.c (scm_quotient, scm_remainder): In inum/big, use mpz_cmp_ui
132 for big == abs(most-negative-fixnum) special case.
133 (abs_most_negative_fixnum): Remove, no longer used.
134
135 * scmsigs.c (scm_sigaction_for_thread): Correction to signum range
136 test, avoids SCM_VECTOR_REF outside bounds of signal_handlers on
137 calling (sigaction NSIG).
138
139 * simpos.c (scm_system_star): Fix execargv memory leak, merge parent
140 and fork error cases to do this.
141
dec40cd2
DH
1422004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
143
144 * eval.c (CEVAL): Don't distinguish between short and long
145 instructions when dispatching - just always dispatch on the
146 instruction code, which is common for short and long instructions.
147 Further, removed unnecessary goto statements and added comment.
148
0e7bb795
DH
1492004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
150
151 * eval.c (scm_unmemocopy): Don't distinguish between short and
152 long instructions when dispatching - just always dispatch on the
153 instruction code, which is common for short and long instructions.
154 Further, removed unnecessary goto statements, fixed indentation
155 and replaced SCM_IMP predicates by SCM_NULLP.
156
f9986767
DH
1572004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
158
159 * eval.c (scm_lookupcar1, CEVAL): Use SCM_ILOCP instead of
160 comparison with SCM_ILOC00. In CEVAL, eliminate goto-label
161 'checkmacro'.
162
fbc42231
KR
1632004-03-31 Kevin Ryde <user42@zip.com.au>
164
165 * simpos.c: Include <signal.h> for SIG_IGN and friends.
166
434f2f7a
DH
1672004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
168
169 Introduce scm_debug_mode_p as a replacement for scm_debug_mode and
170 SCM_DEBUGGINGP:
171
172 * debug.h (scm_debug_mode_p, scm_debug_mode, SCM_DEBUGGINGP),
173 eval.c (scm_debug_mode_p): Deprecated scm_debug_mode and
174 SCM_DEBUGGINGP. Provided scm_debug_mode_p instead, to have one
175 single interface that also matches the naming conventions.
176 Probably scm_debug_mode_p should be part of the private interface
177 anyway.
178
179 * debug.h (scm_debug_mode_p), backtrace.c (display_error_body),
180 eval.c (SCM_APPLY, scm_trampoline_0, scm_trampoline_1,
181 scm_trampoline_2): Change uses of scm_debug_mode or SCM_DEBUGGINGP
182 to scm_debug_mode_p.
183
184
185 Deprecate direct access to scm_ceval, scm_deval and scm_ceval_ptr:
186
187 * eval.h (scm_ceval, scm_deval, scm_ceval_ptr), debug.h
188 (scm_ceval_ptr): Deprecated. Moved declaration of scm_ceval_ptr
189 from debug.h to eval.h.
190
191 * debug.h (SCM_RESET_DEBUG_MODE): Don't access scm_ceval_ptr any
192 more, just leave it with setting scm_debug_mode_p, which is
193 equivalent for practical purposes.
194
195 * deprecated.h (SCM_XEVAL, SCM_XEVALCAR): Call scm_i_eval_x
196 instead of *scm_ceval_ptr. Leave all evaluating to scm_i_eval_x.
197
198 * gdbint.c (gdb_eval): Call scm_i_eval_x instead of scm_ceval.
199
200 * eval.c (ceval, deval, scm_ceval, scm_deval): Made scm_ceval
201 static and renamed it to ceval throughout. Provide a new exported
202 but deprecated function scm_ceval as a wrapper for backwards
203 compatibility. The same is done for the deval/scm_deval pair of
204 functions.
205
206 * eval.c (CEVAL, SCM_CEVAL): Renamed SCM_CEVAL to CEVAL
207 throughout. Defined CEVAL to ceval or deval, based on compilation
208 phase.
209
210 * eval.c (SCM_XEVAL, SCM_XEVALCAR): Dispatch on scm_debug_mode_p
211 to ceval and deval instead of calling *scm_ceval_ptr.
212
213 * eval.c (dispatching_eval): New deprecated static function.
214
215 * eval.c (scm_ceval_ptr): Initialized to dispatching_eval in order
216 to emulate its old behaviour as closely as possible.
217
218
219 Change the evaluator such that only expressions for which pair? is
220 true are passed to CEVAL, and such that all other expressions are
221 evaluated outside of CEVAL:
222
223 * eval.c (EVAL): New, provided in analogy to EVALCAR. Evaluate an
224 expression that is assumed to be memoized already. All but
225 expressions of the form '(<form> <form> ...)' are evaluated inline
226 without calling an evaluator.
227
228 * eval.c (SCM_XEVAL, SCM_XEVALCAR, EVALCAR): Evaluate all but
229 expressions of the form '(<form> <form> ...)' inline without
230 calling an evaluator.
231
232 * eval.c (scm_i_eval_x, scm_i_eval, scm_ceval, scm_deval): Handle
233 the special case of unmemoized symbols passed on the top level.
234
235 * eval.c (CEVAL): Change calls to CEVAL to EVAL, except where it
236 is known that the expression passed to CEVAL is of the form
237 '(<form> <form> ...)'. Remove handling of the tc7-objects, since
238 now it is known that the input expression of CEVAL is a pair.
239
2402004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
5fb64383
DH
241
242 * eval.c (is_self_quoting_p): New static function.
243
244 (scm_m_quote): Use is_self_quoting_p.
245
246 (copy_tree): Corrected typo in comment.
247
84fad130 248>>>>>>> 1.2042
702551e6
HWN
2492004-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
250
bfefbf18
HWN
251 * eval.c (s_scm_copy_tree): idem.
252
253 * list.c (s_scm_filter): remove "pointer" from doc string.
254
702551e6
HWN
255 * gc.h (SCM_GC_CELL_TYPE): SCM_GC_CELL_TYPE uses SCM_GC_CELL_OBJECT.
256
257 * goops.h (SCM_NUMBER_OF_SLOTS): don't SCM_UNPACK the result.
258
259 * backtrace.c ("display_backtrace_body"): SCM_PACK before SCM_EQ_P
260 (display_frame): idem.
261 (display_backtrace_file_and_line): idem.
262
263 * tags.h (SCM_UNPACK): stricter typechecking on SCM_UNPACK
264 arguments.
265
3cd23214
KR
2662004-03-26 Kevin Ryde <user42@zip.com.au>
267
88a7ae1f
KR
268 * filesys.c (scm_getcwd, scm_readlink): Avoid memory leak on errors.
269
3cd23214
KR
270 * numbers.c (scm_modulo): For inum/big and big/big, remove test of
271 big==0 since that never occurs.
272
273 * numbers.c, numbers.h (scm_modulo_expt): Renamed from
274 scm_modular_expt, matching scheme level name `modulo-expt'.
275
276 * numbers.c (scm_modular_expt): Return a negative remainder for a
277 negative divisor, the same as `modulo' does.
278
2792004-03-26 Eric Hanchrow <offby1@blarg.net>
280
281 * numbers.c, numbers.h (scm_modular_expt): New function.
282
2926035a
KR
2832004-03-25 Kevin Ryde <user42@zip.com.au>
284
285 * numbers.c (scm_min, scm_max): Correction to big/real and real/big,
286 return inexact as required by r5rs.
287
62360b89
DH
2882004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
289
290 * eval.c: Separated some definitions relevant for execution from
291 the memoization part of the file.
292
293 (copy_tree): New static function
294
295 (scm_copy_tree): Rewritten to fix two kinds or bugs: First, cyclic
296 structures are detected now and will lead to an exception instead
297 of forcing guile to run in an endless loop, using up all the
298 system's memory. Second, arrays in the cdr of an improper list
299 are now copied. See the new test cases in eval.test.
300
3012004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
b28f5b3c
DH
302
303 * posix.c (scm_gethostname): Make sure len is initialised before
304 it is used. Restructured to (hopefully) represent possible
305 configurations more clearly in the code. Added unwind handler.
306
3bd3bae8
KR
3072004-03-23 Kevin Ryde <user42@zip.com.au>
308
309 * posix.c (scm_gethostname): Use sysconf(_SC_HOST_NAME_MAX) and/or
310 MAXHOSTNAMELEN when available.
311
254bf78d
MV
3122004-03-21 Marius Vollmer <mvo@zagadka.de>
313
314 * read.c (skip_scsh_block_comment): Also recognize '\r' as a line
315 terminator. Rewritten the logic as a state machine, I must have
316 been doing too much VHDL lately...
317
318 * eval.c (scm_ceval, scm_deval): Explicitely evaluate ports to
319 themselves. Thanks to Han-Wen Nienhuys!
320
321 * list.c: Changed docstrings so that they no longer talk about
322 returning 'pointers' to something.
323
009c34a2
HWN
3242004-03-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
325
326 * gc.c: remove set_debug_cell_accesses! when
327 SCM_DEBUG_CELL_ACCESSES is not defined. Scheme source code should
328 use (if (defined? 'set-debug-cell-accesses!) .. ) to switch on
329 debugging conditionally.
330
54733c95
KR
3312004-03-21 Kevin Ryde <user42@zip.com.au>
332
333 * stime.c (scm_gmtime): Use gmtime_r when available, for thread safety.
334
bbaf8747
KR
3352004-03-20 Kevin Ryde <user42@zip.com.au>
336
337 * posix.c (scm_gethostname): Preserve errno across free() call.
338
726f82e7
HWN
3392004-03-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
340
341 * gc-card.c (sweep_card): use SCM_GC_SET_CELL_WORD for setting
342 free cells.
343
e1350d6a
KR
3442004-03-14 Kevin Ryde <user42@zip.com.au>
345
346 * stime.c: Define _GNU_SOURCE for strptime prototype from glibc.
347 (strptime): Use HAVE_DECL_STRPTIME for when to give own prototype.
348
62055253
KR
3492004-03-07 Kevin Ryde <user42@zip.com.au>
350
351 * stime.c (scm_gmtime): Return bd_time->tm_zone when available, rather
352 than "GMT" always.
353 (filltime): Make zname parameter "const".
354
92e64b87
MD
3552004-03-03 Mikael Djurfeldt <mdj@chunk.mit.edu>
356
357 * threads.c, threads.h (scm_c_scm2thread): New function.
358
004ad931
KR
3592004-02-29 Kevin Ryde <user42@zip.com.au>
360
361 * numbers.c (guile_ieee_init): Use C99 INFINITY and NAN when
362 available. Test HAVE_DINFINITY and HAVE_DQNAN for those globals, in
363 particular don't assume "defined (__alpha__) && ! defined (linux)"
364 means OSF. Remove "SCO" code, which was not really SCO specific and
365 which John W. Eaton advises should be long past being needed.
366
367 * posix.c (scm_execl, scm_execlp, scm_execle): Avoid memory leak under
368 error throw.
369
72ea45ac
KR
3702004-02-24 Kevin Ryde <user42@zip.com.au>
371
372 * posix.c (scm_cuserid): Use a private result buffer, for thread safe.
373
2af0602e
KR
3742004-02-22 Kevin Ryde <user42@zip.com.au>
375
376 * numbers.c (scm_max, scm_min): For one arg, dispatch to generic for
377 complex, same as for two args. (Handle only inum, big, real, frac).
378
b114eafe
KR
3792004-02-21 Kevin Ryde <user42@zip.com.au>
380
381 * posix.c (scm_crypt): Use new HAVE_CRYPT.
382 (<crypt.h>): Remove HAVE_LIBCRYPT condition.
db752bb5 383 Reported by Andreas Voegele.
b114eafe 384
1e55d288
NJ
3852004-02-20 Neil Jerram <neil@ossau.uklinux.net>
386
387 * list.c (scm_list_n): Add #if SCM_DEBUG_CELL_ACCESSES_P around
388 validation.
389
390 * read.c (scm_lreadparen): Removed.
391 (scm_lreadparen1): Renamed scm_i_lreadparen.
392
eb741d98
HWN
3932004-02-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
394
395 * list.c (scm_list_n): validate non-immediate arguments;
396 this will catch forgotten a SCM_UNDEFINED.
397
4e28ba5e
MV
3982004-02-18 Marius Vollmer <mvo@zagadka.de>
399
400 * gc.h (scm_gc_cells_collected): Removed duplicated declaration.
401 Thanks to Bill Schottstaedt!
402
403 * socket.h (scm_gethost): Removed prototype it is already in
404 "net_db.h". Thanks to Bill Schottstaedt!
405
ef861ead
KR
4062004-02-18 Kevin Ryde <user42@zip.com.au>
407
408 * num2integral.i.c (INTEGRAL2BIG): WORDS_BIGENDIAN not right for word
409 order parameter to mpz_import, in fact with just one word there's no
410 order to worry about at all.
411
412 * numbers.c (scm_num_eq_p): For real==frac, complex==frac, frac==real
413 and frac==complex, make an exact comparison rather than converting
414 with fraction2double.
415
416 * posix.c, putenv.c, stime.c (environ): Use _NSGetEnviron in Darwin
417 shared library, since environ is not directly available there.
418
419 * script.c (scm_shell_usage): Print to stdout for --help, per GNU
420 standard.
421
422 * stime.c (scm_localtime, scm_gmtime, scm_mktime): Provide a default
423 errno EINVAL in case localtime and gmtime don't set it.
424 (scm_mktime, scm_strptime): Forcibly use errno EINVAL for our
425 SCM_SYSERROR, since mktime and strptime generally don't set errno.
426
ae43d08e 4272004-02-16 Kevin Ryde <kevin@swox.se>
292dfa7f 428
c9ea6462
KR
429 * gc-malloc.c (scm_done_malloc, scm_done_free): Allow negative sizes,
430 which were permitted in the past for these.
431
292dfa7f
KR
432 * num2float.i.c (NUM2FLOAT): Expand isfinite to !xisinf, as per
433 previous change to numbers.c.
434
ae43d08e
KR
435 * script.c (scm_shell_usage): Print bug-guile email address, as per
436 GNU standard. Reported by Han-Wen Nienhuys.
437
711a9fd7
MD
4382004-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
439
440 * unif.c (scm_make_uve): Removed local variable and simplified
441 code in order to avoid compiler used uninitialized warnings.
442
443 * hashtab.c, hashtab.h (scm_hash_map_to_list): Renamed from
444 scm_hash_map.
445 (scm_hash_fold): Use scm_call_3 directly in the call to
446 scm_internal_hash_fold instead of going via fold_proc (which is
447 now removed).
448 (scm_hash_for_each): Use a trampoline +
449 scm_internal_hash_for_each_handle.
450 (scm_internal_hash_for_each_handle, scm_hash_for_each_handle): New
451 functions.
452
3da7f6b2
KR
4532004-02-12 Kevin Ryde <user42@zip.com.au>
454
344a212f
KR
455 * ports.c (scm_port_line): In docstring, note first line is 0.
456 (scm_set_port_line_x): In docstring, note first line is 0.
457 (scm_port_column): In docstring, there's no default to current input
458 port, and remove shared port-line @defun.
459 (scm_set_port_column_x): In docstring, there's no default to current
460 input port, note first column is 0, remove shared set-port-line!
461 @defun.
462
3da7f6b2
KR
463 * ramap.c (scm_array_fill_x): For fvect and dvect, use scm_num2dbl to
464 convert args the same way that array-set! does.
465
466 * unif.c (scm_make_uve, scm_array_p): Allow fraction 1/3 as prototype
467 for dvect.
468 (scm_array_p): Add missing "break"s in switch, fix llvect test look
469 for "l" not "s", fix dvect to be false for singp(prot) since such a
470 value is for fvect.
471 (scm_array_prototype): Return 1/3 for dvect, rather than 0.33..33.
88531a74
KR
472 (exactly_one_third): New variable.
473 (scm_init_unif): Initialize it.
3da7f6b2 474
cd21f5eb
NJ
4752004-02-10 Neil Jerram <neil@ossau.uklinux.net>
476
477 * read.c (scm_read_opts): Change `escaped-parens' to
478 `elisp-strings'.
479
16353acc
NJ
4802004-02-08 Neil Jerram <neil@ossau.uklinux.net>
481
482 * read.c (scm_read_opts): New opts `elisp-vectors' and
483 `escaped-parens'.
484 (s_vector): New.
485 (scm_lreadr): Use scm_lreadparen1 instead of scm_lreadparen. Make
486 handling of elisp vector syntax dependent on SCM_ENABLE_ELISP and
487 `elisp-vectors' option instead of SCM_ELISP_READ_EXTENSIONS.
488 Allow "\(" and "\)" in strings when SCM_ENABLE_ELISP defined and
489 `escaped-parens' option set.
490 (scm_read_token): If elisp vector syntax active, disallow [ and ]
491 in tokens.
492 (scm_lreadparen): Rewrite as interface to scm_lreadparen1.
493 (scm_lreadparen1): New.
494
495 * read.h: Remove conditionally compiled last arg to
496 scm_lreadparen.
497 (SCM_ELISP_VECTORS_P, SCM_ESCAPED_PARENS_P): New.
498
f62b9dff
HWN
4992004-01-23 Han-Wen Nienhuys <hanwen@xs4all.nl>
500
501 * eval.c (m_expand_body): remove stray variable new_body.
502
ef5b6b61
MV
5032004-01-22 Marius Vollmer <mvo@zagadka.de>
504
505 * eval.c (m_expand_body): Rewrite the expression in place (by
506 overwriting FORMS) also when a letrec is constructed, not only
507 when no definitions are found. Do not return rewritten expression
508 to emphasize the in-place rewriting. Changed all users.
509
7eec4c37
HWN
5102004-01-19 Han-Wen Nienhuys <hanwen@xs4all.nl>
511
512 * gc.c: add protected_object_count, a number that is dumped from
513 gc_stats()
514
25ffbdac
MV
5152004-01-11 Marius Vollmer <mvo@zagadka.de>
516
517 * dynwind.h, dynwind.c (scm_frame_unwind,
518 scm_frame_unwind_handler): Renamed and changed all uses.
519 (scm_frame_rewind, scm_frame_rewind_handler): Likewise.
520
08568c95
KR
5212004-01-11 Kevin Ryde <user42@zip.com.au>
522
523 * unif.c (scm_bit_count, scm_bit_position, s_scm_bit_set_star_x,
524 s_scm_bit_count_star, s_scm_bit_invert_x): Clarify docstrings, as per
525 changes made to scheme-compound.texi.
526
5565749c
MV
5272004-01-10 Marius Vollmer <mvo@zagadka.de>
528
25ffbdac
MV
529 * print.c (scm_print_symbol_name): Handle #{`foo}#, #{,foo}#,
530 #{.}#, and all numeric strings specially. Thanks to Paul Jarc!
531
532 * guile-snarf.in: Use mkdir to create a unique temporary directory
533 that we can safely use. Thanks to Stefan Nordhausen!
5565749c 534
fc6bb283
MV
5352004-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
536
7ebccde8
MV
537 * dynwind.h, dynwind.c (scm_i_dowinds): Removed 'explicit'
538 argument since it is always zero now. Changed all callers.
539 Removed code for handling fluids.
96e3b2f8
MV
540
541 * fluids.c (scm_c_with_fluids): Use frames instead of adding to
542 the wind chain explicitely. Use scm_c_with_fluid for the common
543 case of only one fluid.
544 (scm_with_fluid): New.
545 (scm_c_with_fluid): Use frames instead of scm_c_with_fluids.
546
fc6bb283 547 * fluids.h, fluids.c (scm_frame_fluid): New.
96e3b2f8
MV
548 (scm_with_fluid): New.
549 (scm_i_swap_fluids, scm_i_swap_fluids_reverse): Removed.
fc6bb283
MV
550
551 * dynwind.c (scm_frame_end): Do not use scm_i_dowinds. Instead,
552 do the unwinding directly. It is simple enough.
553
554 * dynwind.h, dynwind.c: Did the following renamings:
555 scm_begin_frame -> scm_frame_begin,
556 scm_end_frame -> scm_frame_end,
557 scm_on_unwind -> scm_frame_unwind,
558 scm_on_rewind -> scm_frame_rewind,
559 scm_on_unwind_with_scm -> scm_frame_unwind_with_scm,
560 scm_on_rewind_with_scm -> scm_frame_rewind_with_scm.
561 Changed all uses.
562
563 * aync.h, async.c: Did the follwing renamings:
564 scm_with_blocked_asyncs -> scm_frame_block_asyncs,
565 scm_with_unblocked_asyncs -> scm_frame_unblock_asyncs.
566 Changed all uses.
567
568 * ports.h, ports.c: Did the follwing renamings:
569 scm_with_current_input_port -> scm_frame_current_input_port,
570 scm_with_current_output_port -> scm_frame_current_output_port,
571 scm_with_current_error_port -> scm_frame_current_error_port.
572 Changed all uses.
573
298ab996
KR
5742004-01-07 Kevin Ryde <user42@zip.com.au>
575
576 * numbers.c (s_bignum): Remove, not used since gmp bignums.
577 Reported by Richard Todd.
578
ba40113e
KR
579 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 12*sizeof(long),
580 for the benefit of powerpc-apple-darwin5.5. Reported by Richard Todd.
581
298ab996
KR
582 * unif.c (scm_aind): Test SCM_CONSP rather than !SCM_NULLP while
583 traversing the args list, fixes segv if an improper list is given.
584 Reported by Rouben Rostamian.
585
aacff585
MV
5862004-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
587
588 * ports.c (swap_ports, scm_with_current_foo_port): Do not allocate
589 swap_data on stack, use a 'malloc obj'.
590
591 * fluids.h, fluids.c (scm_make_initial_fluids, scm_copy_fluids,
592 scm_swap_fluids, scm_swap_fluids_reverse): Renamed to
593 scm_i_... since they are internal. Changed all uses.
594
595 * dynwind.c (frame_print): Removed, use the default printer.
596 (WINDER_F_MARK, WINDER_MARK_P, winder_mark): New.
597 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New. Use above
598 to protect SCM values.
599
600 * dynwind.h (SCM_F_WIND_EXPLICITELY,
601 SCM_F_WIND_EXPLICITLY): It's "explicitly" not "explicitely", damn.
602 Changed all uses.
603 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New.
604
49c00ecc
MV
6052004-01-05 Marius Vollmer <mvo@zagadka.de>
606
607 * ports.h, ports.c (scm_with_current_input_port,
608 scm_with_current_output_port, scm_with_current_error_port): New.
609
610 * async.h, async.c (scm_with_blocked_asyncs,
611 scm_with_unblocked_asyncs): New.
612
dab514a8
MV
6132004-01-03 Marius Vollmer <mvo@zagadka.de>
614
615 * dynwind.h, scm_dynwind.c (scm_t_frame_flags, scm_t_wind_flags,
616 scm_begin_frame, scm_end_frame, scm_on_unwind, scm_on_rewind):
617 New.
618 (scm_dowinds, scm_i_dowinds): scm_dowinds has been renamed to
619 scm_i_dowinds and extended to handle frames and to invoke a 'turn'
620 function when the outermost wind point has been reached. The
621 latter is used to copy a continuation stack at the right time.
622 scm_dowinds remains available.
623 (SCM_GUARDSP, SCM_BEFORE_GUARD, SCM_AFTER_GUARD, SCM_GUARD_DATA,
624 tc16_guard, guards_print): Removed.
625 (scm_internal_dynamic_wind): Reimplemented using frames.
626
627 * continuations.c (copy_stack): New, do only the stack copying
628 part of copy_stack_and_call.
629 (copy_stack_and_call): Copy the stack after unwinding and before
630 rewinding.
631 (scm_dynthrow): Do not call scm_dowinds, this is now done by
632 copy_stack_and_call.
633
441a25d9
KR
6342004-01-04 Kevin Ryde <user42@zip.com.au>
635
636 * numbers.c (scm_less_p): Don't convert frac to float for compares,
dab514a8 637 can give bad results due to rounding.
441a25d9 638
e0499207
KR
639 * stime.c (scm_current_time, scm_gettimeofday): Add a comment about
640 setzone/restorezone protection for DOS.
641
89fcf1b4
MV
6422003-12-26 Marius Vollmer <mvo@zagadka.de>
643
644 * gen-scmconfig.h.in, gen-scmconfig.c: Arrange for scm_t_intmax
645 and scm_t_uintmax to be defined in scmconfig.h
646
caff34d4
KR
6472003-12-03 Kevin Ryde <user42@zip.com.au>
648
649 * numbers.c (scm_less_p): Remove spurious xisnan from frac+big case.
650
651 * numbers.c (scm_make_ratio): Check for numerator equal to
652 SCM_MOST_NEGATIVE_FIXNUM and bignum denominator the negative of that,
653 giving integer -1.
654
655 * numbers.c (scm_real_part): Return fraction unchanged rather than
656 converting to flonum.
657
2d0b85ac
DH
6582003-11-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
659
660 * modules.c (module_variable): Fixed (and thus simplified) the
661 definition of SCM_BOUND_THING_P to reflect the fact that since
662 after the 1.4 series of guile, obarrays only hold variable
663 objects.
664
2297981d
MV
6652003-11-30 Marius Vollmer <mvo@zagadka.de>
666
667 * numbers.c (scm_logand): It's "#b...", not "#\b...".
668
669 From Paul Jarc:
670
671 * read.c (scm_lreadr): Signal an error for invalid escape
672 sequences in strings. Code cleanups too.
673
674 * print.c (scm_iprin1): use \xNN hexadecimal sequences when
675 writing control characters in strings.
676
6772003-11-21 Marius Vollmer <mvo@zagadka.de>
678
679 * ports.c (scm_drain_input): Bug fix: only access the port after
680 checking that it indeed is one.
681
5c264007
DH
6822003-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
683
684 * eval.c (s_bad_define): New static identifier.
685
686 (m_body): Fixed comment.
687
688 (scm_m_define): Don't generate memoized code for definitions that
689 are not on the top level. As a consequence, no memoized code at
690 all is generated for definitions any more: Top level definitions
691 are executed immediately during memoization and internal
692 definitions are handled separately in m_expand_body.
693
694 (scm_unmemocopy, unmemocopy): Removed code for unmemoizing
695 definitions. Consequently, there is no unmemoizing code any more
696 that might modify the environment. Thus, the old scm_unmemocopy
697 is removed and the old unmemocopy is renamed to scm_unmemocopy.
698
699 (SCM_CEVAL): The SCM_IM_DEFINE keyword can no longer occur in
700 memoized code. Call EVALCAR for continuations. Prefer !SCM_NULLP
701 over SCM_NIMP in places, where the argument is known to be part of
702 a proper list.
703
018d4730
KR
7042003-11-21 Kevin Ryde <user42@zip.com.au>
705
706 * numbers.c (scm_abs): Allocate a new real only for negatives, as done
707 for bignums.
708
709 * numbers.c (scm_bit_extract): Use mpz functions, rearrange inum case
710 to share some shifting.
711
712 * numbers.c (scm_integer_expt): Don't mpz_init after scm_i_clonebig or
713 scm_i_mkbig, since they do so already. Don't mpz_clear a bignum SCM,
714 since gc does this.
715
4bca30d8
MV
7162003-11-19 Marius Vollmer <mvo@zagadka.de>
717
fb16d26e
MV
718 * numbers.c (scm_make_ratio): Rewritten to have a simpler
719 structure. Previously, not all cases with a negative denominator
720 were covered.
721
4bca30d8
MV
722 * numbers.c (mem2decimal_from_point): use scm_divide instead of
723 scm_divide2real when forming the fractional part. This allows
724 "#e1.2" to yield 6/5.
725
726 * numbers.c (scm_i_fraction_equalp): Do not treat the return value
727 of scm_equal_p as a C boolean, use SCM_FALSEP. Previously, all
728 fractions were equal to each other regardless of value. Ooops.
729
730 * numbers.c (scm_rationalize): Return an inexact result when given
731 inexact arguments.
732
733 * numbers.c (scm_exact_p, scm_inexact_p): Throw error for
734 non-numbers.
735
bdf26b60
MV
7362003-11-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
737
738 Support for exact fractions from Bill Schottstaedt! Thanks!
739
740 * print.c (scm_iprin1): Handle fractions.
741
742 * objects.h (scm_class_fraction): New.
743 * objects.c (scm_class_fraction): New.
744 (scm_class_of): Handle fractions.
745
746 * hash.c (scm_hasher): Handle fractions.
747
748 * numbers.c: New code for handling fraction all over the place.
749 (scm_odd_p, scm_even_p): Handle inexact integers.
750 (scm_rational_p): New function, same as scm_real_p.
751 (scm_round_number, scm_truncate_number, scm_ceiling, scm_floor):
752 New exact functions that replace the inexact 'dsubr'
753 implementations.
754 (scm_numerator, scm_denominator): New.
755
756 * numbers.h (SCM_NUMP): Recognize fractions.
757 (SCM_FRACTIONP, SCM_SLOPPY_FRACTIONP, SCM_FRACTION_NUMERATOR,
758 SCM_FRACTION_DENOMINATOR, SCM_FRACTION_SET_NUMERATOR,
759 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
760 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
761 SCM_FRACTION_REDUCED): New.
762 (scm_floor, scm_ceiling, scm_truncate_number, scm_round_number):
763 New prototypes.
764 (scm_make_ratio, scm_rationalize, scm_numerator, scm_denominator,
765 scm_rational_p): New prototypes.
766 (scm_i_dbl2num, scm_i_fraction2double, scm_i_fraction_equalp,
767 scm_i_print_fraction): New prototypes.
768
769 * goops.c (create_standard_classes): Create "<fraction>" class.
770
771 * gc-mark.c (scm_gc_mark_dependencies): Handle fractions.
772
773 * gc-card.c (scm_i_sweep_card): Include scm_tc16_fraction as a
774 case in the switch, but do nothing for now.
775
776 * eval.c (SCM_CEVAL, SCM_APPLY, call_dsubr_1): Convert fractions
777 to doubles when calling 'dsubr' functions.
778
779 * eq.c (scm_eqv_p, scm_equal_p): Handle fractions.
780
28fda544
RB
7812003-11-18 Rob Browning <rlb@defaultvalue.org>
782
783 * gen-scmconfig.c (main): remove public definition of
784 SCM_SIZEOF___INT64 and SCM_SIZEOF_UNSIGNED___INT64 and add
785 direct typedef of long_long and ulong_long inside deprecated block
786 when appropriate.
787
788 * deprecated.h: move long_long and ulong_long definitions to
789 gen-scmconfig.c so that we don't need to add SCM_SIZEOF___INT64
790 and SCM_SIZEOF_UNSIGNED___INT64 to the public namespace.
791
b58e7420
MV
7922003-11-17 Marius Vollmer <mvo@zagadka.de>
793
9a1d7d7c
MV
794 * hash.c (scm_string_hash): New hashing algorithm that takes the
795 complete string into account.
796
b58e7420
MV
797 * eval.c (scm_m_generalized_set_x): Macroexpand the target when it
798 is a list. This allows (@ ...) to work with set!.
9a1d7d7c
MV
799 (scm_m_generalized_set_x): Use ASSERT_SYNTAX_2 instead of
800 SCM_ASSYNT.
b58e7420
MV
801
802 * script.c (scm_compile_shell_switches): Use scm_c_read_string for
803 the "-e" option instead of scm_str2symbol. This allows things
804 like (@ ...) to be specified for the entry point.
805
461bffb1
DH
8062003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
807
808 * eval.c (scm_m_letstar): Create memoized code in place to
809 minimize consing.
810
6f81708a
DH
8112003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
812
813 * eval.c (s_splicing): Commented and reformulated.
814
815 (lookup_global_symbol, lookup_symbol): New static functions.
816
817 (s_test, s_bindings, s_duplicate_bindings, s_variable): Removed.
818
819 (try_macro_lookup, literal_p): Use lookup_symbol instead of
820 creating a temporary pair for scm_lookupcar.
821
822 (scm_unmemocar, unmemocar): Renamed scm_unmemocar to unmemocar,
823 created deprecated wrapper function scm_unmemocar.
824
825 (SCM_VALIDATE_NON_EMPTY_COMBINATION, scm_sym_else,
826 scm_sym_unquote, scm_sym_uq_splicing, scm_sym_enter_frame,
827 scm_sym_apply_frame, scm_sym_exit_frame, scm_sym_trace, f_apply,
828 undefineds, sym_three_question_marks): Moved around without
829 modifications.
830
831 * eval.c, eval.h (scm_macroexp, scm_unmemocar): Deprecated.
832
910b5125
DH
8332003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
834
835 * eval.c (try_macro_lookup, expand_user_macros, is_system_macro_p,
836 m_expand_body, scm_m_expand_body): Grouped together with m_body.
837 No further modifications.
838
c86c440b
DH
8392003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
840
841 * eval.c (s_mixed_body_forms): New static identifier.
842
843 (canonicalize_define, scm_m_define): The check for a bad
844 expression is performed in canonicalize_define now.
845
846 (try_macro_lookup, expand_user_macros, is_system_macro_p): New
847 static helper functions for m_expand_body.
848
849 (m_expand_body): Use ASSERT_SYNTAX to signal syntax errors. Only
850 expand user defined macros. Fixed handling of the definition/
851 expression boundary. Fixed handling of definitions grouped with
852 'begin. Use canonicalize_define to expand definitions.
853
3890131a
MV
8542003-11-13 Marius Vollmer <mvo@zagadka.de>
855
b58e7420
MV
856 * read.c (scm_lreadr): detect EOF after backslash, and interpret
857 \xNN hexadecimal sequences. From Paul Jarc, thanks!
858
5df36eac
MV
859 * snarf.h (SCM_SMOB, SCM_GLOBAL_SMOB, SCM_SMOB_MARK,
860 SCM_GLOBAL_SMOB_MARK, SCM_SMOB_FREE, SCM_GLOBAL_SMOB_FREE,
861 SCM_SMOB_PRINT, SCM_GLOBAL_SMOB_PRINT, SCM_SMOB_EQUALP,
862 SCM_GLOBAL_SMOB_EQUALP, SCM_SMOB_APPLY, SCM_GLOBAL_SMOB_APPLY):
863 New macros from Paul Jarc. Thanks!
864
3890131a
MV
865 * gc_os_dep.c (scm_get_stack_base): Provide a definition that
866 return NULL when the machine type is unknown. Previously,
867 gc_os_dep.c would refuse to compile.
868
430b8401
DH
8692003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
870
871 * eval.c (scm_m_body, m_body, scm_m_lambda, memoize_named_let,
872 scm_m_let, scm_m_letrec, m_expand_body): Renamed static function
873 scm_m_body to m_body.
874
328dc9a3
DH
8752003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
876
877 * eval.c, eval.h (scm_m_expand_body, m_expand_body): Deprecated
878 public use of scm_m_expand_body in eval.h. In eval.c, renamed
879 scm_m_expand_body to m_expand_body and made it static. Added
880 deprecated wrapper scm_m_expand_body.
881
882 (scm_eval_body, SCM_CEVAL, SCM_APPLY): Use m_expand_body instead
883 of scm_m_expand_body.
884
c2337a61
KR
8852003-11-09 Kevin Ryde <user42@zip.com.au>
886
887 * dynl.c (scm_dynamic_unlink): Need scm_list_1 on error message
888 argument. Reported by Mike Gran.
889
ced8edb0
DH
8902003-11-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
891
892 * eval.c (s_missing_body_expression): New static identifier.
893
894 (s_body): Removed.
895
896 (scm_m_expand_body): Fixed core dump when passing a body with
897 defines, but without expressions (see additions to syntax.test).
898 Use ASSERT_SYNTAX to signal syntax errors.
899
0f572ba7
DH
9002003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
901
902 * eval.c (canonicalize_define): New static helper function.
903
904 (memoize_define, canonicalize_define): Extract handling of
905 function currying to canonicalize_define.
906
2510c810
DH
9072003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
908
909 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
910 Make sure that error checking in debug mode is not worse than in
911 standard mode.
912
34adf7ea
DH
9132003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
914
915 * eval.c (scm_m_body, scm_m_lambda): Documentation strings are not
916 handled in scm_m_body any more, but rather in scm_m_lambda.
917
918 (scm_m_body, memoize_named_let, scm_m_let, scm_m_letstar,
919 scm_m_letrec, scm_m_expand_body): Check for validity is done by
920 calling functions of scm_m_body.
921
922 (scm_m_lambda): Avoid unnecessary consing when creating the
923 memoized code.
924
89bff2fc
DH
9252003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
926
927 * eval.c (s_expression): Added comment.
928
929 (s_empty_combination, error_unbound_variable): New static
930 identifiers.
931
932 (SCM_VALIDATE_NON_EMPTY_COMBINATION, SCM_EVALIM2, scm_lookupcar1):
933 Use ASSERT_SYNTAX, syntax_error or error_unbound_variable to
934 signal syntax errors.
935
936 (SCM_CEVAL): Separated handling of evaluator bytecodes and other
937 scheme objects.
938
60a49842
DH
9392003-10-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
940
941 * eval.c (unmemocar, sym_three_question_marks, scm_unmemocar):
942 Grouped together with unmemocopy, without modifications.
943
944 (build_binding_list, unmemocopy): Renamed names of list arguments
945 and variables to reflect the actual order of the list elements.
946
70c1c108
DH
9472003-10-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
948
949 * eval.c (s_defun): New static identifier.
950
951 (scm_m_nil_cond, scm_m_atfop, scm_m_undefine): Add comments. Use
952 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
953 when creating the memoized code.
954
0ee39677
KR
9552003-10-19 Kevin Ryde <user42@zip.com.au>
956
957 * numbers.c (scm_ash): Revise docstring as per recent update to manual.
958
959 * numbers.c (scm_i_big2dbl): Rewrite, carefully rounding to "closest"
960 in accordance with R5RS, which just mpz_get_d doesn't really give.
961
9a848baf
DH
9622003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
963
964 * eval.c (s_bad_slot_number): New static identifier.
965
966 (scm_m_atslot_ref, scm_m_atslot_set_x): Use ASSERT_SYNTAX to
967 signal syntax errors. Avoid unnecessary consing when creating the
968 memoized code.
969
da48db62
DH
9702003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
971
972 * eval.c (scm_m_cont, scm_m_at_call_with_values,
973 scm_m_generalized_set_x): Use ASSERT_SYNTAX to signal syntax
974 errors. Avoid unnecessary consing when creating the memoized
975 code.
976
977 (scm_m_generalized_set_x): Let scm_m_set_x handle the R5RS
978 standard case. Make sure line and file information are copied to
979 every created expression.
980
82b3e2c6
DH
9812003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
982
983 * eval.c (scm_m_set_x, scm_m_apply, scm_m_atbind): Use
984 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
985 when creating the memoized code.
986
987 (scm_m_atbind): Reversed the order, in which the init expressions
988 are stored and executed. The order of execution is now equal to
989 the order in which the initializers of the let-forms are executed.
990 Use check_bindings and transform_bindings.
991
992 (SCM_CEVAL): Eliminated SCM_NIMP in favor of more appropriate
993 !SCM_NULLP. Added some comments.
994
21628685
DH
9952003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
996
997 * eval.c: Sorted include files alphabetically.
998
999 (scm_m_begin): Added comment.
1000
1001 (scm_m_or): Use ASSERT_SYNTAX to signal syntax errors. Avoid
1002 unnecessary consing when creating the memoized code.
1003
1004 (iqq, scm_m_quasiquote, scm_m_quote): Use ASSERT_SYNTAX to signal
1005 syntax errors. Be more specific about the kind of error that was
1006 detected.
1007
1008 (scm_m_quote, unmemocopy): As an optimization, vector constants
1009 are now inserted unquoted into the memoized code. During
1010 unmemoization the quotes are added again to provide syntactically
1011 correct code.
1012
d6754c23
DH
10132003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
1014
1015 * eval.c (scm_m_let, scm_m_letstar, scm_m_letrec,
1016 scm_m_expand_body, check_bindings): Extracted syntax checking of
1017 bindings to new static function check_bindings.
1018
1019 (scm_m_let, memoize_named_let): Extracted handling of named let to
1020 new static function memoize_named_let.
1021
1022 (transform_bindings, scm_m_let, scm_m_letstar, scm_m_letrec): Use
1023 ASSERT_SYNTAX to signal syntax errors. Be more specific about the
1024 kind of error that was detected. Avoid use of SCM_CDRLOC. Avoid
1025 unnecessary consing when creating the memoized code.
1026
03a3e941
DH
10272003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
1028
1029 * eval.c (s_bad_formals, s_bad_formal, s_duplicate_formal): New
1030 static identifiers.
1031
1032 (s_clauses, s_formals, s_duplicate_formals): Removed.
1033
1034 (scm_m_lambda): Use ASSERT_SYNTAX to signal syntax errors. Be more
1035 specific about the kind of error that was detected. Prepare for
1036 easier integration of changes for separated memoization.
1037
da48db62 10382003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4610b011
DH
1039
1040 * eval.c (s_duplicate_binding): New static identifier.
1041
1042 (scm_m_case): Call scm_c_memq instead of implementing it inline.
1043
1044 (scm_m_define): Added comment about how we check for duplicate
1045 formals.
1046
1047 (scm_m_do): Added check for duplicate bindings.
1048
1049 (scm_m_if): Use ASSERT_SYNTAX to signal syntax errors. Avoid
1050 unnecessary consing when creating the memoized code.
1051
1052 (scm_c_improper_memq, c_improper_memq, scm_m_lambda): Renamed
1053 scm_c_improper_memq to c_improper_memq, since it is not exported.
1054
1055 (transform_bindings): Call scm_c_memq rather than
1056 scm_c_improper_memq.
1057
1058 (SCM_CEVAL): Simplified handling of SCM_IM_IF forms.
1059
da48db62 10602003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
a954ce1d
DH
1061
1062 * eval.c (s_bad_bindings, s_bad_binding, s_bad_exit_clause): New
1063 static identifiers.
1064
1065 (scm_m_do): Use ASSERT_SYNTAX to signal syntax errors. Be more
1066 specific about the kind of error that was detected. Avoid use of
1067 SCM_CDRLOC. Avoid unnecessary consing when creating the memoized
1068 code, this way also making sure that file name, line number
1069 information etc. remain available.
1070
da48db62 10712003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
8ae95199
DH
1072
1073 * eval.c (memoize_as_thunk_prototype): New static function.
1074
1075 (scm_m_delay, scm_m_future): Use memoize_as_thunk_prototype.
1076 Avoid unnecessary consing when creating the memoized code.
1077
9b9a35b6
KR
10782003-10-12 Kevin Ryde <user42@zip.com.au>
1079
1080 * list.c (scm_append): Track argument number and use in error.
1081
cc56ba80
DH
10822003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
1083
1084 * eval.c (s_missing_expression, s_bad_variable): New static
1085 identifiers.
1086
1087 (scm_m_define): Use ASSERT_SYNTAX to signal syntax errors. Prefer
1088 R5RS terminology for the naming of variables. Be more specific
1089 about the kind of error that was detected. Make sure file name,
1090 line number etc. are added to all freshly created expressions.
1091 Avoid unnecessary consing when creating the memoized code.
1092
609a8b86
DH
10932003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
1094
1095 * eval.c (s_extra_expression, s_misplaced_else_clause,
1096 s_bad_cond_clause, s_missing_recipient): New static identifiers.
1097
1098 (s_extra_case_clause): Removed.
1099
1100 (scm_m_case, scm_m_cond): If a clause appears after an else
1101 clause, report a misplaced else clause.
1102
1103 (scm_m_cond): Use ASSERT_SYNTAX to signal syntax errors. Be more
1104 specific about the kind of error that was detected. Handle bound
1105 'else and '=>. Avoid unnecessary consing when creating the
1106 memoized code.
1107
1108 (scm_m_cond, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
1109 the syntactic keyword 'else and SCM_IM_ARROW to memoize the
1110 syntactic keyword '=>.
1111
58a2510b
DH
11122003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
1113
1114 * eval.c (scm_m_case): Allow empty lists of case labels.
1115
2a6f7afe
DH
11162003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
1117
1118 * tags.h (SCM_IM_ELSE, SCM_IM_ARROW): New memoizer codes.
1119
1120 * print.c (scm_isymnames): Add names for the new memoizer codes.
1121
1122 * eval.c (s_missing_clauses, s_bad_case_clause,
1123 s_extra_case_clause, s_bad_case_labels, s_duplicate_case_label,
1124 literal_p): New static identifiers.
1125
1126 (scm_m_case): Use ASSERT_SYNTAX to signal syntax errors. Be more
1127 specific about the kind of error that was detected. Check for
1128 duplicate case labels. Handle bound 'else. Avoid unnecessary
1129 consing when creating the memoized code.
1130
1131 (scm_m_case, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
1132 the syntactic keyword 'else.
1133
e6729603
DH
11342003-10-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
1135
1136 * eval.c (s_bad_expression, syntax_error_key, syntax_error,
1137 ASSERT_SYNTAX, ASSERT_SYNTAX_2): New static identifiers.
1138
1139 (scm_m_and): Use ASSERT_SYNTAX to signal syntax errors. Avoid
1140 unnecessary consing when creating the memoized code.
1141
9ddeb776
KR
11422003-10-09 Kevin Ryde <user42@zip.com.au>
1143
1144 * numbers.c (scm_inexact_to_exact): Don't depend on what double->long
1145 cast gives for values bigger than a long, or for nan or inf.
1146
df5af69a
DH
11472003-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
1148
1149 * smob.h (scm_make_smob_type): Made the declaration match the
1150 definition.
1151
da0e6c2b
MV
11522003-10-07 Marius Vollmer <mvo@zagadka.de>
1153
1154 * goops.c, objects.h, smob.c, smob.h: Make type names char
1155 const * instead of char *. Thanks to Paul Jarc!
1156
591924eb
KR
11572003-10-02 Kevin Ryde <user42@zip.com.au>
1158
ff6ea7b9 1159 * strports.c (scm_call_with_output_string): scm_get_output_string
591924eb
KR
1160 rather than scm_strport_to_string, so as to guard against the port
1161 having been closed by the called procedure. Reported by Nic Ferrier.
1162
f03314f9
DH
11632003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
1164
1165 * numbers.h (SCM_INEXACTP): Removed uses of SCM_TYP16S.
1166
1167 * tags.h, deprecated.h (SCM_TYP16S): Deprecated and moved from
1168 tags.h to deprecated.h.
1169
534c55a9
DH
11702003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
1171
1172 This set of patches introduces a new tc7 code scm_tc7_number for
1173 numbers. Bignums, reals and complex numbers are turned from smobs
1174 into subtypes of scm_tc7_number.
1175
1176 * tags.h (scm_tc7_number): New.
1177
1178 * eq.c (scm_equal_p), eval.c (SCM_CEVAL), evalext.c
1179 (scm_self_evaluating_p), gc-card.c (scm_i_sweep_card), gc-mark.c
1180 (scm_gc_mark_dependencies), goops.c (create_smob_classes), hash.c
1181 (scm_hasher), numbers.c, numbers.h (SCM_NUMP), objects.c
1182 (scm_class_of), print.c (scm_iprin1), smob.c
1183 (scm_smob_prehistory): Don't handle bignums, reals and complex
1184 numbers as subtypes of scm_tc7_smob any more.
1185
1186 * numbers.h, tags.h (scm_tc16_big, scm_tc16_real,
1187 scm_tc16_complex): Moved definitions from tags.h to numbers.h.
1188
29c4382a
DH
11892003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
1190
1191 * numbers.c (scm_make_complex), gc-card.c (scm_i_sweep_card): Use
1192 sizeof (scm_t_complex) to determine the memory size of the
1193 malloc'd area for complex numbers.
1194
47ae1f0e
DH
11952003-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
1196
1197 * numbers.c (scm_bigequal): Fixed.
1198
859b6b2f
MV
11992003-09-16 Marius Vollmer <mvo@zagadka.de>
1200
1201 * stime.c (scm_current_time): 'time' does not set errno so don't
1202 use SCM_SYSERROR for reporting errors.
1203
e17d318f
DH
12042003-09-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
1205
1206 This set of patches eliminates the dependency between the
1207 implementation of evaluator specific memoization codes and special
1208 constants like #f, '() etc. ('flags'), which are not evaluator
1209 specific. The goal is to remove definitions of evaluator
1210 memoization codes completely from the public interface. This will
1211 make it possible to experiment more freely with optimizations of
1212 guile's internal representation of memoized code.
1213
1214 * objects.c (scm_class_of): Eliminate dependency on SCM_ISYMNUM.
1215
1216 * print.c (iflagnames): New array, holding the printed names of
1217 guile's special constants ('flags').
1218
1219 (scm_isymnames): Now holds only the printed names of the
1220 memoization codes.
1221
1222 (scm_iprin1): Separate the handling of memoization codes and
1223 guile's special constants.
1224
1225 * tags.h (scm_tc9_flag, SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA,
1226 SCM_IFLAGNUM): new
1227
1228 (scm_tc8_char, scm_tc8_iloc, SCM_BOOL_F, SCM_BOOL_T,
1229 SCM_UNDEFINED, SCM_EOF_VAL, SCM_EOL, SCM_UNSPECIFIED, SCM_UNBOUND,
1230 SCM_ELISP_NIL, SCM_IM_DISPATCH, SCM_IM_SLOT_REF,
1231 SCM_IM_SLOT_SET_X, SCM_IM_DELAY, SCM_IM_FUTURE,
1232 SCM_IM_CALL_WITH_VALUES, SCM_IM_NIL_COND, SCM_IM_BIND): Changed
1233 values.
1234
1235 (SCM_IFLAGP): SCM_IFLAGP now only tests for flags.
1236
1237 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Generalized to use the
1238 tc9 macros and scm_tc9_flag.
1239
eecac806
MV
12402003-09-15 Marius Vollmer <mvo@zagadka.de>
1241
1242 * posix.c (scm_setgroups): Check that the gid list is not too
1243 long. Thanks to Paul Jarc!
1244
22f2cf2d
DH
12452003-09-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
1246
1247 * tags.h: Reduced the number of short instructions from 14 to 13.
1248 The typecode of the former 14th short instruction is now used to
1249 represent long instructions. Changed some comments to reflect
1250 this fact.
1251
1252 (SCM_MAKISYM): ISYMs get a new tc7 code, namely the one that was
1253 previously used by SCM_IM_DEFINE.
1254
1255 (SCM_IM_DEFINE): Turned into a long instruction.
1256
1257 * eval.c (unmemocopy, SCM_CEVAL): Treat SCM_IM_DEFINE as a long
1258 instruction.
1259
1260 * eval.c (SCM_CEVAL): Since characters and iflags have now a tc7
1261 code that is separate from all instructions, one level of dispatch
1262 for long instructions can be eliminated.
1263
1264 * print.c (scm_isymnames): Removed some commented code.
1265
62f548e1
MV
12662003-09-12 Marius Vollmer <mvo@zagadka.de>
1267
97a61c5f
MV
1268 * __scm.h (SCM_FENCE): Use __memory_barrier with the Intel
1269 compiler on IA64.
1270
50e0ba57
MV
1271 * hashtab.h (scm_tc16_hashtable): Added "extern" declaration.
1272
1273 * modules.c (scm_module_reverse_lookup): Check that the obarray
1274 really is a hashtable and do nothing if not.
1275
62f548e1
MV
1276 * inline.h: Use "extern inline" only with GCC. Use "static
1277 inline" else.
1278
0d5e3480
DH
12792003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
1280
1281 * numbers.h (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Removed uses
1282 of SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
1283
1284 * numbers.h, deprecated.h (SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP,
1285 SCM_SLOPPY_COMPLEXP): Deprecated and moved from numbers.h to
1286 deprecated.h.
1287
6b412e91
DH
12882003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
1289
1290 * eq.c (scm_eqv_p, scm_equal_p): Removed uses of
1291 SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
1292
1293 * eq.c (scm_eqv_p, scm_equal_p): Reordered comparisons from
1294 0.0==some_expression to some_expression==0.0. The latter is
1295 better readable. The former is preferred by some people, since it
1296 leads to a compiler error when confusing == with =. However, when
1297 using gcc, a warning will be issued if in an if-statement an
1298 assigment appears. Since many Guile developers are using gcc,
1299 such errors will not remain unnoticed anyway. We can therefore
1300 focus on better readability.
1301
7e3b25bf
DH
13022003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
1303
1304 * tags.h: Added description of Guile's type system. Removed some
1305 old and misleading comments.
1306
3ea39242
DH
13072003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
1308
1309 * unit.c (scm_cvref): Eliminate unnecessary uses of SCM_NIMP,
1310 SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
1311
5d7d39ff
DH
13122003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
1313
1314 * numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
1315
1316 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the
1317 respective SLOPPY macro.
1318
baa84a20
DH
13192003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
1320
1321 * eq.c (scm_equal_p): Use SCM_TYP7 to check if an object is of
1322 type string, not SCM_TYP7S.
1323
ba15f500
KR
13242003-09-03 Kevin Ryde <user42@zip.com.au>
1325
1326 * numbers.c (scm_lognot): Correction to docstring, ones-complement not
1327 2s-complement.
1328
53bb8782
KR
1329 * stime.c (scm_strptime): Add comment about glibc strptime %s and
1330 current timezone requiring SCM_DEFER_INTS.
1331
defdc4b4
NJ
13322003-08-30 Neil Jerram <neil@ossau.uklinux.net>
1333
1334 * script.c (scm_compile_shell_switches): Make -s switch optional
1335 if file to be loaded does not begin with a `-'. (Thanks to Aaron
1336 VanDevender for the patch!)
1337
0f008a15
KR
13382003-08-30 Kevin Ryde <user42@zip.com.au>
1339
1340 * numbers.c (scm_lognot): Rewrite using ~ and mpz_com, for directness
1341 and to have non-integer types rejected as per other logical funcs.
1342
438a3ba1
KR
13432003-08-28 Kevin Ryde <user42@zip.com.au>
1344
1345 * gc.h (scm_remember_upto_here_1): Revise comments on the asm form.
1346
98dceb37
KR
13472003-08-23 Kevin Ryde <user42@zip.com.au>
1348
1349 * simpos.c (scm_system): Remove SCM_DEFER_INTS, system() should be
1350 thread safe, and could take a long time too.
1351
1fa79a38
KR
13522003-08-22 Kevin Ryde <user42@zip.com.au>
1353
1354 * numbers.c (scm_difference): Correction to bignum - negative inum.
1355
d97f9b42
KR
13562003-08-14 Kevin Ryde <user42@zip.com.au>
1357
1358 * gc.h (scm_remember_upto_here_1, scm_remember_upto_here_2)
1359 [__GNUC__]: Use volatile asm macros rather than a function call.
1360 * gc.c (scm_remember_upto_here_1, scm_remember_upto_here_2): Undefine
1361 macros while defining functions.
1362
1363 * simpos.c (getenv): Use <stdlib.h> for prototype.
1364 (scm_system): In docstring, refer to status:exit-val rather than
1365 "functions above".
1366
b9052fcc
KR
13672003-08-09 Kevin Ryde <user42@zip.com.au>
1368
1369 * srcprop.c (scm_source_properties): Return plist from hash if it's a
1370 list set by source-properties! rather than an SRCPROPS object,
1371
8e5b4b9e
KR
13722003-07-29 Kevin Ryde <user42@zip.com.au>
1373
1374 * properties.c (scm_primitive_property_ref): In docstring, note
1375 parameters to not-found-proc, use hyphens rather than underscores for
1376 that parameter name.
1377 (scm_primitive_property_set_x): In docstring, VAL is the value
1378 parameter not CODE.
1379
20703ac4
MV
13802003-07-27 Marius Vollmer <mvo@zagadka.de>
1381
c6ccee34
MV
1382 * print.c (scm_print_symbol_name): handle more weird characters by
1383 escaping the symbol name properly. Thanks to Paul Jarc!
1384
2f4931bf
MV
1385 * posix.h (scm_setgroups): New prototype.
1386 * posix.c (scm_setgroups): New. Thanks to Paul Jarc!
1387 (scm_getgroups): Handle groups ids that don't fit into a fixnum.
1388 Don't use SCM_WRITABLE_VELTS.
1389
265c456f
MV
1390 * gc.h (SCM_GC_SET_CELL_BVEC): New.
1391 * gc-card.c (scm_i_init_card_freelist): Use it. Thanks to
1392 Matthias Koeppe!
1393
20703ac4
MV
1394 * __scm.h (SCM_C_INLINE_KEYWORD): New.
1395 * numbers.c: Use it in place of SCM_C_INLINE so that the code
1396 compiles when SCM_C_INLINE is undefined.
1397
59c4bb82
DH
13982003-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
1399
1400 * __scm.h: Reformulated the architecture and compiler properties
1401 in terms of properties of scm_t_bits and SCM variables rather than
1402 in terms of c standard types. This is since it is not known which
1403 of the standard types scm_t_bits and SCM variables will be defined
1404 to.
1405
d7850c8d
KR
14062003-07-24 Kevin Ryde <user42@zip.com.au>
1407
1408 * numbers.c (scm_angle): Use scm_flo0 for non-negative inum, bignum
1409 and real.
1410
8a0c514f
KR
14112003-07-18 Kevin Ryde <user42@zip.com.au>
1412
1413 * numbers.c (scm_product): In complex * bignum, correction to
1414 REAL/IMAG fetch, x is the complex, not y.
1415
0aacf84e
MD
14162003-07-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1417
1418 * numbers.c (scm_odd_p, scm_even_p): Bugfix: Treat result of
1419 scm_inf_p test as Scheme values.
1420 (scm_sum): Bugfix: Normalize bignum created from a negative bignum
1421 and a positive inum.
1422 Use GNU indentation style.
1423
192de9a4
DH
14242003-07-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
1425
1426 * values.c (scm_values): Build lists of length 1 by using
1427 scm_list_1 instead of using scm_cons.
1428
bbb4438a
KR
14292003-07-10 Kevin Ryde <user42@zip.com.au>
1430
b58c85ce
KR
1431 * deprecation.c (scm_c_issue_deprecation_warning_fmt): Add va_end.
1432 * list.c (scm_list_n): Ditto.
1433
bbb4438a
KR
1434 * gc-malloc.c (scm_gc_realloc): Define "ptr" at start of function.
1435
287f8ad1
KR
14362003-07-08 Matthias Koeppe <mkoeppe@merkur.math.uni-magdeburg.de>
1437
1438 * tags.h (scm_t_bits, scm_t_signed_bits, etc): Avoid solaris empty
1439 defines of INTPTR_MAX and UINTPTR_MAX, combine conditionals for
1440 scm_t_bits and scm_t_signed_bits to avoid any chance of one and not
1441 the other using intptr_t.
1442
005d2366
KR
14432003-07-08 Kevin Ryde <user42@zip.com.au>
1444
0aacf84e 1445 * numbers.c (scm_make_polar): Use sincos, when available.
005d2366
KR
1446 (scm_magnitude): Use hypot.
1447
1448 * ports.c (scm_char_ready_p, scm_peek_char): In docstrings, don't use
1449 @footnote since it doesn't go through to guile-procedures.txt.
1450
1451 * threads.c (scm_call_with_new_thread): In docstring, use "( )"
1452 outside @var to quieten makeinfo, and use @code.
1453
cbfe8e62
HWN
14542003-07-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1455
1456 * gc-malloc.c (decrease_mtrigger): new function
1457 (increase_mtrigger): new function, separate debug registering and
1458 mtrigger administration.
1459 (scm_gc_realloc): bugfix: do mtrigger administration before the
1460 actual realloc, for the realloc might invalidate a GC-d segment of
1461 memory. Thanks to Sam Hocevar for pointing this out.
1462 (scm_gc_realloc): use scm_malloc_reregister instead of
1463 unregistering and registering in sequence.
1464
aeb4c2e1
HWN
14652003-07-03 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1466
1467 * __scm.h (SCM_ASSERT): change "else" expansion to "do { } while (0)"
1468
4c27f8d2
HWN
14692003-07-02 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1470
1471 * __scm.h (SCM_ASRTGO): add "else" to macro expansions with if
1472 clauses.
1473
983e697d
MV
14742003-06-29 Marius Vollmer <mvo@zagadka.de>
1475
1476 * deprecated.h (SCM_OPDIRP, scm_fport, scm_option, scm_srcprops,
1477 scm_srcprops_chunk, scm_info_frame, scm_stack, scm_array,
1478 scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_FUNC_NAME, SCM_WTA,
1479 RETURN_SCM_WTA, SCM_VALIDATE_NUMBER_COPY,
1480 SCM_VALIDATE_NUMBER_DEF_COPY, SCM_VALIDATE_OPDIR): Re-added from
1481 the release_1_6 branch.
1482
78b6566e
SJ
14832003-06-25 Stefan Jahn <stefan@lkcc.org>
1484
1485 * continuations.c: Redeclaration of getcontext() via the
1486 __asm__ ("getcontext") directive.
1487
1488 * continuations.h: Include <ucontext.h> instead of
1489 <sys/ucontext.h>.
1490
1ebb8497
KR
14912003-06-21 Kevin Ryde <user42@zip.com.au>
1492
1493 * numbers.c (_GNU_SOURCE): #define, to get C99 things.
1494 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, $asinh, $acosh,
1495 $atanh, truncate): Use C library asinh, acosh, atanh and trunc, when
1496 available.
1497 (scm_inexact_to_exact): Expand isfinite to its definition !xisinf.
1498 (isfinite): Remove, conflicts with C99 isfinite().
1499
fbf85ba4
MV
15002003-06-19 Marius Vollmer <mvo@zagadka.de>
1501
1502 * deprecated.h, deprecated.c (scm_strhash, scm_sym2ovcell_soft,
1503 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
1504 scm_symbol_value0, scm_string_to_obarray_symbol scm_intern_symbol,
1505 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
1506 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp): Re-added from
1507 the release_1_6 branch.
1508
fcc5d734
SJ
15092003-06-14 Stefan Jahn <stefan@lkcc.org>
1510
1511 * threads.h: Redefined scm_getspecific() and scm_setspecific()
1512 to be functions instead of macros.
1513
1514 * threads.c: Conditionalized inclusion of <sys/time.h> and
1515 <unistd.h>.
1516 (scm_getspecific, scm_setspecific): Made these two function
1517 real part of the API.
1518
1519 * posix.c (s_scm_putenv): Added some code to make a
1520 (putenv "FOO="), i.e. setting an empty string, work also on
1521 Win32 systems. Thanks to Kevin Ryde for the proposal.
1522
c3ae8e07
KR
15232003-06-12 Kevin Ryde <user42@zip.com.au>
1524
75b14838
KR
1525 * posix.c (scm_putenv): Free temporary ptr in mingw unset. Add
1526 freebsd to comment about need to use unsetenv.
c3ae8e07 1527
9d9fa092
MV
15282003-06-02 Marius Vollmer <mvo@zagadka.de>
1529
1530 * ports.c (scm_peek_char): Safe the column of the port around the
1531 getc/ungetc calls. Thanks to Dr. Peter Ivanyi!
1532
f2478375
KR
15332003-06-07 Kevin Ryde <user42@zip.com.au>
1534
1535 * tags.h: Use inttypes.h and stdint.h when available, for INTPTR_MAX
1536 and friends required by scm_t_bits setups.
1537
6375e040
DH
15382003-06-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
1539
1540 * tags.h (scm_tc2_int): Added.
1541
1542 * tags.h (scm_tc3_int_1, scm_tc3_int_2): Expressed in terms of
1543 scm_tc2_int.
1544
1545 * tags.h (scm_tcs_cons_imcar, scm_tcs_cons_nimcar, scm_tcs_struct,
1546 scm_tcs_closures): Hard coded values replaced by symbolic ones.
1547
f5c6ec2f
DH
15482003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
1549
1550 * eval.c: Partially undid my patch from 2003-05-31. This patch
1551 caused the segfault referenced in the previous changelog entry.
1552
47dbd81e
DH
15532003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
1554
1555 * tags.h: Fixed comment about the immediate type code layout.
1556
1557 * eval.c: Fixed handling of non-special instructions. Without
1558 this patch, guile will segfault on (#\0) and similar instructions.
1559
3ec52c51
KR
15602003-06-05 Kevin Ryde <user42@zip.com.au>
1561
1562 * numbers.c (scm_max, scm_min): For inum, bignum and real, if other
1563 operand is NaN, then return NaN. Also avoid passing NaN to mpz_cmp_d.
1564
e418bd7c
KR
1565 * read.c (scm_input_error): Pass arg list parameter to scm_error_scm,
1566 rather than SCM_EOL. Needed by "Unknown # object" case in scm_lreadr.
1567
d0624e39
DH
15682003-06-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
1569
1570 * __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,
1571 SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
1572 SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
1573 generalized it to apply not only to C level functions but also to
1574 scheme level functions.
1575
1576 * debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
1577 scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
1578 scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
1579 eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
1580 only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
1581 respectively.
1582
1583 * deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
1584 SCM_IDSTMSK): Deprecated. The macro definitions are moved from
1585 eval.h into eval.c and a copy is placed into deprecated.h.
1586
1587 * eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
1588 into eval.c. This definition was not part of the API in any
1589 officially released version of guile and thus does not need to go
1590 through a phase of deprecation.
1591
e90c3a89
DH
15922003-06-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
1593
d0624e39
DH
1594 * deprecated.c, deprecated.h, eval.c, eval.h (scm_s_expression,
1595 scm_s_test, scm_s_body, scm_s_bindings, scm_s_variable,
1596 scm_s_clauses, scm_s_formals): Deprecated. In eval.c the
e90c3a89
DH
1597 definitions are make static and renamed from scm_s_xxx to s_xxx.
1598 In deprecated.c the original definitions are copied.
1599
d0624e39
DH
1600 * deprecated.h, eval.c, eval (SCM_EVALIM2, SCM_EVALIM, SCM_XEVAL,
1601 SCM_XEVALCAR): Deprecated. The macro definitions are moved from
e90c3a89
DH
1602 eval.h into eval.c and a copy (slightly modified to work in user
1603 code) is placed into deprecated.h.
1604
1605 * eval.c: Use the local static s_xxx definitions instead of the
1606 scm_s_xxx definitions throughout.
1607
14b18ed6
DH
16082003-06-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
1609
1610 This set of patches separates the representation of the cxr family
1611 of functions (car, cdr etc.) from the dsubr family of functions
1612 (i. e. functions that take a double precision floating point
1613 argument). Further, the algorithm for handling the cxr function
1614 is improved.
1615
1616 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_1), numbers.c
1617 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, scm_round, floor,
1618 ceil, sqrt, fabs, exp, log, sin, cos, tan, asin, acos, atan, sinh,
1619 cosh, tanh), objects.c (scm_class_of), procprop.c
1620 (scm_i_procedure_arity), ramap.c (scm_array_map_x), tags.h
1621 (scm_tc7_dsubr, scm_tcs_subrs): Introduce scm_tc7_dsubr as new
1622 typecode for the dsubr family of functions.
1623
1624 * ramap.c (ramap_cxr, ramap_dsubr): Renamed ramap_cxr to
1625 ramap_dsubr.
1626
1627 * eval.c (SCM_CEVAL, SCM_APPLY, call_cxr_1), pairs.c
1628 (scm_init_pairs): Make use of the (now usable) second cell element
1629 of a scm_tc7_cxr function to implement the cxr family of functions
1630 more efficiently.
1631
2ca0d207
DH
16322003-05-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
1633
1634 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_0,
1635 scm_trampoline_1, scm_trampoline_2): Postpone error cases to the
1636 end of an if-else-if-sequence of checks.
1637
9a069bdd
DH
16382003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
1639
1640 * eval.c (SCM_CEVAL): Improved readability of call-with-values
1641 execution. Generalize apply_closure to apply_proc and use that
1642 for call-with-values.
1643
e910e9d2
DH
16442003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
1645
1646 * eval.c (SCM_CEVAL): Avoid one level of indirection when applying
1647 a non closure.
1648
1e498fbd
SJ
16492003-05-30 Stefan Jahn <stefan@lkcc.org>
1650
1651 * posix.c (s_scm_putenv): Use the new HAVE_UNSETENV
1652 appropriately for mingw32 hosts.
1653
1654 * numbers.h: Defining copysign(), isnan() and finite() to
1655 be prefixed by a single '_' for mingw32 hosts.
1656
c47e2599
KR
16572003-05-30 Kevin Ryde <user42@zip.com.au>
1658
1659 * numbers.c (z_negative_one): New variable.
1660 (scm_init_numbers): Initialize it.
1661 (scm_logcount): Use it and mpz_hamdist to count zeros for negatives.
1662
2e945bcc
SJ
16632003-05-29 Stefan Jahn <stefan@lkcc.org>
1664
1665 * win32-dirent.c: Use malloc() instead of scm_malloc().
1666
1667 * stime.c (s_scm_strftime): Add a type cast to avoid compiler
1668 warning.
1669
1670 * posix.c (s_scm_putenv): Disable use of unsetenv() for the
1671 mingw32 build.
1672
1673 * modules.c (s_scm_module_import_interface): Renamed local
1674 variable interface to _interface. Seems like 'interface'
1675 is a special compiler directive for the mingw32 compiler.
1676
1677 * mkstemp.c: Provide prototype to avoid compiler warning.
1678
1679 * load.c (s_scm_search_path): Fixed absolute and relative
1680 path detections for native Windows platforms.
1681
1682 * gc.h, threads.h: Export some more symbols using SCM_API (necessary
1683 to build on mingw32).
1684
1685 * gc-freelist.c ("s_scm_map_free_list",
1686 "s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.
1687
1688 * fports.c (fport_fill_input): Disable use of
1689 fport_wait_for_input() on Win32 platforms.
1690
1691 * filesys.c (s_scm_basename): Fixed __MINGW32__ code.
1692
1693 * Makefile.am: Modified some rules for cross compiling.
1694
ddd8f927
DH
16952003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
1696
1697 * eval.c (SCM_CEVAL): In case of an application, all checks for a
1698 proper function object and the correct number of arguments are now
1699 performed in the application part of SCM_CEVAL.
1700
1701 (scm_badformalsp): Removed.
1702
f8ba2197
DH
17032003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
1704
1705 * deprecated.c (scm_read_and_eval_x): Fixed C99-ism.
1706
79f55b7c
MD
17072003-05-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1708
a502595f
MD
1709 * num2integral.i.c (NUM2INTEGRAL): Avoid warning about conditional
1710 always being false by inserting preprocessor conditional. (Thanks
1711 to Bruce Korb.)
1712
79f55b7c
MD
1713 * __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
1714 (void *) in order to avoid an aliasing warning; thanks to Bruce
1715 Korb.)
1716
1717 * stackchk.h (SCM_STACK_OVERFLOW_P): Use SCM_STACK_PTR.
1718
1719 * threads.c (suspend, launch_thread, scm_threads_mark_stacks): Use
1720 SCM_STACK_PTR.
1721
1722 * threads.c (scm_threads_mark_stacks): Bugfix: Changed
1723 thread->base --> t->base.
1724
1725 * eval.c (SCM_CEVAL): Don't cast argument of SCM_STACK_OVERFLOW_P.
1726
47dee228
MV
17272003-05-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1728
1729 * deprecated.h, deprecated.c (scm_makstr, scm_makfromstr,
1730 scm_variable_set_name_hint, scm_builtin_variable,
1731 scm_internal_with_fluids, scm_make_gsubr,
1732 scm_make_gsubr_with_generic, scm_create_hook, SCM_LIST0,
1733 SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6,
1734 SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify, scm_sloppy_memq,
85494587
MV
1735 scm_sloppy_memv, scm_sloppy_member, scm_read_and_eval_x,
1736 scm_subr_entry, SCM_SUBR_DOC, scm_make_subr,
1737 scm_make_subr_with_generic, scm_make_subr_opt,
1738 scm_call_catching_errors, scm_make_smob_type_mfpe,
1739 scm_set_smob_mfpe, scm_strprint_obj, scm_read_0str, scm_eval_0str,
1740 SCM_CHARS, SCM_UCHARS, SCM_LENGTH): Re-added from the release_1_6
1741 branch. Some have been slightly rewritten.
1742 (scm_i_object_chars, scm_i_object_length): New, to support
1743 SCM_CHARS, SCM_UCHARS, and SCM_LENTH.
1744
e681d187
DH
17452003-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
1746
1747 * eval.c (scm_m_do, unmemocopy, SCM_CEVAL): Reversed order of
1748 names and inits in the memoized code of do.
1749
7e59d9d4
MD
17502003-05-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1751
1752 * c-tokenize.lex (yyget_lineno, yyget_in, yyget_out, yyget_leng,
1753 yyget_text, yyset_lineno, yyset_in, yyset_out, yyget_debug,
1754 yyset_debug, yylex_destroy): Added prototypes (otherwise we'll get
1755 a compilation error if error-on-warning is enabled).
1756
9950a42c
MV
17572003-05-17 Marius Vollmer <mvo@zagadka.de>
1758
1759 * c-tokenize.lex: Gobble up complete lines after a '#'. This
1760 removes preprocessor directives from the snarfage that might
1761 otherwise confuse us. These directives appear when compiling with
1762 "-g3", for example.
1763
0068984b
HWN
17642003-05-16 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1765
26e68795
HWN
1766 * ChangeLog: add my surname
1767
0068984b
HWN
1768 * srcprop.c (scm_finish_srcprop): use
1769 scm_gc_register_collectable_memory()
1770 (scm_make_srcprops): idem.
1771
131805f0
HWN
17722003-05-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1773
1774 * gc-malloc.c (scm_gc_register_collectable_memory): avoid
1775 wrap-around for scm_mtrigger
1776 (scm_gc_register_collectable_memory): abort on overflowing
1777 scm_mallocated().
1778
d4611024
KR
17792003-05-13 Kevin Ryde <user42@zip.com.au>
1780
1781 * numbers.c (xmpz_cmp_d): New macro, handling infs if gmp doesn't.
1782 (scm_num_eq_p, scm_less_p, scm_max, scm_min): Use it.
1783
7aaf8dc9
MD
17842003-05-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1785
dfd03fb9
MD
1786 * backtrace.c (scm_display_error_message): Introduced fancy
1787 printing with max level 7 and length 10. (Purpose: avoid printing
1788 gigantic objects in error messages.)
1789
1790 * print.c, print.h (scm_i_port_with_print_state): New function.
1791
1792 * print.c (scm_iprin1, scm_printer_apply,
1793 scm_port_with_print_state): Use scm_i_port_with_print_state.
1794 (scm_simple_format): Modified not to destroy print states.
1795 (print_state_mutex): New mutex.
1796 (scm_make_print_state, scm_free_print_state, scm_prin1):
1797 Lock/unlock print_state_mutex.
1798
7aaf8dc9
MD
1799 * deprecated.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK):
1800 Use current names in definitions.
1801
a4d9ffa1
KR
18022003-05-10 Kevin Ryde <user42@zip.com.au>
1803
1804 * numbers.c (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d.
1805
d25e96a4
KR
1806 * numbers.c (scm_integer_length): On negative bignums, adjust
1807 mpz_sizeinbase to account for it looking at absolute value where we
1808 want ones-complement.
1809
1810 * numbers.c (scm_gcd): In bignum/inum, don't pass yy==0 to mpz_gcd_ui
1811 since we're only using the ulong return value, and x might not fit.
1812
5bf6a6f0
DH
18132003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
1814
1815 * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to
1816 read. This will allow to make the definition in read.c static.
1817
f58c472a
DH
18182003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
1819
1820 * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved
1821 from evalext to eval. This will allow to make some of the
1822 definitions in eval.c static.
1823
90382aeb
KR
18242003-05-06 Kevin Ryde <user42@zip.com.au>
1825
1826 * numbers.c (scm_difference): In inum - bignum, handle negative inum.
1827 (scm_logcount): Use mpz_com, not mpz_neg.
1828
3b88ed2a
DH
18292003-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
1830
1831 The purpose of this patch is to make guile's internal memoizers
1832 distinguishable from memoizing macros created on the scheme level
1833 or from user provided primitive memoizing macros. The reason is,
1834 that the internal memoizers are the only ones that are allowed to
1835 transform their scheme input into memoizer byte code, while all
1836 other memoizing macros may only transform scheme code into new
1837 scheme code.
1838
1839 To achieve this, a new macro type 'builtin-macro!' is introduced.
1840 Currently, 'builtin-macro!'s are handled as memoizing macros, but
1841 this will change when the memoizer and executor are separated.
1842
1843 * macros.[ch] (scm_i_makbimacro): New.
1844
1845 * macros.h (SCM_BUILTIN_MACRO_P): New.
1846
1847 * macros.c (macro_print, scm_macro_type): Support builtin-macro!s.
1848
1849 * eval.c, goops.c: All of guile's primitive memoizing macros are
1850 primitive builtin-macros now.
1851
1852 * eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive
1853 builtin-macros are handled equally to memoizing macros.
1854
b0780eb1
MV
18552003-05-04 Marius Vollmer <mvo@zagadka.de>
1856
1857 * throw.c (scm_ithrow): Remove "asm volatile" hack. It used to
1858 work around a bug in GCC 2.95.2 but is now a bug in itself.
1859
1cbf4fe9
MV
18602003-05-02 Marius Vollmer <mvo@zagadka.de>
1861
1862 * deprecated.h (scm_rstate, scm_rng, SCM_SLOPPY_CONSP,
1863 SCM_SLOPPY_NCONSP, scm_tc7_ssymbol, scm_tc7_msymbol,
1864 scm_tcs_symbols): New.
1865
1a61d41b
MV
18662003-04-30 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1867
096ecbaf
MV
1868 * deprecated.h, deprecated.c (scm_protect_object,
1869 scm_unprotect_object, SCM_SETAND_CAR, SCM_SETOR_CAR,
1870 SCM_SET_AND_CDR, SCM_SET_OR_CDR, SCM_FREEP, SCM_NFREEP,
1871 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
1872 SCM_GCCDR, scm_remember, scm_the_root_module, scm_make_module,
1873 scm_ensure_user_module, scm_load_scheme_module, scm_port,
1874 scm_ptob_descriptor, scm_port_rw_active,
1875 scm_close_all_ports_except): New.
1876
1a61d41b
MV
1877 * ports.c (scm_c_port_for_each): New function, mostly copied from
1878 scm_port_for_each.
1879 (scm_port_for_each): Reimplemented using scm_c_port_for_each.
1880 * ports.h (scm_c_port_for_each): New prototype.
1881
c8e1d354
MD
18822003-04-28 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1883
1884 * eval.c (scm_m_atdispatch): Removed until actually needed. (This
1885 macro was introduced in anticipation of GOOPS method compilation
1886 code.)
1887
1888 * goops.c: Removed binding of @dispatch.
1889
a4aa2134
DH
18902003-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
1891
1892 * eval.c, goops.c (@dispatch, @slot-ref, @slot-set!): Move the
1893 instructions that bind the macros on the scheme level back to
1894 goops.c in order to make sure again that the bindings go into the
1895 (oop goops) module and are not visible from the outside.
1896
9fbee57e
DH
18972003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
1898
1899 * eval.c: Non functional change: Separated R5RS and non-R5RS
1900 macros into different sections of the file and ordered the
1901 memoizers alphabetically.
1902
12841895
DH
19032003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
1904
1905 * eval.c (scm_ilookup): Rewritten to improve readability.
1906
6a3f13f0
DH
19072003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
1908
1909 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
1910 Partially reverted patch from 2003-04-23 in oder to find a better
1911 compromise between readability and debuggability.
1912
b0c5d67b
DH
19132003-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
1914
1915 * eval.c, eval.h, goops.c, goops.h (scm_m_atslot_ref,
1916 scm_m_atslot_set_x, scm_m_atdispatch): Move the declarations and
1917 definitions of the special goops memoizers from goops.[ch] to
1918 eval.[ch]. Hmm... it seems that scm_m_atdispatch is not used
1919 throughout guile.
1920
b9ad392e
MD
19212003-04-24 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1922
1923 * ports.c, ports.h (scm_i_port_table_mutex): New mutex.
1924
1925 * fports.c (scm_evict_ports): Lock/unlock scm_i_port_table_mutex.
1926
1927 * ports.c (scm_close_port, scm_flush_all_ports): Ditto.
1928
1929 * ioext.c (scm_fdes_to_ports): Ditto.
1930
1931 * vports.c (scm_make_soft_port): Changed SCM_DEFER/ALLOW_INTS into
1932 lock/unlock scm_i_port_table_mutex.
1933
1934 * strports.c (scm_mkstrport): Ditto.
1935
1936 * ports.c (scm_void_port, scm_port_for_each): Ditto.
1937
1938 * fports.c (scm_fdes_to_port): Ditto.
1939
d0b07b5d
DH
19402003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
1941
1942 This set of patches contains no functional changes, only debatable
1943 minor stylistic ones. Still, in order to prepare a patch between
1944 my local copy and the CVS version, I decided to submit the changes
1945 below. Then, the patch will hopefully only contain relevant
1946 modifications :-)
1947
1948 * eval.c (iqq): Added const specifier.
1949
1950 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
1951 Use NULL instead of 0 to indicate that a pointer is returned.
1952 Removed some misleading 'fall through' comments.
1953
1954 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
1955 Split up long expressions into smaller ones to be more debugging
1956 friendly.
1957
a98e8e98
DH
19582003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
1959
1960 * eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR,
1961 SCM_EXIT_FRAME_HDLR): Use SCM_PACK to convert data to a SCM value
1962 rather than casting to SCM.
1963
c178c3a6
DH
19642003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
1965
1966 * sort.c, pairs.h: Removed unnecessary includes.
1967
d339981a
DH
19682003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
1969
1970 * sort.c: Replaced hand-made trampline code by the new official
1971 mechanism from eval.c. This fixes a segfault in the new test file
1972 sort.test.
1973
1974 (quicksort, compare_function, scm_restricted_vector_sort_x,
1975 scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
1976 scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x,
1977 scm_merge_vector_step, scm_stable_sort_x, scm_stable_sort,
1978 scm_sort_list_x, scm_sort_list): Use trampoline mechanism from
1979 eval.c.
1980
1981 (subr2less, lsubrless, closureless, applyless, scm_cmp_function,
1982 cmp_fun_t): Removed.
1983
1984 (compare_function): Added.
1985
1986 * sort.c (quicksort, SWAP, stack_node): Replaced pointer
1987 arithmetics with index arithmetics. Changed quicksort to work on
1988 an array of SCM values instead of an array of characters. Avoid
1989 bytewise copying of SCM elements. Avoid allocating memory on the
1990 stack with alloca. Fixed some comments.
1991
821f18a4
DH
19922003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
1993
1994 * eval.c (EXTEND_ENV): Eliminated.
1995
1996 (unmemocopy, SCM_CEVAL, SCM_APPLY): Use SCM_EXTEND_ENV instead of
1997 EXTEND_ENV.
1998
94fb5a6e
DH
19992003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
2000
2001 * __scm.h (SCM_DEBUG_DEBUGGER_SUPPORT): New compile-time option.
2002
2003 * gc.card.c (scm_gc_marked_p): Fixed compiler warning when
2004 compiling with SCM_DEBUG==1 by moving definition behind prototype.
2005
2006 * gc.card.c (scm_dbg_t_list_cell, scm_dbg_t_double_cell,
2007 scm_dbg_gc_marked_p, scm_dbg_gc_get_card, scm_dbg_gc_get_bvec,
2008 scm_t_list_cell_struct, scm_t_list_cell, scm_t_double_cell,
2009 scm_gc_marked_p, scm_gc_get_card, scm_gc_get_bvec): Fixed
2010 functions such that they check if the object is a non-immediate.
2011 Further, renamed identifiers to use the scm_dbg_ prefix and made
2012 their inclusion into the lib dependent of the
2013 SCM_DEBUG_DEBUGGER_SUPPORT compile time option.
2014
fce0b22d
DH
20152003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
2016
2017 * __scm.h: Fixed comment about the SCM_DEBUG_TYPING_STRICTNESS
2018 debug option.
2019
1685446c
DH
20202003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
2021
821f18a4 2022 * list.c (scm_ilength, scm_last_pair), unif.c (l2ra): Prefer
1685446c
DH
2023 !SCM_CONSP over SCM_NCONSP. Now, guile itself does not include
2024 any calls to SCM_NCONSP any more.
2025
2026 * unif.c (l2ra): Eliminate redundant check.
2027
9ff1720f
DH
20282003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
2029
2030 * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
2031 scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over
2032 SCM_NNULLP. Now, guile itself does not include any calls to
2033 SCM_NNULLP any more.
2034
05b15362
DH
20352003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
2036
2037 * eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
2038 scm_copy_tree): Place assignment expressions which are part of
2039 other expressions into an expression of their own.
2040
0c88d7df
DH
20412003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
2042
2043 * goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't
2044 compare SCM values with !=.
2045
5cb22e96
DH
20462003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
2047
2048 * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter,
2049 scm_m_generalized_set_x, scm_init_evalext): Move the declaration
2050 and definition of the memoizer for the generalized set! macro from
2051 evalext.[ch] to eval.[ch]. Use the SCM_SYNTAX snarfer macro to
2052 define the macro object.
2053
2054 * eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x,
2055 scm_m_generalized_set_x): Since now scm_s_set_x is only used in
2056 eval.c, it is made static and renamed to s_set_x.
2057
2058 * evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo>
2059 over SCM_N<foo>.
2060
a44a9715
DH
20612003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
2062
2063 * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,
2064 scm_init_eval): Made scm_undefineds static in eval.c, renamed it
2065 to undefineds and registered the object as a permanent object.
2066
2067 * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
2068 static in eval.c, renamed it to f_apply and registered the object
2069 as a permanent object.
2070
1b43d24c
DH
20712003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
2072
5cb22e96 2073 * eval.c (SCM_BIT7, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
1b43d24c
DH
2074 file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
2075
aec16f99
DH
20762003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
2077
2078 * numbers.c (scm_logtest): Fixed argument bug in the call to
2079 mpz_and, which showed up when compiling with SCM_DEBUG defined.
2080
f96460ce
DH
20812003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
2082
2083 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
2084 type errors that showed up when compiling with SCM_DEBUG defined.
2085
d0f6ceb8
DH
20862003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
2087
2088 * continuations.c, continuations.h, eval.c, eval.h, extensions.c,
2089 gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h,
2090 throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
2091 fix compile errors with --disable-deprecated.
2092
19a7a089
RB
20932003-04-17 Rob Browning <rlb@defaultvalue.org>
2094
2095 * numbers.c (scm_integer_expt): fix case where we were declaring
2096 vars in the middle of a statement block. Thanks to Thamer
2097 Al-Harbash.
2098
47cd67db
MD
20992003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2100
0fd7dcd3
MD
2101 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
2102 change.
2103
47cd67db
MD
2104 * eq.c (scm_eqv_p): Turned into a primitive generic.
2105
3b8b889c
RB
21062003-04-16 Rob Browning <rlb@defaultvalue.org>
2107
312006bb
RB
2108 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
2109 Thanks to Boyd Gerber.
2110 Added check for __arm__ in addition to arm for LINUX and copied
2111 __s390__ defines from upstream libgc. Thanks to James Treacy for
2112 reporting the problems.
c7ef2ea1 2113
3b8b889c
RB
2114 * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT.
2115
2116 * socket.c: use SCM_CHAR_BIT.
2117
2118 * random.c (scm_c_random_bignum): use SCM_CHAR_BIT.
2119
2120 * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT.
2121
43261b39
MD
21222003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
2123
2124 * feature.c (scm_init_feature): Always add threads feature.
2125
58241edc
MD
21262003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2127
2128 * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
2129 scm_at_assert_bound_ref. (We don't want the unbound check. See
2130 oop/goops/active-slot.scm.)
2131
94e91275
RB
21322003-04-14 Rob Browning <rlb@defaultvalue.org>
2133
2134 * tags.h: scm_t_intptr should have been intptr_t.
2135
3071ea27
RB
21362003-04-13 Rob Browning <rlb@defaultvalue.org>
2137
2138 * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc"
2139 test. Instead use
2140 #if defined (sparc) || defined (__sparc__) || defined (__sparc)
2141 as gc_os_dep.c suggests is appropriate.
2142
2143 * goops.c (prep_hashsets): make static to match prototype.
2144 (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert
2145 Chin.
2146
2147 * c-tokenize.lex: remove trailing comma from enum. Thanks to
2148 Albert Chin.
2149
2150 * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas
2151 Klausner.
2152
21ab2aeb
MD
21532003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2154
2155 * goops.c (scm_sys_prep_layout_x): Instance allocation is now
2156 indicated through extra fields in getters-n-setters.
2157 (scm_add_slot): Adapted to new format of getters_n_setters slot.
2158 (Thanks to Andy Wingo.)
2159
dff96e95
HWN
21602003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
2161
2162 * gc-segment.c: add comment
2163
07921c76
RB
21642003-04-07 Rob Browning <rlb@defaultvalue.org>
2165
b5331f10
RB
2166 * debug.h: change "id" arg name to "info_id" to avoid objective-c
2167 clash.
2168
07921c76
RB
2169 * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael
2170 and add regression test to standalone/.
2171
21722003-04-06 Rob Browning <rlb@defaultvalue.org>
2173
2174 * strings.c (scm_mem2string): use memcpy rather than by-hand loop.
2175 Thanks to Dale P. Smith.
2176
2177 * random.c: #include gmp.h.
2178 (scm_c_random_bignum): normalize result on return.
2179
2180 * init.c: #include gmp.h.
2181
2182 * numbers.h: remove the gmp.h #include (not needed now).
2183
2184 * posix.h: change occurences of "id" to something else so we don't
2185 cause trouble when included via objective-c (can't hurt, might
2186 help). Still have usage in debug.h, though.
2187
938f6b7c
MD
21882003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2189
372691d8
MD
2190 * random.c (scm_c_random_bignum): Don't generate a random number
2191 equal to m (the second argument of scm_c_random_bignum); only
2192 generate numbers in the range 0 <= r < m.
c5f268f8
MD
2193 (scm_c_default_rstate): Use SCM_VARIABLE_REF to access
2194 scm_var_random_state.
372691d8 2195
938f6b7c
MD
2196 * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then
2197 clause.
2198
6cdb8c3f
RB
21992003-04-05 Rob Browning <rlb@defaultvalue.org>
2200
938f6b7c 2201 * modules.c (scm_module_import_interface): move declaration of
6cdb8c3f
RB
2202 uses before any code.
2203
15635be5
MD
22042003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2205
1ecfd013
MD
2206 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
2207 not top_srcdir.
2208
15635be5
MD
2209 * hashtab.c (rehash_after_gc): Clear to_rehash list before
2210 processing it in order to avoid an infinite loop.
2211
2212 * print.c (scm_prin1): Remember old state of pstate->writingp.
2213
73be1d9e
MV
22142003-04-05 Marius Vollmer <mvo@zagadka.de>
2215
2216 * Changed license terms to the plain LGPL thru-out.
2217
ad815c06
RB
22182003-04-04 Rob Browning <rlb@defaultvalue.org>
2219
2220 * socket.c (FLIPCPY_NET_HOST_128): new macro.
2221 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
2222 rewrite to handle GMP bignums.
2223
2224
2225 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
2226
2227 * ports.c (scm_getc): minor tweak.
2228
2229 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
2230 rewrite to handle GMP bignums.
2231
2232 * numbers.c: rewrite *many* functions to handle GMP bignums.
2233
2234 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
2235 handle GMP bignums.
2236
2237 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
2238
2239 * init.c (check_config): remove SCM_BIGDIG conditionals.
2240 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
2241
2242 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
2243
2244 * eval.c: remove SCM_BIGDIG conditionals.
2245
2246 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
2247
6cdb8c3f
RB
22482003-03-31 Rob Browning <rlb@defaultvalue.org>
2249
2250 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
2251 to Kevin Ryde.)
2252
22532003-03-27 Rob Browning <rlb@defaultvalue.org>
2254
2255 * threads.h: fix various preprocessor usages of new public
2256 symbols to expect 0 or 1 values rather than 1 or undefined.
2257 i.e. change #ifdef to #if, etc.
2258
2259 * threads.c: fix various preprocessor usages of new public
2260 symbols to expect 0 or 1 values rather than 1 or undefined.
2261 i.e. change #ifdef to #if, etc.
2262
2263 * tags.h: fix various preprocessor usages of new public
2264 symbols to expect 0 or 1 values rather than 1 or undefined.
2265 i.e. change #ifdef to #if, etc.
2266
2267 * stacks.c: fix various preprocessor usages of new public
2268 symbols to expect 0 or 1 values rather than 1 or undefined.
2269 i.e. change #ifdef to #if, etc.
2270
2271 * stackchk.h: fix various preprocessor usages of new public
2272 symbols to expect 0 or 1 values rather than 1 or undefined.
2273 i.e. change #ifdef to #if, etc.
2274
2275 * stackchk.c: fix various preprocessor usages of new public
2276 symbols to expect 0 or 1 values rather than 1 or undefined.
2277 i.e. change #ifdef to #if, etc.
2278
2279 * sort.c: fix various preprocessor usages of new public
2280 symbols to expect 0 or 1 values rather than 1 or undefined.
2281 i.e. change #ifdef to #if, etc.
2282
2283 * read.c: fix various preprocessor usages of new public
2284 symbols to expect 0 or 1 values rather than 1 or undefined.
2285 i.e. change #ifdef to #if, etc.
2286
2287 * random.c: fix various preprocessor usages of new public
2288 symbols to expect 0 or 1 values rather than 1 or undefined.
2289 i.e. change #ifdef to #if, etc.
2290
2291 * print.c: fix various preprocessor usages of new public
2292 symbols to expect 0 or 1 values rather than 1 or undefined.
2293 i.e. change #ifdef to #if, etc.
2294
2295 * objects.c: fix various preprocessor usages of new public
2296 symbols to expect 0 or 1 values rather than 1 or undefined.
2297 i.e. change #ifdef to #if, etc.
2298
2299 * numbers.h: fix various preprocessor usages of new public
2300 symbols to expect 0 or 1 values rather than 1 or undefined.
2301 i.e. change #ifdef to #if, etc.
2302
2303 * null-threads.c: fix various preprocessor usages of new public
2304 symbols to expect 0 or 1 values rather than 1 or undefined.
2305 i.e. change #ifdef to #if, etc.
2306
2307 * lang.c: fix various preprocessor usages of new public
2308 symbols to expect 0 or 1 values rather than 1 or undefined.
2309 i.e. change #ifdef to #if, etc.
2310
2311 * lang.h: fix various preprocessor usages of new public
2312 symbols to expect 0 or 1 values rather than 1 or undefined.
2313 i.e. change #ifdef to #if, etc.
2314
2315 * iselect.h: fix various preprocessor usages of new public
2316 symbols to expect 0 or 1 values rather than 1 or undefined.
2317 i.e. change #ifdef to #if, etc.
2318
2319 * init.c: fix various preprocessor usages of new public
2320 symbols to expect 0 or 1 values rather than 1 or undefined.
2321 i.e. change #ifdef to #if, etc.
2322
2323 * gh_data.c: fix various preprocessor usages of new public
2324 symbols to expect 0 or 1 values rather than 1 or undefined.
2325 i.e. change #ifdef to #if, etc.
2326
2327 * gh.h: fix various preprocessor usages of new public
2328 symbols to expect 0 or 1 values rather than 1 or undefined.
2329 i.e. change #ifdef to #if, etc.
2330
2331 * gen-scmconfig.c: change most new public symbols to be defined to
2332 0 or 1 rather than being either 1 or undefined.
2333
2334 * gc_os_dep.c: fix various preprocessor usages of new public
2335 symbols to expect 0 or 1 values rather than 1 or undefined.
2336 i.e. change #ifdef to #if, etc.
2337 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
2338
2339 * gc.h: fix various preprocessor usages of new public
2340 symbols to expect 0 or 1 values rather than 1 or undefined.
2341 i.e. change #ifdef to #if, etc.
2342
2343 * gc-card.c: fix various preprocessor usages of new public
2344 symbols to expect 0 or 1 values rather than 1 or undefined.
2345 i.e. change #ifdef to #if, etc.
2346
2347 * gc-mark.c: fix various preprocessor usages of new public
2348 symbols to expect 0 or 1 values rather than 1 or undefined.
2349 i.e. change #ifdef to #if, etc.
2350
2351 * feature.c: fix various preprocessor usages of new public
2352 symbols to expect 0 or 1 values rather than 1 or undefined.
2353 i.e. change #ifdef to #if, etc.
2354
2355 * evalext.c: fix various preprocessor usages of new public
2356 symbols to expect 0 or 1 values rather than 1 or undefined.
2357 i.e. change #ifdef to #if, etc.
2358
2359 * eval.h: fix various preprocessor usages of new public
2360 symbols to expect 0 or 1 values rather than 1 or undefined.
2361 i.e. change #ifdef to #if, etc.
2362
2363 * eval.c: fix various preprocessor usages of new public
2364 symbols to expect 0 or 1 values rather than 1 or undefined.
2365 i.e. change #ifdef to #if, etc.
2366
2367 * eq.c: fix various preprocessor usages of new public
2368 symbols to expect 0 or 1 values rather than 1 or undefined.
2369 i.e. change #ifdef to #if, etc.
2370
2371 * coop.c: fix various preprocessor usages of new public
2372 symbols to expect 0 or 1 values rather than 1 or undefined.
2373 i.e. change #ifdef to #if, etc.
2374
2375 * coop-threads.c: fix various preprocessor usages of new public
2376 symbols to expect 0 or 1 values rather than 1 or undefined.
2377 i.e. change #ifdef to #if, etc.
2378
2379 * coop-pthreads.c: fix various preprocessor usages of new public
2380 symbols to expect 0 or 1 values rather than 1 or undefined.
2381 i.e. change #ifdef to #if, etc.
2382
2383 * coop-defs.h: fix various preprocessor usages of new public
2384 symbols to expect 0 or 1 values rather than 1 or undefined.
2385 i.e. change #ifdef to #if, etc.
2386
2387 * convert.i.c: fix various preprocessor usages of new public
2388 symbols to expect 0 or 1 values rather than 1 or undefined.
2389 i.e. change #ifdef to #if, etc.
2390
2391 * continuations.c: fix various preprocessor usages of new public
2392 symbols to expect 0 or 1 values rather than 1 or undefined.
2393 i.e. change #ifdef to #if, etc.
2394
2395 * _scm.h: fix various preprocessor usages of new public symbols to
2396 expect 0 or 1 values rather than 1 or undefined. i.e. change
2397 #ifdef to #if, etc.
2398
d11d697a
MV
23992003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2400
9686f86d
MV
2401 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
2402
2403 * deprecated.c, deprecated.h: New files, to collect deprecated
2404 things in one place.
2405 * Makefile.am: Added them in all the right places.
2406
d11d697a
MV
2407 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
2408 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
2409 builds work.
9686f86d
MV
2410 (DOT_X_FILES): Removed "iselect.x".
2411 (DOT_DOC_FILES): Removed "iselect.doc".
d11d697a 2412
e3c0c3b9
RB
24132003-03-25 Rob Browning <rlb@defaultvalue.org>
2414
2415 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
2416 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
2417
2418 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
2419
2420 * vports.c: #include <config.h> if HAVE_CONFIG_H.
2421
2422 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
2423 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
2424
2425 * threads.h: replace usage of struct timespect with
2426 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
2427 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
2428 favor of scm_t_timespec from scmconfig.h.
2429
2430 * threads.c: move libguile/_scm.h include to the top so we pick up
2431 any critical defines like _GNU_SOURCE early. Replace usage of
2432 struct timespect with scm_t_timespec. Replace usage of
2433 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
2434 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
2435
2436 * threads-plugin.h: replace usage of struct timespect with
2437 scm_t_timespec.
2438
2439 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
2440 usage of struct timespect with scm_t_timespec.
2441
2442 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
2443 HAVE_INTTYPES_H handling to scmconfig.h. #include
2444 "libguile/__scm.h". Rework handling for scm_t_bits,
2445 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
2446 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
2447 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
2448 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
2449 SCM_HAVE_ARRAYS.
2450
2451 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
2452
2453 * struct.c: #include <config.h> if HAVE_CONFIG_H.
2454
2455 * strports.c: #include <config.h> if HAVE_CONFIG_H.
2456
2457 * strop.c: #include <config.h> if HAVE_CONFIG_H.
2458
2459 * stime.h: move handling of time related headers to scmconfig.h.
2460
2461 * stime.c: #include <config.h> if HAVE_CONFIG_H.
2462
2463 * stacks.c: replace usage of STACK_GROWS_UP with
2464 SCM_STACK_GROWS_UP.
2465
2466 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
2467 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
2468
2469 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
2470 of uint32 and HAVE_UINT_32 with scm_t_int32.
2471
2472 * smob.c: #include <config.h> if HAVE_CONFIG_H.
2473
2474 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
2475
2476 * script.c: #include <config.h> if HAVE_CONFIG_H.
2477
2478 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
2479
2480 * scmconfig.h.top: new file -- preamble for scmconfig.h.
2481
2482 * rw.c: #include <config.h> if HAVE_CONFIG_H.
2483
2484 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
2485
2486 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
2487
2488 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
2489
2490 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
2491 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
2492 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
2493 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
2494
2495 * ramap.c: replace usage of HAVE_LONG_LONGS with
2496 "SCM_SIZEOF_LONG_LONG != 0".
2497
2498 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
2499 "libguile/scmconfig.h".
2500
2501 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
2502
2503 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
2504 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
2505
2506 * posix.c: #include <config.h> if HAVE_CONFIG_H.
2507
2508 * ports.c: #include <config.h> if HAVE_CONFIG_H.
2509
2510 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
2511
2512 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
2513 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
2514 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
2515 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
2516 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
2517 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
2518 "SCM_SIZEOF_LONG_LONG != 0".
2519
2520 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
2521 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
2522 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
2523 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
2524
2525 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
2526
2527 * null-threads.h: replace usage of struct timespect with
2528 scm_t_timespec.
2529
2530 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
2531
2532 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
2533 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
2534 scm_t_uint64 and rename usages.
2535
2536 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
2537
2538 * load.c: #include <config.h> if HAVE_CONFIG_H.
2539
2540 * iselect.h: move handling of time related headers to scmconfig.h.
2541 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
2542 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
2543 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
2544
2545 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
2546 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
2547 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
2548
2549 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
2550
2551 * inline.h: #include "libguile/__scm.h" at the top. Change code
2552 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
2553 what to do instead of creating a new public #define. Rename usage
2554 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
2555 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
2556 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
2557
2558 * inline.c: rearrange handling -- now we just #define
2559 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
2560 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
2561 appropriate, and we use that in inline.h along with the above
2562 define to determine how to respond.
2563
2564 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
2565 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
2566
2567 * guile.c: #include <config.h> if HAVE_CONFIG_H.
2568
2569 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
2570 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
2571
2572 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
2573
2574 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
2575
2576 * gen-scmconfig.c: new file -- see comments in file for details.
2577
2578 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
2579
2580 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
2581 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
2582
2583 * gc.h: replace usage of SIZEOF_LONG with
2584 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
2585 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
2586 since we handle that in scmconfig.h now.
2587
2588 * gc.c: #include <config.h> if HAVE_CONFIG_H.
2589
2590 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
2591 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
2592 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
2593
2594 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
2595
2596 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
2597 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
2598
2599 * fports.c: #include <config.h> if HAVE_CONFIG_H.
2600
2601 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
2602
2603 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
2604 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
2605
2606 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
2607
2608 * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
2609 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
2610
2611 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
2612 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
2613 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
2614 with "SCM_SIZEOF_LONG_LONG != 0".
2615
2616 * error.c: #include <config.h> if HAVE_CONFIG_H.
2617
2618 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
2619 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
2620 with "SCM_SIZEOF_LONG_LONG != 0".
2621
2622 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
2623
2624 * coop.c: replace usage of struct timespect with scm_t_timespec.
2625 #include <config.h> if HAVE_CONFIG_H.
2626
2627 * coop-threads.c: #include "libguile/_scm.h" early. Replace
2628 usage of struct timespect with scm_t_timespec. Replace usage of
2629 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
2630
2631 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
2632 usage of struct timespect with scm_t_timespec. Replace usage of
2633 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
2634
2635 * coop-defs.h: move handling of time related headers to
2636 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
2637 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
2638 timespect with scm_t_timespec.
2639
2640 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
2641
2642 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
2643
2644 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
2645 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
2646
2647 * continuations.c: move libguile/_scm.h include to the top so we
2648 pick up any critical defines like _GNU_SOURCE early.
2649
2650 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
2651
2652 * async.c: #include <config.h> if HAVE_CONFIG_H.
2653
2654 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
2655
2656 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
2657 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
2658
2659 * __scm.h: move libguile/scmconfig.h include up to the top, so
2660 we're sure to pick up any critical defines like _GNU_SOURCE early.
2661 #include <limits.h> removed in favor of scmconfig.h inclusion when
2662 appropriate. STDC_HEADERS based inclusion of stdlib.h,
2663 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
2664 scmconfig.h inclusion when appropriate. Various Win32 related
2665 definitions removed in favor of scmconfig.h inclusion when
2666 appropriate.
2667 (HAVE_UINTPTR_T): definition removed (see NEWS).
2668 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
2669 (HAVE_LONG_LONGS): definition removed (see NEWS).
2670 (HAVE_LONG_LONG): definition removed (see NEWS).
2671 (HAVE_PTRDIFF_T): definition removed (see NEWS).
2672
2673 * Makefile.am: scmconfig.h is now generated by building and
2674 running gen-scmconfig.h and capturing its output. gen-scmconfig
2675 uses config.h and the configure.in generated gen-scmconfig.h to
2676 decide what to output. See gen-scmconfig.c for details.
2677 (noinst_PROGRAMS): add gen-scmconfig.
2678 (gen_scmconfig_SOURCES): new variable.
2679 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
2680 cross-compiling right.
2681 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
2682 (BUILT_SOURCES): add scmconfig.h.
2683
25e0bf97
MV
26842003-03-19 Marius Vollmer <mvo@zagadka.de>
2685
2686 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
2687 Adrian Bunk. Thanks!
2688
74b6d6e4
MD
26892003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2690
2691 * goops.c (make_class_from_template): New fourth arg:
2692 applicablep.
2693 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
2694 cpls.
2695
2696 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
2697
2698 * goops.c, objects.c, objects.h (scm_make_extended_class): New
2699 second arg: applicablep.
2700 (scm_i_inherit_applicable): New function.
2701
2702 * goops.c, goops.h (scm_class_applicable,
2703 scm_class_extended_accessor): New classes.
2704
5c9e7dad
DH
27052003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
2706
2707 * procs.c (scm_procedure_documentation): Removed redundant
2708 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
2709 predicates.
2710
f8af5c6d
MD
27112003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2712
c614a00b
MD
2713 * list.c, list.h (scm_filter, scm_filter_x): New functions.
2714
109c2c9f
MD
2715 * modules.c (scm_module_import_interface): New function.
2716
f8af5c6d
MD
2717 * goops.c, goops.h (scm_class_accessor_method): Renamed from
2718 scm_class_accessor.
2719 (scm_class_accessor): New class.
2720
a48d60b1
MD
27212003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2722
2723 * goops.c (scm_primitive_generic_generic): Enable primitive
2724 generic if not enabled.
2725 (scm_sys_goops_loaded): Setup unextended primitive generics.
2726
2727 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
2728
2729 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
2730 snarf macros.
2731
2732 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
2733 testing example. All uses of SCM_GPROC should be converted.)
2734
2735 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
2736 scm_assoc.
2737
2738 * eq.c (scm_equal_p): Turned into a primitive generic.
2739
84edc049
RB
27402003-02-27 Rob Browning <rlb@defaultvalue.org>
2741
2742 * Makefile.am (scmconfig.h): new target -- generate file from
2743 ../config.h.
2744 (modinclude_HEADERS): remove version.h.
2745 (nodist_modinclude_HEADERS): add version.h.
2746
ea5c9285
MD
27472003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2748
b4a1358c
MD
2749 This fixes a serious GC bug, introduced during the latest
2750 reorganization of the GC, which disabled freeing of structs and
2751 GOOPS objects:
2752
2753 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
2754 SCM_EOL.
53af8255
MD
2755 (scm_struct_prehistory): Move scm_free_structs to
2756 scm_before_mark_c_hook.
ea5c9285 2757
b4a1358c
MD
2758 * gc-card.c (sweep_card): Check that we haven't swept structs on
2759 this card before. That can happen if scm_i_sweep_all_segments has
2760 been called from some other place than scm_igc.
2761
c35738c1
MD
27622003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2763
231a4ea8
MD
2764 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
2765 (since hash tables now adapt their size).
2766
2767 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
2768 (current number of prehistory bindings; hashtable code will select
2769 a prime which is greater than this value).
2770
2771 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
2772 (current number of initial symbols).
2773
2774 * properties.c (scm_init_properties): Don't specify size of
2775 scm_properties_whash.
2776
2777 * objprop.c (scm_init_objprop): Don't specify size of
2778 scm_object_whash.
2779
2780 * keywords.c (scm_init_keywords): Don't specify a hash table size.
2781
c35738c1
MD
2782 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
2783
2784 The following changes introduce the use of resizable hash tables
2785 throughout Guile. It also renames the old *-hash-table* functions
2786 to *-alist-vector* and places them, together with the rest of the
2787 weak vector support, in the module (ice-9 weak-vector). We should
2788 probably introduce a new, better, API for weak references, for
2789 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
2790 look like and are used like ordinary pairs.)
2791
2792 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
2793 leaf_environment_fold, obarray_remove_all): Use hashtable
2794 accessors.
2795
2796 * gc.c (scm_init_storage): Moved hook initialization to
2797 scm_storage_prehistory.
2798 (scm_storage_prehistory): New function.
2799 (scm_igc): Added commentary about placement of
2800 scm_after_sweep_c_hook.
2801
2802 * gc-mark.c (scm_mark_all): Use hashtable accessors.
2803 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
2804 SCM_WVECT_WEAK_VALUE_P.
2805
2806 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
2807 functions.
2808 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
2809 Removed.
2810 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
2811 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
2812
2813 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
2814 calls to scm_storage_prehistory and scm_hashtab_prehistory.
2815
2816 * modules.c (module-reverse-lookup): Use hashtable accessors.
2817
2818 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
2819
2820 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
2821 scm_make_weak_value_alist_vector,
2822 scm_make_doubly_weak_alist_vector): New functions.
2823
2824 * weaks.c (scm_init_weaks_builtins): New function.
2825
2826 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
2827 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
2828 SCM_WVECT_NOSCAN_P): New macros.
2829
2830 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
2831 and SCM_WVECT_WEAK_VALUE_P.
2832
2833 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
2834 allocate_weak_vector and exported.
2835
0a4c1355
MD
28362003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2837
2838 * hashtab.c: Undid thread safety. (We decided that it's better to
2839 let the user explicitly protect the tables (or not) according what
2840 is suitable for the application.)
2841
87ca11ff
MD
28422003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2843
2844 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
2845 thread safe and handle resizing tables.
2846 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
2847 SCM_DEFER/ALLOW_INTS.
2848
f59a096e
MD
28492003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2850
2851 * hashtab.c (scm_vector_to_hash_table,
2852 scm_c_make_resizing_hash_table, scm_make_hash_table): New
2853 functions.
2854 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
2855 safe and handle resizing tables.
2856
2857 * weaks.c (scm_make_weak_key_hash_table,
2858 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
2859 Size argument made optional. Return resizable table if not
2860 specified.
2861
4b612c5b
MD
28622003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2863
2864 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
2865 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
2866
b3d7f6df
MD
28672003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2868
2869 * debug.c (scm_procedure_source): Handle all objects for which
2870 procedure? is #t. (Thanks to Bill Schottstaedt.)
2871
756414cf
MD
28722003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2873
361d631f
MD
2874 * futures.c (mark_futures): Don't need to mark data of recycled
2875 futures.
2876 (scan_futures, cleanup_undead): Be smarter about marking
2877 futures---avoid unnecessary passes through future lists.
2878
756414cf
MD
2879 * futures.h, futures.c: New files; Introduced recycling of
2880 futures. For fine-grained threading this lifts performance to
2881 another level. We can now use parallelization in inner loops of
2882 Guile programs without impossible overhead.
2883
2884 * threads.h, threads.c: Moved futures to their own file.
2885
2886 * Makefile.am (libguile_la_SOURCES): Added futures.c.
2887 (DOT_X_FILES): Added futures.x.
2888 (DOT_DOC_FILES): Added futures.doc.
2889 (modinclude_HEADERS): Added futures.h.
2890
2891 * threads.c, threads.h (scm_i_create_thread): Renamed from
2892 create_thread and made global.
2893
2894 * futures.c (scm_make_future): New procedure.
2895
2896 * eval.c: #include "libguile/futures.h".
2897
2898 * init.c: #include "futures.h"
2899 (scm_init_guile_1): Call scm_init_futures.
2900
2901 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
2902
2903 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
2904
2905 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
2906 functions.
2907
2908 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
2909
b4debead
MD
29102003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2911
2912 * threads.c (create_thread): Don't unwind dynwind chain of parent
2913 thread before creation. Just start the new thread with an empty
2914 dynwind chain.
2915
93f26b7b
MD
29162003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2917
2918 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
2919
38d8927c
MD
29202003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2921
41c96c32
MD
2922 * threads.c (scm_timed_wait_condition_variable): Support timed
2923 waiting also for simple condition variables.
2924
38d8927c
MD
2925 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
2926 of calling the procedure change-object-class.
2927
9cf5d9b7
MD
29282003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2929
2930 * ramap.c (scm_ramapc): Typo in error message.
2931
bbf8d523
MD
29322003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2933
b46fae00
MD
2934 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
2935 slots with instance allocation.
2936
bbf8d523
MD
2937 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
2938 class.
2939 (scm_compute_applicable_methods): Use scm_generic_function_methods.
2940
2941 * goops.c (scm_generic_function_methods): Support extended
2942 generic functions.
2943
ebf9b47c
MD
29442002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2945
2946 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
2e37d6a2 2947 Thanks to Neil for pointing this out!
ebf9b47c 2948
14a9ba3f
NJ
29492002-12-29 Neil Jerram <neil@ossau.uklinux.net>
2950
2951 * lang.h: Remove declarations matching definitions removed from
2952 lang.c (just below).
2953
c6a040a8
NJ
29542002-12-28 Neil Jerram <neil@ossau.uklinux.net>
2955
6054d805
NJ
2956 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
2957 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
2958 and already commented out.
2959
c6a040a8
NJ
2960 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
2961 scm_lreadparen): Support reading vectors with Elisp syntax if
2962 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
2963 is not currently defined, and there isn't even a configure switch
2964 to enable it yet.)
2965
3742c12f
MV
29662002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
2967
2968 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
2969 builds work.
2970 (EXTRA_DIST): Added version.h.in.
2971
fb50ef08
MD
29722002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2973
2974 This change makes it possible for one thread to do lazy sweeping
2975 while other threads are running. Now only the mark phase need to
2976 have all threads asleep. We should look further into this issue.
2977 Presently, I've put the locking of scm_i_sweep_mutex at
2978 "conservative" places due to my current lack of knowledge about
2979 the garbage collector. Please feel free to restrict these regions
2980 further to allow for maximal parallelism!
2981
2982 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
2983
2984 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
2985 scm_gc_register_collectable_memory): Substitute locking of
2986 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
2987 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
2988 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
2989 the single-thread section (which now only contains the mark
2990 phase).
2991 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
2992 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
2993
2994 * threads.c (gc_section_mutex): Removed.
2995
9ed24633
MD
29962002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
2997
0d48aca5
MD
2998 * threads.c (create_thread): Clear parent field in root state in
2999 order not to unnecessarily remember dead threads.
3000
9ed24633
MD
3001 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
3002 (scm_trampoline_1, scm_trampoline_2): Use them.
3003
29717c89
MD
30042002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
3005
3006 Partial introduction of real plugin interface.
3007
3008 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
3009 (EXTRA_DIST): Added threads-plugin.c.
3010
3011 * threads-plugin.h, threads-plugin.c: New files.
3012
3013 * threads.h: #include "libguile/threads-plugin.h".
3014
3015 * threads.c: #include "libguile/threads-plugin.c".
3016
3017 * pthread-threads.c: Temporarily remove debugging functions.
3018
3019 * threads.c, threads.h (scm_yield): Added back.
3020
e29e0b09
MD
30212002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
3022
3023 * threads.c (really_launch): Detach before unlocking
3024 thread_admin_mutex in order not to risk being joined.
3025 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
3026 thread_admin_mutex locked during GC.
3027
3028 * pthread-threads.c, pthread-threads.h: Improvements to debugging
3029 functions.
3030
0b6843b1 30312002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
93cd4dcd 3032
6da2dfc4
MD
3033 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
3034 support for debugging mutex operations.
3035
1b92fb6b
MD
3036 * threads.c (scm_thread): Removed filed joining_threads.
3037 (thread_print): Print thread number as well as address of thread
3038 structure.
0b6843b1
MD
3039 (scm_join_thread): Bugfix.
3040 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
3041 scm_timed_wait_condition_variable, scm_signal_condition_variable,
3042 scm_broadcast_condition_variable): Use the low-level API.
3043 (scm_all_threads): Return copy of thread list (to prevent
3044 unintended destruction).
3045 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
1b92fb6b 3046
93cd4dcd
MD
3047 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
3048 pthread "native" recursive mutex support.
3049
2ff4f181
MD
30502002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
3051
28d52ebb
MD
3052 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
3053 Simply lock a thread C API recursive mutex.
3054 (SCM_NONREC_CRITICAL_SECTION_START,
3055 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
3056 SCM_REC_CRITICAL_SECTION_END): Removed.
3057
3058 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
3059 direct calls to scm_rec_mutex_lock / unlock around the three calls
3060 to scm_m_expand_body.
3061
3062 * eval.c, eval.h (promise_free): New function.
3063 (scm_force): Rewritten; Now thread-safe; Removed
3064 SCM_DEFER/ALLOW_INTS.
3065
3066 * pthread-threads.h: Added partially implemented plugin interface
3067 for recursive mutexes. These are, for now, only intended to be
3068 used internally within the Guile implementation.
3069
3070 * pthread-threads.c: New file.
3071
3072 * threads.c: Conditionally #include "pthread-threads.c".
3073
3074 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
3075 thread-safe;
3076
3077 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
3078 SCM_GLOBAL_REC_MUTEX): New macros.
3079
3080 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
3081 macros---use mutexes instead.
3082
3083 * tags.h (SCM_IM_FUTURE): New tag.
3084
3085 * eval.c (scm_m_future): New primitive macro.
3086 (SCM_CEVAL): Support futures.
3087 (unmemocopy): Support unmemoization of futures.
3088
3089 * print.c (scm_isymnames): Name of future isym.
3090
2ff4f181
MD
3091 * version.c: Unmade some changes to my private copy that got
3092 committed by mistake.
3093
392d2833
MD
30942002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
3095
e200ddee
MD
3096 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
3097 2002-12-10.
3098
392d2833
MD
3099 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
3100
3101 * gc.c (scm_gc_sweep): Call it here instead, which is a more
3102 logical place.
3103
3104 * threads.c (create_thread): Remember root object until the handle
3105 of the new thread is on all_threads list.
3106
3107 * root.c (scm_make_root): Moved copying of fluids until after
3108 creation of root handle so that the fluids are GC protected. Also
3109 removed the critical section.
3110
c4c52ebe
MD
31112002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
3112
960c408c
MD
3113 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
3114
3cdde9d6 3115 * gc-malloc.c (malloc_mutex): New mutex.
960c408c 3116 (scm_gc_malloc_prehistory): Initialize it.
3cdde9d6
MD
3117 (scm_realloc): Serialize call to realloc
3118 (scm_calloc): Same for calloc.
3119 Thanks to Wolfgang Jaehrling!
3120 (Now we have to make sure all calls to malloc/realloc are made
3121 through scm_malloc.)
3122
960c408c
MD
3123 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
3124
c4c52ebe
MD
3125 * threads.c (really_launch): Release heap (to prevent deadlock).
3126 (create_thread): Release heap before locking thread admin mutex.
3127
b0dc3d71
MD
31282002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
3129
3130 * threads.c (scm_i_thread_invalidate_freelists): New
3131 function.
3132
3133 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
3134
3135 * modules.c (scm_export): Inserted a return statement.
3136
06e80f59
HWN
31372002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
3138
3139 * modules.c (scm_export): new function
3140
3141 * gc-card.c: add a note about malloc()/free() overhead.
3142
a12611c3
MD
31432002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
3144
3145 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
3146 in srcdir.
3147
c7fabadf
MD
31482002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
3149
3150 These changes remove scm_ints_disabled (which hasn't has any
3151 effect in Guile for quite some time).
3152
3153 * async.c, error.h (scm_ints_disabled): Removed.
3154
3155 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
3156 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
3157 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
3158 (old_ints): Removed.
3159
3160 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
3161 critical section.
3162 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
3163 SCM_ALLOW_INTS.
3164
9bc4701c
MD
31652002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
3166
52340b65
MD
3167 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
3168 Removed accidental #if 0 around these functions.
3169
9bc4701c
MD
3170 These changes are the start of support for preemptive
3171 multithreading. Marius and I have agreed that I commit this code
3172 into the repository although it isn't thoroughly tested and surely
3173 introduces many bugs. The bugs should only be exposed when using
3174 threads, though. Signalling and error handling for threads is
3175 very likely broken. Work on making the implementation cleaner and
3176 more efficient is needed.
3177
3178 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
3179 (SCM_NONREC_CRITICAL_SECTION_START,
3180 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
3181 SCM_REC_CRITICAL_SECTION_END): New macros.
3182 (SCM_CRITICAL_SECTION_START/END): Defined here.
3183
3184 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
3185 the three calls to scm_m_expand_body.
3186
3187 * gc.h: #include "libguile/pthread-threads.h";
3188 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
3189
3190 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
3191 scm_t_key;
3192
3193 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
3194 access.
3195
3196 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
3197
3198 * gc-freelist.c, threads.c (really_launch): Use
3199 SCM_FREELIST_CREATE.
3200
3201 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
3202
3203 * gc.c (scm_i_expensive_validation_check, scm_gc,
3204 scm_gc_for_newcell): Put threads to sleep before doing GC-related
3205 heap administration so that those pieces of code are executed
3206 single-threaded. We might consider rewriting these code sections
3207 in terms of a "call_gc_code_singly_threaded" construct instead of
3208 calling the pair of scm_i_thread_put_to_sleep () and
3209 scm_i_thread_wake_up (). Also, we would want to have as many of
3210 these sections eleminated.
3211
3212 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
3213
3214 * inline.h: #include "libguile/threads.h"
3215
3216 * pthread-threads.h: Macros now conform more closely to the
3217 pthreads interface. Some of them now take a second argument.
3218
3219 * threads.c, threads.h: Many changes.
3220
32212002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
3222
3223 * Makefile.am (version.h): Changed $^ --> $< in rule for
3224 version.h.
3225
b2cbe8d8
RB
32262002-12-08 Rob Browning <rlb@defaultvalue.org>
3227
3228 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
3229 (SCM_MINOR_VERSION): use @--@ substitution now.
3230 (SCM_MICRO_VERSION): use @--@ substitution now.
3231 (scm_effective_version): new function prototype.
3232
3233 * version.c (scm_effective_version): new function, also add
3234 effective-version.
3235
3236 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
3237 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
3238 SCM_LIBRARY_DIR.
3239 (version.h): generate this here rather than configure.in. This
3240 approach tracks source edits better (i.e. more immediately).
3241 Might be worth considering for other .in files too.
3242
5441c65c
MV
32432002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
3244
3245 Reorganized thread package selection. A thread package now only
3246 implements a small set of pthread like functions and Guile
3247 implements the rest on top of that. Guile's implementation is
3248 what the "coop-pthreads" package has been previously. Support for
3249 "coop" threads has been removed until I get time to add it again.
3250
3251 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
3252 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
3253 null-threads.c, coop-pthreads.c.
3254 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
3255 pthread-threads.h.
3256
3257 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
3258
3259 * threads.h: Do not include "libguile/coop-defs.h". Include
3260 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
3261 (previously deprecated) C level thread API prototypes. They are
3262 now in the thread package specific headers, "null-threads.h" and
3263 "pthread-threads.h".
3264 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
3265 New.
3266 (scm_threads_init): Removed.
3267 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
3268 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
3269 SCM_I_THREAD_SWITCH_COUNT): Define here.
3270 (scm_single_thread_p): Removed.
3271 (scm_call_with_new_thread): Take two args directly instead of list
3272 of two args.
3273 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
3274 SCM_SET_THREAD_LOCAL_DATA): Define here.
3275
3276 * threads.c: Merged with "coop-pthreads.c".
3277
3278 * null-threads.h: Implement pthread-like API as a set of macros.
3279
3280 * pthread-threads.h: New, implement pthread-like API by deferring
3281 to pthread itself.
3282
3283 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
3284 has been lost in the reorganization.
3285
504d99c5
MD
32862002-12-01 Mikael Djurfeldt <mdj@linnaeus>
3287
3288 The following change makes it possible to move procedure
3289 application dispatch outside inner loops. The motivation was
3290 clean implementation of efficient replacements of R5RS primitives
3291 in SRFI-1.
3292
3293 The semantics is clear: scm_trampoline_N returns an optimized
3294 version of scm_call_N (or NULL if the procedure isn't applicable
3295 on N args).
3296
3297 Applying the optimization to map and for-each increases efficiency
3298 noticeably. For example, (map abs ls) is 8 times faster than
3299 before.
3300
3301 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
3302
3303 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
3304
3305 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
3306 (map, for-each): Handle also application on two args as a special
3307 case; Use trampolines.
3308
3309 Other changes:
3310
3311 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
3312 (subr2oless): Removed.
3313 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
3314 vector GC protected.
3315
3316 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
3317 scm_out_of_range.
3318
63dd3413
DH
33192002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
3320
3321 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
3322
4ba5f279
MD
33232002-11-17 Mikael Djurfeldt <mdj@linnaeus>
3324
3325 * debug.c (scm_make_iloc): Added missing "return".
3326
56ae231f
MV
33272002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
3328
3329 * strports.c (scm_eval_string_in_module): Validate second arg to
3330 be a module. Thanks to Arno Peters!
3331
80b28865
DH
33322002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
3333
3334 * .cvsignore: remove goops.c
3335
c88b1456
DH
33362002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
3337
3338 * modules.c (scm_env_top_level, scm_lookup_closure_module,
3339 module_variable, scm_module_lookup_closure,
3340 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
3341 scm_system_module_env_p): Don't compare SCM values with C
3342 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
3343 over SCM_NFALSEP.
3344
a8a19efc
DH
33452002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
3346
3347 * eval.h (SCM_MAKE_ILOC): New macro.
3348
3349 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
3350 the iloc bitpattern here.
3351
76734914
MD
33522002-11-14 Mikael Djurfeldt <mdj@linnaeus>
3353
3354 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
3355 part of the API, otherwise it's difficult to write Guile
3356 extensions using non-blocking I/O => moved #include
3357 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
3358
3359 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
3360 s_unlock_mutex.
3361
8b5b4a75
MV
33622002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
3363
3364 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
3365 are defined in configure.in.
3366
3367 * threads.c: Removed SCM_API from function definitions. SCM_API
3368 is only for declarations.
3369
e5a83084
MD
33702002-11-07 Mikael Djurfeldt <mdj@linnaeus>
3371
9be8bb45
MD
3372 * coop-pthreads.h: Added support for thread specific data to the
3373 generic C API for the coop-pthreads case.
3374
e5a83084
MD
3375 * threads.c, threads.h (scm_cond_init): Undo unintentional API
3376 change.
6c214b62 3377 (scm_cond_broadcast): Added missing function.
e5a83084 3378
7edf178e
MV
33792002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3380
3381 * coop.c (coop_next_runnable_thread): Removed, wich should have
3382 happened when GUILE_ISELECT was hard-wired.
3383
7f5b1b77
MV
33842002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
3385
7caa1b07
MV
3386 * Makefile.am (libguile_la_SOURCES): Added threads.c
3387 (DOT_DOC_FILES): Added threads.doc.
3388 (DOT_X_FILES): Added threads.x.
3389 (EXTRA_libguile_la_SOURCES): Removed threads.c.
3390 (noinst_HEADERS): Added coop-pthreads.c.
3391 (modinclude_HEADERS): Added coop-pthreads.h.
3392
3393 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
3394 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
3395
bb11cbf4
MV
3396 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
3397 Thanks to Bill Schottstaedt!
3398
1d4cbbed
MV
3399 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
3400
7f5b1b77
MV
3401 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
3402 SCM_COPT_THREADS is defined.
3403 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
3404 is defined.
3405
3406 * coop-pthreads.c: Some harmless renamings of internal stuff.
3407 (create_thread): New, generalized version of
3408 scm_call_with_new_thread.
3409 (scm_call_with_new_thread): Use it.
3410 (scm_spawn_thread): New, use create_thread.
3411
d52f53b1
MV
34122002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
3413
3414 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
3415 start testing it now.
3416
3417 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
3418 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
3419 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
3420 is defined.
3421
30f920c3
MV
34222002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
3423
3424 * scmsigs.c (signal_cell_handlers, install_handler_data,
3425 scm_delq_spine_x, really_install_handler, install_handler): New
3426 scheme for triggering signal handlers, to simplify take_signal.
3427 (take_signal): Simplified, to avoid race conditions.
3428 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
3429 hasn't exited yet.
3430
3431 * async.c (scm_async_click): Reset pending_asyncs, handle
3432 signal_asyncs. Don't set cdr of a non-signal async to #f.
3433 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
3434 always. Set pending_asyncs.
3435 (scm_system_async_mark_for_thread): Check that thread has not
3436 exited.
3437 (scm_unmask_signals, decrease_block): Call scm_async_click after
3438 block_asyncs becomes zero.
3439
3440 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
3441 active_asyncs.
3442
3443 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
3444 fields.
3445 * root.c (root_mark): Mark them.
3446 (make_root): Initialize them.
3447
3448 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
3449 USE_COOP_THREADS.
3450 (scm_internal_select): Define one version for USE_COOP_THREADS and
3451 one for USE_NULL_THREADS.
3452 (scm_init_iselect): Likewise.
3453
3454 * inline.h (scm_cell, scm_double_cell): Also allow
3455 USE_COPT_THREADS to not protect the slot initializers.
3456
3457 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
3458 because threads need to be initialized before the stack, but
3459 gsubrs such as scm_timed_condition_variable_wait can only be
3460 created later.
3461
3462 * threads.h: Include "coop-pthreads.h" when requested.
3463 (scm_threads_make_mutex, scm_threads_lock_mutex,
3464 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
3465 not implemented anyway.
3466 (scm_init_thread_procs, scm_try_mutex,
3467 scm_timed_condition_variable_wait,
3468 scm_broadcast_condition_variable, scm_c_thread_exited_p,
3469 scm_thread_exited_p): New prototypes.
3470 (struct timespec): Define if not already defined.
3471 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
3472 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
3473 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
3474 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
3475 deprecated.
3476
3477 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
3478 requested.
3479 (scm_thread_exited_p): New.
3480 (scm_try_mutex, scm_broadcast_condition_variable): Newly
3481 registered procedures.
3482 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
3483 Use the latter as the procedure for "wait-condition-variable",
3484 thus offering a optional timeout parameter to Scheme.
3485 (scm_wait_condition_variable): Implement in terms of
3486 scm_timed_wait_condition_variable.
3487 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
3488 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
3489 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
3490 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
3491 scm_make_mutex, etc, and deprecate.
3492 (scm_init_threads): Do not create smobs, leave this to
3493 scm_threads_init. Do not include "threads.x" file.
3494 (scm_init_thread_procs): New, include "threads.x" here.
3495
3496 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
3497 scm_null_mutex_lock, scm_null_mutex_unlock,
3498 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
3499 scm_null_condvar_wait, scm_null_condvar_signal,
3500 scm_null_condvar_destroy): Removed.
3501 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
3502 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
3503 scm_cond_destory): Do not define, they are now deprecated and
3504 handled by threads.{h,c}.
3505
3506 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
3507 (scm_threads_init): Create smobs here, using the appropriate
3508 sizes.
3509 (block): Removed, now unused.
3510 (scm_c_thread_exited_p): New.
3511 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
3512 scm_null_mutex_destroy, scm_null_condvar_init,
3513 scm_null_condvar_wait, scm_null_condvar_signal,
3514 scm_null_condvar_destroy): Removed and updated users to do their
3515 task directly.
3516 (scm_try_mutex, timeval_subtract,
3517 scm_timed_wait_condition_variable,
3518 scm_broadcast_condition_variable): New.
3519 (scm_wait_condition_variable): Removed.
3520
3521 * coop-defs.h (coop_m): Added 'level' field.
3522 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
3523 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
3524 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
3525 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
3526 define.
3527 (coop_condition_variable_broadcast): New.
3528
3529 * coop-threads.c (scm_threads_init): Create smobs here, using the
3530 appropriate sizes.
3531 (scm_c_thread_exited_p, scm_try_mutex,
3532 scm_timed_wait_condition_variable,
3533 scm_broadcast_condition_variable): New.
3534 (scm_wait_condition_variable): Removed.
3535
3536 * coop.c (coop_new_mutex_init): Initialize level.
3537 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
3538 level.
3539 (coop_condition_variable_signal): Renamed to
3540 coop_condition_variable_broadcast and reimplemented in terms of
3541 that. Thus...
3542 (coop_condition_variable_broadcast): New.
3543
3544 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
3545
3546 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
3547
087ed40d
MV
35482002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
3549
65a23095
MV
3550 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
3551 of system headers.
3552
087ed40d
MV
3553 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
3554 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
30f920c3 3555 give better error messages. Thanks to Bill Schottstaedt!
087ed40d 3556
5ec1d2c8
DH
35572002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
3558
3559 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
3560 scm_definedp to scm_defined_p and deprecated scm_definedp.
3561
100ae50d
DH
35622002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
3563
3564 * async.h, async.c (scm_system_async): Fixed deprecation to work
3565 correctly when deprecated features are excluded.
3566
2794cb50
MV
35672002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3568
3569 * async.c (scm_system_async_mark_for_thread): Validate thread
3570 argument.
3571
3572 * coop-threads.c (scm_i_thread_root): Do not validate argument.
3573
3574 * feature.c (scm_init_feature): Don't add 'threads' for
3575 USE_NULL_THREADS.
3576
3577 * inline.h (scm_cell, scm_double_cell): Also allow
3578 USE_NULL_THREADS to not protect the slot initializers.
3579
3580 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
3581 "USE_THREAD".
3582
3583 * Makefile.am (noinst_HEADERS): Added null-threads.c.
3584 (modinclude_HEADERS): Added null-threads.h.
3585
3586 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
3587 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
3588 (scm_init_threads): Use generic type names scm_t_mutex and
3589 scm_t_cond instead of coop_m and coop_c.
3590
3591 * null-threads.c, null-threads.h: New files.
3592
ff810d7a
MV
35932002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
3594
3595 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
3596 This is to support makes that know about "$<" only in pattern
3597 rules, like Sun's make.
3598
a90bdb73
MV
35992002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
3600
3601 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
3602 substitution. Thanks to David Allouche!
3603
e71a8bf2
DH
36042002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
3605
3606 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
3607 !SCM_ENABLE_DEPRECATED.
3608
41f77ff5
MV
36092002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3610
504d99c5 3611 * async.c (scm_system_async_mark_for_thread): Only call
41f77ff5
MV
3612 scm_i_thread_root when USE_THREADS is defined. Use scm_root
3613 otherwise.
3614
3615 * scmsigs.c (take_signal): Only call scm_i_thread_root when
3616 USE_THREADS is defined. Use scm_root otherwise.
3617 (scm_sigaction_for_thread): Ignore THREAD argument when
3618 USE_THREADS is not defined. Also, move THREAD argument defaulting
3619 out of HAVE_SIGACTION section, which was a bug.
3620
6d16b125
MV
36212002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3622
3623 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
3624 signal_handlers, not the closure that is used as the async.
3625 The closure is stored in signal_handler_cells, as previously.
3626
acfa1f52
MV
36272002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
3628
3629 * root.h (scm_root_state): Added 'block_async' slot.
3630 (scm_active_asyncs): Removed abbrev.
3631 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
3632
3633 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
3634 abbrev.
3635
3636 * async.h (scm_call_with_blocked_asyncs,
3637 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
3638 scm_c_call_with_unblocked_asyncs): New prototypes.
3639 (scm_mask_signals, scm_unmask_signals): Deprecated.
3640 (scm_mask_ints): Turned into a macro.
3641 * async.c (scm_mask_ints): Removed.
3642 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
3643 this should not be necessary.
3644 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
3645 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
3646 deprecation warning and check for errornous use. Set block_asyncs
3647 instead of scm_mask_ints.
3648 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
3649 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
3650 scm_c_call_with_unblocked_asyncs): New.
3651
3652 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
3653 Asyncs are enabled by default.
3654
34010f56
NJ
36552002-10-09 Neil Jerram <neil@ossau.uklinux.net>
3656
3657 * vports.c (scm_make_soft_port): Allow vector argument to carry a
3658 6th element: an input waiting thunk.
3659 (sf_input_waiting): New.
3660
9310d6f2
MV
36612002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
3662
3663 * root.c (root_mark): Mark active_asyncs slot.
3664
3665 * async.c (scm_async_click): Set the cdr of a executed handler
3666 cell to SCM_BOOL_F, not SCM_EOL.
3667 (scm_i_queue_async_cell): Queue the cell at the end of the list,
3668 and only if the handler procedure is not already present.
3669 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
3670 with SCM_BOOL_F.
3671 * scmsigs.c (scm_sigaction_for_thread): Likewise.
3672
ac48c719
RB
36732002-10-04 Rob Browning <rlb@defaultvalue.org>
3674
1360a142
RB
3675 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
3676
3677 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
3678 scm_lt_dlopenext, and scm_lt_dlerror.
3679 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
3680 and scm_lt_dlerror.
3681 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
3682 and scm_lt_dlerror.
3683 (sysdep_dynl_init): switch to scm_lt_dlinit();
3684
3685 * Makefile.am (libguile_la_LIBADD): switch to use
3686 libguile-ltdl.la.
3687
504d99c5 3688 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
ac48c719 3689
497092c9
MV
36902002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
3691
3692 * scmsigs.h (scm_sigaction_for_thread): New prototype.
3693 * scmsigs.c (got_signal): Removed.
3694 (signal_handler_cells, signal_handler_threads): New.
3695 (take_signal): Queue the cell of the signal for the specified
3696 thread. Reset the signal handler on systems that don't have
3697 sigaction.
3698 (sys_deliver_signals): Removed.
3699 (close_1): New.
3700 (scm_sigaction_for_thread): Renamed from scm_sigaction and
3701 extended to also set the thread of a signal and allocate a cell
3702 for it. Keep the Scheme name "sigaction". Check that signum is
3703 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
3704 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
3705 (scm_init_scmsigs): Allocate signal_handler_cells and
3706 signal_handler_threads vectors.
3707
3708 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
3709 that system asnycs and user asyncs are separated. Reimplemented
3710 system asyncs to work per-thread.
3711
3712 * gc.c (scm_init_gc): Do not use scm_system_async.
3713
3714 * async.h (scm_asyncs_pending, scm_set_tick_rate,
3715 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
3716 Removed prototypes.
3717 (scm_i_queue_async_cell): New.
3718
3719 * __scm.h (scm_asyncs_pending_p): Removed.
3720 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
3721 scm_asyncs_pending_p.
3722
3723 * async.h (scm_system_async_mark_for_thread): New prototype.
3724
3725 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
3726
3727 * root.h (scm_root_state): Added new "active_asyncs" slot.
3728 * root.c (scm_make_root): Initialize it to SCM_EOL.
3729
3730 * coop-defs.h (coop_t): Added new "handle" slot.
3731 * coop-threads.c (all_threads, scm_current_thread,
3732 scm_all_threads, scm_i_thread_root): New.
3733 (scm_threads_init): Add main thread to all_threads.
3734 (scheme_launch_thread): Remove thread from all_threads when it
3735 terminates.
3736 (scm_call_with_new_thread): Initialize handle slot of coop_t
3737 structure and add new thread to all_threads.
3738 (scm_spawn_thread): Likewise.
3739
3740 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
3741 * threads.c (scm_current_thread, scm_all_threads): Register as
3742 primitives.
3743
3744 * dynl.c: Use scm_lt_ prefix for libltdl functions.
3745
480fa28d
NJ
37462002-09-29 Neil Jerram <neil@ossau.uklinux.net>
3747
3748 * script.c (scm_compile_shell_switches): Fix bad spelling of
3749 `explicitly' in comment.
3750
37512002-09-28 Neil Jerram <neil@ossau.uklinux.net>
3752
3753 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
3754 Refer to provided? in doc string rather than deprecated feature?.
3755
3553e1d1
GH
37562002-09-24 Gary Houston <ghouston@arglist.com>
3757
3758 * inline.h (scm_double_cell): prevent reordering of statements
3759 with any following code (for GCC 3 strict-aliasing).
3760 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
3761 the earlier version of the reordering prevention.
3762
4ad0814a
HWN
37632002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
3764
3765 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
3766
e88e4f2e
HWN
37672002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
3768
3769 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
3770 protection.
3771
1e71eafb
HWN
37722002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
3773
3774 * inline.h: include stdio.h
3775
3776 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
3777
61ef9c1f
HWN
37782002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
3779
dac04e9f
HWN
3780 * gc-segment.c (scm_i_make_initial_segment): check user settings
3781 for sanity.
3782
3783 * gc-malloc.c (scm_gc_init_malloc): check user settings for
3784 sanity.
dac04e9f
HWN
3785
3786 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
3787
ffd72400
HWN
3788 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
3789
3790 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
1e71eafb
HWN
3791 these won't ever wrap around with high memory usage. Thanks to
3792 Sven Hartrumpf for finding this.
ffd72400 3793
5bd4a949
HWN
3794 * gc-freelist.c: include <stdio.h>
3795
61ef9c1f
HWN
3796 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
3797
ffd0ef3b
MV
37982002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
3799
a27e3d14
MV
3800 * vectors.h (SCM_VECTOR_REF): New.
3801
ffd0ef3b
MV
3802 * snarf.h (SCM_DEFINE_PUBLIC): New.
3803
f8a1712b
MV
38042002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
3805
3806 * socket.c (scm_addr_vector): Added size of address to arguments.
3807 Use it to avoid accessing a non-existent path in a sockaddr_un.
3808 Changed all callers.
3809
7200a36b
HWN
38102002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
3811
1383773b
HWN
3812 * gc.h: remove DOUBLECELL card flags.
3813
3814 * gc-malloc.c (scm_calloc): try to use calloc() before calling
3815 scm_realloc().
3816
3817 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
3818 init loop; handle this from scm_init_card_freelist()
3819
3820 * gc-card.c (scm_init_card_freelist): init bit vector here.
3821
7200a36b 3822 * numbers.c (scm_make_real): prevent reordering of statements
8fa5786d 3823 num2float.i.c (FLOAT2NUM): idem
7200a36b 3824
9981de3a
HWN
38252002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
3826
3827 * eval.h: prepend libguile/ to include path
3828
19647556
MV
38292002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
3830
3831 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
3832