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