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