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