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