*** empty log message ***
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
03a3e941
DH
12003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
2
3 * eval.c (s_bad_formals, s_bad_formal, s_duplicate_formal): New
4 static identifiers.
5
6 (s_clauses, s_formals, s_duplicate_formals): Removed.
7
8 (scm_m_lambda): Use ASSERT_SYNTAX to signal syntax errors. Be more
9 specific about the kind of error that was detected. Prepare for
10 easier integration of changes for separated memoization.
11
4610b011
DH
122003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
13
14 * eval.c (s_duplicate_binding): New static identifier.
15
16 (scm_m_case): Call scm_c_memq instead of implementing it inline.
17
18 (scm_m_define): Added comment about how we check for duplicate
19 formals.
20
21 (scm_m_do): Added check for duplicate bindings.
22
23 (scm_m_if): Use ASSERT_SYNTAX to signal syntax errors. Avoid
24 unnecessary consing when creating the memoized code.
25
26 (scm_c_improper_memq, c_improper_memq, scm_m_lambda): Renamed
27 scm_c_improper_memq to c_improper_memq, since it is not exported.
28
29 (transform_bindings): Call scm_c_memq rather than
30 scm_c_improper_memq.
31
32 (SCM_CEVAL): Simplified handling of SCM_IM_IF forms.
33
a954ce1d
DH
342003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
35
36 * eval.c (s_bad_bindings, s_bad_binding, s_bad_exit_clause): New
37 static identifiers.
38
39 (scm_m_do): Use ASSERT_SYNTAX to signal syntax errors. Be more
40 specific about the kind of error that was detected. Avoid use of
41 SCM_CDRLOC. Avoid unnecessary consing when creating the memoized
42 code, this way also making sure that file name, line number
43 information etc. remain available.
44
8ae95199
DH
452003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
46
47 * eval.c (memoize_as_thunk_prototype): New static function.
48
49 (scm_m_delay, scm_m_future): Use memoize_as_thunk_prototype.
50 Avoid unnecessary consing when creating the memoized code.
51
9b9a35b6
KR
522003-10-12 Kevin Ryde <user42@zip.com.au>
53
54 * list.c (scm_append): Track argument number and use in error.
55
cc56ba80
DH
562003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
57
58 * eval.c (s_missing_expression, s_bad_variable): New static
59 identifiers.
60
61 (scm_m_define): Use ASSERT_SYNTAX to signal syntax errors. Prefer
62 R5RS terminology for the naming of variables. Be more specific
63 about the kind of error that was detected. Make sure file name,
64 line number etc. are added to all freshly created expressions.
65 Avoid unnecessary consing when creating the memoized code.
66
609a8b86
DH
672003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
68
69 * eval.c (s_extra_expression, s_misplaced_else_clause,
70 s_bad_cond_clause, s_missing_recipient): New static identifiers.
71
72 (s_extra_case_clause): Removed.
73
74 (scm_m_case, scm_m_cond): If a clause appears after an else
75 clause, report a misplaced else clause.
76
77 (scm_m_cond): Use ASSERT_SYNTAX to signal syntax errors. Be more
78 specific about the kind of error that was detected. Handle bound
79 'else and '=>. Avoid unnecessary consing when creating the
80 memoized code.
81
82 (scm_m_cond, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
83 the syntactic keyword 'else and SCM_IM_ARROW to memoize the
84 syntactic keyword '=>.
85
58a2510b
DH
862003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
87
88 * eval.c (scm_m_case): Allow empty lists of case labels.
89
2a6f7afe
DH
902003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
91
92 * tags.h (SCM_IM_ELSE, SCM_IM_ARROW): New memoizer codes.
93
94 * print.c (scm_isymnames): Add names for the new memoizer codes.
95
96 * eval.c (s_missing_clauses, s_bad_case_clause,
97 s_extra_case_clause, s_bad_case_labels, s_duplicate_case_label,
98 literal_p): New static identifiers.
99
100 (scm_m_case): Use ASSERT_SYNTAX to signal syntax errors. Be more
101 specific about the kind of error that was detected. Check for
102 duplicate case labels. Handle bound 'else. Avoid unnecessary
103 consing when creating the memoized code.
104
105 (scm_m_case, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
106 the syntactic keyword 'else.
107
e6729603
DH
1082003-10-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
109
110 * eval.c (s_bad_expression, syntax_error_key, syntax_error,
111 ASSERT_SYNTAX, ASSERT_SYNTAX_2): New static identifiers.
112
113 (scm_m_and): Use ASSERT_SYNTAX to signal syntax errors. Avoid
114 unnecessary consing when creating the memoized code.
115
9ddeb776
KR
1162003-10-09 Kevin Ryde <user42@zip.com.au>
117
118 * numbers.c (scm_inexact_to_exact): Don't depend on what double->long
119 cast gives for values bigger than a long, or for nan or inf.
120
df5af69a
DH
1212003-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
122
123 * smob.h (scm_make_smob_type): Made the declaration match the
124 definition.
125
da0e6c2b
MV
1262003-10-07 Marius Vollmer <mvo@zagadka.de>
127
128 * goops.c, objects.h, smob.c, smob.h: Make type names char
129 const * instead of char *. Thanks to Paul Jarc!
130
591924eb
KR
1312003-10-02 Kevin Ryde <user42@zip.com.au>
132
ff6ea7b9 133 * strports.c (scm_call_with_output_string): scm_get_output_string
591924eb
KR
134 rather than scm_strport_to_string, so as to guard against the port
135 having been closed by the called procedure. Reported by Nic Ferrier.
136
f03314f9
DH
1372003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
138
139 * numbers.h (SCM_INEXACTP): Removed uses of SCM_TYP16S.
140
141 * tags.h, deprecated.h (SCM_TYP16S): Deprecated and moved from
142 tags.h to deprecated.h.
143
534c55a9
DH
1442003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
145
146 This set of patches introduces a new tc7 code scm_tc7_number for
147 numbers. Bignums, reals and complex numbers are turned from smobs
148 into subtypes of scm_tc7_number.
149
150 * tags.h (scm_tc7_number): New.
151
152 * eq.c (scm_equal_p), eval.c (SCM_CEVAL), evalext.c
153 (scm_self_evaluating_p), gc-card.c (scm_i_sweep_card), gc-mark.c
154 (scm_gc_mark_dependencies), goops.c (create_smob_classes), hash.c
155 (scm_hasher), numbers.c, numbers.h (SCM_NUMP), objects.c
156 (scm_class_of), print.c (scm_iprin1), smob.c
157 (scm_smob_prehistory): Don't handle bignums, reals and complex
158 numbers as subtypes of scm_tc7_smob any more.
159
160 * numbers.h, tags.h (scm_tc16_big, scm_tc16_real,
161 scm_tc16_complex): Moved definitions from tags.h to numbers.h.
162
29c4382a
DH
1632003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
164
165 * numbers.c (scm_make_complex), gc-card.c (scm_i_sweep_card): Use
166 sizeof (scm_t_complex) to determine the memory size of the
167 malloc'd area for complex numbers.
168
47ae1f0e
DH
1692003-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
170
171 * numbers.c (scm_bigequal): Fixed.
172
859b6b2f
MV
1732003-09-16 Marius Vollmer <mvo@zagadka.de>
174
175 * stime.c (scm_current_time): 'time' does not set errno so don't
176 use SCM_SYSERROR for reporting errors.
177
e17d318f
DH
1782003-09-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
179
180 This set of patches eliminates the dependency between the
181 implementation of evaluator specific memoization codes and special
182 constants like #f, '() etc. ('flags'), which are not evaluator
183 specific. The goal is to remove definitions of evaluator
184 memoization codes completely from the public interface. This will
185 make it possible to experiment more freely with optimizations of
186 guile's internal representation of memoized code.
187
188 * objects.c (scm_class_of): Eliminate dependency on SCM_ISYMNUM.
189
190 * print.c (iflagnames): New array, holding the printed names of
191 guile's special constants ('flags').
192
193 (scm_isymnames): Now holds only the printed names of the
194 memoization codes.
195
196 (scm_iprin1): Separate the handling of memoization codes and
197 guile's special constants.
198
199 * tags.h (scm_tc9_flag, SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA,
200 SCM_IFLAGNUM): new
201
202 (scm_tc8_char, scm_tc8_iloc, SCM_BOOL_F, SCM_BOOL_T,
203 SCM_UNDEFINED, SCM_EOF_VAL, SCM_EOL, SCM_UNSPECIFIED, SCM_UNBOUND,
204 SCM_ELISP_NIL, SCM_IM_DISPATCH, SCM_IM_SLOT_REF,
205 SCM_IM_SLOT_SET_X, SCM_IM_DELAY, SCM_IM_FUTURE,
206 SCM_IM_CALL_WITH_VALUES, SCM_IM_NIL_COND, SCM_IM_BIND): Changed
207 values.
208
209 (SCM_IFLAGP): SCM_IFLAGP now only tests for flags.
210
211 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Generalized to use the
212 tc9 macros and scm_tc9_flag.
213
eecac806
MV
2142003-09-15 Marius Vollmer <mvo@zagadka.de>
215
216 * posix.c (scm_setgroups): Check that the gid list is not too
217 long. Thanks to Paul Jarc!
218
22f2cf2d
DH
2192003-09-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
220
221 * tags.h: Reduced the number of short instructions from 14 to 13.
222 The typecode of the former 14th short instruction is now used to
223 represent long instructions. Changed some comments to reflect
224 this fact.
225
226 (SCM_MAKISYM): ISYMs get a new tc7 code, namely the one that was
227 previously used by SCM_IM_DEFINE.
228
229 (SCM_IM_DEFINE): Turned into a long instruction.
230
231 * eval.c (unmemocopy, SCM_CEVAL): Treat SCM_IM_DEFINE as a long
232 instruction.
233
234 * eval.c (SCM_CEVAL): Since characters and iflags have now a tc7
235 code that is separate from all instructions, one level of dispatch
236 for long instructions can be eliminated.
237
238 * print.c (scm_isymnames): Removed some commented code.
239
62f548e1
MV
2402003-09-12 Marius Vollmer <mvo@zagadka.de>
241
97a61c5f
MV
242 * __scm.h (SCM_FENCE): Use __memory_barrier with the Intel
243 compiler on IA64.
244
50e0ba57
MV
245 * hashtab.h (scm_tc16_hashtable): Added "extern" declaration.
246
247 * modules.c (scm_module_reverse_lookup): Check that the obarray
248 really is a hashtable and do nothing if not.
249
62f548e1
MV
250 * inline.h: Use "extern inline" only with GCC. Use "static
251 inline" else.
252
0d5e3480
DH
2532003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
254
255 * numbers.h (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Removed uses
256 of SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
257
258 * numbers.h, deprecated.h (SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP,
259 SCM_SLOPPY_COMPLEXP): Deprecated and moved from numbers.h to
260 deprecated.h.
261
6b412e91
DH
2622003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
263
264 * eq.c (scm_eqv_p, scm_equal_p): Removed uses of
265 SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
266
267 * eq.c (scm_eqv_p, scm_equal_p): Reordered comparisons from
268 0.0==some_expression to some_expression==0.0. The latter is
269 better readable. The former is preferred by some people, since it
270 leads to a compiler error when confusing == with =. However, when
271 using gcc, a warning will be issued if in an if-statement an
272 assigment appears. Since many Guile developers are using gcc,
273 such errors will not remain unnoticed anyway. We can therefore
274 focus on better readability.
275
7e3b25bf
DH
2762003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
277
278 * tags.h: Added description of Guile's type system. Removed some
279 old and misleading comments.
280
3ea39242
DH
2812003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
282
283 * unit.c (scm_cvref): Eliminate unnecessary uses of SCM_NIMP,
284 SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
285
5d7d39ff
DH
2862003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
287
288 * numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
289
290 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the
291 respective SLOPPY macro.
292
baa84a20
DH
2932003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
294
295 * eq.c (scm_equal_p): Use SCM_TYP7 to check if an object is of
296 type string, not SCM_TYP7S.
297
ba15f500
KR
2982003-09-03 Kevin Ryde <user42@zip.com.au>
299
300 * numbers.c (scm_lognot): Correction to docstring, ones-complement not
301 2s-complement.
302
53bb8782
KR
303 * stime.c (scm_strptime): Add comment about glibc strptime %s and
304 current timezone requiring SCM_DEFER_INTS.
305
defdc4b4
NJ
3062003-08-30 Neil Jerram <neil@ossau.uklinux.net>
307
308 * script.c (scm_compile_shell_switches): Make -s switch optional
309 if file to be loaded does not begin with a `-'. (Thanks to Aaron
310 VanDevender for the patch!)
311
0f008a15
KR
3122003-08-30 Kevin Ryde <user42@zip.com.au>
313
314 * numbers.c (scm_lognot): Rewrite using ~ and mpz_com, for directness
315 and to have non-integer types rejected as per other logical funcs.
316
438a3ba1
KR
3172003-08-28 Kevin Ryde <user42@zip.com.au>
318
319 * gc.h (scm_remember_upto_here_1): Revise comments on the asm form.
320
98dceb37
KR
3212003-08-23 Kevin Ryde <user42@zip.com.au>
322
323 * simpos.c (scm_system): Remove SCM_DEFER_INTS, system() should be
324 thread safe, and could take a long time too.
325
1fa79a38
KR
3262003-08-22 Kevin Ryde <user42@zip.com.au>
327
328 * numbers.c (scm_difference): Correction to bignum - negative inum.
329
d97f9b42
KR
3302003-08-14 Kevin Ryde <user42@zip.com.au>
331
332 * gc.h (scm_remember_upto_here_1, scm_remember_upto_here_2)
333 [__GNUC__]: Use volatile asm macros rather than a function call.
334 * gc.c (scm_remember_upto_here_1, scm_remember_upto_here_2): Undefine
335 macros while defining functions.
336
337 * simpos.c (getenv): Use <stdlib.h> for prototype.
338 (scm_system): In docstring, refer to status:exit-val rather than
339 "functions above".
340
b9052fcc
KR
3412003-08-09 Kevin Ryde <user42@zip.com.au>
342
343 * srcprop.c (scm_source_properties): Return plist from hash if it's a
344 list set by source-properties! rather than an SRCPROPS object,
345
8e5b4b9e
KR
3462003-07-29 Kevin Ryde <user42@zip.com.au>
347
348 * properties.c (scm_primitive_property_ref): In docstring, note
349 parameters to not-found-proc, use hyphens rather than underscores for
350 that parameter name.
351 (scm_primitive_property_set_x): In docstring, VAL is the value
352 parameter not CODE.
353
20703ac4
MV
3542003-07-27 Marius Vollmer <mvo@zagadka.de>
355
c6ccee34
MV
356 * print.c (scm_print_symbol_name): handle more weird characters by
357 escaping the symbol name properly. Thanks to Paul Jarc!
358
2f4931bf
MV
359 * posix.h (scm_setgroups): New prototype.
360 * posix.c (scm_setgroups): New. Thanks to Paul Jarc!
361 (scm_getgroups): Handle groups ids that don't fit into a fixnum.
362 Don't use SCM_WRITABLE_VELTS.
363
265c456f
MV
364 * gc.h (SCM_GC_SET_CELL_BVEC): New.
365 * gc-card.c (scm_i_init_card_freelist): Use it. Thanks to
366 Matthias Koeppe!
367
20703ac4
MV
368 * __scm.h (SCM_C_INLINE_KEYWORD): New.
369 * numbers.c: Use it in place of SCM_C_INLINE so that the code
370 compiles when SCM_C_INLINE is undefined.
371
59c4bb82
DH
3722003-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
373
374 * __scm.h: Reformulated the architecture and compiler properties
375 in terms of properties of scm_t_bits and SCM variables rather than
376 in terms of c standard types. This is since it is not known which
377 of the standard types scm_t_bits and SCM variables will be defined
378 to.
379
d7850c8d
KR
3802003-07-24 Kevin Ryde <user42@zip.com.au>
381
382 * numbers.c (scm_angle): Use scm_flo0 for non-negative inum, bignum
383 and real.
384
8a0c514f
KR
3852003-07-18 Kevin Ryde <user42@zip.com.au>
386
387 * numbers.c (scm_product): In complex * bignum, correction to
388 REAL/IMAG fetch, x is the complex, not y.
389
0aacf84e
MD
3902003-07-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
391
392 * numbers.c (scm_odd_p, scm_even_p): Bugfix: Treat result of
393 scm_inf_p test as Scheme values.
394 (scm_sum): Bugfix: Normalize bignum created from a negative bignum
395 and a positive inum.
396 Use GNU indentation style.
397
192de9a4
DH
3982003-07-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
399
400 * values.c (scm_values): Build lists of length 1 by using
401 scm_list_1 instead of using scm_cons.
402
bbb4438a
KR
4032003-07-10 Kevin Ryde <user42@zip.com.au>
404
b58c85ce
KR
405 * deprecation.c (scm_c_issue_deprecation_warning_fmt): Add va_end.
406 * list.c (scm_list_n): Ditto.
407
bbb4438a
KR
408 * gc-malloc.c (scm_gc_realloc): Define "ptr" at start of function.
409
287f8ad1
KR
4102003-07-08 Matthias Koeppe <mkoeppe@merkur.math.uni-magdeburg.de>
411
412 * tags.h (scm_t_bits, scm_t_signed_bits, etc): Avoid solaris empty
413 defines of INTPTR_MAX and UINTPTR_MAX, combine conditionals for
414 scm_t_bits and scm_t_signed_bits to avoid any chance of one and not
415 the other using intptr_t.
416
005d2366
KR
4172003-07-08 Kevin Ryde <user42@zip.com.au>
418
0aacf84e 419 * numbers.c (scm_make_polar): Use sincos, when available.
005d2366
KR
420 (scm_magnitude): Use hypot.
421
422 * ports.c (scm_char_ready_p, scm_peek_char): In docstrings, don't use
423 @footnote since it doesn't go through to guile-procedures.txt.
424
425 * threads.c (scm_call_with_new_thread): In docstring, use "( )"
426 outside @var to quieten makeinfo, and use @code.
427
cbfe8e62
HWN
4282003-07-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
429
430 * gc-malloc.c (decrease_mtrigger): new function
431 (increase_mtrigger): new function, separate debug registering and
432 mtrigger administration.
433 (scm_gc_realloc): bugfix: do mtrigger administration before the
434 actual realloc, for the realloc might invalidate a GC-d segment of
435 memory. Thanks to Sam Hocevar for pointing this out.
436 (scm_gc_realloc): use scm_malloc_reregister instead of
437 unregistering and registering in sequence.
438
aeb4c2e1
HWN
4392003-07-03 Han-Wen Nienhuys <hanwen@cs.uu.nl>
440
441 * __scm.h (SCM_ASSERT): change "else" expansion to "do { } while (0)"
442
4c27f8d2
HWN
4432003-07-02 Han-Wen Nienhuys <hanwen@cs.uu.nl>
444
445 * __scm.h (SCM_ASRTGO): add "else" to macro expansions with if
446 clauses.
447
983e697d
MV
4482003-06-29 Marius Vollmer <mvo@zagadka.de>
449
450 * deprecated.h (SCM_OPDIRP, scm_fport, scm_option, scm_srcprops,
451 scm_srcprops_chunk, scm_info_frame, scm_stack, scm_array,
452 scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_FUNC_NAME, SCM_WTA,
453 RETURN_SCM_WTA, SCM_VALIDATE_NUMBER_COPY,
454 SCM_VALIDATE_NUMBER_DEF_COPY, SCM_VALIDATE_OPDIR): Re-added from
455 the release_1_6 branch.
456
78b6566e
SJ
4572003-06-25 Stefan Jahn <stefan@lkcc.org>
458
459 * continuations.c: Redeclaration of getcontext() via the
460 __asm__ ("getcontext") directive.
461
462 * continuations.h: Include <ucontext.h> instead of
463 <sys/ucontext.h>.
464
1ebb8497
KR
4652003-06-21 Kevin Ryde <user42@zip.com.au>
466
467 * numbers.c (_GNU_SOURCE): #define, to get C99 things.
468 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, $asinh, $acosh,
469 $atanh, truncate): Use C library asinh, acosh, atanh and trunc, when
470 available.
471 (scm_inexact_to_exact): Expand isfinite to its definition !xisinf.
472 (isfinite): Remove, conflicts with C99 isfinite().
473
fbf85ba4
MV
4742003-06-19 Marius Vollmer <mvo@zagadka.de>
475
476 * deprecated.h, deprecated.c (scm_strhash, scm_sym2ovcell_soft,
477 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
478 scm_symbol_value0, scm_string_to_obarray_symbol scm_intern_symbol,
479 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
480 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp): Re-added from
481 the release_1_6 branch.
482
fcc5d734
SJ
4832003-06-14 Stefan Jahn <stefan@lkcc.org>
484
485 * threads.h: Redefined scm_getspecific() and scm_setspecific()
486 to be functions instead of macros.
487
488 * threads.c: Conditionalized inclusion of <sys/time.h> and
489 <unistd.h>.
490 (scm_getspecific, scm_setspecific): Made these two function
491 real part of the API.
492
493 * posix.c (s_scm_putenv): Added some code to make a
494 (putenv "FOO="), i.e. setting an empty string, work also on
495 Win32 systems. Thanks to Kevin Ryde for the proposal.
496
c3ae8e07
KR
4972003-06-12 Kevin Ryde <user42@zip.com.au>
498
75b14838
KR
499 * posix.c (scm_putenv): Free temporary ptr in mingw unset. Add
500 freebsd to comment about need to use unsetenv.
c3ae8e07 501
9d9fa092
MV
5022003-06-02 Marius Vollmer <mvo@zagadka.de>
503
504 * ports.c (scm_peek_char): Safe the column of the port around the
505 getc/ungetc calls. Thanks to Dr. Peter Ivanyi!
506
f2478375
KR
5072003-06-07 Kevin Ryde <user42@zip.com.au>
508
509 * tags.h: Use inttypes.h and stdint.h when available, for INTPTR_MAX
510 and friends required by scm_t_bits setups.
511
6375e040
DH
5122003-06-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
513
514 * tags.h (scm_tc2_int): Added.
515
516 * tags.h (scm_tc3_int_1, scm_tc3_int_2): Expressed in terms of
517 scm_tc2_int.
518
519 * tags.h (scm_tcs_cons_imcar, scm_tcs_cons_nimcar, scm_tcs_struct,
520 scm_tcs_closures): Hard coded values replaced by symbolic ones.
521
f5c6ec2f
DH
5222003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
523
524 * eval.c: Partially undid my patch from 2003-05-31. This patch
525 caused the segfault referenced in the previous changelog entry.
526
47dbd81e
DH
5272003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
528
529 * tags.h: Fixed comment about the immediate type code layout.
530
531 * eval.c: Fixed handling of non-special instructions. Without
532 this patch, guile will segfault on (#\0) and similar instructions.
533
3ec52c51
KR
5342003-06-05 Kevin Ryde <user42@zip.com.au>
535
536 * numbers.c (scm_max, scm_min): For inum, bignum and real, if other
537 operand is NaN, then return NaN. Also avoid passing NaN to mpz_cmp_d.
538
e418bd7c
KR
539 * read.c (scm_input_error): Pass arg list parameter to scm_error_scm,
540 rather than SCM_EOL. Needed by "Unknown # object" case in scm_lreadr.
541
d0624e39
DH
5422003-06-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
543
544 * __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,
545 SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
546 SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
547 generalized it to apply not only to C level functions but also to
548 scheme level functions.
549
550 * debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
551 scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
552 scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
553 eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
554 only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
555 respectively.
556
557 * deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
558 SCM_IDSTMSK): Deprecated. The macro definitions are moved from
559 eval.h into eval.c and a copy is placed into deprecated.h.
560
561 * eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
562 into eval.c. This definition was not part of the API in any
563 officially released version of guile and thus does not need to go
564 through a phase of deprecation.
565
e90c3a89
DH
5662003-06-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
567
d0624e39
DH
568 * deprecated.c, deprecated.h, eval.c, eval.h (scm_s_expression,
569 scm_s_test, scm_s_body, scm_s_bindings, scm_s_variable,
570 scm_s_clauses, scm_s_formals): Deprecated. In eval.c the
e90c3a89
DH
571 definitions are make static and renamed from scm_s_xxx to s_xxx.
572 In deprecated.c the original definitions are copied.
573
d0624e39
DH
574 * deprecated.h, eval.c, eval (SCM_EVALIM2, SCM_EVALIM, SCM_XEVAL,
575 SCM_XEVALCAR): Deprecated. The macro definitions are moved from
e90c3a89
DH
576 eval.h into eval.c and a copy (slightly modified to work in user
577 code) is placed into deprecated.h.
578
579 * eval.c: Use the local static s_xxx definitions instead of the
580 scm_s_xxx definitions throughout.
581
14b18ed6
DH
5822003-06-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
583
584 This set of patches separates the representation of the cxr family
585 of functions (car, cdr etc.) from the dsubr family of functions
586 (i. e. functions that take a double precision floating point
587 argument). Further, the algorithm for handling the cxr function
588 is improved.
589
590 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_1), numbers.c
591 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, scm_round, floor,
592 ceil, sqrt, fabs, exp, log, sin, cos, tan, asin, acos, atan, sinh,
593 cosh, tanh), objects.c (scm_class_of), procprop.c
594 (scm_i_procedure_arity), ramap.c (scm_array_map_x), tags.h
595 (scm_tc7_dsubr, scm_tcs_subrs): Introduce scm_tc7_dsubr as new
596 typecode for the dsubr family of functions.
597
598 * ramap.c (ramap_cxr, ramap_dsubr): Renamed ramap_cxr to
599 ramap_dsubr.
600
601 * eval.c (SCM_CEVAL, SCM_APPLY, call_cxr_1), pairs.c
602 (scm_init_pairs): Make use of the (now usable) second cell element
603 of a scm_tc7_cxr function to implement the cxr family of functions
604 more efficiently.
605
2ca0d207
DH
6062003-05-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
607
608 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_0,
609 scm_trampoline_1, scm_trampoline_2): Postpone error cases to the
610 end of an if-else-if-sequence of checks.
611
9a069bdd
DH
6122003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
613
614 * eval.c (SCM_CEVAL): Improved readability of call-with-values
615 execution. Generalize apply_closure to apply_proc and use that
616 for call-with-values.
617
e910e9d2
DH
6182003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
619
620 * eval.c (SCM_CEVAL): Avoid one level of indirection when applying
621 a non closure.
622
1e498fbd
SJ
6232003-05-30 Stefan Jahn <stefan@lkcc.org>
624
625 * posix.c (s_scm_putenv): Use the new HAVE_UNSETENV
626 appropriately for mingw32 hosts.
627
628 * numbers.h: Defining copysign(), isnan() and finite() to
629 be prefixed by a single '_' for mingw32 hosts.
630
c47e2599
KR
6312003-05-30 Kevin Ryde <user42@zip.com.au>
632
633 * numbers.c (z_negative_one): New variable.
634 (scm_init_numbers): Initialize it.
635 (scm_logcount): Use it and mpz_hamdist to count zeros for negatives.
636
2e945bcc
SJ
6372003-05-29 Stefan Jahn <stefan@lkcc.org>
638
639 * win32-dirent.c: Use malloc() instead of scm_malloc().
640
641 * stime.c (s_scm_strftime): Add a type cast to avoid compiler
642 warning.
643
644 * posix.c (s_scm_putenv): Disable use of unsetenv() for the
645 mingw32 build.
646
647 * modules.c (s_scm_module_import_interface): Renamed local
648 variable interface to _interface. Seems like 'interface'
649 is a special compiler directive for the mingw32 compiler.
650
651 * mkstemp.c: Provide prototype to avoid compiler warning.
652
653 * load.c (s_scm_search_path): Fixed absolute and relative
654 path detections for native Windows platforms.
655
656 * gc.h, threads.h: Export some more symbols using SCM_API (necessary
657 to build on mingw32).
658
659 * gc-freelist.c ("s_scm_map_free_list",
660 "s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.
661
662 * fports.c (fport_fill_input): Disable use of
663 fport_wait_for_input() on Win32 platforms.
664
665 * filesys.c (s_scm_basename): Fixed __MINGW32__ code.
666
667 * Makefile.am: Modified some rules for cross compiling.
668
ddd8f927
DH
6692003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
670
671 * eval.c (SCM_CEVAL): In case of an application, all checks for a
672 proper function object and the correct number of arguments are now
673 performed in the application part of SCM_CEVAL.
674
675 (scm_badformalsp): Removed.
676
f8ba2197
DH
6772003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
678
679 * deprecated.c (scm_read_and_eval_x): Fixed C99-ism.
680
79f55b7c
MD
6812003-05-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
682
a502595f
MD
683 * num2integral.i.c (NUM2INTEGRAL): Avoid warning about conditional
684 always being false by inserting preprocessor conditional. (Thanks
685 to Bruce Korb.)
686
79f55b7c
MD
687 * __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
688 (void *) in order to avoid an aliasing warning; thanks to Bruce
689 Korb.)
690
691 * stackchk.h (SCM_STACK_OVERFLOW_P): Use SCM_STACK_PTR.
692
693 * threads.c (suspend, launch_thread, scm_threads_mark_stacks): Use
694 SCM_STACK_PTR.
695
696 * threads.c (scm_threads_mark_stacks): Bugfix: Changed
697 thread->base --> t->base.
698
699 * eval.c (SCM_CEVAL): Don't cast argument of SCM_STACK_OVERFLOW_P.
700
47dee228
MV
7012003-05-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
702
703 * deprecated.h, deprecated.c (scm_makstr, scm_makfromstr,
704 scm_variable_set_name_hint, scm_builtin_variable,
705 scm_internal_with_fluids, scm_make_gsubr,
706 scm_make_gsubr_with_generic, scm_create_hook, SCM_LIST0,
707 SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6,
708 SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify, scm_sloppy_memq,
85494587
MV
709 scm_sloppy_memv, scm_sloppy_member, scm_read_and_eval_x,
710 scm_subr_entry, SCM_SUBR_DOC, scm_make_subr,
711 scm_make_subr_with_generic, scm_make_subr_opt,
712 scm_call_catching_errors, scm_make_smob_type_mfpe,
713 scm_set_smob_mfpe, scm_strprint_obj, scm_read_0str, scm_eval_0str,
714 SCM_CHARS, SCM_UCHARS, SCM_LENGTH): Re-added from the release_1_6
715 branch. Some have been slightly rewritten.
716 (scm_i_object_chars, scm_i_object_length): New, to support
717 SCM_CHARS, SCM_UCHARS, and SCM_LENTH.
718
e681d187
DH
7192003-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
720
721 * eval.c (scm_m_do, unmemocopy, SCM_CEVAL): Reversed order of
722 names and inits in the memoized code of do.
723
7e59d9d4
MD
7242003-05-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
725
726 * c-tokenize.lex (yyget_lineno, yyget_in, yyget_out, yyget_leng,
727 yyget_text, yyset_lineno, yyset_in, yyset_out, yyget_debug,
728 yyset_debug, yylex_destroy): Added prototypes (otherwise we'll get
729 a compilation error if error-on-warning is enabled).
730
9950a42c
MV
7312003-05-17 Marius Vollmer <mvo@zagadka.de>
732
733 * c-tokenize.lex: Gobble up complete lines after a '#'. This
734 removes preprocessor directives from the snarfage that might
735 otherwise confuse us. These directives appear when compiling with
736 "-g3", for example.
737
0068984b
HWN
7382003-05-16 Han-Wen Nienhuys <hanwen@cs.uu.nl>
739
26e68795
HWN
740 * ChangeLog: add my surname
741
0068984b
HWN
742 * srcprop.c (scm_finish_srcprop): use
743 scm_gc_register_collectable_memory()
744 (scm_make_srcprops): idem.
745
131805f0
HWN
7462003-05-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
747
748 * gc-malloc.c (scm_gc_register_collectable_memory): avoid
749 wrap-around for scm_mtrigger
750 (scm_gc_register_collectable_memory): abort on overflowing
751 scm_mallocated().
752
d4611024
KR
7532003-05-13 Kevin Ryde <user42@zip.com.au>
754
755 * numbers.c (xmpz_cmp_d): New macro, handling infs if gmp doesn't.
756 (scm_num_eq_p, scm_less_p, scm_max, scm_min): Use it.
757
7aaf8dc9
MD
7582003-05-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
759
dfd03fb9
MD
760 * backtrace.c (scm_display_error_message): Introduced fancy
761 printing with max level 7 and length 10. (Purpose: avoid printing
762 gigantic objects in error messages.)
763
764 * print.c, print.h (scm_i_port_with_print_state): New function.
765
766 * print.c (scm_iprin1, scm_printer_apply,
767 scm_port_with_print_state): Use scm_i_port_with_print_state.
768 (scm_simple_format): Modified not to destroy print states.
769 (print_state_mutex): New mutex.
770 (scm_make_print_state, scm_free_print_state, scm_prin1):
771 Lock/unlock print_state_mutex.
772
7aaf8dc9
MD
773 * deprecated.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK):
774 Use current names in definitions.
775
a4d9ffa1
KR
7762003-05-10 Kevin Ryde <user42@zip.com.au>
777
778 * numbers.c (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d.
779
d25e96a4
KR
780 * numbers.c (scm_integer_length): On negative bignums, adjust
781 mpz_sizeinbase to account for it looking at absolute value where we
782 want ones-complement.
783
784 * numbers.c (scm_gcd): In bignum/inum, don't pass yy==0 to mpz_gcd_ui
785 since we're only using the ulong return value, and x might not fit.
786
5bf6a6f0
DH
7872003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
788
789 * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to
790 read. This will allow to make the definition in read.c static.
791
f58c472a
DH
7922003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
793
794 * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved
795 from evalext to eval. This will allow to make some of the
796 definitions in eval.c static.
797
90382aeb
KR
7982003-05-06 Kevin Ryde <user42@zip.com.au>
799
800 * numbers.c (scm_difference): In inum - bignum, handle negative inum.
801 (scm_logcount): Use mpz_com, not mpz_neg.
802
3b88ed2a
DH
8032003-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
804
805 The purpose of this patch is to make guile's internal memoizers
806 distinguishable from memoizing macros created on the scheme level
807 or from user provided primitive memoizing macros. The reason is,
808 that the internal memoizers are the only ones that are allowed to
809 transform their scheme input into memoizer byte code, while all
810 other memoizing macros may only transform scheme code into new
811 scheme code.
812
813 To achieve this, a new macro type 'builtin-macro!' is introduced.
814 Currently, 'builtin-macro!'s are handled as memoizing macros, but
815 this will change when the memoizer and executor are separated.
816
817 * macros.[ch] (scm_i_makbimacro): New.
818
819 * macros.h (SCM_BUILTIN_MACRO_P): New.
820
821 * macros.c (macro_print, scm_macro_type): Support builtin-macro!s.
822
823 * eval.c, goops.c: All of guile's primitive memoizing macros are
824 primitive builtin-macros now.
825
826 * eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive
827 builtin-macros are handled equally to memoizing macros.
828
b0780eb1
MV
8292003-05-04 Marius Vollmer <mvo@zagadka.de>
830
831 * throw.c (scm_ithrow): Remove "asm volatile" hack. It used to
832 work around a bug in GCC 2.95.2 but is now a bug in itself.
833
1cbf4fe9
MV
8342003-05-02 Marius Vollmer <mvo@zagadka.de>
835
836 * deprecated.h (scm_rstate, scm_rng, SCM_SLOPPY_CONSP,
837 SCM_SLOPPY_NCONSP, scm_tc7_ssymbol, scm_tc7_msymbol,
838 scm_tcs_symbols): New.
839
1a61d41b
MV
8402003-04-30 Marius Vollmer <marius.vollmer@uni-dortmund.de>
841
096ecbaf
MV
842 * deprecated.h, deprecated.c (scm_protect_object,
843 scm_unprotect_object, SCM_SETAND_CAR, SCM_SETOR_CAR,
844 SCM_SET_AND_CDR, SCM_SET_OR_CDR, SCM_FREEP, SCM_NFREEP,
845 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
846 SCM_GCCDR, scm_remember, scm_the_root_module, scm_make_module,
847 scm_ensure_user_module, scm_load_scheme_module, scm_port,
848 scm_ptob_descriptor, scm_port_rw_active,
849 scm_close_all_ports_except): New.
850
1a61d41b
MV
851 * ports.c (scm_c_port_for_each): New function, mostly copied from
852 scm_port_for_each.
853 (scm_port_for_each): Reimplemented using scm_c_port_for_each.
854 * ports.h (scm_c_port_for_each): New prototype.
855
c8e1d354
MD
8562003-04-28 Mikael Djurfeldt <djurfeldt@nada.kth.se>
857
858 * eval.c (scm_m_atdispatch): Removed until actually needed. (This
859 macro was introduced in anticipation of GOOPS method compilation
860 code.)
861
862 * goops.c: Removed binding of @dispatch.
863
a4aa2134
DH
8642003-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
865
866 * eval.c, goops.c (@dispatch, @slot-ref, @slot-set!): Move the
867 instructions that bind the macros on the scheme level back to
868 goops.c in order to make sure again that the bindings go into the
869 (oop goops) module and are not visible from the outside.
870
9fbee57e
DH
8712003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
872
873 * eval.c: Non functional change: Separated R5RS and non-R5RS
874 macros into different sections of the file and ordered the
875 memoizers alphabetically.
876
12841895
DH
8772003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
878
879 * eval.c (scm_ilookup): Rewritten to improve readability.
880
6a3f13f0
DH
8812003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
882
883 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
884 Partially reverted patch from 2003-04-23 in oder to find a better
885 compromise between readability and debuggability.
886
b0c5d67b
DH
8872003-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
888
889 * eval.c, eval.h, goops.c, goops.h (scm_m_atslot_ref,
890 scm_m_atslot_set_x, scm_m_atdispatch): Move the declarations and
891 definitions of the special goops memoizers from goops.[ch] to
892 eval.[ch]. Hmm... it seems that scm_m_atdispatch is not used
893 throughout guile.
894
b9ad392e
MD
8952003-04-24 Mikael Djurfeldt <mdj@kvast.blakulla.net>
896
897 * ports.c, ports.h (scm_i_port_table_mutex): New mutex.
898
899 * fports.c (scm_evict_ports): Lock/unlock scm_i_port_table_mutex.
900
901 * ports.c (scm_close_port, scm_flush_all_ports): Ditto.
902
903 * ioext.c (scm_fdes_to_ports): Ditto.
904
905 * vports.c (scm_make_soft_port): Changed SCM_DEFER/ALLOW_INTS into
906 lock/unlock scm_i_port_table_mutex.
907
908 * strports.c (scm_mkstrport): Ditto.
909
910 * ports.c (scm_void_port, scm_port_for_each): Ditto.
911
912 * fports.c (scm_fdes_to_port): Ditto.
913
d0b07b5d
DH
9142003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
915
916 This set of patches contains no functional changes, only debatable
917 minor stylistic ones. Still, in order to prepare a patch between
918 my local copy and the CVS version, I decided to submit the changes
919 below. Then, the patch will hopefully only contain relevant
920 modifications :-)
921
922 * eval.c (iqq): Added const specifier.
923
924 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
925 Use NULL instead of 0 to indicate that a pointer is returned.
926 Removed some misleading 'fall through' comments.
927
928 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
929 Split up long expressions into smaller ones to be more debugging
930 friendly.
931
a98e8e98
DH
9322003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
933
934 * eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR,
935 SCM_EXIT_FRAME_HDLR): Use SCM_PACK to convert data to a SCM value
936 rather than casting to SCM.
937
c178c3a6
DH
9382003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
939
940 * sort.c, pairs.h: Removed unnecessary includes.
941
d339981a
DH
9422003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
943
944 * sort.c: Replaced hand-made trampline code by the new official
945 mechanism from eval.c. This fixes a segfault in the new test file
946 sort.test.
947
948 (quicksort, compare_function, scm_restricted_vector_sort_x,
949 scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
950 scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x,
951 scm_merge_vector_step, scm_stable_sort_x, scm_stable_sort,
952 scm_sort_list_x, scm_sort_list): Use trampoline mechanism from
953 eval.c.
954
955 (subr2less, lsubrless, closureless, applyless, scm_cmp_function,
956 cmp_fun_t): Removed.
957
958 (compare_function): Added.
959
960 * sort.c (quicksort, SWAP, stack_node): Replaced pointer
961 arithmetics with index arithmetics. Changed quicksort to work on
962 an array of SCM values instead of an array of characters. Avoid
963 bytewise copying of SCM elements. Avoid allocating memory on the
964 stack with alloca. Fixed some comments.
965
821f18a4
DH
9662003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
967
968 * eval.c (EXTEND_ENV): Eliminated.
969
970 (unmemocopy, SCM_CEVAL, SCM_APPLY): Use SCM_EXTEND_ENV instead of
971 EXTEND_ENV.
972
94fb5a6e
DH
9732003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
974
975 * __scm.h (SCM_DEBUG_DEBUGGER_SUPPORT): New compile-time option.
976
977 * gc.card.c (scm_gc_marked_p): Fixed compiler warning when
978 compiling with SCM_DEBUG==1 by moving definition behind prototype.
979
980 * gc.card.c (scm_dbg_t_list_cell, scm_dbg_t_double_cell,
981 scm_dbg_gc_marked_p, scm_dbg_gc_get_card, scm_dbg_gc_get_bvec,
982 scm_t_list_cell_struct, scm_t_list_cell, scm_t_double_cell,
983 scm_gc_marked_p, scm_gc_get_card, scm_gc_get_bvec): Fixed
984 functions such that they check if the object is a non-immediate.
985 Further, renamed identifiers to use the scm_dbg_ prefix and made
986 their inclusion into the lib dependent of the
987 SCM_DEBUG_DEBUGGER_SUPPORT compile time option.
988
fce0b22d
DH
9892003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
990
991 * __scm.h: Fixed comment about the SCM_DEBUG_TYPING_STRICTNESS
992 debug option.
993
1685446c
DH
9942003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
995
821f18a4 996 * list.c (scm_ilength, scm_last_pair), unif.c (l2ra): Prefer
1685446c
DH
997 !SCM_CONSP over SCM_NCONSP. Now, guile itself does not include
998 any calls to SCM_NCONSP any more.
999
1000 * unif.c (l2ra): Eliminate redundant check.
1001
9ff1720f
DH
10022003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
1003
1004 * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
1005 scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over
1006 SCM_NNULLP. Now, guile itself does not include any calls to
1007 SCM_NNULLP any more.
1008
05b15362
DH
10092003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
1010
1011 * eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
1012 scm_copy_tree): Place assignment expressions which are part of
1013 other expressions into an expression of their own.
1014
0c88d7df
DH
10152003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
1016
1017 * goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't
1018 compare SCM values with !=.
1019
5cb22e96
DH
10202003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
1021
1022 * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter,
1023 scm_m_generalized_set_x, scm_init_evalext): Move the declaration
1024 and definition of the memoizer for the generalized set! macro from
1025 evalext.[ch] to eval.[ch]. Use the SCM_SYNTAX snarfer macro to
1026 define the macro object.
1027
1028 * eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x,
1029 scm_m_generalized_set_x): Since now scm_s_set_x is only used in
1030 eval.c, it is made static and renamed to s_set_x.
1031
1032 * evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo>
1033 over SCM_N<foo>.
1034
a44a9715
DH
10352003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
1036
1037 * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,
1038 scm_init_eval): Made scm_undefineds static in eval.c, renamed it
1039 to undefineds and registered the object as a permanent object.
1040
1041 * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
1042 static in eval.c, renamed it to f_apply and registered the object
1043 as a permanent object.
1044
1b43d24c
DH
10452003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
1046
5cb22e96 1047 * eval.c (SCM_BIT7, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
1b43d24c
DH
1048 file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
1049
aec16f99
DH
10502003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
1051
1052 * numbers.c (scm_logtest): Fixed argument bug in the call to
1053 mpz_and, which showed up when compiling with SCM_DEBUG defined.
1054
f96460ce
DH
10552003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
1056
1057 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
1058 type errors that showed up when compiling with SCM_DEBUG defined.
1059
d0f6ceb8
DH
10602003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
1061
1062 * continuations.c, continuations.h, eval.c, eval.h, extensions.c,
1063 gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h,
1064 throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
1065 fix compile errors with --disable-deprecated.
1066
19a7a089
RB
10672003-04-17 Rob Browning <rlb@defaultvalue.org>
1068
1069 * numbers.c (scm_integer_expt): fix case where we were declaring
1070 vars in the middle of a statement block. Thanks to Thamer
1071 Al-Harbash.
1072
47cd67db
MD
10732003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1074
0fd7dcd3
MD
1075 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
1076 change.
1077
47cd67db
MD
1078 * eq.c (scm_eqv_p): Turned into a primitive generic.
1079
3b8b889c
RB
10802003-04-16 Rob Browning <rlb@defaultvalue.org>
1081
312006bb
RB
1082 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
1083 Thanks to Boyd Gerber.
1084 Added check for __arm__ in addition to arm for LINUX and copied
1085 __s390__ defines from upstream libgc. Thanks to James Treacy for
1086 reporting the problems.
c7ef2ea1 1087
3b8b889c
RB
1088 * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT.
1089
1090 * socket.c: use SCM_CHAR_BIT.
1091
1092 * random.c (scm_c_random_bignum): use SCM_CHAR_BIT.
1093
1094 * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT.
1095
43261b39
MD
10962003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1097
1098 * feature.c (scm_init_feature): Always add threads feature.
1099
58241edc
MD
11002003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1101
1102 * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
1103 scm_at_assert_bound_ref. (We don't want the unbound check. See
1104 oop/goops/active-slot.scm.)
1105
94e91275
RB
11062003-04-14 Rob Browning <rlb@defaultvalue.org>
1107
1108 * tags.h: scm_t_intptr should have been intptr_t.
1109
3071ea27
RB
11102003-04-13 Rob Browning <rlb@defaultvalue.org>
1111
1112 * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc"
1113 test. Instead use
1114 #if defined (sparc) || defined (__sparc__) || defined (__sparc)
1115 as gc_os_dep.c suggests is appropriate.
1116
1117 * goops.c (prep_hashsets): make static to match prototype.
1118 (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert
1119 Chin.
1120
1121 * c-tokenize.lex: remove trailing comma from enum. Thanks to
1122 Albert Chin.
1123
1124 * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas
1125 Klausner.
1126
21ab2aeb
MD
11272003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1128
1129 * goops.c (scm_sys_prep_layout_x): Instance allocation is now
1130 indicated through extra fields in getters-n-setters.
1131 (scm_add_slot): Adapted to new format of getters_n_setters slot.
1132 (Thanks to Andy Wingo.)
1133
dff96e95
HWN
11342003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1135
1136 * gc-segment.c: add comment
1137
07921c76
RB
11382003-04-07 Rob Browning <rlb@defaultvalue.org>
1139
b5331f10
RB
1140 * debug.h: change "id" arg name to "info_id" to avoid objective-c
1141 clash.
1142
07921c76
RB
1143 * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael
1144 and add regression test to standalone/.
1145
11462003-04-06 Rob Browning <rlb@defaultvalue.org>
1147
1148 * strings.c (scm_mem2string): use memcpy rather than by-hand loop.
1149 Thanks to Dale P. Smith.
1150
1151 * random.c: #include gmp.h.
1152 (scm_c_random_bignum): normalize result on return.
1153
1154 * init.c: #include gmp.h.
1155
1156 * numbers.h: remove the gmp.h #include (not needed now).
1157
1158 * posix.h: change occurences of "id" to something else so we don't
1159 cause trouble when included via objective-c (can't hurt, might
1160 help). Still have usage in debug.h, though.
1161
938f6b7c
MD
11622003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1163
372691d8
MD
1164 * random.c (scm_c_random_bignum): Don't generate a random number
1165 equal to m (the second argument of scm_c_random_bignum); only
1166 generate numbers in the range 0 <= r < m.
c5f268f8
MD
1167 (scm_c_default_rstate): Use SCM_VARIABLE_REF to access
1168 scm_var_random_state.
372691d8 1169
938f6b7c
MD
1170 * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then
1171 clause.
1172
6cdb8c3f
RB
11732003-04-05 Rob Browning <rlb@defaultvalue.org>
1174
938f6b7c 1175 * modules.c (scm_module_import_interface): move declaration of
6cdb8c3f
RB
1176 uses before any code.
1177
15635be5
MD
11782003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1179
1ecfd013
MD
1180 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
1181 not top_srcdir.
1182
15635be5
MD
1183 * hashtab.c (rehash_after_gc): Clear to_rehash list before
1184 processing it in order to avoid an infinite loop.
1185
1186 * print.c (scm_prin1): Remember old state of pstate->writingp.
1187
73be1d9e
MV
11882003-04-05 Marius Vollmer <mvo@zagadka.de>
1189
1190 * Changed license terms to the plain LGPL thru-out.
1191
ad815c06
RB
11922003-04-04 Rob Browning <rlb@defaultvalue.org>
1193
1194 * socket.c (FLIPCPY_NET_HOST_128): new macro.
1195 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
1196 rewrite to handle GMP bignums.
1197
1198
1199 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
1200
1201 * ports.c (scm_getc): minor tweak.
1202
1203 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
1204 rewrite to handle GMP bignums.
1205
1206 * numbers.c: rewrite *many* functions to handle GMP bignums.
1207
1208 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
1209 handle GMP bignums.
1210
1211 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
1212
1213 * init.c (check_config): remove SCM_BIGDIG conditionals.
1214 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
1215
1216 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
1217
1218 * eval.c: remove SCM_BIGDIG conditionals.
1219
1220 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
1221
6cdb8c3f
RB
12222003-03-31 Rob Browning <rlb@defaultvalue.org>
1223
1224 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
1225 to Kevin Ryde.)
1226
12272003-03-27 Rob Browning <rlb@defaultvalue.org>
1228
1229 * threads.h: fix various preprocessor usages of new public
1230 symbols to expect 0 or 1 values rather than 1 or undefined.
1231 i.e. change #ifdef to #if, etc.
1232
1233 * threads.c: fix various preprocessor usages of new public
1234 symbols to expect 0 or 1 values rather than 1 or undefined.
1235 i.e. change #ifdef to #if, etc.
1236
1237 * tags.h: fix various preprocessor usages of new public
1238 symbols to expect 0 or 1 values rather than 1 or undefined.
1239 i.e. change #ifdef to #if, etc.
1240
1241 * stacks.c: fix various preprocessor usages of new public
1242 symbols to expect 0 or 1 values rather than 1 or undefined.
1243 i.e. change #ifdef to #if, etc.
1244
1245 * stackchk.h: fix various preprocessor usages of new public
1246 symbols to expect 0 or 1 values rather than 1 or undefined.
1247 i.e. change #ifdef to #if, etc.
1248
1249 * stackchk.c: fix various preprocessor usages of new public
1250 symbols to expect 0 or 1 values rather than 1 or undefined.
1251 i.e. change #ifdef to #if, etc.
1252
1253 * sort.c: fix various preprocessor usages of new public
1254 symbols to expect 0 or 1 values rather than 1 or undefined.
1255 i.e. change #ifdef to #if, etc.
1256
1257 * read.c: fix various preprocessor usages of new public
1258 symbols to expect 0 or 1 values rather than 1 or undefined.
1259 i.e. change #ifdef to #if, etc.
1260
1261 * random.c: fix various preprocessor usages of new public
1262 symbols to expect 0 or 1 values rather than 1 or undefined.
1263 i.e. change #ifdef to #if, etc.
1264
1265 * print.c: fix various preprocessor usages of new public
1266 symbols to expect 0 or 1 values rather than 1 or undefined.
1267 i.e. change #ifdef to #if, etc.
1268
1269 * objects.c: fix various preprocessor usages of new public
1270 symbols to expect 0 or 1 values rather than 1 or undefined.
1271 i.e. change #ifdef to #if, etc.
1272
1273 * numbers.h: fix various preprocessor usages of new public
1274 symbols to expect 0 or 1 values rather than 1 or undefined.
1275 i.e. change #ifdef to #if, etc.
1276
1277 * null-threads.c: fix various preprocessor usages of new public
1278 symbols to expect 0 or 1 values rather than 1 or undefined.
1279 i.e. change #ifdef to #if, etc.
1280
1281 * lang.c: fix various preprocessor usages of new public
1282 symbols to expect 0 or 1 values rather than 1 or undefined.
1283 i.e. change #ifdef to #if, etc.
1284
1285 * lang.h: fix various preprocessor usages of new public
1286 symbols to expect 0 or 1 values rather than 1 or undefined.
1287 i.e. change #ifdef to #if, etc.
1288
1289 * iselect.h: fix various preprocessor usages of new public
1290 symbols to expect 0 or 1 values rather than 1 or undefined.
1291 i.e. change #ifdef to #if, etc.
1292
1293 * init.c: fix various preprocessor usages of new public
1294 symbols to expect 0 or 1 values rather than 1 or undefined.
1295 i.e. change #ifdef to #if, etc.
1296
1297 * gh_data.c: fix various preprocessor usages of new public
1298 symbols to expect 0 or 1 values rather than 1 or undefined.
1299 i.e. change #ifdef to #if, etc.
1300
1301 * gh.h: fix various preprocessor usages of new public
1302 symbols to expect 0 or 1 values rather than 1 or undefined.
1303 i.e. change #ifdef to #if, etc.
1304
1305 * gen-scmconfig.c: change most new public symbols to be defined to
1306 0 or 1 rather than being either 1 or undefined.
1307
1308 * gc_os_dep.c: fix various preprocessor usages of new public
1309 symbols to expect 0 or 1 values rather than 1 or undefined.
1310 i.e. change #ifdef to #if, etc.
1311 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
1312
1313 * gc.h: fix various preprocessor usages of new public
1314 symbols to expect 0 or 1 values rather than 1 or undefined.
1315 i.e. change #ifdef to #if, etc.
1316
1317 * gc-card.c: fix various preprocessor usages of new public
1318 symbols to expect 0 or 1 values rather than 1 or undefined.
1319 i.e. change #ifdef to #if, etc.
1320
1321 * gc-mark.c: fix various preprocessor usages of new public
1322 symbols to expect 0 or 1 values rather than 1 or undefined.
1323 i.e. change #ifdef to #if, etc.
1324
1325 * feature.c: fix various preprocessor usages of new public
1326 symbols to expect 0 or 1 values rather than 1 or undefined.
1327 i.e. change #ifdef to #if, etc.
1328
1329 * evalext.c: fix various preprocessor usages of new public
1330 symbols to expect 0 or 1 values rather than 1 or undefined.
1331 i.e. change #ifdef to #if, etc.
1332
1333 * eval.h: fix various preprocessor usages of new public
1334 symbols to expect 0 or 1 values rather than 1 or undefined.
1335 i.e. change #ifdef to #if, etc.
1336
1337 * eval.c: fix various preprocessor usages of new public
1338 symbols to expect 0 or 1 values rather than 1 or undefined.
1339 i.e. change #ifdef to #if, etc.
1340
1341 * eq.c: fix various preprocessor usages of new public
1342 symbols to expect 0 or 1 values rather than 1 or undefined.
1343 i.e. change #ifdef to #if, etc.
1344
1345 * coop.c: fix various preprocessor usages of new public
1346 symbols to expect 0 or 1 values rather than 1 or undefined.
1347 i.e. change #ifdef to #if, etc.
1348
1349 * coop-threads.c: fix various preprocessor usages of new public
1350 symbols to expect 0 or 1 values rather than 1 or undefined.
1351 i.e. change #ifdef to #if, etc.
1352
1353 * coop-pthreads.c: fix various preprocessor usages of new public
1354 symbols to expect 0 or 1 values rather than 1 or undefined.
1355 i.e. change #ifdef to #if, etc.
1356
1357 * coop-defs.h: fix various preprocessor usages of new public
1358 symbols to expect 0 or 1 values rather than 1 or undefined.
1359 i.e. change #ifdef to #if, etc.
1360
1361 * convert.i.c: fix various preprocessor usages of new public
1362 symbols to expect 0 or 1 values rather than 1 or undefined.
1363 i.e. change #ifdef to #if, etc.
1364
1365 * continuations.c: fix various preprocessor usages of new public
1366 symbols to expect 0 or 1 values rather than 1 or undefined.
1367 i.e. change #ifdef to #if, etc.
1368
1369 * _scm.h: fix various preprocessor usages of new public symbols to
1370 expect 0 or 1 values rather than 1 or undefined. i.e. change
1371 #ifdef to #if, etc.
1372
d11d697a
MV
13732003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1374
9686f86d
MV
1375 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
1376
1377 * deprecated.c, deprecated.h: New files, to collect deprecated
1378 things in one place.
1379 * Makefile.am: Added them in all the right places.
1380
d11d697a
MV
1381 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
1382 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
1383 builds work.
9686f86d
MV
1384 (DOT_X_FILES): Removed "iselect.x".
1385 (DOT_DOC_FILES): Removed "iselect.doc".
d11d697a 1386
e3c0c3b9
RB
13872003-03-25 Rob Browning <rlb@defaultvalue.org>
1388
1389 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
1390 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
1391
1392 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
1393
1394 * vports.c: #include <config.h> if HAVE_CONFIG_H.
1395
1396 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
1397 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
1398
1399 * threads.h: replace usage of struct timespect with
1400 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
1401 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
1402 favor of scm_t_timespec from scmconfig.h.
1403
1404 * threads.c: move libguile/_scm.h include to the top so we pick up
1405 any critical defines like _GNU_SOURCE early. Replace usage of
1406 struct timespect with scm_t_timespec. Replace usage of
1407 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
1408 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
1409
1410 * threads-plugin.h: replace usage of struct timespect with
1411 scm_t_timespec.
1412
1413 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
1414 usage of struct timespect with scm_t_timespec.
1415
1416 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
1417 HAVE_INTTYPES_H handling to scmconfig.h. #include
1418 "libguile/__scm.h". Rework handling for scm_t_bits,
1419 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
1420 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
1421 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
1422 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
1423 SCM_HAVE_ARRAYS.
1424
1425 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
1426
1427 * struct.c: #include <config.h> if HAVE_CONFIG_H.
1428
1429 * strports.c: #include <config.h> if HAVE_CONFIG_H.
1430
1431 * strop.c: #include <config.h> if HAVE_CONFIG_H.
1432
1433 * stime.h: move handling of time related headers to scmconfig.h.
1434
1435 * stime.c: #include <config.h> if HAVE_CONFIG_H.
1436
1437 * stacks.c: replace usage of STACK_GROWS_UP with
1438 SCM_STACK_GROWS_UP.
1439
1440 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
1441 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
1442
1443 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
1444 of uint32 and HAVE_UINT_32 with scm_t_int32.
1445
1446 * smob.c: #include <config.h> if HAVE_CONFIG_H.
1447
1448 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
1449
1450 * script.c: #include <config.h> if HAVE_CONFIG_H.
1451
1452 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
1453
1454 * scmconfig.h.top: new file -- preamble for scmconfig.h.
1455
1456 * rw.c: #include <config.h> if HAVE_CONFIG_H.
1457
1458 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
1459
1460 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
1461
1462 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
1463
1464 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
1465 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
1466 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
1467 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
1468
1469 * ramap.c: replace usage of HAVE_LONG_LONGS with
1470 "SCM_SIZEOF_LONG_LONG != 0".
1471
1472 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
1473 "libguile/scmconfig.h".
1474
1475 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
1476
1477 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
1478 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
1479
1480 * posix.c: #include <config.h> if HAVE_CONFIG_H.
1481
1482 * ports.c: #include <config.h> if HAVE_CONFIG_H.
1483
1484 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
1485
1486 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
1487 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
1488 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
1489 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
1490 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
1491 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
1492 "SCM_SIZEOF_LONG_LONG != 0".
1493
1494 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
1495 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
1496 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
1497 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
1498
1499 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
1500
1501 * null-threads.h: replace usage of struct timespect with
1502 scm_t_timespec.
1503
1504 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
1505
1506 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
1507 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
1508 scm_t_uint64 and rename usages.
1509
1510 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
1511
1512 * load.c: #include <config.h> if HAVE_CONFIG_H.
1513
1514 * iselect.h: move handling of time related headers to scmconfig.h.
1515 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
1516 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
1517 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
1518
1519 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
1520 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
1521 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
1522
1523 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
1524
1525 * inline.h: #include "libguile/__scm.h" at the top. Change code
1526 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
1527 what to do instead of creating a new public #define. Rename usage
1528 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
1529 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
1530 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
1531
1532 * inline.c: rearrange handling -- now we just #define
1533 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
1534 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
1535 appropriate, and we use that in inline.h along with the above
1536 define to determine how to respond.
1537
1538 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
1539 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
1540
1541 * guile.c: #include <config.h> if HAVE_CONFIG_H.
1542
1543 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
1544 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
1545
1546 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
1547
1548 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
1549
1550 * gen-scmconfig.c: new file -- see comments in file for details.
1551
1552 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
1553
1554 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
1555 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
1556
1557 * gc.h: replace usage of SIZEOF_LONG with
1558 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
1559 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
1560 since we handle that in scmconfig.h now.
1561
1562 * gc.c: #include <config.h> if HAVE_CONFIG_H.
1563
1564 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
1565 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
1566 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
1567
1568 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
1569
1570 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
1571 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
1572
1573 * fports.c: #include <config.h> if HAVE_CONFIG_H.
1574
1575 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
1576
1577 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
1578 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
1579
1580 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
1581
1582 * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
1583 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
1584
1585 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
1586 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
1587 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
1588 with "SCM_SIZEOF_LONG_LONG != 0".
1589
1590 * error.c: #include <config.h> if HAVE_CONFIG_H.
1591
1592 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
1593 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
1594 with "SCM_SIZEOF_LONG_LONG != 0".
1595
1596 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
1597
1598 * coop.c: replace usage of struct timespect with scm_t_timespec.
1599 #include <config.h> if HAVE_CONFIG_H.
1600
1601 * coop-threads.c: #include "libguile/_scm.h" early. Replace
1602 usage of struct timespect with scm_t_timespec. Replace usage of
1603 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
1604
1605 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
1606 usage of struct timespect with scm_t_timespec. Replace usage of
1607 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
1608
1609 * coop-defs.h: move handling of time related headers to
1610 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
1611 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
1612 timespect with scm_t_timespec.
1613
1614 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
1615
1616 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
1617
1618 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
1619 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
1620
1621 * continuations.c: move libguile/_scm.h include to the top so we
1622 pick up any critical defines like _GNU_SOURCE early.
1623
1624 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
1625
1626 * async.c: #include <config.h> if HAVE_CONFIG_H.
1627
1628 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
1629
1630 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
1631 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
1632
1633 * __scm.h: move libguile/scmconfig.h include up to the top, so
1634 we're sure to pick up any critical defines like _GNU_SOURCE early.
1635 #include <limits.h> removed in favor of scmconfig.h inclusion when
1636 appropriate. STDC_HEADERS based inclusion of stdlib.h,
1637 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
1638 scmconfig.h inclusion when appropriate. Various Win32 related
1639 definitions removed in favor of scmconfig.h inclusion when
1640 appropriate.
1641 (HAVE_UINTPTR_T): definition removed (see NEWS).
1642 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
1643 (HAVE_LONG_LONGS): definition removed (see NEWS).
1644 (HAVE_LONG_LONG): definition removed (see NEWS).
1645 (HAVE_PTRDIFF_T): definition removed (see NEWS).
1646
1647 * Makefile.am: scmconfig.h is now generated by building and
1648 running gen-scmconfig.h and capturing its output. gen-scmconfig
1649 uses config.h and the configure.in generated gen-scmconfig.h to
1650 decide what to output. See gen-scmconfig.c for details.
1651 (noinst_PROGRAMS): add gen-scmconfig.
1652 (gen_scmconfig_SOURCES): new variable.
1653 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
1654 cross-compiling right.
1655 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
1656 (BUILT_SOURCES): add scmconfig.h.
1657
25e0bf97
MV
16582003-03-19 Marius Vollmer <mvo@zagadka.de>
1659
1660 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
1661 Adrian Bunk. Thanks!
1662
74b6d6e4
MD
16632003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1664
1665 * goops.c (make_class_from_template): New fourth arg:
1666 applicablep.
1667 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
1668 cpls.
1669
1670 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
1671
1672 * goops.c, objects.c, objects.h (scm_make_extended_class): New
1673 second arg: applicablep.
1674 (scm_i_inherit_applicable): New function.
1675
1676 * goops.c, goops.h (scm_class_applicable,
1677 scm_class_extended_accessor): New classes.
1678
5c9e7dad
DH
16792003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
1680
1681 * procs.c (scm_procedure_documentation): Removed redundant
1682 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
1683 predicates.
1684
f8af5c6d
MD
16852003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1686
c614a00b
MD
1687 * list.c, list.h (scm_filter, scm_filter_x): New functions.
1688
109c2c9f
MD
1689 * modules.c (scm_module_import_interface): New function.
1690
f8af5c6d
MD
1691 * goops.c, goops.h (scm_class_accessor_method): Renamed from
1692 scm_class_accessor.
1693 (scm_class_accessor): New class.
1694
a48d60b1
MD
16952003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1696
1697 * goops.c (scm_primitive_generic_generic): Enable primitive
1698 generic if not enabled.
1699 (scm_sys_goops_loaded): Setup unextended primitive generics.
1700
1701 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
1702
1703 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
1704 snarf macros.
1705
1706 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
1707 testing example. All uses of SCM_GPROC should be converted.)
1708
1709 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
1710 scm_assoc.
1711
1712 * eq.c (scm_equal_p): Turned into a primitive generic.
1713
84edc049
RB
17142003-02-27 Rob Browning <rlb@defaultvalue.org>
1715
1716 * Makefile.am (scmconfig.h): new target -- generate file from
1717 ../config.h.
1718 (modinclude_HEADERS): remove version.h.
1719 (nodist_modinclude_HEADERS): add version.h.
1720
ea5c9285
MD
17212003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1722
b4a1358c
MD
1723 This fixes a serious GC bug, introduced during the latest
1724 reorganization of the GC, which disabled freeing of structs and
1725 GOOPS objects:
1726
1727 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
1728 SCM_EOL.
53af8255
MD
1729 (scm_struct_prehistory): Move scm_free_structs to
1730 scm_before_mark_c_hook.
ea5c9285 1731
b4a1358c
MD
1732 * gc-card.c (sweep_card): Check that we haven't swept structs on
1733 this card before. That can happen if scm_i_sweep_all_segments has
1734 been called from some other place than scm_igc.
1735
c35738c1
MD
17362003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1737
231a4ea8
MD
1738 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
1739 (since hash tables now adapt their size).
1740
1741 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
1742 (current number of prehistory bindings; hashtable code will select
1743 a prime which is greater than this value).
1744
1745 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
1746 (current number of initial symbols).
1747
1748 * properties.c (scm_init_properties): Don't specify size of
1749 scm_properties_whash.
1750
1751 * objprop.c (scm_init_objprop): Don't specify size of
1752 scm_object_whash.
1753
1754 * keywords.c (scm_init_keywords): Don't specify a hash table size.
1755
c35738c1
MD
1756 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
1757
1758 The following changes introduce the use of resizable hash tables
1759 throughout Guile. It also renames the old *-hash-table* functions
1760 to *-alist-vector* and places them, together with the rest of the
1761 weak vector support, in the module (ice-9 weak-vector). We should
1762 probably introduce a new, better, API for weak references, for
1763 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
1764 look like and are used like ordinary pairs.)
1765
1766 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
1767 leaf_environment_fold, obarray_remove_all): Use hashtable
1768 accessors.
1769
1770 * gc.c (scm_init_storage): Moved hook initialization to
1771 scm_storage_prehistory.
1772 (scm_storage_prehistory): New function.
1773 (scm_igc): Added commentary about placement of
1774 scm_after_sweep_c_hook.
1775
1776 * gc-mark.c (scm_mark_all): Use hashtable accessors.
1777 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
1778 SCM_WVECT_WEAK_VALUE_P.
1779
1780 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
1781 functions.
1782 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
1783 Removed.
1784 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
1785 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
1786
1787 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
1788 calls to scm_storage_prehistory and scm_hashtab_prehistory.
1789
1790 * modules.c (module-reverse-lookup): Use hashtable accessors.
1791
1792 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
1793
1794 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
1795 scm_make_weak_value_alist_vector,
1796 scm_make_doubly_weak_alist_vector): New functions.
1797
1798 * weaks.c (scm_init_weaks_builtins): New function.
1799
1800 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
1801 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
1802 SCM_WVECT_NOSCAN_P): New macros.
1803
1804 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
1805 and SCM_WVECT_WEAK_VALUE_P.
1806
1807 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
1808 allocate_weak_vector and exported.
1809
0a4c1355
MD
18102003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1811
1812 * hashtab.c: Undid thread safety. (We decided that it's better to
1813 let the user explicitly protect the tables (or not) according what
1814 is suitable for the application.)
1815
87ca11ff
MD
18162003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1817
1818 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
1819 thread safe and handle resizing tables.
1820 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
1821 SCM_DEFER/ALLOW_INTS.
1822
f59a096e
MD
18232003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1824
1825 * hashtab.c (scm_vector_to_hash_table,
1826 scm_c_make_resizing_hash_table, scm_make_hash_table): New
1827 functions.
1828 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
1829 safe and handle resizing tables.
1830
1831 * weaks.c (scm_make_weak_key_hash_table,
1832 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
1833 Size argument made optional. Return resizable table if not
1834 specified.
1835
4b612c5b
MD
18362003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1837
1838 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
1839 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
1840
b3d7f6df
MD
18412003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1842
1843 * debug.c (scm_procedure_source): Handle all objects for which
1844 procedure? is #t. (Thanks to Bill Schottstaedt.)
1845
756414cf
MD
18462003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1847
361d631f
MD
1848 * futures.c (mark_futures): Don't need to mark data of recycled
1849 futures.
1850 (scan_futures, cleanup_undead): Be smarter about marking
1851 futures---avoid unnecessary passes through future lists.
1852
756414cf
MD
1853 * futures.h, futures.c: New files; Introduced recycling of
1854 futures. For fine-grained threading this lifts performance to
1855 another level. We can now use parallelization in inner loops of
1856 Guile programs without impossible overhead.
1857
1858 * threads.h, threads.c: Moved futures to their own file.
1859
1860 * Makefile.am (libguile_la_SOURCES): Added futures.c.
1861 (DOT_X_FILES): Added futures.x.
1862 (DOT_DOC_FILES): Added futures.doc.
1863 (modinclude_HEADERS): Added futures.h.
1864
1865 * threads.c, threads.h (scm_i_create_thread): Renamed from
1866 create_thread and made global.
1867
1868 * futures.c (scm_make_future): New procedure.
1869
1870 * eval.c: #include "libguile/futures.h".
1871
1872 * init.c: #include "futures.h"
1873 (scm_init_guile_1): Call scm_init_futures.
1874
1875 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
1876
1877 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
1878
1879 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
1880 functions.
1881
1882 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
1883
b4debead
MD
18842003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1885
1886 * threads.c (create_thread): Don't unwind dynwind chain of parent
1887 thread before creation. Just start the new thread with an empty
1888 dynwind chain.
1889
93f26b7b
MD
18902003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1891
1892 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
1893
38d8927c
MD
18942003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1895
41c96c32
MD
1896 * threads.c (scm_timed_wait_condition_variable): Support timed
1897 waiting also for simple condition variables.
1898
38d8927c
MD
1899 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
1900 of calling the procedure change-object-class.
1901
9cf5d9b7
MD
19022003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1903
1904 * ramap.c (scm_ramapc): Typo in error message.
1905
bbf8d523
MD
19062003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1907
b46fae00
MD
1908 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
1909 slots with instance allocation.
1910
bbf8d523
MD
1911 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
1912 class.
1913 (scm_compute_applicable_methods): Use scm_generic_function_methods.
1914
1915 * goops.c (scm_generic_function_methods): Support extended
1916 generic functions.
1917
ebf9b47c
MD
19182002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1919
1920 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
2e37d6a2 1921 Thanks to Neil for pointing this out!
ebf9b47c 1922
14a9ba3f
NJ
19232002-12-29 Neil Jerram <neil@ossau.uklinux.net>
1924
1925 * lang.h: Remove declarations matching definitions removed from
1926 lang.c (just below).
1927
c6a040a8
NJ
19282002-12-28 Neil Jerram <neil@ossau.uklinux.net>
1929
6054d805
NJ
1930 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
1931 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
1932 and already commented out.
1933
c6a040a8
NJ
1934 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
1935 scm_lreadparen): Support reading vectors with Elisp syntax if
1936 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
1937 is not currently defined, and there isn't even a configure switch
1938 to enable it yet.)
1939
3742c12f
MV
19402002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
1941
1942 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
1943 builds work.
1944 (EXTRA_DIST): Added version.h.in.
1945
fb50ef08
MD
19462002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1947
1948 This change makes it possible for one thread to do lazy sweeping
1949 while other threads are running. Now only the mark phase need to
1950 have all threads asleep. We should look further into this issue.
1951 Presently, I've put the locking of scm_i_sweep_mutex at
1952 "conservative" places due to my current lack of knowledge about
1953 the garbage collector. Please feel free to restrict these regions
1954 further to allow for maximal parallelism!
1955
1956 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
1957
1958 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
1959 scm_gc_register_collectable_memory): Substitute locking of
1960 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
1961 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
1962 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
1963 the single-thread section (which now only contains the mark
1964 phase).
1965 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
1966 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
1967
1968 * threads.c (gc_section_mutex): Removed.
1969
9ed24633
MD
19702002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1971
0d48aca5
MD
1972 * threads.c (create_thread): Clear parent field in root state in
1973 order not to unnecessarily remember dead threads.
1974
9ed24633
MD
1975 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
1976 (scm_trampoline_1, scm_trampoline_2): Use them.
1977
29717c89
MD
19782002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1979
1980 Partial introduction of real plugin interface.
1981
1982 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
1983 (EXTRA_DIST): Added threads-plugin.c.
1984
1985 * threads-plugin.h, threads-plugin.c: New files.
1986
1987 * threads.h: #include "libguile/threads-plugin.h".
1988
1989 * threads.c: #include "libguile/threads-plugin.c".
1990
1991 * pthread-threads.c: Temporarily remove debugging functions.
1992
1993 * threads.c, threads.h (scm_yield): Added back.
1994
e29e0b09
MD
19952002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1996
1997 * threads.c (really_launch): Detach before unlocking
1998 thread_admin_mutex in order not to risk being joined.
1999 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
2000 thread_admin_mutex locked during GC.
2001
2002 * pthread-threads.c, pthread-threads.h: Improvements to debugging
2003 functions.
2004
0b6843b1 20052002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
93cd4dcd 2006
6da2dfc4
MD
2007 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
2008 support for debugging mutex operations.
2009
1b92fb6b
MD
2010 * threads.c (scm_thread): Removed filed joining_threads.
2011 (thread_print): Print thread number as well as address of thread
2012 structure.
0b6843b1
MD
2013 (scm_join_thread): Bugfix.
2014 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
2015 scm_timed_wait_condition_variable, scm_signal_condition_variable,
2016 scm_broadcast_condition_variable): Use the low-level API.
2017 (scm_all_threads): Return copy of thread list (to prevent
2018 unintended destruction).
2019 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
1b92fb6b 2020
93cd4dcd
MD
2021 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
2022 pthread "native" recursive mutex support.
2023
2ff4f181
MD
20242002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2025
28d52ebb
MD
2026 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
2027 Simply lock a thread C API recursive mutex.
2028 (SCM_NONREC_CRITICAL_SECTION_START,
2029 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
2030 SCM_REC_CRITICAL_SECTION_END): Removed.
2031
2032 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
2033 direct calls to scm_rec_mutex_lock / unlock around the three calls
2034 to scm_m_expand_body.
2035
2036 * eval.c, eval.h (promise_free): New function.
2037 (scm_force): Rewritten; Now thread-safe; Removed
2038 SCM_DEFER/ALLOW_INTS.
2039
2040 * pthread-threads.h: Added partially implemented plugin interface
2041 for recursive mutexes. These are, for now, only intended to be
2042 used internally within the Guile implementation.
2043
2044 * pthread-threads.c: New file.
2045
2046 * threads.c: Conditionally #include "pthread-threads.c".
2047
2048 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
2049 thread-safe;
2050
2051 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
2052 SCM_GLOBAL_REC_MUTEX): New macros.
2053
2054 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
2055 macros---use mutexes instead.
2056
2057 * tags.h (SCM_IM_FUTURE): New tag.
2058
2059 * eval.c (scm_m_future): New primitive macro.
2060 (SCM_CEVAL): Support futures.
2061 (unmemocopy): Support unmemoization of futures.
2062
2063 * print.c (scm_isymnames): Name of future isym.
2064
2ff4f181
MD
2065 * version.c: Unmade some changes to my private copy that got
2066 committed by mistake.
2067
392d2833
MD
20682002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
2069
e200ddee
MD
2070 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
2071 2002-12-10.
2072
392d2833
MD
2073 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
2074
2075 * gc.c (scm_gc_sweep): Call it here instead, which is a more
2076 logical place.
2077
2078 * threads.c (create_thread): Remember root object until the handle
2079 of the new thread is on all_threads list.
2080
2081 * root.c (scm_make_root): Moved copying of fluids until after
2082 creation of root handle so that the fluids are GC protected. Also
2083 removed the critical section.
2084
c4c52ebe
MD
20852002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
2086
960c408c
MD
2087 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
2088
3cdde9d6 2089 * gc-malloc.c (malloc_mutex): New mutex.
960c408c 2090 (scm_gc_malloc_prehistory): Initialize it.
3cdde9d6
MD
2091 (scm_realloc): Serialize call to realloc
2092 (scm_calloc): Same for calloc.
2093 Thanks to Wolfgang Jaehrling!
2094 (Now we have to make sure all calls to malloc/realloc are made
2095 through scm_malloc.)
2096
960c408c
MD
2097 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
2098
c4c52ebe
MD
2099 * threads.c (really_launch): Release heap (to prevent deadlock).
2100 (create_thread): Release heap before locking thread admin mutex.
2101
b0dc3d71
MD
21022002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
2103
2104 * threads.c (scm_i_thread_invalidate_freelists): New
2105 function.
2106
2107 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
2108
2109 * modules.c (scm_export): Inserted a return statement.
2110
06e80f59
HWN
21112002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
2112
2113 * modules.c (scm_export): new function
2114
2115 * gc-card.c: add a note about malloc()/free() overhead.
2116
a12611c3
MD
21172002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
2118
2119 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
2120 in srcdir.
2121
c7fabadf
MD
21222002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2123
2124 These changes remove scm_ints_disabled (which hasn't has any
2125 effect in Guile for quite some time).
2126
2127 * async.c, error.h (scm_ints_disabled): Removed.
2128
2129 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
2130 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
2131 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
2132 (old_ints): Removed.
2133
2134 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
2135 critical section.
2136 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
2137 SCM_ALLOW_INTS.
2138
9bc4701c
MD
21392002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2140
52340b65
MD
2141 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
2142 Removed accidental #if 0 around these functions.
2143
9bc4701c
MD
2144 These changes are the start of support for preemptive
2145 multithreading. Marius and I have agreed that I commit this code
2146 into the repository although it isn't thoroughly tested and surely
2147 introduces many bugs. The bugs should only be exposed when using
2148 threads, though. Signalling and error handling for threads is
2149 very likely broken. Work on making the implementation cleaner and
2150 more efficient is needed.
2151
2152 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
2153 (SCM_NONREC_CRITICAL_SECTION_START,
2154 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
2155 SCM_REC_CRITICAL_SECTION_END): New macros.
2156 (SCM_CRITICAL_SECTION_START/END): Defined here.
2157
2158 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
2159 the three calls to scm_m_expand_body.
2160
2161 * gc.h: #include "libguile/pthread-threads.h";
2162 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
2163
2164 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
2165 scm_t_key;
2166
2167 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
2168 access.
2169
2170 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
2171
2172 * gc-freelist.c, threads.c (really_launch): Use
2173 SCM_FREELIST_CREATE.
2174
2175 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
2176
2177 * gc.c (scm_i_expensive_validation_check, scm_gc,
2178 scm_gc_for_newcell): Put threads to sleep before doing GC-related
2179 heap administration so that those pieces of code are executed
2180 single-threaded. We might consider rewriting these code sections
2181 in terms of a "call_gc_code_singly_threaded" construct instead of
2182 calling the pair of scm_i_thread_put_to_sleep () and
2183 scm_i_thread_wake_up (). Also, we would want to have as many of
2184 these sections eleminated.
2185
2186 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
2187
2188 * inline.h: #include "libguile/threads.h"
2189
2190 * pthread-threads.h: Macros now conform more closely to the
2191 pthreads interface. Some of them now take a second argument.
2192
2193 * threads.c, threads.h: Many changes.
2194
21952002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2196
2197 * Makefile.am (version.h): Changed $^ --> $< in rule for
2198 version.h.
2199
b2cbe8d8
RB
22002002-12-08 Rob Browning <rlb@defaultvalue.org>
2201
2202 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
2203 (SCM_MINOR_VERSION): use @--@ substitution now.
2204 (SCM_MICRO_VERSION): use @--@ substitution now.
2205 (scm_effective_version): new function prototype.
2206
2207 * version.c (scm_effective_version): new function, also add
2208 effective-version.
2209
2210 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
2211 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
2212 SCM_LIBRARY_DIR.
2213 (version.h): generate this here rather than configure.in. This
2214 approach tracks source edits better (i.e. more immediately).
2215 Might be worth considering for other .in files too.
2216
5441c65c
MV
22172002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
2218
2219 Reorganized thread package selection. A thread package now only
2220 implements a small set of pthread like functions and Guile
2221 implements the rest on top of that. Guile's implementation is
2222 what the "coop-pthreads" package has been previously. Support for
2223 "coop" threads has been removed until I get time to add it again.
2224
2225 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
2226 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
2227 null-threads.c, coop-pthreads.c.
2228 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
2229 pthread-threads.h.
2230
2231 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
2232
2233 * threads.h: Do not include "libguile/coop-defs.h". Include
2234 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
2235 (previously deprecated) C level thread API prototypes. They are
2236 now in the thread package specific headers, "null-threads.h" and
2237 "pthread-threads.h".
2238 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
2239 New.
2240 (scm_threads_init): Removed.
2241 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
2242 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
2243 SCM_I_THREAD_SWITCH_COUNT): Define here.
2244 (scm_single_thread_p): Removed.
2245 (scm_call_with_new_thread): Take two args directly instead of list
2246 of two args.
2247 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
2248 SCM_SET_THREAD_LOCAL_DATA): Define here.
2249
2250 * threads.c: Merged with "coop-pthreads.c".
2251
2252 * null-threads.h: Implement pthread-like API as a set of macros.
2253
2254 * pthread-threads.h: New, implement pthread-like API by deferring
2255 to pthread itself.
2256
2257 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
2258 has been lost in the reorganization.
2259
504d99c5
MD
22602002-12-01 Mikael Djurfeldt <mdj@linnaeus>
2261
2262 The following change makes it possible to move procedure
2263 application dispatch outside inner loops. The motivation was
2264 clean implementation of efficient replacements of R5RS primitives
2265 in SRFI-1.
2266
2267 The semantics is clear: scm_trampoline_N returns an optimized
2268 version of scm_call_N (or NULL if the procedure isn't applicable
2269 on N args).
2270
2271 Applying the optimization to map and for-each increases efficiency
2272 noticeably. For example, (map abs ls) is 8 times faster than
2273 before.
2274
2275 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
2276
2277 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
2278
2279 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
2280 (map, for-each): Handle also application on two args as a special
2281 case; Use trampolines.
2282
2283 Other changes:
2284
2285 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
2286 (subr2oless): Removed.
2287 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
2288 vector GC protected.
2289
2290 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
2291 scm_out_of_range.
2292
63dd3413
DH
22932002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
2294
2295 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
2296
4ba5f279
MD
22972002-11-17 Mikael Djurfeldt <mdj@linnaeus>
2298
2299 * debug.c (scm_make_iloc): Added missing "return".
2300
56ae231f
MV
23012002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
2302
2303 * strports.c (scm_eval_string_in_module): Validate second arg to
2304 be a module. Thanks to Arno Peters!
2305
80b28865
DH
23062002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
2307
2308 * .cvsignore: remove goops.c
2309
c88b1456
DH
23102002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
2311
2312 * modules.c (scm_env_top_level, scm_lookup_closure_module,
2313 module_variable, scm_module_lookup_closure,
2314 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
2315 scm_system_module_env_p): Don't compare SCM values with C
2316 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
2317 over SCM_NFALSEP.
2318
a8a19efc
DH
23192002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
2320
2321 * eval.h (SCM_MAKE_ILOC): New macro.
2322
2323 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
2324 the iloc bitpattern here.
2325
76734914
MD
23262002-11-14 Mikael Djurfeldt <mdj@linnaeus>
2327
2328 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
2329 part of the API, otherwise it's difficult to write Guile
2330 extensions using non-blocking I/O => moved #include
2331 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
2332
2333 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
2334 s_unlock_mutex.
2335
8b5b4a75
MV
23362002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
2337
2338 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
2339 are defined in configure.in.
2340
2341 * threads.c: Removed SCM_API from function definitions. SCM_API
2342 is only for declarations.
2343
e5a83084
MD
23442002-11-07 Mikael Djurfeldt <mdj@linnaeus>
2345
9be8bb45
MD
2346 * coop-pthreads.h: Added support for thread specific data to the
2347 generic C API for the coop-pthreads case.
2348
e5a83084
MD
2349 * threads.c, threads.h (scm_cond_init): Undo unintentional API
2350 change.
6c214b62 2351 (scm_cond_broadcast): Added missing function.
e5a83084 2352
7edf178e
MV
23532002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2354
2355 * coop.c (coop_next_runnable_thread): Removed, wich should have
2356 happened when GUILE_ISELECT was hard-wired.
2357
7f5b1b77
MV
23582002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
2359
7caa1b07
MV
2360 * Makefile.am (libguile_la_SOURCES): Added threads.c
2361 (DOT_DOC_FILES): Added threads.doc.
2362 (DOT_X_FILES): Added threads.x.
2363 (EXTRA_libguile_la_SOURCES): Removed threads.c.
2364 (noinst_HEADERS): Added coop-pthreads.c.
2365 (modinclude_HEADERS): Added coop-pthreads.h.
2366
2367 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
2368 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
2369
bb11cbf4
MV
2370 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
2371 Thanks to Bill Schottstaedt!
2372
1d4cbbed
MV
2373 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
2374
7f5b1b77
MV
2375 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
2376 SCM_COPT_THREADS is defined.
2377 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
2378 is defined.
2379
2380 * coop-pthreads.c: Some harmless renamings of internal stuff.
2381 (create_thread): New, generalized version of
2382 scm_call_with_new_thread.
2383 (scm_call_with_new_thread): Use it.
2384 (scm_spawn_thread): New, use create_thread.
2385
d52f53b1
MV
23862002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
2387
2388 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
2389 start testing it now.
2390
2391 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
2392 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
2393 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
2394 is defined.
2395
30f920c3
MV
23962002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
2397
2398 * scmsigs.c (signal_cell_handlers, install_handler_data,
2399 scm_delq_spine_x, really_install_handler, install_handler): New
2400 scheme for triggering signal handlers, to simplify take_signal.
2401 (take_signal): Simplified, to avoid race conditions.
2402 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
2403 hasn't exited yet.
2404
2405 * async.c (scm_async_click): Reset pending_asyncs, handle
2406 signal_asyncs. Don't set cdr of a non-signal async to #f.
2407 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
2408 always. Set pending_asyncs.
2409 (scm_system_async_mark_for_thread): Check that thread has not
2410 exited.
2411 (scm_unmask_signals, decrease_block): Call scm_async_click after
2412 block_asyncs becomes zero.
2413
2414 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
2415 active_asyncs.
2416
2417 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
2418 fields.
2419 * root.c (root_mark): Mark them.
2420 (make_root): Initialize them.
2421
2422 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
2423 USE_COOP_THREADS.
2424 (scm_internal_select): Define one version for USE_COOP_THREADS and
2425 one for USE_NULL_THREADS.
2426 (scm_init_iselect): Likewise.
2427
2428 * inline.h (scm_cell, scm_double_cell): Also allow
2429 USE_COPT_THREADS to not protect the slot initializers.
2430
2431 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
2432 because threads need to be initialized before the stack, but
2433 gsubrs such as scm_timed_condition_variable_wait can only be
2434 created later.
2435
2436 * threads.h: Include "coop-pthreads.h" when requested.
2437 (scm_threads_make_mutex, scm_threads_lock_mutex,
2438 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
2439 not implemented anyway.
2440 (scm_init_thread_procs, scm_try_mutex,
2441 scm_timed_condition_variable_wait,
2442 scm_broadcast_condition_variable, scm_c_thread_exited_p,
2443 scm_thread_exited_p): New prototypes.
2444 (struct timespec): Define if not already defined.
2445 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
2446 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
2447 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
2448 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
2449 deprecated.
2450
2451 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
2452 requested.
2453 (scm_thread_exited_p): New.
2454 (scm_try_mutex, scm_broadcast_condition_variable): Newly
2455 registered procedures.
2456 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
2457 Use the latter as the procedure for "wait-condition-variable",
2458 thus offering a optional timeout parameter to Scheme.
2459 (scm_wait_condition_variable): Implement in terms of
2460 scm_timed_wait_condition_variable.
2461 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
2462 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
2463 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
2464 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
2465 scm_make_mutex, etc, and deprecate.
2466 (scm_init_threads): Do not create smobs, leave this to
2467 scm_threads_init. Do not include "threads.x" file.
2468 (scm_init_thread_procs): New, include "threads.x" here.
2469
2470 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
2471 scm_null_mutex_lock, scm_null_mutex_unlock,
2472 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
2473 scm_null_condvar_wait, scm_null_condvar_signal,
2474 scm_null_condvar_destroy): Removed.
2475 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
2476 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
2477 scm_cond_destory): Do not define, they are now deprecated and
2478 handled by threads.{h,c}.
2479
2480 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
2481 (scm_threads_init): Create smobs here, using the appropriate
2482 sizes.
2483 (block): Removed, now unused.
2484 (scm_c_thread_exited_p): New.
2485 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
2486 scm_null_mutex_destroy, scm_null_condvar_init,
2487 scm_null_condvar_wait, scm_null_condvar_signal,
2488 scm_null_condvar_destroy): Removed and updated users to do their
2489 task directly.
2490 (scm_try_mutex, timeval_subtract,
2491 scm_timed_wait_condition_variable,
2492 scm_broadcast_condition_variable): New.
2493 (scm_wait_condition_variable): Removed.
2494
2495 * coop-defs.h (coop_m): Added 'level' field.
2496 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
2497 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
2498 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
2499 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
2500 define.
2501 (coop_condition_variable_broadcast): New.
2502
2503 * coop-threads.c (scm_threads_init): Create smobs here, using the
2504 appropriate sizes.
2505 (scm_c_thread_exited_p, scm_try_mutex,
2506 scm_timed_wait_condition_variable,
2507 scm_broadcast_condition_variable): New.
2508 (scm_wait_condition_variable): Removed.
2509
2510 * coop.c (coop_new_mutex_init): Initialize level.
2511 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
2512 level.
2513 (coop_condition_variable_signal): Renamed to
2514 coop_condition_variable_broadcast and reimplemented in terms of
2515 that. Thus...
2516 (coop_condition_variable_broadcast): New.
2517
2518 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
2519
2520 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
2521
087ed40d
MV
25222002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
2523
65a23095
MV
2524 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
2525 of system headers.
2526
087ed40d
MV
2527 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
2528 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
30f920c3 2529 give better error messages. Thanks to Bill Schottstaedt!
087ed40d 2530
5ec1d2c8
DH
25312002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
2532
2533 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
2534 scm_definedp to scm_defined_p and deprecated scm_definedp.
2535
100ae50d
DH
25362002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
2537
2538 * async.h, async.c (scm_system_async): Fixed deprecation to work
2539 correctly when deprecated features are excluded.
2540
2794cb50
MV
25412002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2542
2543 * async.c (scm_system_async_mark_for_thread): Validate thread
2544 argument.
2545
2546 * coop-threads.c (scm_i_thread_root): Do not validate argument.
2547
2548 * feature.c (scm_init_feature): Don't add 'threads' for
2549 USE_NULL_THREADS.
2550
2551 * inline.h (scm_cell, scm_double_cell): Also allow
2552 USE_NULL_THREADS to not protect the slot initializers.
2553
2554 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
2555 "USE_THREAD".
2556
2557 * Makefile.am (noinst_HEADERS): Added null-threads.c.
2558 (modinclude_HEADERS): Added null-threads.h.
2559
2560 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
2561 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
2562 (scm_init_threads): Use generic type names scm_t_mutex and
2563 scm_t_cond instead of coop_m and coop_c.
2564
2565 * null-threads.c, null-threads.h: New files.
2566
ff810d7a
MV
25672002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
2568
2569 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
2570 This is to support makes that know about "$<" only in pattern
2571 rules, like Sun's make.
2572
a90bdb73
MV
25732002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
2574
2575 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
2576 substitution. Thanks to David Allouche!
2577
e71a8bf2
DH
25782002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
2579
2580 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
2581 !SCM_ENABLE_DEPRECATED.
2582
41f77ff5
MV
25832002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2584
504d99c5 2585 * async.c (scm_system_async_mark_for_thread): Only call
41f77ff5
MV
2586 scm_i_thread_root when USE_THREADS is defined. Use scm_root
2587 otherwise.
2588
2589 * scmsigs.c (take_signal): Only call scm_i_thread_root when
2590 USE_THREADS is defined. Use scm_root otherwise.
2591 (scm_sigaction_for_thread): Ignore THREAD argument when
2592 USE_THREADS is not defined. Also, move THREAD argument defaulting
2593 out of HAVE_SIGACTION section, which was a bug.
2594
6d16b125
MV
25952002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2596
2597 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
2598 signal_handlers, not the closure that is used as the async.
2599 The closure is stored in signal_handler_cells, as previously.
2600
acfa1f52
MV
26012002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
2602
2603 * root.h (scm_root_state): Added 'block_async' slot.
2604 (scm_active_asyncs): Removed abbrev.
2605 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
2606
2607 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
2608 abbrev.
2609
2610 * async.h (scm_call_with_blocked_asyncs,
2611 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
2612 scm_c_call_with_unblocked_asyncs): New prototypes.
2613 (scm_mask_signals, scm_unmask_signals): Deprecated.
2614 (scm_mask_ints): Turned into a macro.
2615 * async.c (scm_mask_ints): Removed.
2616 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
2617 this should not be necessary.
2618 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
2619 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
2620 deprecation warning and check for errornous use. Set block_asyncs
2621 instead of scm_mask_ints.
2622 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
2623 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
2624 scm_c_call_with_unblocked_asyncs): New.
2625
2626 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
2627 Asyncs are enabled by default.
2628
34010f56
NJ
26292002-10-09 Neil Jerram <neil@ossau.uklinux.net>
2630
2631 * vports.c (scm_make_soft_port): Allow vector argument to carry a
2632 6th element: an input waiting thunk.
2633 (sf_input_waiting): New.
2634
9310d6f2
MV
26352002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
2636
2637 * root.c (root_mark): Mark active_asyncs slot.
2638
2639 * async.c (scm_async_click): Set the cdr of a executed handler
2640 cell to SCM_BOOL_F, not SCM_EOL.
2641 (scm_i_queue_async_cell): Queue the cell at the end of the list,
2642 and only if the handler procedure is not already present.
2643 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
2644 with SCM_BOOL_F.
2645 * scmsigs.c (scm_sigaction_for_thread): Likewise.
2646
ac48c719
RB
26472002-10-04 Rob Browning <rlb@defaultvalue.org>
2648
1360a142
RB
2649 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
2650
2651 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
2652 scm_lt_dlopenext, and scm_lt_dlerror.
2653 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
2654 and scm_lt_dlerror.
2655 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
2656 and scm_lt_dlerror.
2657 (sysdep_dynl_init): switch to scm_lt_dlinit();
2658
2659 * Makefile.am (libguile_la_LIBADD): switch to use
2660 libguile-ltdl.la.
2661
504d99c5 2662 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
ac48c719 2663
497092c9
MV
26642002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
2665
2666 * scmsigs.h (scm_sigaction_for_thread): New prototype.
2667 * scmsigs.c (got_signal): Removed.
2668 (signal_handler_cells, signal_handler_threads): New.
2669 (take_signal): Queue the cell of the signal for the specified
2670 thread. Reset the signal handler on systems that don't have
2671 sigaction.
2672 (sys_deliver_signals): Removed.
2673 (close_1): New.
2674 (scm_sigaction_for_thread): Renamed from scm_sigaction and
2675 extended to also set the thread of a signal and allocate a cell
2676 for it. Keep the Scheme name "sigaction". Check that signum is
2677 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
2678 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
2679 (scm_init_scmsigs): Allocate signal_handler_cells and
2680 signal_handler_threads vectors.
2681
2682 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
2683 that system asnycs and user asyncs are separated. Reimplemented
2684 system asyncs to work per-thread.
2685
2686 * gc.c (scm_init_gc): Do not use scm_system_async.
2687
2688 * async.h (scm_asyncs_pending, scm_set_tick_rate,
2689 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
2690 Removed prototypes.
2691 (scm_i_queue_async_cell): New.
2692
2693 * __scm.h (scm_asyncs_pending_p): Removed.
2694 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
2695 scm_asyncs_pending_p.
2696
2697 * async.h (scm_system_async_mark_for_thread): New prototype.
2698
2699 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
2700
2701 * root.h (scm_root_state): Added new "active_asyncs" slot.
2702 * root.c (scm_make_root): Initialize it to SCM_EOL.
2703
2704 * coop-defs.h (coop_t): Added new "handle" slot.
2705 * coop-threads.c (all_threads, scm_current_thread,
2706 scm_all_threads, scm_i_thread_root): New.
2707 (scm_threads_init): Add main thread to all_threads.
2708 (scheme_launch_thread): Remove thread from all_threads when it
2709 terminates.
2710 (scm_call_with_new_thread): Initialize handle slot of coop_t
2711 structure and add new thread to all_threads.
2712 (scm_spawn_thread): Likewise.
2713
2714 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
2715 * threads.c (scm_current_thread, scm_all_threads): Register as
2716 primitives.
2717
2718 * dynl.c: Use scm_lt_ prefix for libltdl functions.
2719
480fa28d
NJ
27202002-09-29 Neil Jerram <neil@ossau.uklinux.net>
2721
2722 * script.c (scm_compile_shell_switches): Fix bad spelling of
2723 `explicitly' in comment.
2724
27252002-09-28 Neil Jerram <neil@ossau.uklinux.net>
2726
2727 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
2728 Refer to provided? in doc string rather than deprecated feature?.
2729
3553e1d1
GH
27302002-09-24 Gary Houston <ghouston@arglist.com>
2731
2732 * inline.h (scm_double_cell): prevent reordering of statements
2733 with any following code (for GCC 3 strict-aliasing).
2734 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
2735 the earlier version of the reordering prevention.
2736
4ad0814a
HWN
27372002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
2738
2739 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
2740
e88e4f2e
HWN
27412002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
2742
2743 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
2744 protection.
2745
1e71eafb
HWN
27462002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
2747
2748 * inline.h: include stdio.h
2749
2750 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
2751
61ef9c1f
HWN
27522002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
2753
dac04e9f
HWN
2754 * gc-segment.c (scm_i_make_initial_segment): check user settings
2755 for sanity.
2756
2757 * gc-malloc.c (scm_gc_init_malloc): check user settings for
2758 sanity.
dac04e9f
HWN
2759
2760 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
2761
ffd72400
HWN
2762 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
2763
2764 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
1e71eafb
HWN
2765 these won't ever wrap around with high memory usage. Thanks to
2766 Sven Hartrumpf for finding this.
ffd72400 2767
5bd4a949
HWN
2768 * gc-freelist.c: include <stdio.h>
2769
61ef9c1f
HWN
2770 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
2771
ffd0ef3b
MV
27722002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
2773
a27e3d14
MV
2774 * vectors.h (SCM_VECTOR_REF): New.
2775
ffd0ef3b
MV
2776 * snarf.h (SCM_DEFINE_PUBLIC): New.
2777
f8a1712b
MV
27782002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
2779
2780 * socket.c (scm_addr_vector): Added size of address to arguments.
2781 Use it to avoid accessing a non-existent path in a sockaddr_un.
2782 Changed all callers.
2783
7200a36b
HWN
27842002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
2785
1383773b
HWN
2786 * gc.h: remove DOUBLECELL card flags.
2787
2788 * gc-malloc.c (scm_calloc): try to use calloc() before calling
2789 scm_realloc().
2790
2791 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
2792 init loop; handle this from scm_init_card_freelist()
2793
2794 * gc-card.c (scm_init_card_freelist): init bit vector here.
2795
7200a36b 2796 * numbers.c (scm_make_real): prevent reordering of statements
8fa5786d 2797 num2float.i.c (FLOAT2NUM): idem
7200a36b 2798
9981de3a
HWN
27992002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
2800
2801 * eval.h: prepend libguile/ to include path
2802
19647556
MV
28032002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
2804
2805 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
2806