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