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