*** empty log message ***
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
f5c6ec2f
DH
12003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
2
3 * eval.c: Partially undid my patch from 2003-05-31. This patch
4 caused the segfault referenced in the previous changelog entry.
5
47dbd81e
DH
62003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
7
8 * tags.h: Fixed comment about the immediate type code layout.
9
10 * eval.c: Fixed handling of non-special instructions. Without
11 this patch, guile will segfault on (#\0) and similar instructions.
12
3ec52c51
KR
132003-06-05 Kevin Ryde <user42@zip.com.au>
14
15 * numbers.c (scm_max, scm_min): For inum, bignum and real, if other
16 operand is NaN, then return NaN. Also avoid passing NaN to mpz_cmp_d.
17
e418bd7c
KR
18 * read.c (scm_input_error): Pass arg list parameter to scm_error_scm,
19 rather than SCM_EOL. Needed by "Unknown # object" case in scm_lreadr.
20
d0624e39
DH
212003-06-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
22
23 * __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,
24 SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
25 SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
26 generalized it to apply not only to C level functions but also to
27 scheme level functions.
28
29 * debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
30 scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
31 scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
32 eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
33 only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
34 respectively.
35
36 * deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
37 SCM_IDSTMSK): Deprecated. The macro definitions are moved from
38 eval.h into eval.c and a copy is placed into deprecated.h.
39
40 * eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
41 into eval.c. This definition was not part of the API in any
42 officially released version of guile and thus does not need to go
43 through a phase of deprecation.
44
e90c3a89
DH
452003-06-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
46
d0624e39
DH
47 * deprecated.c, deprecated.h, eval.c, eval.h (scm_s_expression,
48 scm_s_test, scm_s_body, scm_s_bindings, scm_s_variable,
49 scm_s_clauses, scm_s_formals): Deprecated. In eval.c the
e90c3a89
DH
50 definitions are make static and renamed from scm_s_xxx to s_xxx.
51 In deprecated.c the original definitions are copied.
52
d0624e39
DH
53 * deprecated.h, eval.c, eval (SCM_EVALIM2, SCM_EVALIM, SCM_XEVAL,
54 SCM_XEVALCAR): Deprecated. The macro definitions are moved from
e90c3a89
DH
55 eval.h into eval.c and a copy (slightly modified to work in user
56 code) is placed into deprecated.h.
57
58 * eval.c: Use the local static s_xxx definitions instead of the
59 scm_s_xxx definitions throughout.
60
14b18ed6
DH
612003-06-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
62
63 This set of patches separates the representation of the cxr family
64 of functions (car, cdr etc.) from the dsubr family of functions
65 (i. e. functions that take a double precision floating point
66 argument). Further, the algorithm for handling the cxr function
67 is improved.
68
69 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_1), numbers.c
70 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, scm_round, floor,
71 ceil, sqrt, fabs, exp, log, sin, cos, tan, asin, acos, atan, sinh,
72 cosh, tanh), objects.c (scm_class_of), procprop.c
73 (scm_i_procedure_arity), ramap.c (scm_array_map_x), tags.h
74 (scm_tc7_dsubr, scm_tcs_subrs): Introduce scm_tc7_dsubr as new
75 typecode for the dsubr family of functions.
76
77 * ramap.c (ramap_cxr, ramap_dsubr): Renamed ramap_cxr to
78 ramap_dsubr.
79
80 * eval.c (SCM_CEVAL, SCM_APPLY, call_cxr_1), pairs.c
81 (scm_init_pairs): Make use of the (now usable) second cell element
82 of a scm_tc7_cxr function to implement the cxr family of functions
83 more efficiently.
84
2ca0d207
DH
852003-05-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
86
87 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_0,
88 scm_trampoline_1, scm_trampoline_2): Postpone error cases to the
89 end of an if-else-if-sequence of checks.
90
9a069bdd
DH
912003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
92
93 * eval.c (SCM_CEVAL): Improved readability of call-with-values
94 execution. Generalize apply_closure to apply_proc and use that
95 for call-with-values.
96
e910e9d2
DH
972003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
98
99 * eval.c (SCM_CEVAL): Avoid one level of indirection when applying
100 a non closure.
101
1e498fbd
SJ
1022003-05-30 Stefan Jahn <stefan@lkcc.org>
103
104 * posix.c (s_scm_putenv): Use the new HAVE_UNSETENV
105 appropriately for mingw32 hosts.
106
107 * numbers.h: Defining copysign(), isnan() and finite() to
108 be prefixed by a single '_' for mingw32 hosts.
109
c47e2599
KR
1102003-05-30 Kevin Ryde <user42@zip.com.au>
111
112 * numbers.c (z_negative_one): New variable.
113 (scm_init_numbers): Initialize it.
114 (scm_logcount): Use it and mpz_hamdist to count zeros for negatives.
115
2e945bcc
SJ
1162003-05-29 Stefan Jahn <stefan@lkcc.org>
117
118 * win32-dirent.c: Use malloc() instead of scm_malloc().
119
120 * stime.c (s_scm_strftime): Add a type cast to avoid compiler
121 warning.
122
123 * posix.c (s_scm_putenv): Disable use of unsetenv() for the
124 mingw32 build.
125
126 * modules.c (s_scm_module_import_interface): Renamed local
127 variable interface to _interface. Seems like 'interface'
128 is a special compiler directive for the mingw32 compiler.
129
130 * mkstemp.c: Provide prototype to avoid compiler warning.
131
132 * load.c (s_scm_search_path): Fixed absolute and relative
133 path detections for native Windows platforms.
134
135 * gc.h, threads.h: Export some more symbols using SCM_API (necessary
136 to build on mingw32).
137
138 * gc-freelist.c ("s_scm_map_free_list",
139 "s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.
140
141 * fports.c (fport_fill_input): Disable use of
142 fport_wait_for_input() on Win32 platforms.
143
144 * filesys.c (s_scm_basename): Fixed __MINGW32__ code.
145
146 * Makefile.am: Modified some rules for cross compiling.
147
ddd8f927
DH
1482003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
149
150 * eval.c (SCM_CEVAL): In case of an application, all checks for a
151 proper function object and the correct number of arguments are now
152 performed in the application part of SCM_CEVAL.
153
154 (scm_badformalsp): Removed.
155
f8ba2197
DH
1562003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
157
158 * deprecated.c (scm_read_and_eval_x): Fixed C99-ism.
159
79f55b7c
MD
1602003-05-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
161
a502595f
MD
162 * num2integral.i.c (NUM2INTEGRAL): Avoid warning about conditional
163 always being false by inserting preprocessor conditional. (Thanks
164 to Bruce Korb.)
165
79f55b7c
MD
166 * __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
167 (void *) in order to avoid an aliasing warning; thanks to Bruce
168 Korb.)
169
170 * stackchk.h (SCM_STACK_OVERFLOW_P): Use SCM_STACK_PTR.
171
172 * threads.c (suspend, launch_thread, scm_threads_mark_stacks): Use
173 SCM_STACK_PTR.
174
175 * threads.c (scm_threads_mark_stacks): Bugfix: Changed
176 thread->base --> t->base.
177
178 * eval.c (SCM_CEVAL): Don't cast argument of SCM_STACK_OVERFLOW_P.
179
47dee228
MV
1802003-05-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
181
182 * deprecated.h, deprecated.c (scm_makstr, scm_makfromstr,
183 scm_variable_set_name_hint, scm_builtin_variable,
184 scm_internal_with_fluids, scm_make_gsubr,
185 scm_make_gsubr_with_generic, scm_create_hook, SCM_LIST0,
186 SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6,
187 SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify, scm_sloppy_memq,
85494587
MV
188 scm_sloppy_memv, scm_sloppy_member, scm_read_and_eval_x,
189 scm_subr_entry, SCM_SUBR_DOC, scm_make_subr,
190 scm_make_subr_with_generic, scm_make_subr_opt,
191 scm_call_catching_errors, scm_make_smob_type_mfpe,
192 scm_set_smob_mfpe, scm_strprint_obj, scm_read_0str, scm_eval_0str,
193 SCM_CHARS, SCM_UCHARS, SCM_LENGTH): Re-added from the release_1_6
194 branch. Some have been slightly rewritten.
195 (scm_i_object_chars, scm_i_object_length): New, to support
196 SCM_CHARS, SCM_UCHARS, and SCM_LENTH.
197
e681d187
DH
1982003-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
199
200 * eval.c (scm_m_do, unmemocopy, SCM_CEVAL): Reversed order of
201 names and inits in the memoized code of do.
202
7e59d9d4
MD
2032003-05-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
204
205 * c-tokenize.lex (yyget_lineno, yyget_in, yyget_out, yyget_leng,
206 yyget_text, yyset_lineno, yyset_in, yyset_out, yyget_debug,
207 yyset_debug, yylex_destroy): Added prototypes (otherwise we'll get
208 a compilation error if error-on-warning is enabled).
209
9950a42c
MV
2102003-05-17 Marius Vollmer <mvo@zagadka.de>
211
212 * c-tokenize.lex: Gobble up complete lines after a '#'. This
213 removes preprocessor directives from the snarfage that might
214 otherwise confuse us. These directives appear when compiling with
215 "-g3", for example.
216
0068984b
HWN
2172003-05-16 Han-Wen Nienhuys <hanwen@cs.uu.nl>
218
26e68795
HWN
219 * ChangeLog: add my surname
220
0068984b
HWN
221 * srcprop.c (scm_finish_srcprop): use
222 scm_gc_register_collectable_memory()
223 (scm_make_srcprops): idem.
224
131805f0
HWN
2252003-05-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
226
227 * gc-malloc.c (scm_gc_register_collectable_memory): avoid
228 wrap-around for scm_mtrigger
229 (scm_gc_register_collectable_memory): abort on overflowing
230 scm_mallocated().
231
d4611024
KR
2322003-05-13 Kevin Ryde <user42@zip.com.au>
233
234 * numbers.c (xmpz_cmp_d): New macro, handling infs if gmp doesn't.
235 (scm_num_eq_p, scm_less_p, scm_max, scm_min): Use it.
236
7aaf8dc9
MD
2372003-05-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
238
dfd03fb9
MD
239 * backtrace.c (scm_display_error_message): Introduced fancy
240 printing with max level 7 and length 10. (Purpose: avoid printing
241 gigantic objects in error messages.)
242
243 * print.c, print.h (scm_i_port_with_print_state): New function.
244
245 * print.c (scm_iprin1, scm_printer_apply,
246 scm_port_with_print_state): Use scm_i_port_with_print_state.
247 (scm_simple_format): Modified not to destroy print states.
248 (print_state_mutex): New mutex.
249 (scm_make_print_state, scm_free_print_state, scm_prin1):
250 Lock/unlock print_state_mutex.
251
7aaf8dc9
MD
252 * deprecated.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK):
253 Use current names in definitions.
254
a4d9ffa1
KR
2552003-05-10 Kevin Ryde <user42@zip.com.au>
256
257 * numbers.c (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d.
258
d25e96a4
KR
259 * numbers.c (scm_integer_length): On negative bignums, adjust
260 mpz_sizeinbase to account for it looking at absolute value where we
261 want ones-complement.
262
263 * numbers.c (scm_gcd): In bignum/inum, don't pass yy==0 to mpz_gcd_ui
264 since we're only using the ulong return value, and x might not fit.
265
5bf6a6f0
DH
2662003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
267
268 * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to
269 read. This will allow to make the definition in read.c static.
270
f58c472a
DH
2712003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
272
273 * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved
274 from evalext to eval. This will allow to make some of the
275 definitions in eval.c static.
276
90382aeb
KR
2772003-05-06 Kevin Ryde <user42@zip.com.au>
278
279 * numbers.c (scm_difference): In inum - bignum, handle negative inum.
280 (scm_logcount): Use mpz_com, not mpz_neg.
281
3b88ed2a
DH
2822003-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
283
284 The purpose of this patch is to make guile's internal memoizers
285 distinguishable from memoizing macros created on the scheme level
286 or from user provided primitive memoizing macros. The reason is,
287 that the internal memoizers are the only ones that are allowed to
288 transform their scheme input into memoizer byte code, while all
289 other memoizing macros may only transform scheme code into new
290 scheme code.
291
292 To achieve this, a new macro type 'builtin-macro!' is introduced.
293 Currently, 'builtin-macro!'s are handled as memoizing macros, but
294 this will change when the memoizer and executor are separated.
295
296 * macros.[ch] (scm_i_makbimacro): New.
297
298 * macros.h (SCM_BUILTIN_MACRO_P): New.
299
300 * macros.c (macro_print, scm_macro_type): Support builtin-macro!s.
301
302 * eval.c, goops.c: All of guile's primitive memoizing macros are
303 primitive builtin-macros now.
304
305 * eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive
306 builtin-macros are handled equally to memoizing macros.
307
b0780eb1
MV
3082003-05-04 Marius Vollmer <mvo@zagadka.de>
309
310 * throw.c (scm_ithrow): Remove "asm volatile" hack. It used to
311 work around a bug in GCC 2.95.2 but is now a bug in itself.
312
1cbf4fe9
MV
3132003-05-02 Marius Vollmer <mvo@zagadka.de>
314
315 * deprecated.h (scm_rstate, scm_rng, SCM_SLOPPY_CONSP,
316 SCM_SLOPPY_NCONSP, scm_tc7_ssymbol, scm_tc7_msymbol,
317 scm_tcs_symbols): New.
318
1a61d41b
MV
3192003-04-30 Marius Vollmer <marius.vollmer@uni-dortmund.de>
320
096ecbaf
MV
321 * deprecated.h, deprecated.c (scm_protect_object,
322 scm_unprotect_object, SCM_SETAND_CAR, SCM_SETOR_CAR,
323 SCM_SET_AND_CDR, SCM_SET_OR_CDR, SCM_FREEP, SCM_NFREEP,
324 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
325 SCM_GCCDR, scm_remember, scm_the_root_module, scm_make_module,
326 scm_ensure_user_module, scm_load_scheme_module, scm_port,
327 scm_ptob_descriptor, scm_port_rw_active,
328 scm_close_all_ports_except): New.
329
1a61d41b
MV
330 * ports.c (scm_c_port_for_each): New function, mostly copied from
331 scm_port_for_each.
332 (scm_port_for_each): Reimplemented using scm_c_port_for_each.
333 * ports.h (scm_c_port_for_each): New prototype.
334
c8e1d354
MD
3352003-04-28 Mikael Djurfeldt <djurfeldt@nada.kth.se>
336
337 * eval.c (scm_m_atdispatch): Removed until actually needed. (This
338 macro was introduced in anticipation of GOOPS method compilation
339 code.)
340
341 * goops.c: Removed binding of @dispatch.
342
a4aa2134
DH
3432003-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
344
345 * eval.c, goops.c (@dispatch, @slot-ref, @slot-set!): Move the
346 instructions that bind the macros on the scheme level back to
347 goops.c in order to make sure again that the bindings go into the
348 (oop goops) module and are not visible from the outside.
349
9fbee57e
DH
3502003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
351
352 * eval.c: Non functional change: Separated R5RS and non-R5RS
353 macros into different sections of the file and ordered the
354 memoizers alphabetically.
355
12841895
DH
3562003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
357
358 * eval.c (scm_ilookup): Rewritten to improve readability.
359
6a3f13f0
DH
3602003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
361
362 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
363 Partially reverted patch from 2003-04-23 in oder to find a better
364 compromise between readability and debuggability.
365
b0c5d67b
DH
3662003-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
367
368 * eval.c, eval.h, goops.c, goops.h (scm_m_atslot_ref,
369 scm_m_atslot_set_x, scm_m_atdispatch): Move the declarations and
370 definitions of the special goops memoizers from goops.[ch] to
371 eval.[ch]. Hmm... it seems that scm_m_atdispatch is not used
372 throughout guile.
373
b9ad392e
MD
3742003-04-24 Mikael Djurfeldt <mdj@kvast.blakulla.net>
375
376 * ports.c, ports.h (scm_i_port_table_mutex): New mutex.
377
378 * fports.c (scm_evict_ports): Lock/unlock scm_i_port_table_mutex.
379
380 * ports.c (scm_close_port, scm_flush_all_ports): Ditto.
381
382 * ioext.c (scm_fdes_to_ports): Ditto.
383
384 * vports.c (scm_make_soft_port): Changed SCM_DEFER/ALLOW_INTS into
385 lock/unlock scm_i_port_table_mutex.
386
387 * strports.c (scm_mkstrport): Ditto.
388
389 * ports.c (scm_void_port, scm_port_for_each): Ditto.
390
391 * fports.c (scm_fdes_to_port): Ditto.
392
d0b07b5d
DH
3932003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
394
395 This set of patches contains no functional changes, only debatable
396 minor stylistic ones. Still, in order to prepare a patch between
397 my local copy and the CVS version, I decided to submit the changes
398 below. Then, the patch will hopefully only contain relevant
399 modifications :-)
400
401 * eval.c (iqq): Added const specifier.
402
403 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
404 Use NULL instead of 0 to indicate that a pointer is returned.
405 Removed some misleading 'fall through' comments.
406
407 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
408 Split up long expressions into smaller ones to be more debugging
409 friendly.
410
a98e8e98
DH
4112003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
412
413 * eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR,
414 SCM_EXIT_FRAME_HDLR): Use SCM_PACK to convert data to a SCM value
415 rather than casting to SCM.
416
c178c3a6
DH
4172003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
418
419 * sort.c, pairs.h: Removed unnecessary includes.
420
d339981a
DH
4212003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
422
423 * sort.c: Replaced hand-made trampline code by the new official
424 mechanism from eval.c. This fixes a segfault in the new test file
425 sort.test.
426
427 (quicksort, compare_function, scm_restricted_vector_sort_x,
428 scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
429 scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x,
430 scm_merge_vector_step, scm_stable_sort_x, scm_stable_sort,
431 scm_sort_list_x, scm_sort_list): Use trampoline mechanism from
432 eval.c.
433
434 (subr2less, lsubrless, closureless, applyless, scm_cmp_function,
435 cmp_fun_t): Removed.
436
437 (compare_function): Added.
438
439 * sort.c (quicksort, SWAP, stack_node): Replaced pointer
440 arithmetics with index arithmetics. Changed quicksort to work on
441 an array of SCM values instead of an array of characters. Avoid
442 bytewise copying of SCM elements. Avoid allocating memory on the
443 stack with alloca. Fixed some comments.
444
821f18a4
DH
4452003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
446
447 * eval.c (EXTEND_ENV): Eliminated.
448
449 (unmemocopy, SCM_CEVAL, SCM_APPLY): Use SCM_EXTEND_ENV instead of
450 EXTEND_ENV.
451
94fb5a6e
DH
4522003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
453
454 * __scm.h (SCM_DEBUG_DEBUGGER_SUPPORT): New compile-time option.
455
456 * gc.card.c (scm_gc_marked_p): Fixed compiler warning when
457 compiling with SCM_DEBUG==1 by moving definition behind prototype.
458
459 * gc.card.c (scm_dbg_t_list_cell, scm_dbg_t_double_cell,
460 scm_dbg_gc_marked_p, scm_dbg_gc_get_card, scm_dbg_gc_get_bvec,
461 scm_t_list_cell_struct, scm_t_list_cell, scm_t_double_cell,
462 scm_gc_marked_p, scm_gc_get_card, scm_gc_get_bvec): Fixed
463 functions such that they check if the object is a non-immediate.
464 Further, renamed identifiers to use the scm_dbg_ prefix and made
465 their inclusion into the lib dependent of the
466 SCM_DEBUG_DEBUGGER_SUPPORT compile time option.
467
fce0b22d
DH
4682003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
469
470 * __scm.h: Fixed comment about the SCM_DEBUG_TYPING_STRICTNESS
471 debug option.
472
1685446c
DH
4732003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
474
821f18a4 475 * list.c (scm_ilength, scm_last_pair), unif.c (l2ra): Prefer
1685446c
DH
476 !SCM_CONSP over SCM_NCONSP. Now, guile itself does not include
477 any calls to SCM_NCONSP any more.
478
479 * unif.c (l2ra): Eliminate redundant check.
480
9ff1720f
DH
4812003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
482
483 * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
484 scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over
485 SCM_NNULLP. Now, guile itself does not include any calls to
486 SCM_NNULLP any more.
487
05b15362
DH
4882003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
489
490 * eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
491 scm_copy_tree): Place assignment expressions which are part of
492 other expressions into an expression of their own.
493
0c88d7df
DH
4942003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
495
496 * goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't
497 compare SCM values with !=.
498
5cb22e96
DH
4992003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
500
501 * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter,
502 scm_m_generalized_set_x, scm_init_evalext): Move the declaration
503 and definition of the memoizer for the generalized set! macro from
504 evalext.[ch] to eval.[ch]. Use the SCM_SYNTAX snarfer macro to
505 define the macro object.
506
507 * eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x,
508 scm_m_generalized_set_x): Since now scm_s_set_x is only used in
509 eval.c, it is made static and renamed to s_set_x.
510
511 * evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo>
512 over SCM_N<foo>.
513
a44a9715
DH
5142003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
515
516 * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,
517 scm_init_eval): Made scm_undefineds static in eval.c, renamed it
518 to undefineds and registered the object as a permanent object.
519
520 * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
521 static in eval.c, renamed it to f_apply and registered the object
522 as a permanent object.
523
1b43d24c
DH
5242003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
525
5cb22e96 526 * eval.c (SCM_BIT7, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
1b43d24c
DH
527 file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
528
aec16f99
DH
5292003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
530
531 * numbers.c (scm_logtest): Fixed argument bug in the call to
532 mpz_and, which showed up when compiling with SCM_DEBUG defined.
533
f96460ce
DH
5342003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
535
536 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
537 type errors that showed up when compiling with SCM_DEBUG defined.
538
d0f6ceb8
DH
5392003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
540
541 * continuations.c, continuations.h, eval.c, eval.h, extensions.c,
542 gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h,
543 throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
544 fix compile errors with --disable-deprecated.
545
19a7a089
RB
5462003-04-17 Rob Browning <rlb@defaultvalue.org>
547
548 * numbers.c (scm_integer_expt): fix case where we were declaring
549 vars in the middle of a statement block. Thanks to Thamer
550 Al-Harbash.
551
47cd67db
MD
5522003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
553
0fd7dcd3
MD
554 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
555 change.
556
47cd67db
MD
557 * eq.c (scm_eqv_p): Turned into a primitive generic.
558
3b8b889c
RB
5592003-04-16 Rob Browning <rlb@defaultvalue.org>
560
312006bb
RB
561 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
562 Thanks to Boyd Gerber.
563 Added check for __arm__ in addition to arm for LINUX and copied
564 __s390__ defines from upstream libgc. Thanks to James Treacy for
565 reporting the problems.
c7ef2ea1 566
3b8b889c
RB
567 * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT.
568
569 * socket.c: use SCM_CHAR_BIT.
570
571 * random.c (scm_c_random_bignum): use SCM_CHAR_BIT.
572
573 * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT.
574
43261b39
MD
5752003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
576
577 * feature.c (scm_init_feature): Always add threads feature.
578
58241edc
MD
5792003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
580
581 * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
582 scm_at_assert_bound_ref. (We don't want the unbound check. See
583 oop/goops/active-slot.scm.)
584
94e91275
RB
5852003-04-14 Rob Browning <rlb@defaultvalue.org>
586
587 * tags.h: scm_t_intptr should have been intptr_t.
588
3071ea27
RB
5892003-04-13 Rob Browning <rlb@defaultvalue.org>
590
591 * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc"
592 test. Instead use
593 #if defined (sparc) || defined (__sparc__) || defined (__sparc)
594 as gc_os_dep.c suggests is appropriate.
595
596 * goops.c (prep_hashsets): make static to match prototype.
597 (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert
598 Chin.
599
600 * c-tokenize.lex: remove trailing comma from enum. Thanks to
601 Albert Chin.
602
603 * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas
604 Klausner.
605
21ab2aeb
MD
6062003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
607
608 * goops.c (scm_sys_prep_layout_x): Instance allocation is now
609 indicated through extra fields in getters-n-setters.
610 (scm_add_slot): Adapted to new format of getters_n_setters slot.
611 (Thanks to Andy Wingo.)
612
dff96e95
HWN
6132003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
614
615 * gc-segment.c: add comment
616
07921c76
RB
6172003-04-07 Rob Browning <rlb@defaultvalue.org>
618
b5331f10
RB
619 * debug.h: change "id" arg name to "info_id" to avoid objective-c
620 clash.
621
07921c76
RB
622 * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael
623 and add regression test to standalone/.
624
6252003-04-06 Rob Browning <rlb@defaultvalue.org>
626
627 * strings.c (scm_mem2string): use memcpy rather than by-hand loop.
628 Thanks to Dale P. Smith.
629
630 * random.c: #include gmp.h.
631 (scm_c_random_bignum): normalize result on return.
632
633 * init.c: #include gmp.h.
634
635 * numbers.h: remove the gmp.h #include (not needed now).
636
637 * posix.h: change occurences of "id" to something else so we don't
638 cause trouble when included via objective-c (can't hurt, might
639 help). Still have usage in debug.h, though.
640
938f6b7c
MD
6412003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
642
372691d8
MD
643 * random.c (scm_c_random_bignum): Don't generate a random number
644 equal to m (the second argument of scm_c_random_bignum); only
645 generate numbers in the range 0 <= r < m.
c5f268f8
MD
646 (scm_c_default_rstate): Use SCM_VARIABLE_REF to access
647 scm_var_random_state.
372691d8 648
938f6b7c
MD
649 * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then
650 clause.
651
6cdb8c3f
RB
6522003-04-05 Rob Browning <rlb@defaultvalue.org>
653
938f6b7c 654 * modules.c (scm_module_import_interface): move declaration of
6cdb8c3f
RB
655 uses before any code.
656
15635be5
MD
6572003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
658
1ecfd013
MD
659 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
660 not top_srcdir.
661
15635be5
MD
662 * hashtab.c (rehash_after_gc): Clear to_rehash list before
663 processing it in order to avoid an infinite loop.
664
665 * print.c (scm_prin1): Remember old state of pstate->writingp.
666
73be1d9e
MV
6672003-04-05 Marius Vollmer <mvo@zagadka.de>
668
669 * Changed license terms to the plain LGPL thru-out.
670
ad815c06
RB
6712003-04-04 Rob Browning <rlb@defaultvalue.org>
672
673 * socket.c (FLIPCPY_NET_HOST_128): new macro.
674 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
675 rewrite to handle GMP bignums.
676
677
678 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
679
680 * ports.c (scm_getc): minor tweak.
681
682 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
683 rewrite to handle GMP bignums.
684
685 * numbers.c: rewrite *many* functions to handle GMP bignums.
686
687 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
688 handle GMP bignums.
689
690 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
691
692 * init.c (check_config): remove SCM_BIGDIG conditionals.
693 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
694
695 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
696
697 * eval.c: remove SCM_BIGDIG conditionals.
698
699 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
700
6cdb8c3f
RB
7012003-03-31 Rob Browning <rlb@defaultvalue.org>
702
703 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
704 to Kevin Ryde.)
705
7062003-03-27 Rob Browning <rlb@defaultvalue.org>
707
708 * threads.h: fix various preprocessor usages of new public
709 symbols to expect 0 or 1 values rather than 1 or undefined.
710 i.e. change #ifdef to #if, etc.
711
712 * threads.c: fix various preprocessor usages of new public
713 symbols to expect 0 or 1 values rather than 1 or undefined.
714 i.e. change #ifdef to #if, etc.
715
716 * tags.h: fix various preprocessor usages of new public
717 symbols to expect 0 or 1 values rather than 1 or undefined.
718 i.e. change #ifdef to #if, etc.
719
720 * stacks.c: fix various preprocessor usages of new public
721 symbols to expect 0 or 1 values rather than 1 or undefined.
722 i.e. change #ifdef to #if, etc.
723
724 * stackchk.h: fix various preprocessor usages of new public
725 symbols to expect 0 or 1 values rather than 1 or undefined.
726 i.e. change #ifdef to #if, etc.
727
728 * stackchk.c: fix various preprocessor usages of new public
729 symbols to expect 0 or 1 values rather than 1 or undefined.
730 i.e. change #ifdef to #if, etc.
731
732 * sort.c: fix various preprocessor usages of new public
733 symbols to expect 0 or 1 values rather than 1 or undefined.
734 i.e. change #ifdef to #if, etc.
735
736 * read.c: fix various preprocessor usages of new public
737 symbols to expect 0 or 1 values rather than 1 or undefined.
738 i.e. change #ifdef to #if, etc.
739
740 * random.c: fix various preprocessor usages of new public
741 symbols to expect 0 or 1 values rather than 1 or undefined.
742 i.e. change #ifdef to #if, etc.
743
744 * print.c: fix various preprocessor usages of new public
745 symbols to expect 0 or 1 values rather than 1 or undefined.
746 i.e. change #ifdef to #if, etc.
747
748 * objects.c: fix various preprocessor usages of new public
749 symbols to expect 0 or 1 values rather than 1 or undefined.
750 i.e. change #ifdef to #if, etc.
751
752 * numbers.h: fix various preprocessor usages of new public
753 symbols to expect 0 or 1 values rather than 1 or undefined.
754 i.e. change #ifdef to #if, etc.
755
756 * null-threads.c: fix various preprocessor usages of new public
757 symbols to expect 0 or 1 values rather than 1 or undefined.
758 i.e. change #ifdef to #if, etc.
759
760 * lang.c: fix various preprocessor usages of new public
761 symbols to expect 0 or 1 values rather than 1 or undefined.
762 i.e. change #ifdef to #if, etc.
763
764 * lang.h: fix various preprocessor usages of new public
765 symbols to expect 0 or 1 values rather than 1 or undefined.
766 i.e. change #ifdef to #if, etc.
767
768 * iselect.h: fix various preprocessor usages of new public
769 symbols to expect 0 or 1 values rather than 1 or undefined.
770 i.e. change #ifdef to #if, etc.
771
772 * init.c: fix various preprocessor usages of new public
773 symbols to expect 0 or 1 values rather than 1 or undefined.
774 i.e. change #ifdef to #if, etc.
775
776 * gh_data.c: fix various preprocessor usages of new public
777 symbols to expect 0 or 1 values rather than 1 or undefined.
778 i.e. change #ifdef to #if, etc.
779
780 * gh.h: fix various preprocessor usages of new public
781 symbols to expect 0 or 1 values rather than 1 or undefined.
782 i.e. change #ifdef to #if, etc.
783
784 * gen-scmconfig.c: change most new public symbols to be defined to
785 0 or 1 rather than being either 1 or undefined.
786
787 * gc_os_dep.c: fix various preprocessor usages of new public
788 symbols to expect 0 or 1 values rather than 1 or undefined.
789 i.e. change #ifdef to #if, etc.
790 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
791
792 * gc.h: fix various preprocessor usages of new public
793 symbols to expect 0 or 1 values rather than 1 or undefined.
794 i.e. change #ifdef to #if, etc.
795
796 * gc-card.c: fix various preprocessor usages of new public
797 symbols to expect 0 or 1 values rather than 1 or undefined.
798 i.e. change #ifdef to #if, etc.
799
800 * gc-mark.c: fix various preprocessor usages of new public
801 symbols to expect 0 or 1 values rather than 1 or undefined.
802 i.e. change #ifdef to #if, etc.
803
804 * feature.c: fix various preprocessor usages of new public
805 symbols to expect 0 or 1 values rather than 1 or undefined.
806 i.e. change #ifdef to #if, etc.
807
808 * evalext.c: fix various preprocessor usages of new public
809 symbols to expect 0 or 1 values rather than 1 or undefined.
810 i.e. change #ifdef to #if, etc.
811
812 * eval.h: fix various preprocessor usages of new public
813 symbols to expect 0 or 1 values rather than 1 or undefined.
814 i.e. change #ifdef to #if, etc.
815
816 * eval.c: fix various preprocessor usages of new public
817 symbols to expect 0 or 1 values rather than 1 or undefined.
818 i.e. change #ifdef to #if, etc.
819
820 * eq.c: fix various preprocessor usages of new public
821 symbols to expect 0 or 1 values rather than 1 or undefined.
822 i.e. change #ifdef to #if, etc.
823
824 * coop.c: fix various preprocessor usages of new public
825 symbols to expect 0 or 1 values rather than 1 or undefined.
826 i.e. change #ifdef to #if, etc.
827
828 * coop-threads.c: fix various preprocessor usages of new public
829 symbols to expect 0 or 1 values rather than 1 or undefined.
830 i.e. change #ifdef to #if, etc.
831
832 * coop-pthreads.c: fix various preprocessor usages of new public
833 symbols to expect 0 or 1 values rather than 1 or undefined.
834 i.e. change #ifdef to #if, etc.
835
836 * coop-defs.h: fix various preprocessor usages of new public
837 symbols to expect 0 or 1 values rather than 1 or undefined.
838 i.e. change #ifdef to #if, etc.
839
840 * convert.i.c: fix various preprocessor usages of new public
841 symbols to expect 0 or 1 values rather than 1 or undefined.
842 i.e. change #ifdef to #if, etc.
843
844 * continuations.c: fix various preprocessor usages of new public
845 symbols to expect 0 or 1 values rather than 1 or undefined.
846 i.e. change #ifdef to #if, etc.
847
848 * _scm.h: fix various preprocessor usages of new public symbols to
849 expect 0 or 1 values rather than 1 or undefined. i.e. change
850 #ifdef to #if, etc.
851
d11d697a
MV
8522003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
853
9686f86d
MV
854 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
855
856 * deprecated.c, deprecated.h: New files, to collect deprecated
857 things in one place.
858 * Makefile.am: Added them in all the right places.
859
d11d697a
MV
860 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
861 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
862 builds work.
9686f86d
MV
863 (DOT_X_FILES): Removed "iselect.x".
864 (DOT_DOC_FILES): Removed "iselect.doc".
d11d697a 865
e3c0c3b9
RB
8662003-03-25 Rob Browning <rlb@defaultvalue.org>
867
868 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
869 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
870
871 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
872
873 * vports.c: #include <config.h> if HAVE_CONFIG_H.
874
875 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
876 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
877
878 * threads.h: replace usage of struct timespect with
879 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
880 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
881 favor of scm_t_timespec from scmconfig.h.
882
883 * threads.c: move libguile/_scm.h include to the top so we pick up
884 any critical defines like _GNU_SOURCE early. Replace usage of
885 struct timespect with scm_t_timespec. Replace usage of
886 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
887 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
888
889 * threads-plugin.h: replace usage of struct timespect with
890 scm_t_timespec.
891
892 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
893 usage of struct timespect with scm_t_timespec.
894
895 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
896 HAVE_INTTYPES_H handling to scmconfig.h. #include
897 "libguile/__scm.h". Rework handling for scm_t_bits,
898 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
899 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
900 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
901 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
902 SCM_HAVE_ARRAYS.
903
904 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
905
906 * struct.c: #include <config.h> if HAVE_CONFIG_H.
907
908 * strports.c: #include <config.h> if HAVE_CONFIG_H.
909
910 * strop.c: #include <config.h> if HAVE_CONFIG_H.
911
912 * stime.h: move handling of time related headers to scmconfig.h.
913
914 * stime.c: #include <config.h> if HAVE_CONFIG_H.
915
916 * stacks.c: replace usage of STACK_GROWS_UP with
917 SCM_STACK_GROWS_UP.
918
919 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
920 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
921
922 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
923 of uint32 and HAVE_UINT_32 with scm_t_int32.
924
925 * smob.c: #include <config.h> if HAVE_CONFIG_H.
926
927 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
928
929 * script.c: #include <config.h> if HAVE_CONFIG_H.
930
931 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
932
933 * scmconfig.h.top: new file -- preamble for scmconfig.h.
934
935 * rw.c: #include <config.h> if HAVE_CONFIG_H.
936
937 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
938
939 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
940
941 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
942
943 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
944 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
945 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
946 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
947
948 * ramap.c: replace usage of HAVE_LONG_LONGS with
949 "SCM_SIZEOF_LONG_LONG != 0".
950
951 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
952 "libguile/scmconfig.h".
953
954 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
955
956 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
957 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
958
959 * posix.c: #include <config.h> if HAVE_CONFIG_H.
960
961 * ports.c: #include <config.h> if HAVE_CONFIG_H.
962
963 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
964
965 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
966 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
967 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
968 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
969 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
970 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
971 "SCM_SIZEOF_LONG_LONG != 0".
972
973 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
974 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
975 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
976 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
977
978 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
979
980 * null-threads.h: replace usage of struct timespect with
981 scm_t_timespec.
982
983 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
984
985 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
986 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
987 scm_t_uint64 and rename usages.
988
989 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
990
991 * load.c: #include <config.h> if HAVE_CONFIG_H.
992
993 * iselect.h: move handling of time related headers to scmconfig.h.
994 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
995 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
996 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
997
998 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
999 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
1000 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
1001
1002 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
1003
1004 * inline.h: #include "libguile/__scm.h" at the top. Change code
1005 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
1006 what to do instead of creating a new public #define. Rename usage
1007 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
1008 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
1009 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
1010
1011 * inline.c: rearrange handling -- now we just #define
1012 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
1013 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
1014 appropriate, and we use that in inline.h along with the above
1015 define to determine how to respond.
1016
1017 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
1018 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
1019
1020 * guile.c: #include <config.h> if HAVE_CONFIG_H.
1021
1022 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
1023 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
1024
1025 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
1026
1027 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
1028
1029 * gen-scmconfig.c: new file -- see comments in file for details.
1030
1031 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
1032
1033 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
1034 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
1035
1036 * gc.h: replace usage of SIZEOF_LONG with
1037 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
1038 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
1039 since we handle that in scmconfig.h now.
1040
1041 * gc.c: #include <config.h> if HAVE_CONFIG_H.
1042
1043 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
1044 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
1045 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
1046
1047 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
1048
1049 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
1050 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
1051
1052 * fports.c: #include <config.h> if HAVE_CONFIG_H.
1053
1054 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
1055
1056 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
1057 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
1058
1059 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
1060
1061 * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
1062 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
1063
1064 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
1065 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
1066 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
1067 with "SCM_SIZEOF_LONG_LONG != 0".
1068
1069 * error.c: #include <config.h> if HAVE_CONFIG_H.
1070
1071 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
1072 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
1073 with "SCM_SIZEOF_LONG_LONG != 0".
1074
1075 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
1076
1077 * coop.c: replace usage of struct timespect with scm_t_timespec.
1078 #include <config.h> if HAVE_CONFIG_H.
1079
1080 * coop-threads.c: #include "libguile/_scm.h" early. Replace
1081 usage of struct timespect with scm_t_timespec. Replace usage of
1082 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
1083
1084 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
1085 usage of struct timespect with scm_t_timespec. Replace usage of
1086 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
1087
1088 * coop-defs.h: move handling of time related headers to
1089 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
1090 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
1091 timespect with scm_t_timespec.
1092
1093 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
1094
1095 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
1096
1097 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
1098 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
1099
1100 * continuations.c: move libguile/_scm.h include to the top so we
1101 pick up any critical defines like _GNU_SOURCE early.
1102
1103 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
1104
1105 * async.c: #include <config.h> if HAVE_CONFIG_H.
1106
1107 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
1108
1109 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
1110 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
1111
1112 * __scm.h: move libguile/scmconfig.h include up to the top, so
1113 we're sure to pick up any critical defines like _GNU_SOURCE early.
1114 #include <limits.h> removed in favor of scmconfig.h inclusion when
1115 appropriate. STDC_HEADERS based inclusion of stdlib.h,
1116 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
1117 scmconfig.h inclusion when appropriate. Various Win32 related
1118 definitions removed in favor of scmconfig.h inclusion when
1119 appropriate.
1120 (HAVE_UINTPTR_T): definition removed (see NEWS).
1121 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
1122 (HAVE_LONG_LONGS): definition removed (see NEWS).
1123 (HAVE_LONG_LONG): definition removed (see NEWS).
1124 (HAVE_PTRDIFF_T): definition removed (see NEWS).
1125
1126 * Makefile.am: scmconfig.h is now generated by building and
1127 running gen-scmconfig.h and capturing its output. gen-scmconfig
1128 uses config.h and the configure.in generated gen-scmconfig.h to
1129 decide what to output. See gen-scmconfig.c for details.
1130 (noinst_PROGRAMS): add gen-scmconfig.
1131 (gen_scmconfig_SOURCES): new variable.
1132 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
1133 cross-compiling right.
1134 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
1135 (BUILT_SOURCES): add scmconfig.h.
1136
25e0bf97
MV
11372003-03-19 Marius Vollmer <mvo@zagadka.de>
1138
1139 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
1140 Adrian Bunk. Thanks!
1141
74b6d6e4
MD
11422003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1143
1144 * goops.c (make_class_from_template): New fourth arg:
1145 applicablep.
1146 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
1147 cpls.
1148
1149 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
1150
1151 * goops.c, objects.c, objects.h (scm_make_extended_class): New
1152 second arg: applicablep.
1153 (scm_i_inherit_applicable): New function.
1154
1155 * goops.c, goops.h (scm_class_applicable,
1156 scm_class_extended_accessor): New classes.
1157
5c9e7dad
DH
11582003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
1159
1160 * procs.c (scm_procedure_documentation): Removed redundant
1161 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
1162 predicates.
1163
f8af5c6d
MD
11642003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1165
c614a00b
MD
1166 * list.c, list.h (scm_filter, scm_filter_x): New functions.
1167
109c2c9f
MD
1168 * modules.c (scm_module_import_interface): New function.
1169
f8af5c6d
MD
1170 * goops.c, goops.h (scm_class_accessor_method): Renamed from
1171 scm_class_accessor.
1172 (scm_class_accessor): New class.
1173
a48d60b1
MD
11742003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1175
1176 * goops.c (scm_primitive_generic_generic): Enable primitive
1177 generic if not enabled.
1178 (scm_sys_goops_loaded): Setup unextended primitive generics.
1179
1180 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
1181
1182 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
1183 snarf macros.
1184
1185 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
1186 testing example. All uses of SCM_GPROC should be converted.)
1187
1188 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
1189 scm_assoc.
1190
1191 * eq.c (scm_equal_p): Turned into a primitive generic.
1192
84edc049
RB
11932003-02-27 Rob Browning <rlb@defaultvalue.org>
1194
1195 * Makefile.am (scmconfig.h): new target -- generate file from
1196 ../config.h.
1197 (modinclude_HEADERS): remove version.h.
1198 (nodist_modinclude_HEADERS): add version.h.
1199
ea5c9285
MD
12002003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1201
b4a1358c
MD
1202 This fixes a serious GC bug, introduced during the latest
1203 reorganization of the GC, which disabled freeing of structs and
1204 GOOPS objects:
1205
1206 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
1207 SCM_EOL.
53af8255
MD
1208 (scm_struct_prehistory): Move scm_free_structs to
1209 scm_before_mark_c_hook.
ea5c9285 1210
b4a1358c
MD
1211 * gc-card.c (sweep_card): Check that we haven't swept structs on
1212 this card before. That can happen if scm_i_sweep_all_segments has
1213 been called from some other place than scm_igc.
1214
c35738c1
MD
12152003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1216
231a4ea8
MD
1217 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
1218 (since hash tables now adapt their size).
1219
1220 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
1221 (current number of prehistory bindings; hashtable code will select
1222 a prime which is greater than this value).
1223
1224 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
1225 (current number of initial symbols).
1226
1227 * properties.c (scm_init_properties): Don't specify size of
1228 scm_properties_whash.
1229
1230 * objprop.c (scm_init_objprop): Don't specify size of
1231 scm_object_whash.
1232
1233 * keywords.c (scm_init_keywords): Don't specify a hash table size.
1234
c35738c1
MD
1235 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
1236
1237 The following changes introduce the use of resizable hash tables
1238 throughout Guile. It also renames the old *-hash-table* functions
1239 to *-alist-vector* and places them, together with the rest of the
1240 weak vector support, in the module (ice-9 weak-vector). We should
1241 probably introduce a new, better, API for weak references, for
1242 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
1243 look like and are used like ordinary pairs.)
1244
1245 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
1246 leaf_environment_fold, obarray_remove_all): Use hashtable
1247 accessors.
1248
1249 * gc.c (scm_init_storage): Moved hook initialization to
1250 scm_storage_prehistory.
1251 (scm_storage_prehistory): New function.
1252 (scm_igc): Added commentary about placement of
1253 scm_after_sweep_c_hook.
1254
1255 * gc-mark.c (scm_mark_all): Use hashtable accessors.
1256 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
1257 SCM_WVECT_WEAK_VALUE_P.
1258
1259 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
1260 functions.
1261 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
1262 Removed.
1263 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
1264 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
1265
1266 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
1267 calls to scm_storage_prehistory and scm_hashtab_prehistory.
1268
1269 * modules.c (module-reverse-lookup): Use hashtable accessors.
1270
1271 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
1272
1273 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
1274 scm_make_weak_value_alist_vector,
1275 scm_make_doubly_weak_alist_vector): New functions.
1276
1277 * weaks.c (scm_init_weaks_builtins): New function.
1278
1279 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
1280 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
1281 SCM_WVECT_NOSCAN_P): New macros.
1282
1283 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
1284 and SCM_WVECT_WEAK_VALUE_P.
1285
1286 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
1287 allocate_weak_vector and exported.
1288
0a4c1355
MD
12892003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1290
1291 * hashtab.c: Undid thread safety. (We decided that it's better to
1292 let the user explicitly protect the tables (or not) according what
1293 is suitable for the application.)
1294
87ca11ff
MD
12952003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1296
1297 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
1298 thread safe and handle resizing tables.
1299 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
1300 SCM_DEFER/ALLOW_INTS.
1301
f59a096e
MD
13022003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1303
1304 * hashtab.c (scm_vector_to_hash_table,
1305 scm_c_make_resizing_hash_table, scm_make_hash_table): New
1306 functions.
1307 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
1308 safe and handle resizing tables.
1309
1310 * weaks.c (scm_make_weak_key_hash_table,
1311 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
1312 Size argument made optional. Return resizable table if not
1313 specified.
1314
4b612c5b
MD
13152003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1316
1317 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
1318 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
1319
b3d7f6df
MD
13202003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1321
1322 * debug.c (scm_procedure_source): Handle all objects for which
1323 procedure? is #t. (Thanks to Bill Schottstaedt.)
1324
756414cf
MD
13252003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1326
361d631f
MD
1327 * futures.c (mark_futures): Don't need to mark data of recycled
1328 futures.
1329 (scan_futures, cleanup_undead): Be smarter about marking
1330 futures---avoid unnecessary passes through future lists.
1331
756414cf
MD
1332 * futures.h, futures.c: New files; Introduced recycling of
1333 futures. For fine-grained threading this lifts performance to
1334 another level. We can now use parallelization in inner loops of
1335 Guile programs without impossible overhead.
1336
1337 * threads.h, threads.c: Moved futures to their own file.
1338
1339 * Makefile.am (libguile_la_SOURCES): Added futures.c.
1340 (DOT_X_FILES): Added futures.x.
1341 (DOT_DOC_FILES): Added futures.doc.
1342 (modinclude_HEADERS): Added futures.h.
1343
1344 * threads.c, threads.h (scm_i_create_thread): Renamed from
1345 create_thread and made global.
1346
1347 * futures.c (scm_make_future): New procedure.
1348
1349 * eval.c: #include "libguile/futures.h".
1350
1351 * init.c: #include "futures.h"
1352 (scm_init_guile_1): Call scm_init_futures.
1353
1354 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
1355
1356 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
1357
1358 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
1359 functions.
1360
1361 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
1362
b4debead
MD
13632003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1364
1365 * threads.c (create_thread): Don't unwind dynwind chain of parent
1366 thread before creation. Just start the new thread with an empty
1367 dynwind chain.
1368
93f26b7b
MD
13692003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1370
1371 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
1372
38d8927c
MD
13732003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1374
41c96c32
MD
1375 * threads.c (scm_timed_wait_condition_variable): Support timed
1376 waiting also for simple condition variables.
1377
38d8927c
MD
1378 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
1379 of calling the procedure change-object-class.
1380
9cf5d9b7
MD
13812003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1382
1383 * ramap.c (scm_ramapc): Typo in error message.
1384
bbf8d523
MD
13852003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1386
b46fae00
MD
1387 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
1388 slots with instance allocation.
1389
bbf8d523
MD
1390 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
1391 class.
1392 (scm_compute_applicable_methods): Use scm_generic_function_methods.
1393
1394 * goops.c (scm_generic_function_methods): Support extended
1395 generic functions.
1396
ebf9b47c
MD
13972002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1398
1399 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
2e37d6a2 1400 Thanks to Neil for pointing this out!
ebf9b47c 1401
14a9ba3f
NJ
14022002-12-29 Neil Jerram <neil@ossau.uklinux.net>
1403
1404 * lang.h: Remove declarations matching definitions removed from
1405 lang.c (just below).
1406
c6a040a8
NJ
14072002-12-28 Neil Jerram <neil@ossau.uklinux.net>
1408
6054d805
NJ
1409 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
1410 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
1411 and already commented out.
1412
c6a040a8
NJ
1413 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
1414 scm_lreadparen): Support reading vectors with Elisp syntax if
1415 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
1416 is not currently defined, and there isn't even a configure switch
1417 to enable it yet.)
1418
3742c12f
MV
14192002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
1420
1421 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
1422 builds work.
1423 (EXTRA_DIST): Added version.h.in.
1424
fb50ef08
MD
14252002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1426
1427 This change makes it possible for one thread to do lazy sweeping
1428 while other threads are running. Now only the mark phase need to
1429 have all threads asleep. We should look further into this issue.
1430 Presently, I've put the locking of scm_i_sweep_mutex at
1431 "conservative" places due to my current lack of knowledge about
1432 the garbage collector. Please feel free to restrict these regions
1433 further to allow for maximal parallelism!
1434
1435 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
1436
1437 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
1438 scm_gc_register_collectable_memory): Substitute locking of
1439 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
1440 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
1441 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
1442 the single-thread section (which now only contains the mark
1443 phase).
1444 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
1445 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
1446
1447 * threads.c (gc_section_mutex): Removed.
1448
9ed24633
MD
14492002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1450
0d48aca5
MD
1451 * threads.c (create_thread): Clear parent field in root state in
1452 order not to unnecessarily remember dead threads.
1453
9ed24633
MD
1454 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
1455 (scm_trampoline_1, scm_trampoline_2): Use them.
1456
29717c89
MD
14572002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1458
1459 Partial introduction of real plugin interface.
1460
1461 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
1462 (EXTRA_DIST): Added threads-plugin.c.
1463
1464 * threads-plugin.h, threads-plugin.c: New files.
1465
1466 * threads.h: #include "libguile/threads-plugin.h".
1467
1468 * threads.c: #include "libguile/threads-plugin.c".
1469
1470 * pthread-threads.c: Temporarily remove debugging functions.
1471
1472 * threads.c, threads.h (scm_yield): Added back.
1473
e29e0b09
MD
14742002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1475
1476 * threads.c (really_launch): Detach before unlocking
1477 thread_admin_mutex in order not to risk being joined.
1478 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
1479 thread_admin_mutex locked during GC.
1480
1481 * pthread-threads.c, pthread-threads.h: Improvements to debugging
1482 functions.
1483
0b6843b1 14842002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
93cd4dcd 1485
6da2dfc4
MD
1486 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
1487 support for debugging mutex operations.
1488
1b92fb6b
MD
1489 * threads.c (scm_thread): Removed filed joining_threads.
1490 (thread_print): Print thread number as well as address of thread
1491 structure.
0b6843b1
MD
1492 (scm_join_thread): Bugfix.
1493 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
1494 scm_timed_wait_condition_variable, scm_signal_condition_variable,
1495 scm_broadcast_condition_variable): Use the low-level API.
1496 (scm_all_threads): Return copy of thread list (to prevent
1497 unintended destruction).
1498 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
1b92fb6b 1499
93cd4dcd
MD
1500 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
1501 pthread "native" recursive mutex support.
1502
2ff4f181
MD
15032002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1504
28d52ebb
MD
1505 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
1506 Simply lock a thread C API recursive mutex.
1507 (SCM_NONREC_CRITICAL_SECTION_START,
1508 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
1509 SCM_REC_CRITICAL_SECTION_END): Removed.
1510
1511 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
1512 direct calls to scm_rec_mutex_lock / unlock around the three calls
1513 to scm_m_expand_body.
1514
1515 * eval.c, eval.h (promise_free): New function.
1516 (scm_force): Rewritten; Now thread-safe; Removed
1517 SCM_DEFER/ALLOW_INTS.
1518
1519 * pthread-threads.h: Added partially implemented plugin interface
1520 for recursive mutexes. These are, for now, only intended to be
1521 used internally within the Guile implementation.
1522
1523 * pthread-threads.c: New file.
1524
1525 * threads.c: Conditionally #include "pthread-threads.c".
1526
1527 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
1528 thread-safe;
1529
1530 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
1531 SCM_GLOBAL_REC_MUTEX): New macros.
1532
1533 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
1534 macros---use mutexes instead.
1535
1536 * tags.h (SCM_IM_FUTURE): New tag.
1537
1538 * eval.c (scm_m_future): New primitive macro.
1539 (SCM_CEVAL): Support futures.
1540 (unmemocopy): Support unmemoization of futures.
1541
1542 * print.c (scm_isymnames): Name of future isym.
1543
2ff4f181
MD
1544 * version.c: Unmade some changes to my private copy that got
1545 committed by mistake.
1546
392d2833
MD
15472002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1548
e200ddee
MD
1549 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
1550 2002-12-10.
1551
392d2833
MD
1552 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
1553
1554 * gc.c (scm_gc_sweep): Call it here instead, which is a more
1555 logical place.
1556
1557 * threads.c (create_thread): Remember root object until the handle
1558 of the new thread is on all_threads list.
1559
1560 * root.c (scm_make_root): Moved copying of fluids until after
1561 creation of root handle so that the fluids are GC protected. Also
1562 removed the critical section.
1563
c4c52ebe
MD
15642002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1565
960c408c
MD
1566 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
1567
3cdde9d6 1568 * gc-malloc.c (malloc_mutex): New mutex.
960c408c 1569 (scm_gc_malloc_prehistory): Initialize it.
3cdde9d6
MD
1570 (scm_realloc): Serialize call to realloc
1571 (scm_calloc): Same for calloc.
1572 Thanks to Wolfgang Jaehrling!
1573 (Now we have to make sure all calls to malloc/realloc are made
1574 through scm_malloc.)
1575
960c408c
MD
1576 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
1577
c4c52ebe
MD
1578 * threads.c (really_launch): Release heap (to prevent deadlock).
1579 (create_thread): Release heap before locking thread admin mutex.
1580
b0dc3d71
MD
15812002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1582
1583 * threads.c (scm_i_thread_invalidate_freelists): New
1584 function.
1585
1586 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
1587
1588 * modules.c (scm_export): Inserted a return statement.
1589
06e80f59
HWN
15902002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1591
1592 * modules.c (scm_export): new function
1593
1594 * gc-card.c: add a note about malloc()/free() overhead.
1595
a12611c3
MD
15962002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1597
1598 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
1599 in srcdir.
1600
c7fabadf
MD
16012002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1602
1603 These changes remove scm_ints_disabled (which hasn't has any
1604 effect in Guile for quite some time).
1605
1606 * async.c, error.h (scm_ints_disabled): Removed.
1607
1608 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
1609 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
1610 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
1611 (old_ints): Removed.
1612
1613 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
1614 critical section.
1615 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
1616 SCM_ALLOW_INTS.
1617
9bc4701c
MD
16182002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1619
52340b65
MD
1620 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
1621 Removed accidental #if 0 around these functions.
1622
9bc4701c
MD
1623 These changes are the start of support for preemptive
1624 multithreading. Marius and I have agreed that I commit this code
1625 into the repository although it isn't thoroughly tested and surely
1626 introduces many bugs. The bugs should only be exposed when using
1627 threads, though. Signalling and error handling for threads is
1628 very likely broken. Work on making the implementation cleaner and
1629 more efficient is needed.
1630
1631 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
1632 (SCM_NONREC_CRITICAL_SECTION_START,
1633 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
1634 SCM_REC_CRITICAL_SECTION_END): New macros.
1635 (SCM_CRITICAL_SECTION_START/END): Defined here.
1636
1637 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
1638 the three calls to scm_m_expand_body.
1639
1640 * gc.h: #include "libguile/pthread-threads.h";
1641 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
1642
1643 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
1644 scm_t_key;
1645
1646 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
1647 access.
1648
1649 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
1650
1651 * gc-freelist.c, threads.c (really_launch): Use
1652 SCM_FREELIST_CREATE.
1653
1654 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
1655
1656 * gc.c (scm_i_expensive_validation_check, scm_gc,
1657 scm_gc_for_newcell): Put threads to sleep before doing GC-related
1658 heap administration so that those pieces of code are executed
1659 single-threaded. We might consider rewriting these code sections
1660 in terms of a "call_gc_code_singly_threaded" construct instead of
1661 calling the pair of scm_i_thread_put_to_sleep () and
1662 scm_i_thread_wake_up (). Also, we would want to have as many of
1663 these sections eleminated.
1664
1665 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
1666
1667 * inline.h: #include "libguile/threads.h"
1668
1669 * pthread-threads.h: Macros now conform more closely to the
1670 pthreads interface. Some of them now take a second argument.
1671
1672 * threads.c, threads.h: Many changes.
1673
16742002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1675
1676 * Makefile.am (version.h): Changed $^ --> $< in rule for
1677 version.h.
1678
b2cbe8d8
RB
16792002-12-08 Rob Browning <rlb@defaultvalue.org>
1680
1681 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
1682 (SCM_MINOR_VERSION): use @--@ substitution now.
1683 (SCM_MICRO_VERSION): use @--@ substitution now.
1684 (scm_effective_version): new function prototype.
1685
1686 * version.c (scm_effective_version): new function, also add
1687 effective-version.
1688
1689 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
1690 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
1691 SCM_LIBRARY_DIR.
1692 (version.h): generate this here rather than configure.in. This
1693 approach tracks source edits better (i.e. more immediately).
1694 Might be worth considering for other .in files too.
1695
5441c65c
MV
16962002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
1697
1698 Reorganized thread package selection. A thread package now only
1699 implements a small set of pthread like functions and Guile
1700 implements the rest on top of that. Guile's implementation is
1701 what the "coop-pthreads" package has been previously. Support for
1702 "coop" threads has been removed until I get time to add it again.
1703
1704 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
1705 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
1706 null-threads.c, coop-pthreads.c.
1707 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
1708 pthread-threads.h.
1709
1710 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
1711
1712 * threads.h: Do not include "libguile/coop-defs.h". Include
1713 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
1714 (previously deprecated) C level thread API prototypes. They are
1715 now in the thread package specific headers, "null-threads.h" and
1716 "pthread-threads.h".
1717 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
1718 New.
1719 (scm_threads_init): Removed.
1720 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
1721 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
1722 SCM_I_THREAD_SWITCH_COUNT): Define here.
1723 (scm_single_thread_p): Removed.
1724 (scm_call_with_new_thread): Take two args directly instead of list
1725 of two args.
1726 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
1727 SCM_SET_THREAD_LOCAL_DATA): Define here.
1728
1729 * threads.c: Merged with "coop-pthreads.c".
1730
1731 * null-threads.h: Implement pthread-like API as a set of macros.
1732
1733 * pthread-threads.h: New, implement pthread-like API by deferring
1734 to pthread itself.
1735
1736 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
1737 has been lost in the reorganization.
1738
504d99c5
MD
17392002-12-01 Mikael Djurfeldt <mdj@linnaeus>
1740
1741 The following change makes it possible to move procedure
1742 application dispatch outside inner loops. The motivation was
1743 clean implementation of efficient replacements of R5RS primitives
1744 in SRFI-1.
1745
1746 The semantics is clear: scm_trampoline_N returns an optimized
1747 version of scm_call_N (or NULL if the procedure isn't applicable
1748 on N args).
1749
1750 Applying the optimization to map and for-each increases efficiency
1751 noticeably. For example, (map abs ls) is 8 times faster than
1752 before.
1753
1754 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
1755
1756 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
1757
1758 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
1759 (map, for-each): Handle also application on two args as a special
1760 case; Use trampolines.
1761
1762 Other changes:
1763
1764 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
1765 (subr2oless): Removed.
1766 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
1767 vector GC protected.
1768
1769 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
1770 scm_out_of_range.
1771
63dd3413
DH
17722002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
1773
1774 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
1775
4ba5f279
MD
17762002-11-17 Mikael Djurfeldt <mdj@linnaeus>
1777
1778 * debug.c (scm_make_iloc): Added missing "return".
1779
56ae231f
MV
17802002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
1781
1782 * strports.c (scm_eval_string_in_module): Validate second arg to
1783 be a module. Thanks to Arno Peters!
1784
80b28865
DH
17852002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
1786
1787 * .cvsignore: remove goops.c
1788
c88b1456
DH
17892002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
1790
1791 * modules.c (scm_env_top_level, scm_lookup_closure_module,
1792 module_variable, scm_module_lookup_closure,
1793 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
1794 scm_system_module_env_p): Don't compare SCM values with C
1795 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
1796 over SCM_NFALSEP.
1797
a8a19efc
DH
17982002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
1799
1800 * eval.h (SCM_MAKE_ILOC): New macro.
1801
1802 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
1803 the iloc bitpattern here.
1804
76734914
MD
18052002-11-14 Mikael Djurfeldt <mdj@linnaeus>
1806
1807 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
1808 part of the API, otherwise it's difficult to write Guile
1809 extensions using non-blocking I/O => moved #include
1810 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
1811
1812 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
1813 s_unlock_mutex.
1814
8b5b4a75
MV
18152002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
1816
1817 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
1818 are defined in configure.in.
1819
1820 * threads.c: Removed SCM_API from function definitions. SCM_API
1821 is only for declarations.
1822
e5a83084
MD
18232002-11-07 Mikael Djurfeldt <mdj@linnaeus>
1824
9be8bb45
MD
1825 * coop-pthreads.h: Added support for thread specific data to the
1826 generic C API for the coop-pthreads case.
1827
e5a83084
MD
1828 * threads.c, threads.h (scm_cond_init): Undo unintentional API
1829 change.
6c214b62 1830 (scm_cond_broadcast): Added missing function.
e5a83084 1831
7edf178e
MV
18322002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1833
1834 * coop.c (coop_next_runnable_thread): Removed, wich should have
1835 happened when GUILE_ISELECT was hard-wired.
1836
7f5b1b77
MV
18372002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
1838
7caa1b07
MV
1839 * Makefile.am (libguile_la_SOURCES): Added threads.c
1840 (DOT_DOC_FILES): Added threads.doc.
1841 (DOT_X_FILES): Added threads.x.
1842 (EXTRA_libguile_la_SOURCES): Removed threads.c.
1843 (noinst_HEADERS): Added coop-pthreads.c.
1844 (modinclude_HEADERS): Added coop-pthreads.h.
1845
1846 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
1847 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
1848
bb11cbf4
MV
1849 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
1850 Thanks to Bill Schottstaedt!
1851
1d4cbbed
MV
1852 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
1853
7f5b1b77
MV
1854 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
1855 SCM_COPT_THREADS is defined.
1856 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
1857 is defined.
1858
1859 * coop-pthreads.c: Some harmless renamings of internal stuff.
1860 (create_thread): New, generalized version of
1861 scm_call_with_new_thread.
1862 (scm_call_with_new_thread): Use it.
1863 (scm_spawn_thread): New, use create_thread.
1864
d52f53b1
MV
18652002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
1866
1867 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
1868 start testing it now.
1869
1870 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
1871 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
1872 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
1873 is defined.
1874
30f920c3
MV
18752002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
1876
1877 * scmsigs.c (signal_cell_handlers, install_handler_data,
1878 scm_delq_spine_x, really_install_handler, install_handler): New
1879 scheme for triggering signal handlers, to simplify take_signal.
1880 (take_signal): Simplified, to avoid race conditions.
1881 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
1882 hasn't exited yet.
1883
1884 * async.c (scm_async_click): Reset pending_asyncs, handle
1885 signal_asyncs. Don't set cdr of a non-signal async to #f.
1886 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
1887 always. Set pending_asyncs.
1888 (scm_system_async_mark_for_thread): Check that thread has not
1889 exited.
1890 (scm_unmask_signals, decrease_block): Call scm_async_click after
1891 block_asyncs becomes zero.
1892
1893 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
1894 active_asyncs.
1895
1896 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
1897 fields.
1898 * root.c (root_mark): Mark them.
1899 (make_root): Initialize them.
1900
1901 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
1902 USE_COOP_THREADS.
1903 (scm_internal_select): Define one version for USE_COOP_THREADS and
1904 one for USE_NULL_THREADS.
1905 (scm_init_iselect): Likewise.
1906
1907 * inline.h (scm_cell, scm_double_cell): Also allow
1908 USE_COPT_THREADS to not protect the slot initializers.
1909
1910 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
1911 because threads need to be initialized before the stack, but
1912 gsubrs such as scm_timed_condition_variable_wait can only be
1913 created later.
1914
1915 * threads.h: Include "coop-pthreads.h" when requested.
1916 (scm_threads_make_mutex, scm_threads_lock_mutex,
1917 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
1918 not implemented anyway.
1919 (scm_init_thread_procs, scm_try_mutex,
1920 scm_timed_condition_variable_wait,
1921 scm_broadcast_condition_variable, scm_c_thread_exited_p,
1922 scm_thread_exited_p): New prototypes.
1923 (struct timespec): Define if not already defined.
1924 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
1925 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
1926 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
1927 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
1928 deprecated.
1929
1930 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
1931 requested.
1932 (scm_thread_exited_p): New.
1933 (scm_try_mutex, scm_broadcast_condition_variable): Newly
1934 registered procedures.
1935 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
1936 Use the latter as the procedure for "wait-condition-variable",
1937 thus offering a optional timeout parameter to Scheme.
1938 (scm_wait_condition_variable): Implement in terms of
1939 scm_timed_wait_condition_variable.
1940 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
1941 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
1942 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
1943 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
1944 scm_make_mutex, etc, and deprecate.
1945 (scm_init_threads): Do not create smobs, leave this to
1946 scm_threads_init. Do not include "threads.x" file.
1947 (scm_init_thread_procs): New, include "threads.x" here.
1948
1949 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
1950 scm_null_mutex_lock, scm_null_mutex_unlock,
1951 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
1952 scm_null_condvar_wait, scm_null_condvar_signal,
1953 scm_null_condvar_destroy): Removed.
1954 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
1955 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
1956 scm_cond_destory): Do not define, they are now deprecated and
1957 handled by threads.{h,c}.
1958
1959 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
1960 (scm_threads_init): Create smobs here, using the appropriate
1961 sizes.
1962 (block): Removed, now unused.
1963 (scm_c_thread_exited_p): New.
1964 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
1965 scm_null_mutex_destroy, scm_null_condvar_init,
1966 scm_null_condvar_wait, scm_null_condvar_signal,
1967 scm_null_condvar_destroy): Removed and updated users to do their
1968 task directly.
1969 (scm_try_mutex, timeval_subtract,
1970 scm_timed_wait_condition_variable,
1971 scm_broadcast_condition_variable): New.
1972 (scm_wait_condition_variable): Removed.
1973
1974 * coop-defs.h (coop_m): Added 'level' field.
1975 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
1976 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
1977 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
1978 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
1979 define.
1980 (coop_condition_variable_broadcast): New.
1981
1982 * coop-threads.c (scm_threads_init): Create smobs here, using the
1983 appropriate sizes.
1984 (scm_c_thread_exited_p, scm_try_mutex,
1985 scm_timed_wait_condition_variable,
1986 scm_broadcast_condition_variable): New.
1987 (scm_wait_condition_variable): Removed.
1988
1989 * coop.c (coop_new_mutex_init): Initialize level.
1990 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
1991 level.
1992 (coop_condition_variable_signal): Renamed to
1993 coop_condition_variable_broadcast and reimplemented in terms of
1994 that. Thus...
1995 (coop_condition_variable_broadcast): New.
1996
1997 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
1998
1999 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
2000
087ed40d
MV
20012002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
2002
65a23095
MV
2003 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
2004 of system headers.
2005
087ed40d
MV
2006 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
2007 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
30f920c3 2008 give better error messages. Thanks to Bill Schottstaedt!
087ed40d 2009
5ec1d2c8
DH
20102002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
2011
2012 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
2013 scm_definedp to scm_defined_p and deprecated scm_definedp.
2014
100ae50d
DH
20152002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
2016
2017 * async.h, async.c (scm_system_async): Fixed deprecation to work
2018 correctly when deprecated features are excluded.
2019
2794cb50
MV
20202002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2021
2022 * async.c (scm_system_async_mark_for_thread): Validate thread
2023 argument.
2024
2025 * coop-threads.c (scm_i_thread_root): Do not validate argument.
2026
2027 * feature.c (scm_init_feature): Don't add 'threads' for
2028 USE_NULL_THREADS.
2029
2030 * inline.h (scm_cell, scm_double_cell): Also allow
2031 USE_NULL_THREADS to not protect the slot initializers.
2032
2033 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
2034 "USE_THREAD".
2035
2036 * Makefile.am (noinst_HEADERS): Added null-threads.c.
2037 (modinclude_HEADERS): Added null-threads.h.
2038
2039 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
2040 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
2041 (scm_init_threads): Use generic type names scm_t_mutex and
2042 scm_t_cond instead of coop_m and coop_c.
2043
2044 * null-threads.c, null-threads.h: New files.
2045
ff810d7a
MV
20462002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
2047
2048 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
2049 This is to support makes that know about "$<" only in pattern
2050 rules, like Sun's make.
2051
a90bdb73
MV
20522002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
2053
2054 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
2055 substitution. Thanks to David Allouche!
2056
e71a8bf2
DH
20572002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
2058
2059 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
2060 !SCM_ENABLE_DEPRECATED.
2061
41f77ff5
MV
20622002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2063
504d99c5 2064 * async.c (scm_system_async_mark_for_thread): Only call
41f77ff5
MV
2065 scm_i_thread_root when USE_THREADS is defined. Use scm_root
2066 otherwise.
2067
2068 * scmsigs.c (take_signal): Only call scm_i_thread_root when
2069 USE_THREADS is defined. Use scm_root otherwise.
2070 (scm_sigaction_for_thread): Ignore THREAD argument when
2071 USE_THREADS is not defined. Also, move THREAD argument defaulting
2072 out of HAVE_SIGACTION section, which was a bug.
2073
6d16b125
MV
20742002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2075
2076 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
2077 signal_handlers, not the closure that is used as the async.
2078 The closure is stored in signal_handler_cells, as previously.
2079
acfa1f52
MV
20802002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
2081
2082 * root.h (scm_root_state): Added 'block_async' slot.
2083 (scm_active_asyncs): Removed abbrev.
2084 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
2085
2086 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
2087 abbrev.
2088
2089 * async.h (scm_call_with_blocked_asyncs,
2090 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
2091 scm_c_call_with_unblocked_asyncs): New prototypes.
2092 (scm_mask_signals, scm_unmask_signals): Deprecated.
2093 (scm_mask_ints): Turned into a macro.
2094 * async.c (scm_mask_ints): Removed.
2095 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
2096 this should not be necessary.
2097 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
2098 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
2099 deprecation warning and check for errornous use. Set block_asyncs
2100 instead of scm_mask_ints.
2101 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
2102 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
2103 scm_c_call_with_unblocked_asyncs): New.
2104
2105 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
2106 Asyncs are enabled by default.
2107
34010f56
NJ
21082002-10-09 Neil Jerram <neil@ossau.uklinux.net>
2109
2110 * vports.c (scm_make_soft_port): Allow vector argument to carry a
2111 6th element: an input waiting thunk.
2112 (sf_input_waiting): New.
2113
9310d6f2
MV
21142002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
2115
2116 * root.c (root_mark): Mark active_asyncs slot.
2117
2118 * async.c (scm_async_click): Set the cdr of a executed handler
2119 cell to SCM_BOOL_F, not SCM_EOL.
2120 (scm_i_queue_async_cell): Queue the cell at the end of the list,
2121 and only if the handler procedure is not already present.
2122 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
2123 with SCM_BOOL_F.
2124 * scmsigs.c (scm_sigaction_for_thread): Likewise.
2125
ac48c719
RB
21262002-10-04 Rob Browning <rlb@defaultvalue.org>
2127
1360a142
RB
2128 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
2129
2130 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
2131 scm_lt_dlopenext, and scm_lt_dlerror.
2132 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
2133 and scm_lt_dlerror.
2134 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
2135 and scm_lt_dlerror.
2136 (sysdep_dynl_init): switch to scm_lt_dlinit();
2137
2138 * Makefile.am (libguile_la_LIBADD): switch to use
2139 libguile-ltdl.la.
2140
504d99c5 2141 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
ac48c719 2142
497092c9
MV
21432002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
2144
2145 * scmsigs.h (scm_sigaction_for_thread): New prototype.
2146 * scmsigs.c (got_signal): Removed.
2147 (signal_handler_cells, signal_handler_threads): New.
2148 (take_signal): Queue the cell of the signal for the specified
2149 thread. Reset the signal handler on systems that don't have
2150 sigaction.
2151 (sys_deliver_signals): Removed.
2152 (close_1): New.
2153 (scm_sigaction_for_thread): Renamed from scm_sigaction and
2154 extended to also set the thread of a signal and allocate a cell
2155 for it. Keep the Scheme name "sigaction". Check that signum is
2156 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
2157 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
2158 (scm_init_scmsigs): Allocate signal_handler_cells and
2159 signal_handler_threads vectors.
2160
2161 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
2162 that system asnycs and user asyncs are separated. Reimplemented
2163 system asyncs to work per-thread.
2164
2165 * gc.c (scm_init_gc): Do not use scm_system_async.
2166
2167 * async.h (scm_asyncs_pending, scm_set_tick_rate,
2168 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
2169 Removed prototypes.
2170 (scm_i_queue_async_cell): New.
2171
2172 * __scm.h (scm_asyncs_pending_p): Removed.
2173 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
2174 scm_asyncs_pending_p.
2175
2176 * async.h (scm_system_async_mark_for_thread): New prototype.
2177
2178 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
2179
2180 * root.h (scm_root_state): Added new "active_asyncs" slot.
2181 * root.c (scm_make_root): Initialize it to SCM_EOL.
2182
2183 * coop-defs.h (coop_t): Added new "handle" slot.
2184 * coop-threads.c (all_threads, scm_current_thread,
2185 scm_all_threads, scm_i_thread_root): New.
2186 (scm_threads_init): Add main thread to all_threads.
2187 (scheme_launch_thread): Remove thread from all_threads when it
2188 terminates.
2189 (scm_call_with_new_thread): Initialize handle slot of coop_t
2190 structure and add new thread to all_threads.
2191 (scm_spawn_thread): Likewise.
2192
2193 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
2194 * threads.c (scm_current_thread, scm_all_threads): Register as
2195 primitives.
2196
2197 * dynl.c: Use scm_lt_ prefix for libltdl functions.
2198
480fa28d
NJ
21992002-09-29 Neil Jerram <neil@ossau.uklinux.net>
2200
2201 * script.c (scm_compile_shell_switches): Fix bad spelling of
2202 `explicitly' in comment.
2203
22042002-09-28 Neil Jerram <neil@ossau.uklinux.net>
2205
2206 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
2207 Refer to provided? in doc string rather than deprecated feature?.
2208
3553e1d1
GH
22092002-09-24 Gary Houston <ghouston@arglist.com>
2210
2211 * inline.h (scm_double_cell): prevent reordering of statements
2212 with any following code (for GCC 3 strict-aliasing).
2213 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
2214 the earlier version of the reordering prevention.
2215
4ad0814a
HWN
22162002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
2217
2218 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
2219
e88e4f2e
HWN
22202002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
2221
2222 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
2223 protection.
2224
1e71eafb
HWN
22252002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
2226
2227 * inline.h: include stdio.h
2228
2229 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
2230
61ef9c1f
HWN
22312002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
2232
dac04e9f
HWN
2233 * gc-segment.c (scm_i_make_initial_segment): check user settings
2234 for sanity.
2235
2236 * gc-malloc.c (scm_gc_init_malloc): check user settings for
2237 sanity.
dac04e9f
HWN
2238
2239 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
2240
ffd72400
HWN
2241 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
2242
2243 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
1e71eafb
HWN
2244 these won't ever wrap around with high memory usage. Thanks to
2245 Sven Hartrumpf for finding this.
ffd72400 2246
5bd4a949
HWN
2247 * gc-freelist.c: include <stdio.h>
2248
61ef9c1f
HWN
2249 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
2250
ffd0ef3b
MV
22512002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
2252
a27e3d14
MV
2253 * vectors.h (SCM_VECTOR_REF): New.
2254
ffd0ef3b
MV
2255 * snarf.h (SCM_DEFINE_PUBLIC): New.
2256
f8a1712b
MV
22572002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
2258
2259 * socket.c (scm_addr_vector): Added size of address to arguments.
2260 Use it to avoid accessing a non-existent path in a sockaddr_un.
2261 Changed all callers.
2262
7200a36b
HWN
22632002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
2264
1383773b
HWN
2265 * gc.h: remove DOUBLECELL card flags.
2266
2267 * gc-malloc.c (scm_calloc): try to use calloc() before calling
2268 scm_realloc().
2269
2270 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
2271 init loop; handle this from scm_init_card_freelist()
2272
2273 * gc-card.c (scm_init_card_freelist): init bit vector here.
2274
7200a36b 2275 * numbers.c (scm_make_real): prevent reordering of statements
8fa5786d 2276 num2float.i.c (FLOAT2NUM): idem
7200a36b 2277
9981de3a
HWN
22782002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
2279
2280 * eval.h: prepend libguile/ to include path
2281
19647556
MV
22822002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
2283
2284 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
2285