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