* goops.scm (compute-getters-n-setters): Allow for primitive
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
1b43d24c
DH
12003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
2
3 * eval.c (SCM_BIT8, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
4 file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
5
aec16f99
DH
62003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
7
8 * numbers.c (scm_logtest): Fixed argument bug in the call to
9 mpz_and, which showed up when compiling with SCM_DEBUG defined.
10
f96460ce
DH
112003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
12
13 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
14 type errors that showed up when compiling with SCM_DEBUG defined.
15
d0f6ceb8
DH
162003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
17
18 * continuations.c, continuations.h, eval.c, eval.h, extensions.c,
19 gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h,
20 throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
21 fix compile errors with --disable-deprecated.
22
19a7a089
RB
232003-04-17 Rob Browning <rlb@defaultvalue.org>
24
25 * numbers.c (scm_integer_expt): fix case where we were declaring
26 vars in the middle of a statement block. Thanks to Thamer
27 Al-Harbash.
28
47cd67db
MD
292003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
30
0fd7dcd3
MD
31 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
32 change.
33
47cd67db
MD
34 * eq.c (scm_eqv_p): Turned into a primitive generic.
35
3b8b889c
RB
362003-04-16 Rob Browning <rlb@defaultvalue.org>
37
312006bb
RB
38 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
39 Thanks to Boyd Gerber.
40 Added check for __arm__ in addition to arm for LINUX and copied
41 __s390__ defines from upstream libgc. Thanks to James Treacy for
42 reporting the problems.
c7ef2ea1 43
3b8b889c
RB
44 * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT.
45
46 * socket.c: use SCM_CHAR_BIT.
47
48 * random.c (scm_c_random_bignum): use SCM_CHAR_BIT.
49
50 * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT.
51
43261b39
MD
522003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
53
54 * feature.c (scm_init_feature): Always add threads feature.
55
58241edc
MD
562003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
57
58 * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
59 scm_at_assert_bound_ref. (We don't want the unbound check. See
60 oop/goops/active-slot.scm.)
61
94e91275
RB
622003-04-14 Rob Browning <rlb@defaultvalue.org>
63
64 * tags.h: scm_t_intptr should have been intptr_t.
65
3071ea27
RB
662003-04-13 Rob Browning <rlb@defaultvalue.org>
67
68 * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc"
69 test. Instead use
70 #if defined (sparc) || defined (__sparc__) || defined (__sparc)
71 as gc_os_dep.c suggests is appropriate.
72
73 * goops.c (prep_hashsets): make static to match prototype.
74 (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert
75 Chin.
76
77 * c-tokenize.lex: remove trailing comma from enum. Thanks to
78 Albert Chin.
79
80 * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas
81 Klausner.
82
21ab2aeb
MD
832003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
84
85 * goops.c (scm_sys_prep_layout_x): Instance allocation is now
86 indicated through extra fields in getters-n-setters.
87 (scm_add_slot): Adapted to new format of getters_n_setters slot.
88 (Thanks to Andy Wingo.)
89
dff96e95
HWN
902003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
91
92 * gc-segment.c: add comment
93
07921c76
RB
942003-04-07 Rob Browning <rlb@defaultvalue.org>
95
b5331f10
RB
96 * debug.h: change "id" arg name to "info_id" to avoid objective-c
97 clash.
98
07921c76
RB
99 * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael
100 and add regression test to standalone/.
101
1022003-04-06 Rob Browning <rlb@defaultvalue.org>
103
104 * strings.c (scm_mem2string): use memcpy rather than by-hand loop.
105 Thanks to Dale P. Smith.
106
107 * random.c: #include gmp.h.
108 (scm_c_random_bignum): normalize result on return.
109
110 * init.c: #include gmp.h.
111
112 * numbers.h: remove the gmp.h #include (not needed now).
113
114 * posix.h: change occurences of "id" to something else so we don't
115 cause trouble when included via objective-c (can't hurt, might
116 help). Still have usage in debug.h, though.
117
938f6b7c
MD
1182003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
119
372691d8
MD
120 * random.c (scm_c_random_bignum): Don't generate a random number
121 equal to m (the second argument of scm_c_random_bignum); only
122 generate numbers in the range 0 <= r < m.
c5f268f8
MD
123 (scm_c_default_rstate): Use SCM_VARIABLE_REF to access
124 scm_var_random_state.
372691d8 125
938f6b7c
MD
126 * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then
127 clause.
128
6cdb8c3f
RB
1292003-04-05 Rob Browning <rlb@defaultvalue.org>
130
938f6b7c 131 * modules.c (scm_module_import_interface): move declaration of
6cdb8c3f
RB
132 uses before any code.
133
15635be5
MD
1342003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
135
1ecfd013
MD
136 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
137 not top_srcdir.
138
15635be5
MD
139 * hashtab.c (rehash_after_gc): Clear to_rehash list before
140 processing it in order to avoid an infinite loop.
141
142 * print.c (scm_prin1): Remember old state of pstate->writingp.
143
73be1d9e
MV
1442003-04-05 Marius Vollmer <mvo@zagadka.de>
145
146 * Changed license terms to the plain LGPL thru-out.
147
ad815c06
RB
1482003-04-04 Rob Browning <rlb@defaultvalue.org>
149
150 * socket.c (FLIPCPY_NET_HOST_128): new macro.
151 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
152 rewrite to handle GMP bignums.
153
154
155 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
156
157 * ports.c (scm_getc): minor tweak.
158
159 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
160 rewrite to handle GMP bignums.
161
162 * numbers.c: rewrite *many* functions to handle GMP bignums.
163
164 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
165 handle GMP bignums.
166
167 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
168
169 * init.c (check_config): remove SCM_BIGDIG conditionals.
170 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
171
172 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
173
174 * eval.c: remove SCM_BIGDIG conditionals.
175
176 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
177
6cdb8c3f
RB
1782003-03-31 Rob Browning <rlb@defaultvalue.org>
179
180 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
181 to Kevin Ryde.)
182
1832003-03-27 Rob Browning <rlb@defaultvalue.org>
184
185 * threads.h: fix various preprocessor usages of new public
186 symbols to expect 0 or 1 values rather than 1 or undefined.
187 i.e. change #ifdef to #if, etc.
188
189 * threads.c: fix various preprocessor usages of new public
190 symbols to expect 0 or 1 values rather than 1 or undefined.
191 i.e. change #ifdef to #if, etc.
192
193 * tags.h: fix various preprocessor usages of new public
194 symbols to expect 0 or 1 values rather than 1 or undefined.
195 i.e. change #ifdef to #if, etc.
196
197 * stacks.c: fix various preprocessor usages of new public
198 symbols to expect 0 or 1 values rather than 1 or undefined.
199 i.e. change #ifdef to #if, etc.
200
201 * stackchk.h: fix various preprocessor usages of new public
202 symbols to expect 0 or 1 values rather than 1 or undefined.
203 i.e. change #ifdef to #if, etc.
204
205 * stackchk.c: fix various preprocessor usages of new public
206 symbols to expect 0 or 1 values rather than 1 or undefined.
207 i.e. change #ifdef to #if, etc.
208
209 * sort.c: fix various preprocessor usages of new public
210 symbols to expect 0 or 1 values rather than 1 or undefined.
211 i.e. change #ifdef to #if, etc.
212
213 * read.c: fix various preprocessor usages of new public
214 symbols to expect 0 or 1 values rather than 1 or undefined.
215 i.e. change #ifdef to #if, etc.
216
217 * random.c: fix various preprocessor usages of new public
218 symbols to expect 0 or 1 values rather than 1 or undefined.
219 i.e. change #ifdef to #if, etc.
220
221 * print.c: fix various preprocessor usages of new public
222 symbols to expect 0 or 1 values rather than 1 or undefined.
223 i.e. change #ifdef to #if, etc.
224
225 * objects.c: fix various preprocessor usages of new public
226 symbols to expect 0 or 1 values rather than 1 or undefined.
227 i.e. change #ifdef to #if, etc.
228
229 * numbers.h: fix various preprocessor usages of new public
230 symbols to expect 0 or 1 values rather than 1 or undefined.
231 i.e. change #ifdef to #if, etc.
232
233 * null-threads.c: fix various preprocessor usages of new public
234 symbols to expect 0 or 1 values rather than 1 or undefined.
235 i.e. change #ifdef to #if, etc.
236
237 * lang.c: fix various preprocessor usages of new public
238 symbols to expect 0 or 1 values rather than 1 or undefined.
239 i.e. change #ifdef to #if, etc.
240
241 * lang.h: fix various preprocessor usages of new public
242 symbols to expect 0 or 1 values rather than 1 or undefined.
243 i.e. change #ifdef to #if, etc.
244
245 * iselect.h: fix various preprocessor usages of new public
246 symbols to expect 0 or 1 values rather than 1 or undefined.
247 i.e. change #ifdef to #if, etc.
248
249 * init.c: fix various preprocessor usages of new public
250 symbols to expect 0 or 1 values rather than 1 or undefined.
251 i.e. change #ifdef to #if, etc.
252
253 * gh_data.c: fix various preprocessor usages of new public
254 symbols to expect 0 or 1 values rather than 1 or undefined.
255 i.e. change #ifdef to #if, etc.
256
257 * gh.h: fix various preprocessor usages of new public
258 symbols to expect 0 or 1 values rather than 1 or undefined.
259 i.e. change #ifdef to #if, etc.
260
261 * gen-scmconfig.c: change most new public symbols to be defined to
262 0 or 1 rather than being either 1 or undefined.
263
264 * gc_os_dep.c: fix various preprocessor usages of new public
265 symbols to expect 0 or 1 values rather than 1 or undefined.
266 i.e. change #ifdef to #if, etc.
267 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
268
269 * gc.h: fix various preprocessor usages of new public
270 symbols to expect 0 or 1 values rather than 1 or undefined.
271 i.e. change #ifdef to #if, etc.
272
273 * gc-card.c: fix various preprocessor usages of new public
274 symbols to expect 0 or 1 values rather than 1 or undefined.
275 i.e. change #ifdef to #if, etc.
276
277 * gc-mark.c: fix various preprocessor usages of new public
278 symbols to expect 0 or 1 values rather than 1 or undefined.
279 i.e. change #ifdef to #if, etc.
280
281 * feature.c: fix various preprocessor usages of new public
282 symbols to expect 0 or 1 values rather than 1 or undefined.
283 i.e. change #ifdef to #if, etc.
284
285 * evalext.c: fix various preprocessor usages of new public
286 symbols to expect 0 or 1 values rather than 1 or undefined.
287 i.e. change #ifdef to #if, etc.
288
289 * eval.h: fix various preprocessor usages of new public
290 symbols to expect 0 or 1 values rather than 1 or undefined.
291 i.e. change #ifdef to #if, etc.
292
293 * eval.c: fix various preprocessor usages of new public
294 symbols to expect 0 or 1 values rather than 1 or undefined.
295 i.e. change #ifdef to #if, etc.
296
297 * eq.c: fix various preprocessor usages of new public
298 symbols to expect 0 or 1 values rather than 1 or undefined.
299 i.e. change #ifdef to #if, etc.
300
301 * coop.c: fix various preprocessor usages of new public
302 symbols to expect 0 or 1 values rather than 1 or undefined.
303 i.e. change #ifdef to #if, etc.
304
305 * coop-threads.c: fix various preprocessor usages of new public
306 symbols to expect 0 or 1 values rather than 1 or undefined.
307 i.e. change #ifdef to #if, etc.
308
309 * coop-pthreads.c: fix various preprocessor usages of new public
310 symbols to expect 0 or 1 values rather than 1 or undefined.
311 i.e. change #ifdef to #if, etc.
312
313 * coop-defs.h: fix various preprocessor usages of new public
314 symbols to expect 0 or 1 values rather than 1 or undefined.
315 i.e. change #ifdef to #if, etc.
316
317 * convert.i.c: fix various preprocessor usages of new public
318 symbols to expect 0 or 1 values rather than 1 or undefined.
319 i.e. change #ifdef to #if, etc.
320
321 * continuations.c: fix various preprocessor usages of new public
322 symbols to expect 0 or 1 values rather than 1 or undefined.
323 i.e. change #ifdef to #if, etc.
324
325 * _scm.h: fix various preprocessor usages of new public symbols to
326 expect 0 or 1 values rather than 1 or undefined. i.e. change
327 #ifdef to #if, etc.
328
d11d697a
MV
3292003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
330
9686f86d
MV
331 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
332
333 * deprecated.c, deprecated.h: New files, to collect deprecated
334 things in one place.
335 * Makefile.am: Added them in all the right places.
336
d11d697a
MV
337 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
338 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
339 builds work.
9686f86d
MV
340 (DOT_X_FILES): Removed "iselect.x".
341 (DOT_DOC_FILES): Removed "iselect.doc".
d11d697a 342
e3c0c3b9
RB
3432003-03-25 Rob Browning <rlb@defaultvalue.org>
344
345 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
346 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
347
348 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
349
350 * vports.c: #include <config.h> if HAVE_CONFIG_H.
351
352 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
353 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
354
355 * threads.h: replace usage of struct timespect with
356 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
357 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
358 favor of scm_t_timespec from scmconfig.h.
359
360 * threads.c: move libguile/_scm.h include to the top so we pick up
361 any critical defines like _GNU_SOURCE early. Replace usage of
362 struct timespect with scm_t_timespec. Replace usage of
363 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
364 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
365
366 * threads-plugin.h: replace usage of struct timespect with
367 scm_t_timespec.
368
369 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
370 usage of struct timespect with scm_t_timespec.
371
372 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
373 HAVE_INTTYPES_H handling to scmconfig.h. #include
374 "libguile/__scm.h". Rework handling for scm_t_bits,
375 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
376 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
377 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
378 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
379 SCM_HAVE_ARRAYS.
380
381 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
382
383 * struct.c: #include <config.h> if HAVE_CONFIG_H.
384
385 * strports.c: #include <config.h> if HAVE_CONFIG_H.
386
387 * strop.c: #include <config.h> if HAVE_CONFIG_H.
388
389 * stime.h: move handling of time related headers to scmconfig.h.
390
391 * stime.c: #include <config.h> if HAVE_CONFIG_H.
392
393 * stacks.c: replace usage of STACK_GROWS_UP with
394 SCM_STACK_GROWS_UP.
395
396 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
397 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
398
399 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
400 of uint32 and HAVE_UINT_32 with scm_t_int32.
401
402 * smob.c: #include <config.h> if HAVE_CONFIG_H.
403
404 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
405
406 * script.c: #include <config.h> if HAVE_CONFIG_H.
407
408 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
409
410 * scmconfig.h.top: new file -- preamble for scmconfig.h.
411
412 * rw.c: #include <config.h> if HAVE_CONFIG_H.
413
414 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
415
416 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
417
418 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
419
420 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
421 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
422 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
423 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
424
425 * ramap.c: replace usage of HAVE_LONG_LONGS with
426 "SCM_SIZEOF_LONG_LONG != 0".
427
428 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
429 "libguile/scmconfig.h".
430
431 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
432
433 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
434 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
435
436 * posix.c: #include <config.h> if HAVE_CONFIG_H.
437
438 * ports.c: #include <config.h> if HAVE_CONFIG_H.
439
440 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
441
442 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
443 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
444 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
445 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
446 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
447 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
448 "SCM_SIZEOF_LONG_LONG != 0".
449
450 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
451 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
452 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
453 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
454
455 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
456
457 * null-threads.h: replace usage of struct timespect with
458 scm_t_timespec.
459
460 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
461
462 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
463 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
464 scm_t_uint64 and rename usages.
465
466 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
467
468 * load.c: #include <config.h> if HAVE_CONFIG_H.
469
470 * iselect.h: move handling of time related headers to scmconfig.h.
471 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
472 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
473 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
474
475 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
476 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
477 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
478
479 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
480
481 * inline.h: #include "libguile/__scm.h" at the top. Change code
482 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
483 what to do instead of creating a new public #define. Rename usage
484 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
485 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
486 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
487
488 * inline.c: rearrange handling -- now we just #define
489 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
490 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
491 appropriate, and we use that in inline.h along with the above
492 define to determine how to respond.
493
494 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
495 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
496
497 * guile.c: #include <config.h> if HAVE_CONFIG_H.
498
499 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
500 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
501
502 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
503
504 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
505
506 * gen-scmconfig.c: new file -- see comments in file for details.
507
508 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
509
510 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
511 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
512
513 * gc.h: replace usage of SIZEOF_LONG with
514 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
515 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
516 since we handle that in scmconfig.h now.
517
518 * gc.c: #include <config.h> if HAVE_CONFIG_H.
519
520 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
521 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
522 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
523
524 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
525
526 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
527 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
528
529 * fports.c: #include <config.h> if HAVE_CONFIG_H.
530
531 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
532
533 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
534 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
535
536 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
537
538 * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
539 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
540
541 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
542 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
543 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
544 with "SCM_SIZEOF_LONG_LONG != 0".
545
546 * error.c: #include <config.h> if HAVE_CONFIG_H.
547
548 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
549 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
550 with "SCM_SIZEOF_LONG_LONG != 0".
551
552 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
553
554 * coop.c: replace usage of struct timespect with scm_t_timespec.
555 #include <config.h> if HAVE_CONFIG_H.
556
557 * coop-threads.c: #include "libguile/_scm.h" early. Replace
558 usage of struct timespect with scm_t_timespec. Replace usage of
559 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
560
561 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
562 usage of struct timespect with scm_t_timespec. Replace usage of
563 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
564
565 * coop-defs.h: move handling of time related headers to
566 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
567 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
568 timespect with scm_t_timespec.
569
570 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
571
572 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
573
574 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
575 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
576
577 * continuations.c: move libguile/_scm.h include to the top so we
578 pick up any critical defines like _GNU_SOURCE early.
579
580 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
581
582 * async.c: #include <config.h> if HAVE_CONFIG_H.
583
584 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
585
586 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
587 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
588
589 * __scm.h: move libguile/scmconfig.h include up to the top, so
590 we're sure to pick up any critical defines like _GNU_SOURCE early.
591 #include <limits.h> removed in favor of scmconfig.h inclusion when
592 appropriate. STDC_HEADERS based inclusion of stdlib.h,
593 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
594 scmconfig.h inclusion when appropriate. Various Win32 related
595 definitions removed in favor of scmconfig.h inclusion when
596 appropriate.
597 (HAVE_UINTPTR_T): definition removed (see NEWS).
598 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
599 (HAVE_LONG_LONGS): definition removed (see NEWS).
600 (HAVE_LONG_LONG): definition removed (see NEWS).
601 (HAVE_PTRDIFF_T): definition removed (see NEWS).
602
603 * Makefile.am: scmconfig.h is now generated by building and
604 running gen-scmconfig.h and capturing its output. gen-scmconfig
605 uses config.h and the configure.in generated gen-scmconfig.h to
606 decide what to output. See gen-scmconfig.c for details.
607 (noinst_PROGRAMS): add gen-scmconfig.
608 (gen_scmconfig_SOURCES): new variable.
609 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
610 cross-compiling right.
611 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
612 (BUILT_SOURCES): add scmconfig.h.
613
25e0bf97
MV
6142003-03-19 Marius Vollmer <mvo@zagadka.de>
615
616 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
617 Adrian Bunk. Thanks!
618
74b6d6e4
MD
6192003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
620
621 * goops.c (make_class_from_template): New fourth arg:
622 applicablep.
623 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
624 cpls.
625
626 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
627
628 * goops.c, objects.c, objects.h (scm_make_extended_class): New
629 second arg: applicablep.
630 (scm_i_inherit_applicable): New function.
631
632 * goops.c, goops.h (scm_class_applicable,
633 scm_class_extended_accessor): New classes.
634
5c9e7dad
DH
6352003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
636
637 * procs.c (scm_procedure_documentation): Removed redundant
638 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
639 predicates.
640
f8af5c6d
MD
6412003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
642
c614a00b
MD
643 * list.c, list.h (scm_filter, scm_filter_x): New functions.
644
109c2c9f
MD
645 * modules.c (scm_module_import_interface): New function.
646
f8af5c6d
MD
647 * goops.c, goops.h (scm_class_accessor_method): Renamed from
648 scm_class_accessor.
649 (scm_class_accessor): New class.
650
a48d60b1
MD
6512003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
652
653 * goops.c (scm_primitive_generic_generic): Enable primitive
654 generic if not enabled.
655 (scm_sys_goops_loaded): Setup unextended primitive generics.
656
657 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
658
659 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
660 snarf macros.
661
662 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
663 testing example. All uses of SCM_GPROC should be converted.)
664
665 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
666 scm_assoc.
667
668 * eq.c (scm_equal_p): Turned into a primitive generic.
669
84edc049
RB
6702003-02-27 Rob Browning <rlb@defaultvalue.org>
671
672 * Makefile.am (scmconfig.h): new target -- generate file from
673 ../config.h.
674 (modinclude_HEADERS): remove version.h.
675 (nodist_modinclude_HEADERS): add version.h.
676
ea5c9285
MD
6772003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
678
b4a1358c
MD
679 This fixes a serious GC bug, introduced during the latest
680 reorganization of the GC, which disabled freeing of structs and
681 GOOPS objects:
682
683 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
684 SCM_EOL.
53af8255
MD
685 (scm_struct_prehistory): Move scm_free_structs to
686 scm_before_mark_c_hook.
ea5c9285 687
b4a1358c
MD
688 * gc-card.c (sweep_card): Check that we haven't swept structs on
689 this card before. That can happen if scm_i_sweep_all_segments has
690 been called from some other place than scm_igc.
691
c35738c1
MD
6922003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
693
231a4ea8
MD
694 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
695 (since hash tables now adapt their size).
696
697 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
698 (current number of prehistory bindings; hashtable code will select
699 a prime which is greater than this value).
700
701 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
702 (current number of initial symbols).
703
704 * properties.c (scm_init_properties): Don't specify size of
705 scm_properties_whash.
706
707 * objprop.c (scm_init_objprop): Don't specify size of
708 scm_object_whash.
709
710 * keywords.c (scm_init_keywords): Don't specify a hash table size.
711
c35738c1
MD
712 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
713
714 The following changes introduce the use of resizable hash tables
715 throughout Guile. It also renames the old *-hash-table* functions
716 to *-alist-vector* and places them, together with the rest of the
717 weak vector support, in the module (ice-9 weak-vector). We should
718 probably introduce a new, better, API for weak references, for
719 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
720 look like and are used like ordinary pairs.)
721
722 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
723 leaf_environment_fold, obarray_remove_all): Use hashtable
724 accessors.
725
726 * gc.c (scm_init_storage): Moved hook initialization to
727 scm_storage_prehistory.
728 (scm_storage_prehistory): New function.
729 (scm_igc): Added commentary about placement of
730 scm_after_sweep_c_hook.
731
732 * gc-mark.c (scm_mark_all): Use hashtable accessors.
733 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
734 SCM_WVECT_WEAK_VALUE_P.
735
736 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
737 functions.
738 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
739 Removed.
740 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
741 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
742
743 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
744 calls to scm_storage_prehistory and scm_hashtab_prehistory.
745
746 * modules.c (module-reverse-lookup): Use hashtable accessors.
747
748 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
749
750 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
751 scm_make_weak_value_alist_vector,
752 scm_make_doubly_weak_alist_vector): New functions.
753
754 * weaks.c (scm_init_weaks_builtins): New function.
755
756 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
757 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
758 SCM_WVECT_NOSCAN_P): New macros.
759
760 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
761 and SCM_WVECT_WEAK_VALUE_P.
762
763 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
764 allocate_weak_vector and exported.
765
0a4c1355
MD
7662003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
767
768 * hashtab.c: Undid thread safety. (We decided that it's better to
769 let the user explicitly protect the tables (or not) according what
770 is suitable for the application.)
771
87ca11ff
MD
7722003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
773
774 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
775 thread safe and handle resizing tables.
776 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
777 SCM_DEFER/ALLOW_INTS.
778
f59a096e
MD
7792003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
780
781 * hashtab.c (scm_vector_to_hash_table,
782 scm_c_make_resizing_hash_table, scm_make_hash_table): New
783 functions.
784 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
785 safe and handle resizing tables.
786
787 * weaks.c (scm_make_weak_key_hash_table,
788 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
789 Size argument made optional. Return resizable table if not
790 specified.
791
4b612c5b
MD
7922003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
793
794 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
795 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
796
b3d7f6df
MD
7972003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
798
799 * debug.c (scm_procedure_source): Handle all objects for which
800 procedure? is #t. (Thanks to Bill Schottstaedt.)
801
756414cf
MD
8022003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
803
361d631f
MD
804 * futures.c (mark_futures): Don't need to mark data of recycled
805 futures.
806 (scan_futures, cleanup_undead): Be smarter about marking
807 futures---avoid unnecessary passes through future lists.
808
756414cf
MD
809 * futures.h, futures.c: New files; Introduced recycling of
810 futures. For fine-grained threading this lifts performance to
811 another level. We can now use parallelization in inner loops of
812 Guile programs without impossible overhead.
813
814 * threads.h, threads.c: Moved futures to their own file.
815
816 * Makefile.am (libguile_la_SOURCES): Added futures.c.
817 (DOT_X_FILES): Added futures.x.
818 (DOT_DOC_FILES): Added futures.doc.
819 (modinclude_HEADERS): Added futures.h.
820
821 * threads.c, threads.h (scm_i_create_thread): Renamed from
822 create_thread and made global.
823
824 * futures.c (scm_make_future): New procedure.
825
826 * eval.c: #include "libguile/futures.h".
827
828 * init.c: #include "futures.h"
829 (scm_init_guile_1): Call scm_init_futures.
830
831 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
832
833 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
834
835 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
836 functions.
837
838 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
839
b4debead
MD
8402003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
841
842 * threads.c (create_thread): Don't unwind dynwind chain of parent
843 thread before creation. Just start the new thread with an empty
844 dynwind chain.
845
93f26b7b
MD
8462003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
847
848 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
849
38d8927c
MD
8502003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
851
41c96c32
MD
852 * threads.c (scm_timed_wait_condition_variable): Support timed
853 waiting also for simple condition variables.
854
38d8927c
MD
855 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
856 of calling the procedure change-object-class.
857
9cf5d9b7
MD
8582003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
859
860 * ramap.c (scm_ramapc): Typo in error message.
861
bbf8d523
MD
8622003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
863
b46fae00
MD
864 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
865 slots with instance allocation.
866
bbf8d523
MD
867 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
868 class.
869 (scm_compute_applicable_methods): Use scm_generic_function_methods.
870
871 * goops.c (scm_generic_function_methods): Support extended
872 generic functions.
873
ebf9b47c
MD
8742002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
875
876 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
2e37d6a2 877 Thanks to Neil for pointing this out!
ebf9b47c 878
14a9ba3f
NJ
8792002-12-29 Neil Jerram <neil@ossau.uklinux.net>
880
881 * lang.h: Remove declarations matching definitions removed from
882 lang.c (just below).
883
c6a040a8
NJ
8842002-12-28 Neil Jerram <neil@ossau.uklinux.net>
885
6054d805
NJ
886 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
887 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
888 and already commented out.
889
c6a040a8
NJ
890 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
891 scm_lreadparen): Support reading vectors with Elisp syntax if
892 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
893 is not currently defined, and there isn't even a configure switch
894 to enable it yet.)
895
3742c12f
MV
8962002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
897
898 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
899 builds work.
900 (EXTRA_DIST): Added version.h.in.
901
fb50ef08
MD
9022002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
903
904 This change makes it possible for one thread to do lazy sweeping
905 while other threads are running. Now only the mark phase need to
906 have all threads asleep. We should look further into this issue.
907 Presently, I've put the locking of scm_i_sweep_mutex at
908 "conservative" places due to my current lack of knowledge about
909 the garbage collector. Please feel free to restrict these regions
910 further to allow for maximal parallelism!
911
912 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
913
914 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
915 scm_gc_register_collectable_memory): Substitute locking of
916 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
917 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
918 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
919 the single-thread section (which now only contains the mark
920 phase).
921 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
922 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
923
924 * threads.c (gc_section_mutex): Removed.
925
9ed24633
MD
9262002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
927
0d48aca5
MD
928 * threads.c (create_thread): Clear parent field in root state in
929 order not to unnecessarily remember dead threads.
930
9ed24633
MD
931 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
932 (scm_trampoline_1, scm_trampoline_2): Use them.
933
29717c89
MD
9342002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
935
936 Partial introduction of real plugin interface.
937
938 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
939 (EXTRA_DIST): Added threads-plugin.c.
940
941 * threads-plugin.h, threads-plugin.c: New files.
942
943 * threads.h: #include "libguile/threads-plugin.h".
944
945 * threads.c: #include "libguile/threads-plugin.c".
946
947 * pthread-threads.c: Temporarily remove debugging functions.
948
949 * threads.c, threads.h (scm_yield): Added back.
950
e29e0b09
MD
9512002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
952
953 * threads.c (really_launch): Detach before unlocking
954 thread_admin_mutex in order not to risk being joined.
955 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
956 thread_admin_mutex locked during GC.
957
958 * pthread-threads.c, pthread-threads.h: Improvements to debugging
959 functions.
960
0b6843b1 9612002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
93cd4dcd 962
6da2dfc4
MD
963 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
964 support for debugging mutex operations.
965
1b92fb6b
MD
966 * threads.c (scm_thread): Removed filed joining_threads.
967 (thread_print): Print thread number as well as address of thread
968 structure.
0b6843b1
MD
969 (scm_join_thread): Bugfix.
970 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
971 scm_timed_wait_condition_variable, scm_signal_condition_variable,
972 scm_broadcast_condition_variable): Use the low-level API.
973 (scm_all_threads): Return copy of thread list (to prevent
974 unintended destruction).
975 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
1b92fb6b 976
93cd4dcd
MD
977 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
978 pthread "native" recursive mutex support.
979
2ff4f181
MD
9802002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
981
28d52ebb
MD
982 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
983 Simply lock a thread C API recursive mutex.
984 (SCM_NONREC_CRITICAL_SECTION_START,
985 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
986 SCM_REC_CRITICAL_SECTION_END): Removed.
987
988 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
989 direct calls to scm_rec_mutex_lock / unlock around the three calls
990 to scm_m_expand_body.
991
992 * eval.c, eval.h (promise_free): New function.
993 (scm_force): Rewritten; Now thread-safe; Removed
994 SCM_DEFER/ALLOW_INTS.
995
996 * pthread-threads.h: Added partially implemented plugin interface
997 for recursive mutexes. These are, for now, only intended to be
998 used internally within the Guile implementation.
999
1000 * pthread-threads.c: New file.
1001
1002 * threads.c: Conditionally #include "pthread-threads.c".
1003
1004 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
1005 thread-safe;
1006
1007 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
1008 SCM_GLOBAL_REC_MUTEX): New macros.
1009
1010 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
1011 macros---use mutexes instead.
1012
1013 * tags.h (SCM_IM_FUTURE): New tag.
1014
1015 * eval.c (scm_m_future): New primitive macro.
1016 (SCM_CEVAL): Support futures.
1017 (unmemocopy): Support unmemoization of futures.
1018
1019 * print.c (scm_isymnames): Name of future isym.
1020
2ff4f181
MD
1021 * version.c: Unmade some changes to my private copy that got
1022 committed by mistake.
1023
392d2833
MD
10242002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1025
e200ddee
MD
1026 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
1027 2002-12-10.
1028
392d2833
MD
1029 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
1030
1031 * gc.c (scm_gc_sweep): Call it here instead, which is a more
1032 logical place.
1033
1034 * threads.c (create_thread): Remember root object until the handle
1035 of the new thread is on all_threads list.
1036
1037 * root.c (scm_make_root): Moved copying of fluids until after
1038 creation of root handle so that the fluids are GC protected. Also
1039 removed the critical section.
1040
c4c52ebe
MD
10412002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1042
960c408c
MD
1043 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
1044
3cdde9d6 1045 * gc-malloc.c (malloc_mutex): New mutex.
960c408c 1046 (scm_gc_malloc_prehistory): Initialize it.
3cdde9d6
MD
1047 (scm_realloc): Serialize call to realloc
1048 (scm_calloc): Same for calloc.
1049 Thanks to Wolfgang Jaehrling!
1050 (Now we have to make sure all calls to malloc/realloc are made
1051 through scm_malloc.)
1052
960c408c
MD
1053 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
1054
c4c52ebe
MD
1055 * threads.c (really_launch): Release heap (to prevent deadlock).
1056 (create_thread): Release heap before locking thread admin mutex.
1057
b0dc3d71
MD
10582002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1059
1060 * threads.c (scm_i_thread_invalidate_freelists): New
1061 function.
1062
1063 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
1064
1065 * modules.c (scm_export): Inserted a return statement.
1066
06e80f59
HWN
10672002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1068
1069 * modules.c (scm_export): new function
1070
1071 * gc-card.c: add a note about malloc()/free() overhead.
1072
a12611c3
MD
10732002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1074
1075 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
1076 in srcdir.
1077
c7fabadf
MD
10782002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1079
1080 These changes remove scm_ints_disabled (which hasn't has any
1081 effect in Guile for quite some time).
1082
1083 * async.c, error.h (scm_ints_disabled): Removed.
1084
1085 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
1086 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
1087 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
1088 (old_ints): Removed.
1089
1090 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
1091 critical section.
1092 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
1093 SCM_ALLOW_INTS.
1094
9bc4701c
MD
10952002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1096
52340b65
MD
1097 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
1098 Removed accidental #if 0 around these functions.
1099
9bc4701c
MD
1100 These changes are the start of support for preemptive
1101 multithreading. Marius and I have agreed that I commit this code
1102 into the repository although it isn't thoroughly tested and surely
1103 introduces many bugs. The bugs should only be exposed when using
1104 threads, though. Signalling and error handling for threads is
1105 very likely broken. Work on making the implementation cleaner and
1106 more efficient is needed.
1107
1108 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
1109 (SCM_NONREC_CRITICAL_SECTION_START,
1110 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
1111 SCM_REC_CRITICAL_SECTION_END): New macros.
1112 (SCM_CRITICAL_SECTION_START/END): Defined here.
1113
1114 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
1115 the three calls to scm_m_expand_body.
1116
1117 * gc.h: #include "libguile/pthread-threads.h";
1118 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
1119
1120 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
1121 scm_t_key;
1122
1123 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
1124 access.
1125
1126 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
1127
1128 * gc-freelist.c, threads.c (really_launch): Use
1129 SCM_FREELIST_CREATE.
1130
1131 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
1132
1133 * gc.c (scm_i_expensive_validation_check, scm_gc,
1134 scm_gc_for_newcell): Put threads to sleep before doing GC-related
1135 heap administration so that those pieces of code are executed
1136 single-threaded. We might consider rewriting these code sections
1137 in terms of a "call_gc_code_singly_threaded" construct instead of
1138 calling the pair of scm_i_thread_put_to_sleep () and
1139 scm_i_thread_wake_up (). Also, we would want to have as many of
1140 these sections eleminated.
1141
1142 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
1143
1144 * inline.h: #include "libguile/threads.h"
1145
1146 * pthread-threads.h: Macros now conform more closely to the
1147 pthreads interface. Some of them now take a second argument.
1148
1149 * threads.c, threads.h: Many changes.
1150
11512002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1152
1153 * Makefile.am (version.h): Changed $^ --> $< in rule for
1154 version.h.
1155
b2cbe8d8
RB
11562002-12-08 Rob Browning <rlb@defaultvalue.org>
1157
1158 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
1159 (SCM_MINOR_VERSION): use @--@ substitution now.
1160 (SCM_MICRO_VERSION): use @--@ substitution now.
1161 (scm_effective_version): new function prototype.
1162
1163 * version.c (scm_effective_version): new function, also add
1164 effective-version.
1165
1166 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
1167 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
1168 SCM_LIBRARY_DIR.
1169 (version.h): generate this here rather than configure.in. This
1170 approach tracks source edits better (i.e. more immediately).
1171 Might be worth considering for other .in files too.
1172
5441c65c
MV
11732002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
1174
1175 Reorganized thread package selection. A thread package now only
1176 implements a small set of pthread like functions and Guile
1177 implements the rest on top of that. Guile's implementation is
1178 what the "coop-pthreads" package has been previously. Support for
1179 "coop" threads has been removed until I get time to add it again.
1180
1181 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
1182 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
1183 null-threads.c, coop-pthreads.c.
1184 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
1185 pthread-threads.h.
1186
1187 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
1188
1189 * threads.h: Do not include "libguile/coop-defs.h". Include
1190 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
1191 (previously deprecated) C level thread API prototypes. They are
1192 now in the thread package specific headers, "null-threads.h" and
1193 "pthread-threads.h".
1194 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
1195 New.
1196 (scm_threads_init): Removed.
1197 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
1198 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
1199 SCM_I_THREAD_SWITCH_COUNT): Define here.
1200 (scm_single_thread_p): Removed.
1201 (scm_call_with_new_thread): Take two args directly instead of list
1202 of two args.
1203 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
1204 SCM_SET_THREAD_LOCAL_DATA): Define here.
1205
1206 * threads.c: Merged with "coop-pthreads.c".
1207
1208 * null-threads.h: Implement pthread-like API as a set of macros.
1209
1210 * pthread-threads.h: New, implement pthread-like API by deferring
1211 to pthread itself.
1212
1213 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
1214 has been lost in the reorganization.
1215
504d99c5
MD
12162002-12-01 Mikael Djurfeldt <mdj@linnaeus>
1217
1218 The following change makes it possible to move procedure
1219 application dispatch outside inner loops. The motivation was
1220 clean implementation of efficient replacements of R5RS primitives
1221 in SRFI-1.
1222
1223 The semantics is clear: scm_trampoline_N returns an optimized
1224 version of scm_call_N (or NULL if the procedure isn't applicable
1225 on N args).
1226
1227 Applying the optimization to map and for-each increases efficiency
1228 noticeably. For example, (map abs ls) is 8 times faster than
1229 before.
1230
1231 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
1232
1233 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
1234
1235 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
1236 (map, for-each): Handle also application on two args as a special
1237 case; Use trampolines.
1238
1239 Other changes:
1240
1241 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
1242 (subr2oless): Removed.
1243 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
1244 vector GC protected.
1245
1246 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
1247 scm_out_of_range.
1248
63dd3413
DH
12492002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
1250
1251 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
1252
4ba5f279
MD
12532002-11-17 Mikael Djurfeldt <mdj@linnaeus>
1254
1255 * debug.c (scm_make_iloc): Added missing "return".
1256
56ae231f
MV
12572002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
1258
1259 * strports.c (scm_eval_string_in_module): Validate second arg to
1260 be a module. Thanks to Arno Peters!
1261
80b28865
DH
12622002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
1263
1264 * .cvsignore: remove goops.c
1265
c88b1456
DH
12662002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
1267
1268 * modules.c (scm_env_top_level, scm_lookup_closure_module,
1269 module_variable, scm_module_lookup_closure,
1270 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
1271 scm_system_module_env_p): Don't compare SCM values with C
1272 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
1273 over SCM_NFALSEP.
1274
a8a19efc
DH
12752002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
1276
1277 * eval.h (SCM_MAKE_ILOC): New macro.
1278
1279 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
1280 the iloc bitpattern here.
1281
76734914
MD
12822002-11-14 Mikael Djurfeldt <mdj@linnaeus>
1283
1284 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
1285 part of the API, otherwise it's difficult to write Guile
1286 extensions using non-blocking I/O => moved #include
1287 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
1288
1289 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
1290 s_unlock_mutex.
1291
8b5b4a75
MV
12922002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
1293
1294 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
1295 are defined in configure.in.
1296
1297 * threads.c: Removed SCM_API from function definitions. SCM_API
1298 is only for declarations.
1299
e5a83084
MD
13002002-11-07 Mikael Djurfeldt <mdj@linnaeus>
1301
9be8bb45
MD
1302 * coop-pthreads.h: Added support for thread specific data to the
1303 generic C API for the coop-pthreads case.
1304
e5a83084
MD
1305 * threads.c, threads.h (scm_cond_init): Undo unintentional API
1306 change.
6c214b62 1307 (scm_cond_broadcast): Added missing function.
e5a83084 1308
7edf178e
MV
13092002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1310
1311 * coop.c (coop_next_runnable_thread): Removed, wich should have
1312 happened when GUILE_ISELECT was hard-wired.
1313
7f5b1b77
MV
13142002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
1315
7caa1b07
MV
1316 * Makefile.am (libguile_la_SOURCES): Added threads.c
1317 (DOT_DOC_FILES): Added threads.doc.
1318 (DOT_X_FILES): Added threads.x.
1319 (EXTRA_libguile_la_SOURCES): Removed threads.c.
1320 (noinst_HEADERS): Added coop-pthreads.c.
1321 (modinclude_HEADERS): Added coop-pthreads.h.
1322
1323 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
1324 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
1325
bb11cbf4
MV
1326 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
1327 Thanks to Bill Schottstaedt!
1328
1d4cbbed
MV
1329 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
1330
7f5b1b77
MV
1331 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
1332 SCM_COPT_THREADS is defined.
1333 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
1334 is defined.
1335
1336 * coop-pthreads.c: Some harmless renamings of internal stuff.
1337 (create_thread): New, generalized version of
1338 scm_call_with_new_thread.
1339 (scm_call_with_new_thread): Use it.
1340 (scm_spawn_thread): New, use create_thread.
1341
d52f53b1
MV
13422002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
1343
1344 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
1345 start testing it now.
1346
1347 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
1348 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
1349 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
1350 is defined.
1351
30f920c3
MV
13522002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
1353
1354 * scmsigs.c (signal_cell_handlers, install_handler_data,
1355 scm_delq_spine_x, really_install_handler, install_handler): New
1356 scheme for triggering signal handlers, to simplify take_signal.
1357 (take_signal): Simplified, to avoid race conditions.
1358 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
1359 hasn't exited yet.
1360
1361 * async.c (scm_async_click): Reset pending_asyncs, handle
1362 signal_asyncs. Don't set cdr of a non-signal async to #f.
1363 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
1364 always. Set pending_asyncs.
1365 (scm_system_async_mark_for_thread): Check that thread has not
1366 exited.
1367 (scm_unmask_signals, decrease_block): Call scm_async_click after
1368 block_asyncs becomes zero.
1369
1370 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
1371 active_asyncs.
1372
1373 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
1374 fields.
1375 * root.c (root_mark): Mark them.
1376 (make_root): Initialize them.
1377
1378 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
1379 USE_COOP_THREADS.
1380 (scm_internal_select): Define one version for USE_COOP_THREADS and
1381 one for USE_NULL_THREADS.
1382 (scm_init_iselect): Likewise.
1383
1384 * inline.h (scm_cell, scm_double_cell): Also allow
1385 USE_COPT_THREADS to not protect the slot initializers.
1386
1387 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
1388 because threads need to be initialized before the stack, but
1389 gsubrs such as scm_timed_condition_variable_wait can only be
1390 created later.
1391
1392 * threads.h: Include "coop-pthreads.h" when requested.
1393 (scm_threads_make_mutex, scm_threads_lock_mutex,
1394 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
1395 not implemented anyway.
1396 (scm_init_thread_procs, scm_try_mutex,
1397 scm_timed_condition_variable_wait,
1398 scm_broadcast_condition_variable, scm_c_thread_exited_p,
1399 scm_thread_exited_p): New prototypes.
1400 (struct timespec): Define if not already defined.
1401 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
1402 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
1403 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
1404 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
1405 deprecated.
1406
1407 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
1408 requested.
1409 (scm_thread_exited_p): New.
1410 (scm_try_mutex, scm_broadcast_condition_variable): Newly
1411 registered procedures.
1412 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
1413 Use the latter as the procedure for "wait-condition-variable",
1414 thus offering a optional timeout parameter to Scheme.
1415 (scm_wait_condition_variable): Implement in terms of
1416 scm_timed_wait_condition_variable.
1417 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
1418 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
1419 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
1420 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
1421 scm_make_mutex, etc, and deprecate.
1422 (scm_init_threads): Do not create smobs, leave this to
1423 scm_threads_init. Do not include "threads.x" file.
1424 (scm_init_thread_procs): New, include "threads.x" here.
1425
1426 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
1427 scm_null_mutex_lock, scm_null_mutex_unlock,
1428 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
1429 scm_null_condvar_wait, scm_null_condvar_signal,
1430 scm_null_condvar_destroy): Removed.
1431 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
1432 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
1433 scm_cond_destory): Do not define, they are now deprecated and
1434 handled by threads.{h,c}.
1435
1436 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
1437 (scm_threads_init): Create smobs here, using the appropriate
1438 sizes.
1439 (block): Removed, now unused.
1440 (scm_c_thread_exited_p): New.
1441 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
1442 scm_null_mutex_destroy, scm_null_condvar_init,
1443 scm_null_condvar_wait, scm_null_condvar_signal,
1444 scm_null_condvar_destroy): Removed and updated users to do their
1445 task directly.
1446 (scm_try_mutex, timeval_subtract,
1447 scm_timed_wait_condition_variable,
1448 scm_broadcast_condition_variable): New.
1449 (scm_wait_condition_variable): Removed.
1450
1451 * coop-defs.h (coop_m): Added 'level' field.
1452 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
1453 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
1454 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
1455 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
1456 define.
1457 (coop_condition_variable_broadcast): New.
1458
1459 * coop-threads.c (scm_threads_init): Create smobs here, using the
1460 appropriate sizes.
1461 (scm_c_thread_exited_p, scm_try_mutex,
1462 scm_timed_wait_condition_variable,
1463 scm_broadcast_condition_variable): New.
1464 (scm_wait_condition_variable): Removed.
1465
1466 * coop.c (coop_new_mutex_init): Initialize level.
1467 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
1468 level.
1469 (coop_condition_variable_signal): Renamed to
1470 coop_condition_variable_broadcast and reimplemented in terms of
1471 that. Thus...
1472 (coop_condition_variable_broadcast): New.
1473
1474 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
1475
1476 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
1477
087ed40d
MV
14782002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
1479
65a23095
MV
1480 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
1481 of system headers.
1482
087ed40d
MV
1483 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
1484 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
30f920c3 1485 give better error messages. Thanks to Bill Schottstaedt!
087ed40d 1486
5ec1d2c8
DH
14872002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
1488
1489 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
1490 scm_definedp to scm_defined_p and deprecated scm_definedp.
1491
100ae50d
DH
14922002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
1493
1494 * async.h, async.c (scm_system_async): Fixed deprecation to work
1495 correctly when deprecated features are excluded.
1496
2794cb50
MV
14972002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1498
1499 * async.c (scm_system_async_mark_for_thread): Validate thread
1500 argument.
1501
1502 * coop-threads.c (scm_i_thread_root): Do not validate argument.
1503
1504 * feature.c (scm_init_feature): Don't add 'threads' for
1505 USE_NULL_THREADS.
1506
1507 * inline.h (scm_cell, scm_double_cell): Also allow
1508 USE_NULL_THREADS to not protect the slot initializers.
1509
1510 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
1511 "USE_THREAD".
1512
1513 * Makefile.am (noinst_HEADERS): Added null-threads.c.
1514 (modinclude_HEADERS): Added null-threads.h.
1515
1516 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
1517 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
1518 (scm_init_threads): Use generic type names scm_t_mutex and
1519 scm_t_cond instead of coop_m and coop_c.
1520
1521 * null-threads.c, null-threads.h: New files.
1522
ff810d7a
MV
15232002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
1524
1525 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
1526 This is to support makes that know about "$<" only in pattern
1527 rules, like Sun's make.
1528
a90bdb73
MV
15292002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
1530
1531 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
1532 substitution. Thanks to David Allouche!
1533
e71a8bf2
DH
15342002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
1535
1536 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
1537 !SCM_ENABLE_DEPRECATED.
1538
41f77ff5
MV
15392002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1540
504d99c5 1541 * async.c (scm_system_async_mark_for_thread): Only call
41f77ff5
MV
1542 scm_i_thread_root when USE_THREADS is defined. Use scm_root
1543 otherwise.
1544
1545 * scmsigs.c (take_signal): Only call scm_i_thread_root when
1546 USE_THREADS is defined. Use scm_root otherwise.
1547 (scm_sigaction_for_thread): Ignore THREAD argument when
1548 USE_THREADS is not defined. Also, move THREAD argument defaulting
1549 out of HAVE_SIGACTION section, which was a bug.
1550
6d16b125
MV
15512002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1552
1553 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
1554 signal_handlers, not the closure that is used as the async.
1555 The closure is stored in signal_handler_cells, as previously.
1556
acfa1f52
MV
15572002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
1558
1559 * root.h (scm_root_state): Added 'block_async' slot.
1560 (scm_active_asyncs): Removed abbrev.
1561 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
1562
1563 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
1564 abbrev.
1565
1566 * async.h (scm_call_with_blocked_asyncs,
1567 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
1568 scm_c_call_with_unblocked_asyncs): New prototypes.
1569 (scm_mask_signals, scm_unmask_signals): Deprecated.
1570 (scm_mask_ints): Turned into a macro.
1571 * async.c (scm_mask_ints): Removed.
1572 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
1573 this should not be necessary.
1574 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
1575 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
1576 deprecation warning and check for errornous use. Set block_asyncs
1577 instead of scm_mask_ints.
1578 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
1579 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
1580 scm_c_call_with_unblocked_asyncs): New.
1581
1582 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
1583 Asyncs are enabled by default.
1584
34010f56
NJ
15852002-10-09 Neil Jerram <neil@ossau.uklinux.net>
1586
1587 * vports.c (scm_make_soft_port): Allow vector argument to carry a
1588 6th element: an input waiting thunk.
1589 (sf_input_waiting): New.
1590
9310d6f2
MV
15912002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
1592
1593 * root.c (root_mark): Mark active_asyncs slot.
1594
1595 * async.c (scm_async_click): Set the cdr of a executed handler
1596 cell to SCM_BOOL_F, not SCM_EOL.
1597 (scm_i_queue_async_cell): Queue the cell at the end of the list,
1598 and only if the handler procedure is not already present.
1599 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
1600 with SCM_BOOL_F.
1601 * scmsigs.c (scm_sigaction_for_thread): Likewise.
1602
ac48c719
RB
16032002-10-04 Rob Browning <rlb@defaultvalue.org>
1604
1360a142
RB
1605 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
1606
1607 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
1608 scm_lt_dlopenext, and scm_lt_dlerror.
1609 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
1610 and scm_lt_dlerror.
1611 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
1612 and scm_lt_dlerror.
1613 (sysdep_dynl_init): switch to scm_lt_dlinit();
1614
1615 * Makefile.am (libguile_la_LIBADD): switch to use
1616 libguile-ltdl.la.
1617
504d99c5 1618 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
ac48c719 1619
497092c9
MV
16202002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
1621
1622 * scmsigs.h (scm_sigaction_for_thread): New prototype.
1623 * scmsigs.c (got_signal): Removed.
1624 (signal_handler_cells, signal_handler_threads): New.
1625 (take_signal): Queue the cell of the signal for the specified
1626 thread. Reset the signal handler on systems that don't have
1627 sigaction.
1628 (sys_deliver_signals): Removed.
1629 (close_1): New.
1630 (scm_sigaction_for_thread): Renamed from scm_sigaction and
1631 extended to also set the thread of a signal and allocate a cell
1632 for it. Keep the Scheme name "sigaction". Check that signum is
1633 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
1634 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
1635 (scm_init_scmsigs): Allocate signal_handler_cells and
1636 signal_handler_threads vectors.
1637
1638 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
1639 that system asnycs and user asyncs are separated. Reimplemented
1640 system asyncs to work per-thread.
1641
1642 * gc.c (scm_init_gc): Do not use scm_system_async.
1643
1644 * async.h (scm_asyncs_pending, scm_set_tick_rate,
1645 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
1646 Removed prototypes.
1647 (scm_i_queue_async_cell): New.
1648
1649 * __scm.h (scm_asyncs_pending_p): Removed.
1650 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
1651 scm_asyncs_pending_p.
1652
1653 * async.h (scm_system_async_mark_for_thread): New prototype.
1654
1655 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
1656
1657 * root.h (scm_root_state): Added new "active_asyncs" slot.
1658 * root.c (scm_make_root): Initialize it to SCM_EOL.
1659
1660 * coop-defs.h (coop_t): Added new "handle" slot.
1661 * coop-threads.c (all_threads, scm_current_thread,
1662 scm_all_threads, scm_i_thread_root): New.
1663 (scm_threads_init): Add main thread to all_threads.
1664 (scheme_launch_thread): Remove thread from all_threads when it
1665 terminates.
1666 (scm_call_with_new_thread): Initialize handle slot of coop_t
1667 structure and add new thread to all_threads.
1668 (scm_spawn_thread): Likewise.
1669
1670 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
1671 * threads.c (scm_current_thread, scm_all_threads): Register as
1672 primitives.
1673
1674 * dynl.c: Use scm_lt_ prefix for libltdl functions.
1675
480fa28d
NJ
16762002-09-29 Neil Jerram <neil@ossau.uklinux.net>
1677
1678 * script.c (scm_compile_shell_switches): Fix bad spelling of
1679 `explicitly' in comment.
1680
16812002-09-28 Neil Jerram <neil@ossau.uklinux.net>
1682
1683 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
1684 Refer to provided? in doc string rather than deprecated feature?.
1685
3553e1d1
GH
16862002-09-24 Gary Houston <ghouston@arglist.com>
1687
1688 * inline.h (scm_double_cell): prevent reordering of statements
1689 with any following code (for GCC 3 strict-aliasing).
1690 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
1691 the earlier version of the reordering prevention.
1692
4ad0814a
HWN
16932002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1694
1695 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
1696
e88e4f2e
HWN
16972002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1698
1699 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
1700 protection.
1701
1e71eafb
HWN
17022002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1703
1704 * inline.h: include stdio.h
1705
1706 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
1707
61ef9c1f
HWN
17082002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1709
dac04e9f
HWN
1710 * gc-segment.c (scm_i_make_initial_segment): check user settings
1711 for sanity.
1712
1713 * gc-malloc.c (scm_gc_init_malloc): check user settings for
1714 sanity.
dac04e9f
HWN
1715
1716 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
1717
ffd72400
HWN
1718 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
1719
1720 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
1e71eafb
HWN
1721 these won't ever wrap around with high memory usage. Thanks to
1722 Sven Hartrumpf for finding this.
ffd72400 1723
5bd4a949
HWN
1724 * gc-freelist.c: include <stdio.h>
1725
61ef9c1f
HWN
1726 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
1727
ffd0ef3b
MV
17282002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
1729
a27e3d14
MV
1730 * vectors.h (SCM_VECTOR_REF): New.
1731
ffd0ef3b
MV
1732 * snarf.h (SCM_DEFINE_PUBLIC): New.
1733
f8a1712b
MV
17342002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
1735
1736 * socket.c (scm_addr_vector): Added size of address to arguments.
1737 Use it to avoid accessing a non-existent path in a sockaddr_un.
1738 Changed all callers.
1739
7200a36b
HWN
17402002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1741
1383773b
HWN
1742 * gc.h: remove DOUBLECELL card flags.
1743
1744 * gc-malloc.c (scm_calloc): try to use calloc() before calling
1745 scm_realloc().
1746
1747 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
1748 init loop; handle this from scm_init_card_freelist()
1749
1750 * gc-card.c (scm_init_card_freelist): init bit vector here.
1751
7200a36b 1752 * numbers.c (scm_make_real): prevent reordering of statements
8fa5786d 1753 num2float.i.c (FLOAT2NUM): idem
7200a36b 1754
9981de3a
HWN
17552002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1756
1757 * eval.h: prepend libguile/ to include path
1758
19647556
MV
17592002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
1760
1761 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
1762