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