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