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