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