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