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