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