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