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