* eval.c: Removed ASRTSYNTAX macro. Removed function 'bodycheck'.
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
ab66ae47
DH
12000-05-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
2
3 * eval.c (ASRTSYNTAX, scm_m_body, scm_m_letrec1): Removed
4 ASRTSYNTAX. Using SCM_ASSYNT instead.
5
6 (scm_m_body): Don't create a redundant cons cell.
7
8 (scm_m_do): Removed redundant test 'bodycheck'.
9
10 (bodycheck): Removed.
11
12 * stacks.c (stack_depth, read_frame, read_frames): Removed
13 redundant calculation of size, minimized some variable scopes.
14
4983cbe4
DH
152000-05-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
16
17 * pairs.c (scm_cons, scm_cons2): Use SCM{_SET}?_CELL_OBJECT as
18 long as a cell is not known to be a valid pair.
19
20 (scm_pair_p): Eliminated redundant SCM_IMP test.
21
44d3cb0d
DH
222000-05-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
23
24 * eval.c (scm_m_body, scm_macroexp, unmemocopy, scm_eval_args,
25 scm_deval_args): Eliminated redundant SCM_IMP tests.
26
27 * hashtab.c (scm_ihashx, scm_sloppy_assx, scm_delx_x), weaks.c
28 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
29 scm_make_doubly_weak_hash_table): Fixed critical sections.
30 Thanks to Keisuke Nishida.
31
9a00c9fc
DH
322000-05-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
33
34 * numbers.c (scm_logand, scm_logior, scm_logxor, scm_logtest):
35 Fixed some goto-related initialization bugs (introduced by me).
36
b82c6ce0
DH
372000-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
38
39 * numbers.h (SCM_INUM0): Uses SCM_MAKINUM instead of SCM_PACK.
40
41 * dynl.c (dynl_obj, DYNL_OBJ, get_dynl_obj): Removed.
42
43 (DYNL_FILENAME, DYNL_HANDLE): Use SCM_CELL... macros instead of
44 pointer trickery.
45
46 (SET_DYNL_HANDLE): Added.
47
48 (scm_dynamic_object_p): Simplified.
49
50 (scm_dynamic_unlink, scm_dynamic_func): Changed comment. Deliver
51 better error message when accessing unlinked dynamic objects.
52 Eliminated call to get_dynl_obj.
53
106428b3
MV
542000-05-03 Marius Vollmer <mvo@zagadka.ping.de>
55
7eea5296 56 * scmsigs.c (orig_handlers) [!HAVE_SIGACTION]: Fix declaration to
106428b3
MV
57 be an array of function pointers instead of being a pointer to an
58 array returning function. Thanks to Kalle Olavi Niemitalo!
59
f4c627b3
DH
602000-05-03 Dirk Herrmann <D.Herrmann@tu-bs.de>
61
62 * numbers.c (scm_divbigbig, scm_divbigint), numbers.h
63 (scm_divbigbig, scm_divbigint): Don't return zero any more to
64 indicate that a division has a remainder, return SCM_UNDEFINED
65 instead. It is improbable that anyone actually used these
66 functions outside of numbers.c. For this reason and due to the
67 change in behaviour the functions are static now. Thus, if
68 surprisingly there are users of these functions they will at least
69 get alarmed.
70
71 * numbers.c: Removed #ifdef SCM_BIGDIG #endif in those functions,
72 that already have a clean dispatch order. Note: SCM_BIGDIG is
73 always defined.
74
75 * numbers.c (scm_inexact_p): Simplified.
76
77 * numbers.c (scm_num_eq_p, scm_less_p, scm_max, scm_min,
78 scm_product, scm_num2dbl, scm_angle): Reordered dispatch
79 sequence, thereby fixing some comparisons of SCM values with
80 integer constants.
81
82 * numbers.c (scm_divide): Division by zero of inums leads to an
83 error now. (Formerly, an infinite number was returned.)
84
85 Respect the fact, that scm_divbigbig does now return SCM_UNDEFINED
86 if a division has a remainder.
87
3a6e6616
GH
882000-05-02 Gary Houston <ghouston@arglist.com>
89
90 * Makefile.am (INCLUDES): add ${INCLTDL} (thanks to Tim Mooney).
91
f8de44c1
DH
922000-05-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
93
94 * numbers.c (scm_logtest, scm_division): Reordered dispatch
95 sequence, thereby fixing some comparisons of SCM values with
96 integer constants.
97
98 * numbers.h (scm_makdbl): Mark as deprecated at the point of
99 declaration.
100
101 * eval.c (SCM_CEVAL, SCM_APPLY), gh_data.c (gh_double2scm,
102 gh_doubles2scm), numbers.c (scm_istr2flo, scm_max, scm_min,
103 scm_sum, scm_difference, scm_product, scm_divide, scm_sys_expt,
104 scm_sys_atan2, scm_make_rectangular, scm_make_polar,
105 scm_real_part, scm_imag_part, scm_magnitude, scm_angle,
106 scm_long2num, scm_long_long2num, scm_ulong2num), ramap.c
107 (ramap_rp, scm_array_map_x), random.c (scm_random,
108 scm_random_uniform, scm_random_normal_vector_x, scm_random_exp),
109 struct.c (scm_struct_ref), unif.c (scm_array_to_list): Replace
110 call to scm_makdbl with a call to scm_make_real or
111 scm_make_complex, depending on whether the imaginary part is known
112 to be zero.
113
7f5fa419
GH
1142000-05-01 Gary Houston <ghouston@arglist.com>
115
0607c109
GH
116 * scmsigs.c: fix the definition of orig_handlers for the case
117 that HAVE_SIGACTION is not defined (thanks to
118 Kalle Olavi Niemitalo).
119
7f5fa419
GH
120 * Makefile.am: remove include_HEADERS (was libguile.h)
121 libguile.h: moved to top level directory.
122
09fb7599
DH
1232000-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
124
125 * numbers.c (SCM_SWAP): Moved to the top of the file to allow for
126 a wider use.
127
128 * numbers.c (scm_modulo, scm_gcd, scm_lcm, scm_logand, scm_logior,
129 scm_logxor): Reordered dispatch sequence, thereby fixing some
130 comparisons of SCM values with integer constants.
131
132 * number.c (scm_logtest): Removed some redundant SCM_{N}?IMP
133 tests.
134
89a7e495
DH
1352000-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
136
137 * numbers.c (scm_quotient, scm_remainder): Removed code that was
138 conditionally compiled based on BADIVSGNS. BADIVSGNS does not
139 occur anywhere else throughout guile.
140
141 * numbers.c (scm_quotient): Fixed parameter number in error
142 message.
143
144 * numbers.c (scm_remainder): Reordered dispatch sequence.
145
a4fbabb3
GH
1462000-04-25 Gary Houston <ghouston@arglist.com>
147
148 * posix.c (scm_execlp): docstring fix (thanks to Martin
149 Grabmueller).
150
09e4d064
DH
1512000-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
152
153 * eval.c (undef_object): Made into a local static variable
154 (suggested by Jost Boekemeier).
155
e59bb516
DH
1562000-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
157
158 * pairs.c (cxrs, scm_init_pairs): Simplify initialization of
159 c[ad]+r functions.
160
161 * procs.c (scm_init_iprocs), procs.h (scm_subr, scm_iproc,
162 scm_dsubr, scm_init_iprocs): Removed.
163
164 * procs.h (SCM_SUBRF, SCM_DSUBRF): Access the cell words
165 directly instead of casting a cell to a C struct.
166
820920e6
MD
1672000-04-22 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
168
169 Better modularization of GC extensions through new C level GC
170 hooks:
171
172 * weaks.c (scm_weaks_prehistory): New function: Add
173 scm_weak_vector_gc_init to scm_before_mark_c_hook; Add
174 scm_mark_weak_vector_spines to scm_before_sweep_c_hook.
175 (scm_scan_weak_vectors): New function; added to
176 scm_after_sweep_c_hook.
177
178 * weaks.h (scm_weak_vectors, scm_weaks_prehistory): Added
179 declarations.
180
181 * guardians.h (scm_guardian_gc_init, scm_guardian_zombify): Are
182 now static.
183
184 * guardians.c (scm_guardian_gc_init): Turned into a hook function
185 and added to scm_before_mark_c_hook.
186 (scm_guardian_zombify): Turned into a hook function and added to
187 scm_before_sweep_c_hook.
188
189 * async.c (scm_sys_gc_async_thunk): Run after-gc-hook.
190 Added #include "libguile/gc.h".
191
192 * gc.h: Added #include "libguile/hooks.h".
193
194 * gc.c: Removed #include "libguile/guardians.h".
195 (scm_before_gc_c_hook, scm_before_mark_c_hook,
196 scm_before_sweep_c_hook, scm_after_sweep_c_hook,
197 scm_after_gc_c_hook): New C level hooks.
198 (scm_after_gc_hook): New Scheme level hook.
199 (scm_gc_sweep): Moved scanning of weak vectors to weaks.c.
200 (scm_igc): Moved initialization of scm_weak_vectors and the call
201 to scm_guardian_gc_init to respective module.
202 (scm_mark_weak_vector_spines): Moved to weaks.c;
203 Call to scm_guardian_zombify moved to guardians.c;
204 Run scm_before_gc_c_hook, scm_before_sweep_c_hook,
205 scm_after_gc_c_hook at appropriate places.
206 (scm_init_gc): Initialize scm_after_gc_hook.
207
208 * hooks.c, hooks.h (scm_make_hook_with_name): Removed deprecated
209 function.
210
211 * init.c (scm_boot_guile_1): Added `scm_init_hooks'.
212
213 * Makefile.am: Added hooks.c, hooks.h, hooks.x.
214
215 * feature.c, feature.h: Broke out hook code into separate files.
216
217 * hooks.c, hooks.h: New files.
9764c29b 218
a0599745
MD
219 * *.*: Change includes so that they always use the "prefixes"
220 libguile/, qt/, guile-readline/, or libltdl/.
221 (Thanks to Tim Mooney.)
222
223 * Makefile.am (INCLUDES): Removed THREAD_CPPFLAGS and INCLTDL.
224 (DEFS): Added. automake adds -I options to DEFS, and we don't
225 want that.
226 Removed all -I options except for the root source directory and
227 the root build directory.
228
f4b0c568
MD
229 * numbers.c (scm_odd_p, scm_even_p): Use SCM_WRONG_TYPE_ARG
230 instead of SCM_ASSERT (0, ...). (Some compilers will complain
231 about control reaching end of function otherwise, and, besides,
232 the new code is not less clear.)
233
9764c29b
MD
234 * gc.c (scm_must_malloc, scm_must_realloc, scm_must_free): Added
235 calls to malloc debugging functions.
236
237 * init.c (scm_boot_guile_1): Added calls to debug-malloc init
238 functions.
239
240 * Makefile.am: Added debug-malloc.c, debug-malloc.h,
241 debug-malloc.x.
242
243 * debug-malloc.c, debug-malloc.h: New files.
244
4219f20d
DH
2452000-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
246
247 * numbers.c (scm_exact_p, scm_odd_p, scm_even_p): Added
248 documentation strings.
249
250 * numbers.c (scm_exact_p, scm_odd_p, scm_even_p, scm_abs,
251 scm_quotient): Reordered dispatch sequence to first handle
252 immediates, second handle bignums and finally handle generic
253 functions respectively signal wrong type arguments. Hopefully
254 this will allow for easier separation when goops is integrated.
255
195e6201
DH
2562000-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
257
258 * gc.c (which_seg): Use SCM2PTR to convert a non immediate SCM
259 variable into a pointer to a heap cell.
260
261 * gc.c (scm_mark_locations, scm_cellp, init_heap_seg,
262 scm_unhash_name): Remove redundant cast to SCM_CELLPTR.
263
9e882eec
DH
2642000-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
265
266 * print.c (scm_iprin1): Don't assign zero to SCM values, use
267 SCM_UNDEFINED instead.
268
269 * weaks.c (scm_make_weak_vector): Fix assignment of zero to a
270 vector element. (Still to be improved)
271
3201d763
DH
2722000-04-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
273
274 * eval.c (undef_cell): Removed, replaced by:
275
276 (undef_object): Added to replace undef_cell.
277
278 (scm_lookupcar, scm_lookupcar1): Use undef_object.
279
280 * eval.c (scm_lookupcar, scm_lookupcar1, scm_m_atfop,
281 scm_m_atbind, CHECK_EQVISH, SCM_CEVAL), procs.h (SCM_SETCODE):
282 Don't perform arithmetic operations with SCM values.
283
284 * eval.c (scm_lookupcar, scm_lookupcar1, scm_m_atfop,
285 scm_m_atbind, scm_eval_args, scm_deval_args, SCM_CEVAL): Use
286 symbolic names for the tc3 type codes.
287
288 * eval.c (scm_m_define, SCM_CEVAL, SCM_APPLY): Remove redundant
289 cast to SCM.
290
291 * eval.c (scm_eval_args, scm_deval_args, SCM_CEVAL): Made the
292 access of the struct vcell element explicit.
293
f7c38587
MD
2942000-04-19 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
295
296 * struct.c (scm_struct_free_light, scm_struct_free_standard,
297 scm_struct_free_entity): Use `scm_must_free' instead of `free'.
298
299 * procs.c (scm_make_subr_opt): Tell scm_must_realloc that we're
300 realloc:ing scm_subr_table ("what" instead of "who").
301
302 * numbers.c (scm_adjbig): Ditto.
303
baa702c8
DH
3042000-04-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
305
306 * unif.c (l2ra): Don't eliminate the call to scm_array_set_x
307 itself, as was done in the previous 'patch'. (Thanks to Radey
308 Shouman)
309
fee7ef83
DH
3102000-04-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
311
312 * options.c (scm_options), read.c (recsexpr): Remove redundant
313 SCM_IMP test.
314
315 * print.c (scm_iprin1): Made the access of the struct vcell
316 element explicit.
317
318 * print.h (SCM_PRINT_CLOSURE): Added call to SCM_PACK.
319
320 * ramap.c (scm_ra_eqp, ra_compare), unif.c
321 (scm_uniform_vector_ref, scm_cvref, rapr1): Separated accesses to
322 unsigned long and signed long arrays and clarified the way the
323 access is performed.
324
325 * ramap.c (scm_array_map_x, raeql), read.c (scm_lreadr), stacks.c
326 (narrow_stack), unif.c (scm_cvref, scm_uniform_array_read_x,
327 scm_raprin1): Use SCM_EQ_P to compare SCM values.
328
329 * strings.c (scm_makstr): Treat the msymbol slots as a field of
330 scm_bits_t values.
331
332 * struct.h (SCM_SET_VTABLE_DESTRUCTOR): Treat the struct data as
333 a field of scm_bits_t values.
334
335 * unif.c (l2ra): Don't test result of scm_array_set_x against
336 zero: It is always SCM_UNSPECIFIED.
337
9d0633a8
MD
3382000-04-18 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
339
340 * script.c (scm_compile_shell_switches): Also enable
341 record-positions when given the --debug option. (Thanks to Diego
342 Dainese.)
343
230d095f
DH
3442000-04-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
345
346 * print.c (ENTER_NESTED_DATA, print_circref, scm_iprlist):
347 Compare SCM's with SCM_EQ_P.
348
349 * print.c (scm_make_print_state), srcprop.c
350 (scm_source_properties): Use valid scheme object to initialize
351 SCM variable.
352
353 * print.c (scm_iprin1): Remove redundant calls to SCM_UNPACK.
354
c8045e8d
DH
3552000-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
356
357 * struct.c (scm_alloc_struct, scm_struct_free_0,
358 scm_struct_free_light, scm_struct_free_standard,
359 scm_struct_free_entity, scm_make_struct, scm_make_vtable_vtable),
360 struct.h (scm_struct_free_t, scm_alloc_struct, scm_struct_free_0,
361 scm_struct_free_light, scm_struct_free_standard,
362 scm_struct_free_entity): Struct data regions (and thus also
363 vtable data regions) are now C arrays of scm_bits_t elements.
364
365 * gc.c (scm_gc_mark, scm_gc_sweep, scm_unhash_name): Made the
366 mixup of glocs and structs explicit.
367
368 * gc.c (scm_unprotect_object): Compare SCM's with SCM_EQ_P.
369
b0c54567
DH
3702000-04-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
371
372 * eval.c (scm_unmemocar): Use macros to test for gloc cell.
373 Minimize scope of variable 'ir'.
374
375 * eval.h (SCM_IFRAME, SCM_IDIST), weaks.h (SCM_IS_WHVEC_ANY):
376 Added missing call to SCM_UNPACK.
377
b9c90f11
MD
3782000-04-17 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
379
7aac9824 380 * validate.h (SCM_VALIDATE_INUM_RANGE_COPY,
2891588b 381 SCM_VALIDATE_NUMBER_COPY): New macros.
b9c90f11 382
9ae58e2d
MD
3832000-04-16 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
384
385 * script.c (scm_compile_shell_switches): Added --debug option.
386
49e12eb3
MD
3872000-04-16 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
388
389 * vectors.c (scm_vector_set_x): Return SCM_UNSPECIFIED (as
390 specified by R5RS).
391
7c1e0b12
MD
3922000-04-15 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
393
394 * ports.h (SCM_INPUT_PORT_P, SCM_OUTPUT_PORT_P): New macros.
395 (SCM_INPORTP, SCM_OUTPORTP): Marked as deprecated.
396
397 * validate.h (SCM_VALIDATE_INPUT_PORT, SCM_VALIDATE_OUTPUT_PORT):
398 New macros.
399 Cleanup of code layout.
400
401 * ports.c, ports.h (close-input-port, close-output-port): New R5RS
402 procedures.
403
01c8a3dd
DH
4042000-04-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
405
406 * continuations.c (scm_make_cont, scm_dynthrow): Completely
407 separated implementations for defined (CHEAP_CONTINUATIONS) and
408 !defined (CHEAP_CONTINUATIONS). Also, now using memcpy for stack
409 copying.
410
411 * continuations.c (grow_stack): Renamed from grow_throw.
412
413 * continuations.c (copy_stack_and_call): New static function.
414
415 * continuations.c (scm_dynthrow): Simplified and made static.
416
417 * continuations.h (scm_dynthrow): Made static.
418
553f4414
MD
4192000-04-13 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
420
421 * unif.c, unif.h (shared-array-root, shared-array-offset,
422 shared-array-increments): New primitives.
423
cf551a2b
DH
4242000-04-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
425
426 * gc.c (scm_gc_sweep): Simplify the computation of freed memory
427 size for msymbols.
428
429 * symbols.h (SCM_SLOTS, SCM_SYMBOL_FUNC, SCM_SYMBOL_PROPS,
430 SCM_SYMBOL_HASH): The msymbol slots are now a field of scm_bits_t
431 values.
432
433 * symbols.h (SCM_SET_SYMBOL_FUNC, SCM_SET_SYMBOL_PROPS): New
434 macros.
435
436 symbols.c (scm_intern_obarray_soft, msymbolize, scm_symbol_fset_x,
437 scm_symbol_pset_x): Use them.
438
439 * symbols.c (scm_symbol_hash): Unpack to access SCM raw data.
440
12a8b769
DH
4412000-04-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
442
443 * ports.c (scm_port_print): The port data is read as raw data.
444
445 * ports.h (SCM_TC2PTOBNUM, SCM_PTOBNUM): Fix SCM/scm_bits_t
446 mismatch.
447
d8c40b9f
DH
4482000-04-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
449
450 * eval.c (SCM_CEVAL), objects.c (scm_mcache_lookup_cmethod,
451 scm_make_subclass_object), objects.h (SCM_CLASS_FLAGS,
452 SCM_ENTITY_PROCEDURE, SCM_ENTITY_SETTER), struct.c
453 (scm_struct_init, scm_struct_vtable_p, scm_make_struct,
454 scm_struct_ref, scm_struct_set_x), struct.h (SCM_STRUCT_DATA):
455 The struct data is now an array of scm_bits_t variables.
456
457 * objects.h (SCM_SET_ENTITY_PROCEDURE): New macro.
458
cf551a2b 459 objects.c (scm_set_object_procedure_x): Use it.
d8c40b9f
DH
460
461 * struct.c (scm_struct_init): Unused variable 'data' removed.
462
463 (scm_struct_vtable_p): Redundant SCM_IMP tests removed.
464
1c3e63f0
DH
4652000-04-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
466
467 * objects.h (SCM_OBJ_CLASS_FLAGS, SCM_OBJ_CLASS_REDEF), struct.h
468 (SCM_STRUCT_VTABLE_DATA, SCM_STRUCT_LAYOUT, SCM_STRUCT_VTABLE,
469 SCM_STRUCT_PRINTER): The struct vtable data is now an array of
470 scm_bits_t variables.
471
472 * struct.h (SCM_SET_STRUCT_LAYOUT): New macro.
473
cf551a2b 474 struct.c (scm_make_vtable_vtable): Use it.
1c3e63f0 475
bc66755e
DH
4762000-04-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
477
478 * symbols.c (scm_sym2vcell, scm_sym2ovcell_soft, scm_sym2ovcell,
479 scm_intern_obarray_soft, scm_sysintern0,
480 scm_string_to_obarray_symbol, scm_intern_symbol,
481 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
482 scm_symbol_bound_p, scm_symbol_set_x): Don't use C operators to
483 compare SCM values.
484
828865c3
DH
4852000-04-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
486
487 * numbers.c (scm_quotient, scm_modulo): Reordered to handle the
488 case of immediate numbers parameters first. Also, only use
489 decoded numbers for numerical comparison.
490
1cf49a85
MD
4912000-04-10 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
492
493 * objects.h: Don't redeclare scm_call_generic_0 and
494 scm_apply_generic. (Thanks to Tal Tversky.)
495
dba97178
DH
4962000-04-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
497
498 * hash.c (scm_hasher): Use symbolic names for the tc3 constants.
499 Unpack SCM value to use it as a switch parameter. Don't cast SCM
500 values to int values.
501
3da01fa3
MD
5022000-04-10 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
503
504 * coop.c (mother): Handled EINTR (the wait has been interrupted by
505 a signal).
506
451e591c
DH
5072000-04-07 Dirk Herrmann <D.Herrmann@tu-bs.de>
508
509 * __scm.h (SCM_WTA_DISPATCH_[012n]): To test whether a SCM value
510 contains a raw zero value it has to be unpacked.
511
512 * debug.c (with_traps_inner, scm_with_traps): Passing SCM values
513 via void * requires unpacking / packing.
514
515 * stacks.h (SCM_STACKP): Remove unnecessary SCM_NIMP test and use
516 SCM_EQ_P to compare SCM values.
517
518 * stacks.h (SCM_FRAME_VOID_P, SCM_FRAME_REAL_P, SCM_FRAME_PROC_P,
519 SCM_FRAME_EVAL_ARGS_P, SCM_FRAME_OVERFLOW_P): Remove unnecessary
520 call to SCM_UNPACK.
521
522 * tags.h (SCM_NECONSP): Define in terms of SCM_ECONSP
523
524 * tags.h (SCM_ECONSP): Clarify the test for glocs. This is still
525 quite ugly.
526
e94e3f21
ML
5272000-04-05 Michael Livshin <mlivshin@bigfoot.com>
528
529 * async.[ch]: unexpose low-level async access macros (thanks to
530 Dirk Herrmann).
531
532 * validate.h: move async validation macros to async.c (nobody else
533 needs them anyway), and rename them.
534
843e4e9d
ML
5352000-04-04 Michael Livshin <mlivshin@bigfoot.com>
536
537 * async.h: kill the scm_async_t struct. having a heap cell
538 pretending to be a C struct is not helthy, and is not needed here
539 anyway, as asyncs happily fit in one heap cell.
540
541 * async.c: reflect the fact that asyncs are now represented by
542 single heap cell each.
543
873c35ee
GH
5442000-04-04 Gary Houston <ghouston@arglist.com>
545
546 * error.c (scm_syserror): save errno before doing anything else,
547 since it's used in two expressions and may get mutated (thanks to
548 Dirk Herrmann).
549
4260a7fc
DH
5502000-04-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
551
552 * debug.c (scm_procedure_source, scm_procedure_environment),
553 gsubr.c (scm_make_gsubr_with_generic, scm_gsubr_apply), procs.c
554 (scm_procedure, scm_setter): Return valid scheme value as dummy.
555
556 * filesys.c (scm_readdir, scm_rewinddir, scm_closedir,
557 scm_dir_print, scm_dir_free), numbers.h (SCM_COMPLEX_REAL,
558 SCM_COMPLEX_IMAG), regex-posix.h (SCM_RGX), throw.c (JBJMPBUF,
559 SETJBJMPBUF, JBJMPBUF, SETJBJMPBUF, freejb, print_lazy_catch,
560 scm_ithrow), unif.c (scm_uniform_vector_ref, scm_cvref,
561 scm_array_set_x, rapr1), unif.h (SCM_ARRAY_V, SCM_ARRAY_BASE),
562 vectors.h (SCM_VELTS, SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS): Use
563 SCM_{SET_}?CELL_WORD* to access cell entries with raw data.
564
565 * filesys.c (scm_closedir), numbers.c (scm_addbig), numbers.h
566 (SCM_SETNUMDIGS), throw.c (JBACTIVE, SCM_JBDFRAME,
567 SCM_SETJBDFRAME): Read and modify data bits in cell entry #0 using
568 SCM_{SET_}?CELL_WORD_0.
569
570 * filesys.c (fill_select_type, retrieve_select_type, scm_select),
571 numbers.c (scm_gcd, scm_lcm, scm_integer_expt, scm_zero_p,
572 scm_product, scm_divide), posix.c (scm_getgrgid), ramap.c
573 (scm_array_fill_int, racp), throw.c (scm_catch, scm_lazy_catch,
574 scm_ithrow), unif.c (scm_make_uve, scm_array_p,
575 scm_transpose_array, scm_array_set_x, scm_bit_set_star_x,
576 scm_bit_count_star, l2ra), variable.c (prin_var,
577 scm_make_variable, scm_make_undefined_variable,
578 scm_builtin_variable), vectors.c (scm_vector_set_length_x),
579 vports.c (sf_flush, sf_close): Don't use C operators to compare
580 SCM values.
581
582 * numbers.c (scm_odd_p, scm_even_p), variable.c (prin_var): Must
583 unpack SCM values to access their raw contents.
584
585 * numbers.c (big2str): Eliminate unnecessary casts to SCM.
586
587 * numbers.h (SCM_NEWREAL), regex-posix.h (SCM_RGXP), vports.c
588 (scm_make_soft_port): Use SCM_{SET_}?CELL_TYPE to access the cell
589 type information.
590
591 * throw.c (printjb): Eliminated unnecessary unpack.
592
593 * variable.c (make_vcell_variable): Smob data is of type
594 scm_bits_t.
595
5b15c3b4
MD
5962000-04-04 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
597
598 * print.c: Removed promise to rewrite printer code before next
599 release. :)
600
395c8567
MD
6012000-04-03 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
602
603 * iselect.c (add_fd_sets): Insert empty statement after label.
604 (Thanks to Tim Mooney.)
605
50fecba9
ML
6062000-04-03 Michael Livshin <mlivshin@bigfoot.com>
607
608 * guardians.c (scm_guardian_zombify): mark all zombies in a
609 separate loop after processing all the currently known live
610 guardians, so as to not introduce order dependencies (thanks to
f6e2fd8b 611 Gary Houston). note that the order problems are still there if
843e4e9d 612 some guardians are themselves zombies, but that's a sick case that
f6e2fd8b
ML
613 I'm not going to worry about.
614 also, make another outer loop to process zombified
50fecba9
ML
615 guardians (which are uncovered while marking zombies).
616
54778cd3
DH
6172000-04-03 Dirk Herrmann <D.Herrmann@tu-bs.de>
618
619 * evalext.c (scm_definedp, scm_m_undefine), gc.c
620 (scm_mark_weak_vector_spines, scm_gc_sweep), hashtab.c
621 (scm_hashq_ref, scm_hashv_ref, scm_hash_ref, scm_hashx_ref),
622 keywords.c (scm_make_keyword_from_dash_symbol), lang.c
623 (scm_nil_eq), lang.h (SCM_NILP, SCM_NIL2EOL), load.c
624 (scm_primitive_load), modules.c (scm_module_full_name), objects.c
625 (scm_class_of, scm_mcache_lookup_cmethod, scm_make_class_object),
626 ports.c (scm_close_all_ports_except), ports.h (SCM_EOF_OBJECT_P),
627 print.c (scm_iprin1, scm_prin1, scm_iprlist, scm_simple_format),
628 print.h (SCM_PRINT_STATE_P), procprop.c (scm_i_procedure_arity,
629 scm_stand_in_scm_proc, scm_procedure_property,
630 scm_set_procedure_property_x), procs.c
631 (scm_procedure_documentation), read.c (scm_lreadr, scm_lreadparen,
632 scm_lreadrecparen, scm_read_hash_extend), script.c
633 (scm_compile_shell_switches), srcprop.c (scm_source_property,
634 scm_set_source_property_x), srcprop.h (SCM_WHASHFOUNDP), stacks.c
635 (read_frame, NEXT_FRAME, read_frames, narrow_stack,
636 scm_make_stack, scm_stack_id), strop.c (scm_i_index,
637 scm_string_index, scm_string_rindex), struct.c (scm_struct_init),
638 validate.h (SCM_VALIDATE_BOOL_COPY, SCM_VALIDATE_INUM_DEF,
639 SCM_VALIDATE_INUM_DEF_COPY, SCM_VALIDATE_PROC,
640 SCM_VALIDATE_ARRAY): Don't use C operators to compare SCM values.
641
642 * feature.c (make_hook), keywords.c
643 (scm_make_keyword_from_dash_symbol), macros.c (scm_makacro,
644 scm_makmacro, scm_makmmacro), print.c (scm_iprin1,
645 scm_printer_apply, scm_port_with_print_state): Smob data is of type
646 scm_bits_t.
647
648 * feature.c (print_hook), gc.c (scm_object_address), hash.c
649 (scm_ihashq, scm_ihashv), print.c (scm_iprin1, scm_ipruk), smob.c
843e4e9d 650 (freeprint), struct.c (scm_print_struct): Must unpack
54778cd3
DH
651 SCM values to access their raw contents.
652
653 * fluids.c (apply_thunk, scm_with_fluids), hashtab.c (fold_proc,
654 scm_hash_fold), load.c (load, scm_primitive_load): Passing SCM
655 values via void * requires unpacking / packing.
656
657 * fports.c (scm_fport_buffer_add, scm_setvbuf), procs.h
658 (SCM_SUBRNUM, SCM_SET_SUBRNUM), srcprop.h (SRCPROPBRK, SRCBRKP):
659 Read and modify data bits in cell entry #0 using
660 SCM_{SET_}?CELL_WORD_0.
661
662 * fports.c (scm_fdes_to_port), gc.c (scm_gc_for_newcell,
663 scm_gc_sweep, init_heap_seg), init.c (start_stack), ports.c
664 (scm_void_port), procs.c (scm_make_subr_opt,
665 scm_make_procedure_with_setter), root.c (scm_internal_cwdr),
666 smob.c (scm_make_smob), strports.c (scm_mkstrport): Use
667 SCM_SET_CELL_TYPE to write the cell type information.
668
669 * gc.c (scm_gc_mark): Use SCM_CELL_OBJECT* to access SCM values
670 from cells that are no scheme pairs.
671
672 * gc.c (scm_gc_sweep), mallocs.c (prinmalloc), mallocs.h
673 (SCM_MALLOCDATA, SCM_SETMALLOCDATA), print.c (scm_ipruk), random.h
674 (SCM_RSTATE), root.h (SCM_ROOT_STATE), smob.c (scm_smob_free),
675 srcprop.c (freesrcprops), srcprop.h (SRCPROPPOS, SRCPROPFNAME,
676 SRCPROPCOPY, SRCPROPPLIST), struct.c (scm_make_struct,
677 scm_make_vtable_vtable): Use SCM_{SET_}?CELL_WORD* to access cell
678 entries with raw data.
679
680 * gc.c (scm_init_storage), sort.c (applyless), strop.c
681 (scm_string_to_list): Eliminate unnecessary casts to SCM.
682
683 * mallocs.c (scm_malloc_obj): Store result of malloc as raw
684 data.
685
686 * ports.c (scm_close_all_ports_except): Duplicate documentation
687 text removed.
688
689 * print.c (scm_iprin1): Use SCM_ITAG3.
690
691 * procs.h (SCM_SET_SUBRNUM): Fix shift direction.
692
693 * snarf.h (SCM_GPROC, SCM_GPROC1, SCM_SYMBOL, SCM_GLOBAL_SYMBOL,
694 SCM_KEYWORD, SCM_GLOBAL_KEYWORD, SCM_VCELL, SCM_GLOBAL_VCELL,
695 SCM_VCELL_INIT, SCM_GLOBAL_VCELL_INIT): Don't initialize globals
696 and static variables at their point of declaration, but rather in
697 the init function.
698
699 * tags.h (SCM_PACK): Automatically cast to scm_bits_t.
700
abeed821
GH
7012000-04-02 Gary Houston <ghouston@arglist.com>
702
703 * guardians.c (TCONC_IN, scm_make_guardian): set the CDR of the
704 empty tconc pair to SCM_EOL instead of SCM_BOOL_F, avoiding the
705 use of an improper list (which breaks g_print. g_print isn't
706 used).
707 guardians.c: Added more comments and modified the make-guardian
708 docstring. Reordered a few procedures.
709
cf498326
DH
7102000-04-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
711
712 * eval.c (scm_lookupcar1, scm_lookupcar, scm_m_case, scm_m_cond,
713 scm_m_lambda, iqq, scm_m_define, scm_m_expand_body, unmemocopy,
714 SCM_CEVAL), procs.h (SCM_TOP_LEVEL): Don't use C operators to
715 compare SCM values.
716
717 (scm_makprom): Smob data is of type scm_bits_t.
718
cffcab30
DH
7192000-03-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
720
721 * backtrace.c (display_error_body), debug.c (scm_procedure_source,
722 scm_reverse_lookup), dynl.c (scm_dynamic_link): Don't use C
723 operators to compare SCM values.
724
725 * debug.c (scm_make_debugobj), debug.h (SCM_DEBUGOBJ_FRAME,
726 SCM_SET_DEBUGOBJ_FRAME): Update SCM_{SET_}?DEBUGOBJ_FRAME to
727 access raw cell data with SCM_{SET_}?CELL_WORD_1.
728
729 * debug.c (scm_make_debugobj): Don't use SCM_SETCAR to set types.
730
731 * debug.c (scm_make_memoized), dynl.c (scm_dynamic_link): Smob
732 data is of type scm_bits_t.
733
7fa93bf8
DH
7342000-03-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
735
736 * gdbint.c (gdb_maybe_valid_type_p), guardians.c (TCONC_EMPTYP,
737 scm_guardian_zombify): Use SCM_EQ_P to compare SCM values.
738
739 * guardians.c (GUARDIAN): Use SCM_CELL_WORD_1 for raw data.
740
74a16888
DH
7412000-03-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
742
743 * ports.h (scm_port): Change type of stream member to scm_bits_t.
744
745 * gdbint.c (unmark_port, remark_port), ports.c (scm_markstream),
746 strports.c (st_resize_port, scm_mkstrport), vports (sf_flush,
747 sf_write, sf_fill_input, sf_close, scm_make_soft_port): Since
748 streams are now of type scm_bits_t, SCM streams have to be
749 unpacked/packed.
750
751 * ports.h (SCM_SETPTAB_ENTRY, SCM_SETSTREAM): Cast input to
752 scm_bits_t.
753
b6cc0ef6
MD
7542000-03-31 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
755
6a878357
MD
756 * coop-defs.h (struct coop_t): Added `sto'-field again because of
757 binary compatibility---let's remove it next time we alter some
758 major structure.
759
b6cc0ef6
MD
760 * coop.c (coop_quitting_p, coop_cond_create, coop_mutex_create,
761 coop_mother, coop_child): New variables.
762 (mother): New function.
763 (coop_create): New thread spawning mechanism which uses a "mother
764 thread". The "dummy" pthreads aren't healthy enough to give birth
765 to new threads since Linux threads thinks they are asleep.
766
767 * coop-defs.h (struct coop_t): Removed dummy_mutex.
768
769 * coop-defs.h, coop-threads.c (struct coop_t): Eliminate
770 `sto'-field when GUILE_PTHREAD_COMPAT is enabled.
771
843524cc
DH
7722000-03-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
773
774 * arbiters.c (scm_make_arbiter), async.c (scm_async), dynwind.c
775 (scm_internal_dynamic_wind): Smob data is always of type
776 scm_bits_t.
777
778 * arbiters.c (SCM_ARB_LOCKED, SCM_LOCK_ARB, SCM_UNLOCK_ARB):
779 Access the locking information in cell entry 0 with
780 SCM_{SET_}?CELL_WORD_0 instead of SCM_*CAR.
781
782 * async.c (scm_run_asyncs): Use SCM_NULLP to test for the empty
783 list.
784
785 * dynwind.c (scm_dowinds): Use SCM_EQ_P to compare SCM values.
786
787 * ports.h (SCM_PTAB_ENTRY, SCM_SETPTAB_ENTRY): Access the ptab
788 entry data using SCM_{SET_}?CELL_WORD_1 instead of SCM_{SET}?CDR.
789
fbd485ba
DH
7902000-03-29 Dirk Herrmann <D.Herrmann@tu-bs.de>
791
792 * alist.c (scm_sloppy_assq, scm_assq), eq.c (scm_eq_p, scm_eqv_p,
793 scm_equal_p), list.c (scm_ilength, scm_last_pair, scm_reverse,
794 scm_sloppy_memq, scm_delq_x, scm_delq1_x), tags.h (SCM_UNBNDP):
795 Don't use C operators == and != to compare SCM values, use
796 SCM_EQ_P instead.
797
798 * boolean.c (scm_boolean_p): Use SCM_BOOLP to determine whether a
799 SCM value is equal to #t or #f.
800
801 * eq.c (scm_eqv_p, scm_equal_p): Don't use SCM_CAR to access the
802 cell type entry of non immediate objects of unknown type. Use
803 SCM_CELL_TYPE instead.
804
805 * gh_data.c (gh_scm2bool, gh_module_lookup), list.c
806 (scm_sloppy_memv, scm_sloppy_member, scm_delv_x, scm_delete_x,
807 scm_delv1_x, scm_delete1_x), scmsigs.c (scm_sigaction): Use
808 SCM_FALSEP and SCM_TRUE_P to compare SCM values against #f and
809 #t.
810
811 * list.c (scm_listify): Use SCM_UNBNDP to test for an unbound
812 scheme value.
813
64e3bf6c
MD
8142000-03-29 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
815
0208baa0
MD
816 * coop-threads.c (scm_call_with_new_thread, scm_spawn_thread,
817 scm_make_mutex, scm_make_condition_variable): Cast data to
818 scm_bits_t in SCM_SET_CELL_WORD and SCM_NEWSMOB macros.
819
64e3bf6c
MD
820 * coop.c (coop_create): Set `specific' field, not `data' to NULL.
821
94113249
DH
8222000-03-29 Dirk Herrmann <D.Herrmann@tu-bs.de>
823
824 * smob.h (SCM_NEWSMOB, SCM_NEWSMOB2, SCM_NEWSMOB3, SCM_SMOB_DATA,
825 SCM_SET_SMOB_DATA, SCM_TC2SMOBNUM, SCM_SMOBNUM): To access smob
826 data, use SCM_{SET_}?CELL_TYPE or SCM_{SET_}?WORD_[1-3].
827
828 Note that this implies that smob data has always to be passed as
829 values of type scm_bits_t.
830
1978b33e
MD
8312000-03-29 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
832
833 * threads.c (scm_init_threads): Pass 0 size to scm_make_smob_type
834 for scm_tc16_thread. As the current COOP threads are written, GC
835 is not supposed to manage storage for threads.
836
837 * error.c (scm_error): Don't try to throw an error if
838 scm_gc_heap_lock is true.
839
840 * coop.c (coop_finish): New function. Called at exit.
841 (coop_aborthelp): Free thread structures when threads die.
842 Finished LinuxThreads compatibility support => COOP threads now
843 mesh with LinuxThreads.
843e4e9d 844
1978b33e
MD
845 * coop-threads.c (scm_call_with_new_thread, scm_spawn_thread):
846 Changed SETCDR --> SET_CELL_WORD_1.
847
848 * coop-threads.c (scheme_launch_thread): Set word 1 of handle to 0
849 when thread dies.
850
dd039d6d
DH
8512000-03-29 Dirk Herrmann <D.Herrmann@tu-bs.de>
852
853 * boolean.h (SCM_TRUE_P): New macro.
854
855 * boolean.h (SCM_FALSEP, SCM_NFALSEP, SCM_BOOLP), pairs.h
856 (SCM_NULLP, SCM_NNULLP): Use SCM_EQ_P to compare SCM values.
857
8b3bda20
DH
8582000-03-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
859
860 * continuations.h (SCM_CONTREGS, SCM_SET_CONTREGS): New macros to
861 access continuation data.
862
863 (SCM_SETJMPBUF): Deprecated. Use SCM_SET_CONTREGS instead.
864
865 (SCM_JMPBUF, SCM_DYNENV, SCM_THROW_VALUE, SCM_BASE, SCM_SEQ,
866 SCM_DFRAME): Use SCM_CONTREGS instead of SCM_CHARS to access
867 continuation data.
868
843e4e9d 869 * continuations.c (scm_make_cont), init.c (start_stack),
8b3bda20
DH
870 root.c (scm_internal_cwdr): Use SCM_SET_CONTREGS instead of
871 SCM_SETJMPBUF.
872
3210f49a
DH
8732000-03-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
874
875 * symbols.h (SCM_LENGTH, SCM_SETLENGTH): Access the length field
876 of strings and symbols by using SCM_{SET_}?CELL_WORD_0.
877
878 (SCM_CHARS, SCM_UCHARS, SCM_SETCHARS): Use SCM_{SET_}?CELL_WORD_1
879 to access the char * field of strings and symbols.
880
2d67e390
DH
8812000-03-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
882
883 * gc.h (SCM_NEWCELL, SCM_NEWCELL2): Use SCM_SET_CELL_TYPE to set
884 the type entry of a new cell. Added a comment about things to
885 remember when updating the list of free cells.
886
887 (SCM_FREEP, SCM_MARKEDP): Use SCM_CELL_TYPE to access the type
888 entry of a cell.
889
76a369d9
DH
8902000-03-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
891
892 * pairs.h (SCM_CAR, SCM_CDR, SCM_SETCAR, SCM_SETCDR): Use
893 SCM_CELL_OBJECT and SCM_SET_CELL_OBJECT. This change implies that
894 with strict type checking enabled these macros will only work if
895 given valid SCM parameters.
896
3210f49a 897 (SCM_GCCDR): Moved to tags.h.
76a369d9
DH
898
899 * tags.h (SCM_GCCDR): Moved here from pairs.h.
900
2549a709
DH
9012000-03-26 Dirk Herrmann <D.Herrmann@tu-bs.de>
902
903 * tags.h (SCM2PTR, PTR2SCM): Moved to gc.h.
904
905 * pairs.h (scm_cell, SCM_CELLPTR, SCM_CELL_WORD*, SCM_CELL_OBJECT*,
906 SCM_SET_CELL_WORD*, SCM_SET_CELL_OBJECT*, SCM_CELL_TYPE,
907 SCM_SET_CELL_TYPE, SCM_PTR_LT, SCM_PTR_MASK, SCM_PTR_GT,
908 SCM_PTR_LE, SCM_PTR_GE, SCM_CELL_WORD_LOC, SCM_NEWCELL,
909 SCM_NEWCELL2): Moved to gc.h.
910
911 (SCM_CARLOC, SCM_CDRLOC, SCM_SETAND_CAR, SCM_SETAND_CDR,
912 SCM_SETOR_CAR, SCM_SETOR_CDR): Moved to gc.h. These names should
913 be changed, though, since the macros are not only pair related.
914
915 (SCMPTR): Deleted.
916
917 * gc.h (SCM2PTR, PTR2SCM, scm_cell, SCM_CELLPTR, SCM_CELL_WORD*,
918 SCM_CELL_OBJECT*, SCM_SET_CELL_WORD*, SCM_SET_CELL_OBJECT*,
919 SCM_CELL_TYPE, SCM_SET_CELL_TYPE, SCM_PTR_LT, SCM_PTR_MASK,
920 SCM_PTR_GT, SCM_PTR_LE, SCM_PTR_GE, SCM_CELL_WORD_LOC,
921 SCM_NEWCELL, SCM_NEWCELL2, SCM_CARLOC, SCM_CDRLOC, SCM_SETAND_CAR,
922 SCM_SETAND_CDR, SCM_SETOR_CAR, SCM_SETOR_CDR): Moved here from
923 tags.h and pairs.h.
924
8d3356e7
DH
9252000-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
926
927 * tags.h (SCM_STRICT_TYPING): New macro that, if defined,
928 activates strict compile time type checking for variables of
929 type SCM.
930 (SCM, SCM_PACK, SCM_UNPACK): Define according to whether
931 SCM_STRICT_TYPING or SCM_VOIDP_TEST are defined.
932 (SCM_EQ_P): Defined as a macro equivalent for eq?.
933
96f6f4ae
DH
9342000-03-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
935
936 * tags.h (SCM_POINTERS_MUNGED): Removed.
937
938 * gc.c (scm_gc_sweep, init_heap_seg): Removed use of
939 SCM_POINTERS_MUNGED, thus fixing some illegal casts to SCM.
940
0cbaaf0b
DH
9412000-03-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
942
943 * pairs.h (SCM_CELL_OBJECT, SCM_CELL_OBJECT_[0-3],
944 SCM_SET_CELL_OBJECT, SCM_SET_CELL_OBJECT_[0-3], SCM_CELL_TYPE,
945 SCM_SET_CELL_TYPE): Added a set of low level macros for accessing
946 cell entries.
947 (SCM_CELL_WORD_[0-3]): Renamed from the SCM_CELL_WORD[0-3].
948
949 * procs.h, procs.c: Instead of SCM_{SET_}?CELL_WORD[12], use the
950 newly introduced SCM_{SET_}?CELL_OBJECT_[12] macros.
951
7284d584
MD
9522000-03-23 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
953
954 * tags.h: Disabled definition of SCM_VOIDP_TEST.
955
956 Defining SCM as void * introduces problems which haven't been
957 handled yet. Developers who work with these issues can enable it
958 in their working copies.
959
960 Disabling this definition exposes a set of newly introduced and
961 older misuses of types which causes warning messages during
962 compilation. We'll fix this successively.
963
964 * gc.c (scm_mark_locations): Changed * (SCM **) X --> * (SCM *) X
965 in order to obtain a value of type SCM.
966 (scm_cellp): Updated with new changes to scm_mark_locations.
967
968 * continuations.h (SCM_SETJMPBUF): Cast second arg into SCM.
969
2f9055ea
MD
970 * continuations.c (scm_make_cont): Removed cast of size_t into
971 long.
972
7284d584
MD
973 * symbols.h (SCM_SETCHARS): Cast second arg into SCM.
974
f81e080b
DH
9752000-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
976
977 * numbers.h (SCM_SETNUMDIGS): Use SCM_BIGSIZEFIELD macro for
978 shifting, not constant. Thanks to Dale P. Smith.
979
980 * numbers.c (scm_sum, scm_difference): Don't test a SCM value
981 for being less than zero. Decode it to a C value first. Again,
982 thank you Dale.
983
1ff2fa6e
DH
9842000-03-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
985
986 * numbers.h, ramap.c, struct.h, vectors.h: Don't use SCM2PTR for
987 non scheme values. If raw data is stored in SCM variables, it has
988 to be accessed using SCM_UNPACK until a better solution is found.
989
3920465b
MD
9902000-03-22 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
991
6f29dc6d
MD
992 * tags.h (SCM_ECONSP, SCM_NECONSP): More corrections of
993 pointer-arithmetic induced by the SCM_PACK/UNPACK change.
994
995 * print.c (scm_iprin1): SCM_PACK/UNPACK corrections.
996
997 * gc.c (scm_gc_sweep): SCM_PACK/UNPACK corrections.
998
999 * eval.c (SCM_CEVAL, scm_unmemocar): SCM_PACK/UNPACK corrections.
1000
1001 * dynwind.c (scm_swap_bindings): SCM_PACK/UNPACK corrections.
1002
3920465b
MD
1003 * async.c, __scm.h: Removed lots of the old async click logic. It
1004 is possible to reinsert it by defining GUILE_OLD_ASYNC_CLICK in
1005 __scm.h. Let's try this out and dump the old code after the
1006 threads reorganization.
1007 (set-tick-rate, set-switch-rate): Conditionally removed.
1008
90cca6f9
MD
10092000-03-21 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1010
1011 * gc.c (scm_gc_mark): Bugfix 1: The recent SCM_PACK/UNPACK change
1012 made SCM values into pointers. This turned an arithmetic
1013 computation of the address of the vcell into a pointer-arithmetic
1014 one, thereby screwing up marking of structs.
1015 Bugfix 2: Removed incompletely introduced loop variable `j' used
1016 when protecting the tail array of a struct.
1017
8246bf3e
DH
10182000-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
1019
1020 * struct.h (SCM_STRUCT_DATA): Don't cast SCM values to pointers.
1021
95c9e176
DH
10222000-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
1023
1024 * symbols.h, symbols.c (scm_strhash): Declare the string
1025 parameter as constant, since it is not modified.
1026
1027 * symbols.c (scm_intern_obarray_soft,
1028 scm_sysintern0_no_module_lookup): Can now pass constant strings
1029 to scm_strhash without need for casting.
1030
7352d0b2
DH
10312000-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
1032
1033 * vectors.h (SCM_VELTS, SCM_VELTS_AS_STACKITEMS): Don't cast SCM
1034 values to pointers. Use SCM2PTR instead.
1035
b00c8cdc 10362000-03-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
9b139b4e
DH
1037
1038 * async.c (scm_set_tick_rate, scm_set_switch_rate): Don't unpack
1039 results of SCM_INUM.
1040
df2d5178
MD
10412000-03-21 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1042
bd54e664
MD
1043 * init.c (scm_boot_guile_1): Renamed GUILE_GC_TRIGGER_1 -->
1044 GUILE_MIN_YIELD_1, GUILE_GC_TRIGGER_2 --> GUILE_MIN_YIELD_2.
1045 GUILE_MIN_YIELD_X now take *positive* fractions of heap size.
1046
1047 * gc.c, gc.h (SCM_MIN_YIELD_1, SCM_MIN_YIELD_2,
1048 min_yield_fraction, min_yield, adjust_min_yield): Renamed from
1049 SCM_GC_TRIGGER_1, SCM_GC_TRIGGER_2, gc_trigger_fraction,
1050 gc_trigger, adjust_gc_trigger.
1051
df2d5178
MD
1052 * gc.c (alloc_some_heap): Further improvement of minimal heap size
1053 prediction.
1054 (SCM_MAX): New macro.
1055 (scm_freelist_t): New field: collected_1. Previous amount of
1056 collected cells.
1057 (gc_sweep_freelist_finish): Trigger based on two last values of
1058 freelist->collected to avoid unnecessary allocation due to
1059 temporary peaks.
bd54e664
MD
1060 (SCM_INIT_HEAP_SIZE_1, SCM_GC_TRIGGER_1, SCM_GC_TRIGGER_2):
1061 Adjusted to 45000 cells, 40% and 40%. Gives quick startup
1062 without extra heap allocation.
df2d5178 1063
f2961ccd
DH
10642000-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
1065
1066 * numbers.h (SCM_MAKINUM): The parameter to SCM_MAKINUM should
1067 already be a C value. No need to unpack it.
1068
3210f49a 1069 * numbers.c (scm_long_long2num): Cast the parameter to scm_bits_t
f2961ccd
DH
1070 if we know it fits into an inum.
1071
1072 * ramap.c (ramap_rp): An scm_tc7_[ui]vect object does point to a
1073 field of long values. In contrast, SCM_VELTS accesses a field of
1074 SCM values.
1075
7b4cc831
MD
10762000-03-20 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1077
f1d316dd
MD
1078 * gc.c (scm_gc_stats): Inserted explanation of local_scm_mtrigger
1079 etc.
80770ddc
MD
1080 (scm_gc_yield_1): New variable: Holds previous yield. Used to
1081 make better judgements.
f1083dd7
MD
1082 (gc_sweep_freelist_finish): Inserted explanation of use of
1083 gc_trigger.
f1d316dd
MD
1084
1085 * print.h, stacks.h, options.c, options.h: Changed C++
1086 commentaries to C.
7b4cc831 1087
7a710745
DH
10882000-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
1089
1090 * tags.h (SCM2PTR, PTR2SCM): Use SCM_PACK / SCM_UNPACK correctly.
1091
1092 * numbers.h (SCM_INUMP, SCM_MAKINUM, SCM_INUM0, SCM_COMPLEX_REAL,
1093 SCM_COMPLEX_IMAG, SCM_NUMP, SCM_BDIGITS): Use SCM_PACK /
1094 SCM_UNPACK / SCM2PTR correctly.
1095
1ef20c80
MD
10962000-03-20 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1097
1098 * gc.c (adjust_gc_trigger): Improved documentation.
1099 (alloc_some_heap): Since gc_trigger is used against
1100 freelist->collected, this is the value which should be used to
1101 predict minimum growth.
1102
b464b970
DH
11032000-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
1104
1105 * eval.h: Fix mixup of packed/unpacked SCM values. (Thanks
1106 Thien-Thi Nguyen for the patch.)
1107
3ab9f56e
DH
11082000-03-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
1109
1110 * numbers.c (scm_ash): Fixed typing problems with the second
1111 parameter and added some documentation. (Thanks Thien-Thi Nguyen
1112 for indicating the problem.)
1113
05bc3265
MD
11142000-03-19 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1115
78a4915a
MD
1116 * gc.c, gc.h (scm_gc_yield): New variable.
1117 (adjust_gc_trigger): Use scm_gc_yield.
1118 (alloc_some_heap): Use scm_gc_yield instead of
1119 scm_gc_cells_collected.
1120
05bc3265
MD
1121 * coop-threads.c: Addd #include "root.h", #include "strings.h".
1122
1123 * debug.c: Added #include "root.h". (Thanks to Thien-Thi Nguyen.)
1124
1125 * gc.c (scm_gc_for_newcell, adjust_gc_trigger): Improved GC
1126 trigger adjustmeant: Take yield (freed cells) for all freelists
1127 into account.
1128 (SCM_INIT_HEAP_SIZE_1, SCM_GC_TRIGGER_1, SCM_GC_TRIGGER_2): Tuned
1129 to 50000 cell heap with 45% trigger.
1130 (scm_gc_cells_collected): Reintroduced.
1131 (SCM_HEAP_SIZE): New macro.
1132 (scm_gc_sweep): Reintroduced correct computation of
1133 scm_cells_allocated.
1134 (scm_freelist_t): Corrected commentary for field `cluster_size':
1135 Clustersize counts objects, not cells; New member
1136 `clusters_allocated'.
1137
89e00824
ML
11382000-03-19 Michael Livshin <mlivshin@bigfoot.com>
1139
1140 * *.[hc]: add Emacs magic at the end of file, to ensure GNU
1141 indentation style.
1142
afcfc5bb
MD
11432000-03-19 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1144
1145 * threads.h: Added #include "libguile/throw.h". (Thanks to
1146 Thien-Thi Nguyen.)
1147
a00c95d9
ML
11482000-03-18 Michael Livshin <mlivshin@bigfoot.com>
1149
50fecba9
ML
1150 * tags.h: (SCM_DOUBLE_CELLP, SCM_NDOUBLE_CELLP): new macros (bad
1151 names, anyone got any better ones?)
a00c95d9
ML
1152
1153 * gc.h: (typedef struct scm_freelist_t) remove from here.
1154
50fecba9 1155 * gc.c: (CELL_UP, CELL_DN) made these macros take additional
a00c95d9
ML
1156 parameter (the span).
1157 (CLUSTER_SIZE_IN_BYTES, ALIGNMENT_SLACK) new macros.
50fecba9 1158 (typedef struct scm_freelist_t) moved here from gc.h, it had no
a00c95d9
ML
1159 business being externally visible.
1160 (typedef struct scm_heap_seg_data_t) renamed from
1161 scm_heap_seg_data, to be style-compliant.
1162 (scm_mark_locations) if the possible pointer points to a
50fecba9
ML
1163 double-cell, check that it's properly aligned.
1164 (init_heap_seg) align double-cells properly, work with the
1165 assumption that the segment size divides cleanly by cluster size.
a00c95d9
ML
1166 (round_to_cluster_size) new function.
1167 (alloc_some_heap, make_initial_segment) use round_to_cluster_size
1168 to satisfy the new init_heap_seg invariant.
1169
28b3236d
DH
11702000-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
1171
1172 * _scm.h: Don't include async.h everywhere...
1173
1174 * eq.c eval.c iselect.c: ... only include it here.
1175
ba11fd4c
DH
11762000-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
1177
1178 * _scm.h: Don't include root.h everywhere...
1179
1180 * async.c continuations.c eq.c eval.c evalext.c feature.c gc.c
1181 gdbint.c gsubr.c ioext.c keywords.c lang.c load.c macros.c
1182 numbers.c objprop.c ports.c print.c procprop.c ramap.c read.c
1183 srcprop.c stackchk.c stacks.c strports.c symbols.c unif.c
1184 variable.c vectors.c vports.c: ... only include it here.
1185
7ab3fdd5
DH
11862000-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
1187
1188 * _scm.h: Don't include strings.h everywhere...
1189
1190 * backtrace.c dynl.c error.c feature.c filesys.c fports.c gc.c
1191 gdbint.c ioext.c load.c net_db.c numbers.c objects.c options.c
1192 ports.c posix.c print.c procs.c random.c read.c regex-posix.c
1193 simpos.c socket.c stacks.c stime.c strop.c strports.c struct.c
1194 symbols.c unif.c vectors.c version.c vports.c: ... only include it
1195 here.
1196
f04d8caf
DH
11972000-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
1198
1199 * _scm.h: Don't include ports.h everywhere...
1200
1201 * arbiters.c backtrace.c debug.c dynl.c dynwind.c eval.c feature.c
1202 fluids.c gc.c gdbint.c guardians.c hash.c keywords.c mallocs.c
1203 numbers.c objects.c print.c read.c root.c smob.c srcprop.c
1204 stackchk.c strports.c struct.c throw.c variable.c: ... only
1205 include it here.
1206
003d1fd0
DH
12072000-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
1208
1209 * _scm.h: Don't include vectors.h everywhere...
1210
1211 * eq.c eval.c filesys.c gc.c gsubr.c guardians.c hash.c hashtab.c
1212 keywords.c net_db.c numbers.c objects.c posix.c print.c procprop.c
1213 procs.c ramap.c random.c read.c scmsigs.c socket.c sort.c stime.c
1214 strports.c symbols.c unif.c vports.c weaks.c: ... only include it
1215 here.
1216
0fa27efa
DH
12172000-03-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
1218
1219 * genio.h: removed. (Only content was '/* delete me */'.)
1220
1221 * Makefile.am arbiters.c backtrace.c debug.c dynl.c dynwind.c
1222 error.c filesys.c fluids.c gc.c gsubr.c guardians.c keywords.c
1223 libguile.h mallocs.c numbers.c print.c random.c read.c root.c
1224 srcprop.c stackchk.c struct.c threads.c throw.c variable.c:
1225 Removed reference to genio.h
1226
148f31de
MD
12272000-03-17 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1228
1229 * gc.c, gc.h: Cleanup of the change of 2000-03-15.
1230 Cluster sizes are now independent of GC trigger values.
1231 GUILE_GC_TRIGGER_n can now specify a relative trigger value:
1232 A negative integer gives fraction of total heap size in percent.
1eb489a2 1233 (SCM_GC_TRIGGER_1, SCM_GC_TRIGGER_2): Default values set to -40.
148f31de
MD
1234
1235 * init.c (scm_boot_guile_1): Introduced new variable
1236 GUILE_MAX_SEGMENT_SIZE; New environment variable names:
1237 GUILE_INIT_SEGMENT_SIZE_1, GUILE_GC_TRIGGER_1,
1238 GUILE_INIT_SEGMENT_SIZE_2, GUILE_GC_TRIGGER_2
1239
6d0f81dd 12402000-03-16 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
a00c95d9 1241
6d0f81dd
MD
1242 * __scm.h (GC_FREE_SEGMENTS): Disable this until we have made
1243 freeing of segment work with the new GC scheme. (Thanks to
bc2c8d98
MD
1244 Michael Livshin.) Oops, also happened to make GUILE_NEW_GC_SCHEME
1245 the default, but I'll let this change stay in CVS Guile since this
1246 code is not expected to contain serious bugs.
a00c95d9 1247
17351a6f 12482000-03-16 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
c5133dc9 1249
6c7c449e
MD
1250 * gc.c, gc.h (scm_map_free_list): Define also if GUILE_DEBUG is
1251 defined.
5a551542
MD
1252 (scm_free_list_length): New procedure (GUILE_DEBUG).
1253 Fixed a small but serious bug introduced by the previous change.
1254
17351a6f
MD
1255 * gc.c (scm_gc_sweep): Moved variable n_objects to inner sweep
1256 loop and declare as register.
6c7c449e 1257
c5133dc9
MD
1258 * gc.c (scm_gc_sweep): Sigh... forgot to clear private freelists
1259 after GC.
1260
3820581c
GB
1261Wed Mar 15 08:27:04 2000 Greg J. Badros <gjb@cs.washington.edu>
1262
1263 * fluids.c: Docstring patch from Keisuke Nishida. Some
1264 reindentation, too, and a couple formals renamed. Should
1265 fluid-set! return UNSPECIFIED instead of a value?
1266
1267Wed Mar 15 08:24:58 2000 Greg J. Badros <gjb@cs.washington.edu>
1268
1269 * Makefile.am: Separate out DOT_X_FILES and DOT_DOC_FILES, and
a00c95d9 1270 generate the latter from the concrete listing of the former. Then
3820581c
GB
1271 make guile-procedures.txt depend on DOT_DOC_FILES instead of
1272 *.doc, so that rebuilding it works.
1273
dd6390bf
GB
1274Wed Mar 15 08:12:14 2000 Greg J. Badros <gjb@cs.washington.edu>
1275
1276 * libguile.h: Include libguile/validate.h. Thanks Keisuke Nishida!
1277
1278 * guile-snarf.awk.in: Replace docstring line-ending \n" and \n\n"
1279 with nothing and \n, respectively. Thanks Keisuke Nishida for
1280 noticing this problem.
1281
4fdb0ae2
MD
12822000-03-15 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1283
1284 * __scm.h (GUILE_NEW_GC_SCHEME): Define this if you want to test a
1285 new way of allocating heap. It makes Guile fast, but still
1286 contains bugs.
1287
1288 * gc.c, gc.h, pairs.h, init.c: Implementation of a new way of
1289 allocating heap. The basic idea is to trigger GC every Nth
1290 allocated cell and grow heap when free list runs out. The scheme
1291 has been extended so that GC isn't triggered until all remaining
1292 cells are used. The implementation is also prepared for
1293 development in the direction of POSIX threads.
1294
1295 * gc.c (SCM_EXPHEAP): In order to grow by a factor of 1.5,
1296 SCM_EXPHEAP should return half of the heap size.
1297
3d8d1283
MD
12982000-03-14 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1299
5f4edb86
MD
1300 The following change to init.c is only enabled if Guile was
1301 configured with --enable-guile-debug.
a00c95d9 1302
5f4edb86
MD
1303 * init.c (scm_i_getenv_int): New function.
1304 (scm_boot_guile_1): Use the environment variables
1305 GUILE_INIT_HEAP_SIZE, GUILE_INIT_HEAP_SIZE2 to select heap size if
1306 they exist. (This may be replaced by a Scheme level mechanism in
1307 the future.)
1308
3d8d1283 1309 * objprop.c (s_scm_set_object_property_x): Use scm_assq instead of
90e77861 1310 scm_assoc. (Thanks to Keisuke Nishida.)
3d8d1283 1311
b0e37c83
MD
13122000-03-14 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1313
1314 * eval.c, lang.c, lang.h (scm_lisp_nil, scm_lisp_t): Renamed from
2b260c0f 1315 scm_nil, scm_t. (Thanks to Keisuke Nishida.)
b0e37c83 1316
16d35552
MD
13172000-03-14 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1318
5ebf0091
MD
1319 * init.c (scm_boot_guile_1): Use same initial segment size for
1320 1-word and 2-word segments. Having the smaller size causes Guile
1321 to GC too often. Obviously something needs to be done to allow
1322 for a smaller 2-word segment without this to happen. (The amount
1323 of heap for each type should be automatically adapted to the
1324 application somehow.)
1325
31ed4cff
MD
1326 [Almost all of these changes should be documented in the NEWS
1327 file.]
1328
cf2c7413
MD
1329 * gc.h (scm_freelist_t): New type.
1330
1331 * pairs.h (SCM_NEWCELL, SCM_NEWCELL2): Use new style freelists.
1332
1333 * gc.c (SCM_INIT_HEAP_SIZE): Changed from 32768 --> 40000 so that
1334 all of Guile basics fits into one segment and there suitable room
1335 for work.
1336 (SCM_EXPHEAP): Now takes an argument. Grow by a factor of 1.5
1337 instead of 2.
1338 (scm_freelist, scm_freelist2): Now of type scm_freelist_t.
1339 Freelists now contains information about object span, cells
1340 collected and amount of cells in heap segments belonging to the
1341 list.
1342 (scm_heap_size, scm_gc_cells_collected): Removed.
1343
1344 * init.c (scm_boot_guile_1): Make 2-word segment 8K (512 cells).
1345
16d35552
MD
1346 * Makefile.am (libguile_la_LDFLAGS): Bumped library version
1347 number.
1348
cf2c7413 1349 * __scm.h eq.c, eval.c, gc.c, gc.h, gh_data, hash.c, numbers.c,
16d35552
MD
1350 numbers.h, objects.c, ramap.c, random.c, unif.c, unif.h: Extensive
1351 rewrite of handling of real and complex numbers.
1352 (SCM_FLOATS, SCM_SINGLES): These #ifdef conditionals have been
1353 removed along with the support for floats. (Float vectors are
1354 still supported.)
1355
1356 * tags.h (scm_tcs_bignums): Removed.
1357 (scm_tc16_bigpos, scm_tc16_bigneg): Replaced by scm_tc16_big.
1358 Use SCM_BIGSIGN(x) to test for sign!
1359 (scm_tc16_big): The new bignum type.
1360 (SCM_REAL_PART, SCM_IMAG_PART): Removed.
1361
1362 * numbers.h (SCM_BIGSIGN): Sign moved to bit 16.
1363 (scm_makdbl): Deprecated.
1364 (SCM_NEWREAL, SCM_NEWCOMPLEX): New macros.
1365 (SCM_SINGP): Deprecated.
1366 (SCM_FLO): Removed.
1367 (SCM_INEXP, SCM_CPLXP): Deprecated.
1368 (SCM_INEXACTP, SCM_COMPLEXP): New macros.
1369 (SCM_COMPLEX_REAL, SCM_COMPLEX_IMAG): Renamed from
1370 SCM_REAL, SCM_IMAG (and now only valid for complex numbers).
1371 (SCM_REAL, SCM_IMAG): New, *deprecated*, selectors which work both
1372 for doubles and complex numbers.
1373 (SCM_REAL_VALUE): New selector for doubles.
1374 (scm_double_t, scm_complex_t): New types.
1375 (scm_dbl): Removed.
1376
1377 * numbers.c (scm_floprint, scm_floequal): Removed.
1378 (scm_print_real, scm_print_complex, scm_real_equalp,
1379 scm_complex_equalp): New functions.
1380
1381 * unif.c (scm_makflo): Removed.
1382
1383 * smob.h (SCM_SMOB_PREDICATE): New macro.
1384 (SCM_NEWSMOB2, SCM_RETURN_NEWSMOB2, SCM_NEWSMOB3,
1385 SCM_RETURN_NEWSMOB3): New macros.
1386
13871999-11-21 Michael Livshin <mlivshin@bigfoot.com>
1388
1389 The following changes implement primitive support for double cells
1390 (i.e. four-word cells) and change the representation of some
1391 things to multi-cells instead of cons+malloc. (Applied and
1392 modified by mdj.)
1393
1394 * pairs.h (SCM_NEWCELL2): double-cell variants of SCM_NEWCELL.
1395 (SCM_CELL_WORD, SCM_CELL_WORDLOC, SCM_SET_CELL_WORD): primitive
1396 multi-cell access macros (used by the ones below).
1397 (SCM_CELL_WORD[0-3], SCM_SET_CELL_WORD[0-3]): multi-cell access
1398 macros.
1399
1400 * gc.c (scm_freelist2): multi-cell freelists.
1401 (inner_map_free_list): map_free_list, parameterized on ncells.
1402 "nn cells in segment mm" was misleading for ncells > 1; changed to
1403 "objects". still print cells too, though.
1404 (scm_map_free_list): rewritten using inner_map_free_list.
1405 (scm_check_freelist): get freelist as parameter, since now we have
1406 more than one.
1407 (scm_debug_newcell2): multi-cell variants of
1408 scm_debug_newcell.
1409 (scm_gc_for_newcell): take ncells and freelist pointer as
1410 parameters.
1411 (scm_gc_mark): add case for tc7_pws (procedures with setters are
1412 now double cells).
1413 (scm_gc_sweep): don't free the float data, since it's not malloced
1414 anymore.
1415 (init_heap_seg): didn't understand what n_new_objects stood for,
1416 so changed to n_new_cells.
1417 (make_initial_segment): new function, makes an initial segment
1418 according to given ncells.
1419 (scm_init_storage): call make_initial_segment, for ncells={1,2,3}.
1420
1421 * numbers.c (scm_makdbl): no malloc'ing needed, so the
1422 {DEFER,ALLOW}_INTS thing removed.
1423
1424 * numbers.h (struct scm_dbl): changed to represent a double cell,
1425 with the number in the second half.
16d35552
MD
1426
1427 * dynwind.c: changed the wind-guards representation to double
1428 cell.
1429
1430 * procs.c, procs.h: changed the procedure-with-setter representation
1431 to double cell.
1432
1433 * async.c, async.h: made async representation a double cell.
1434
16d35552 1435 * dynl.c: made dynamic_obj representation a double cell.
a00c95d9 1436
b70ecbd0
GH
14372000-03-13 Gary Houston <ghouston@arglist.com>
1438
1439 * ports.c (flush_void_port): renamed to flush_port_default.
1440 (end_input_void_port): renamed to end_input_default.
1441
1442 * init.c (scm_standard_stream_to_port): create a void port instead
1443 of opening /dev/null if the standard file descriptors are bad.
1444 advantages: no portability problems, doesn't waste a file descriptor,
1445 simplifies the code (thanks to Marius for the idea).
1446
1447 * vports.c (s_scm_make_soft_port): call scm_port_non_buffer.
1448
1449 * void ports: make reading from a void port give EOF instead of
1450 segv:
1451 * ports.c (s_scm_sys_make_void_port): modified docstring.
1452 (fill_input_void_port): new proc.
1453 (scm_init_ports): set up fill_input_void_port.
1454 * ports.c (scm_port_non_buffer): new proc.
1455 (scm_void_port): call scm_port_non_buffer.
1456
1457 * fports.c (scm_setvbuf): docstring: remove the fcntl documentation
1458 which was incorrectly appended.
1459
fdc7ea2d
MD
14602000-03-13 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1461
1462 * guile-doc-snarf.in: Don't use absolute path for `sed'. (Note
1463 that we can't use autoconf for this. Autoconf itself relies on
26fba922 1464 the existence of `sed' somewhere on your path.) (Thanks to Dirk
fdc7ea2d 1465 Herrman.)
a00c95d9 1466
68933ba3
MD
14672000-03-13 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1468
b44a555a
MD
1469 * Makefile.am (libguile_la_SOURCES): Moved iselect.c here from
1470 EXTRA_libguile_la_SOURCES.
1471
1472 * iselect.h: Always declare scm_internal_select.
1473
1474 * iselect.c (scm_internal_select): Added SCM_ASYNC_TICK at the
1475 end. Also let scm_internal_select be a real function also when
1476 not using threads.
1477
68933ba3
MD
1478 * __scm.h (SCM_TICK): Oops! Forgot to put SCM_ASYNC_TICK here...
1479
c7f6ea11
MD
14802000-03-13 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1481
1482 * __scm.h (SCM_ALLOW_INTS, SCM_REALLOW_INTS): Removed call to
1483 SCM_ASYNC_TICK. (This is a preparation for POSIX threads support,
1484 and kind of an experiment: Will this cause problems?)
1485
62dbc244
GB
1486Sun Mar 12 13:26:30 2000 Greg J. Badros <gjb@cs.washington.edu>
1487
1488 * Makefile.am: Added *.doc to DISTCLEANFILES.
1489
4f2f645d
GH
14902000-03-12 Gary Houston <ghouston@arglist.com>
1491
1492 * fports.c (scm_fdes_to_port): call fcntl F_GETFL to test that
1493 the fdes is valid before doing anything else. check that
1494 the file descriptor supports the modes required.
1495 (scm_fport_buffer_add): don't throw an error if fstat doesn't
1496 work: just use the default buffer size.
1497
1498 * throw.c: change an outdated comment about scm_internal_catch
1499 BODY: it doesn't take a jumpbuf arg.
1500
1501 * init.c (scm_standard_stream_to_port): install a handler in case
1502 scm_fdes_to_port throws an error. don't check here whether the
1503 file descriptor is valid, since scm_fdes_to_port will do that.
1504 set the revealed count depending on whether the port got the
1505 standard file descriptor.
1506 (stream_body_data): new type.
1507 (stream_body, stream_handler): new procs.
1508
7f782a0a
MD
15092000-03-12 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1510
67673f75
MD
1511 * stacks.c, stacks.h, struct.c, tags.h, unif.c (scm_bits_t):
1512 Renamed from SCMWORD.
1513
1514 * tags.h (SCM_NCELLP): Removed (SCMWORD).
1515
f1267706 1516 * arbiters.c (SCM_ARB_LOCKED): Use SCM_UNPACK_CAR.
67673f75 1517
74a426ae
MD
1518 * async.c, boolean.h, debug.c, dynl.c, dynwind.c, eval.c, eval.h,
1519 feature.h, filesys.h, fluids.h, fports.c, fports.h, gc.c, gc.h,
1520 hash.c, keywords.h, macros.c, numbers.c, numbers.h, objects.c,
1521 objects.h, options.c, pairs.h, ports.c, ports.h, print.c,
1522 procs.h, ramap.c, read.c, smob.c, smob.h, srcprop.h, stacks.c,
1523 stacks.h, strports.c, struct.c, struct.h, tag.c, tags.h,
1524 throw.c, unif.c, unif.h, variable.h, vectors.h, weaks.c,
f1267706 1525 weaks.h (SCM_PACK, SCM_UNPACK, SCM_UNPACK_CAR): Renamed from
74a426ae
MD
1526 SCM_ASSCM, SCM_ASWORD, SCM_CARW).
1527
7f782a0a
MD
1528 * numbers.h (SCM_SRS, SCM_INUM): Corrected SCM_ASSCM/ASWORD fixes.
1529
1530 * alist.c, eval.c, net_db.c, posix.c, print.c, snarf.h, struct.c,
1531 tags.h: Fixed copyright notices.
1532
1533 * struct.c, coop-threads.c: SCM_ASSCM/ASWORD fixes.
0cd87628 1534
7f782a0a 15352000-03-12 Marius Vollmer <mvo@zagadka.ping.de>
a00c95d9 1536
0cd87628
MV
1537 * init.c (scm_standard_stream_to_port): Check whether the file
1538 descriptor is valid and substitute "/dev/null" when not.
a00c95d9 1539
f3b5e185
MD
15402000-03-12 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1541
1542 * coop-defs.h (struct timespec): Conditionally defined.
1543
1544 * coop.c (coop_condition_variable_timed_wait_mutex): Use ETIMEDOUT
1545 instead of ETIME.
38eca29b
MD
1546
1547 * readline.c (match_paren): Bugfix: First arg to select is not
1548 number of descriptors but the number of the highest descriptor +
1549 1.
1550
1551 This is a preliminary attempt at a cleanup of the threads support
1552 code. It moves things to better places, makes arguments more
1553 consistent with the POSIX API (which is used in GNOME's glib), and
1554 adds new functionality.
a00c95d9 1555
38eca29b
MD
1556 * readline.c (scm_init_readline): Added new arg to scm_init_mutex.
1557
1558 * coop-defs.h (scm_mutex_trylock): New macro: alias for
1559 coop_mutex_trylock.
1560 (scm_cond_init): Changed definition to
1561 coop_new_condition_variable_init.
a00c95d9 1562
38eca29b
MD
1563 * coop.c: #include <errno.h>
1564 (coop_timeout_qinsert): Moved here from iselect.c
1565 (coop_new_mutex_init, coop_new_condition_variable_init): New
1566 functions. The strange names are temporary. Use scm_mutex_init
1567 and scm_cond_init instead.
1568 (coop_mutex_trylock): New function. Uses errno.h:EBUSY. errno.h
1569 is ANSI C, but should we check for individual error codes in
1570 configure.in?
1571 (coop_condition_variable_timed_wait_mutex): New function.
1572 (coop_key_create, coop_setspecific, coop_getspecific,
7f782a0a 1573 coop_key_delete): New functions.
38eca29b
MD
1574
1575 * iselect.c (coop_timout_qinsert): Moved to coop.c
1576
32e1616c
MD
15772000-03-11 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1578
1579 * pairs.h (SCM_SETAND_CAR, SCM_SETAND_CDR, SCM_SETOR_CAR,
1580 SCM_SETOR_CDR): Corrected SCM_ASSCM/WORD fixes.
1581
1582 * tags.h (SCM_VOIDP_TEST): Renamed from VOIDP_TEST.
1583 Layout cleanups.
1584
1585 * objects.h (SCM_CLASS_FLAGS, SCM_OBJ_CLASS_FLAGS,
1586 SCM_SET_CLASS_INSTANCE_SIZE), struct.h (SCM_STRUCT_VTABLE_DATA),
1587 proc.h (SCM_CLOSCAR): SCM_ASSCM/WORD fixes.
1588
1589 * eval.c (scm_lookupcar1): Inserted SCM_ASWORD in expressions
1590 dealing with ilocs.
1591
d5c39069
GB
15922000-03-11 Dale P. Smith <dpsm@en.com>, applied by Greg J. Badros, <gjb@cs.washington.edu>
1593
1594 * numbers.c (scm_copy_big_dec, scm_copy_smaller, scm_big_ior,
1595 scm_big_xor, scm_big_and, scm_big_test): Added new lowlevel bignum
1596 logical functions from SCM.
1597
1598 (logand, logior, logxor, logtest, logbit?): Extended scheme
1599 logical functions to use bignums from SCM.
1600
1601 (lognot): Removed call to `SCM_VALIDATE_INUM' that prevented
1602 lognot from using bignums.
1603
3e892913
GB
1604Thu Mar 9 11:33:25 2000 Greg J. Badros <gjb@cs.washington.edu>
1605
a00c95d9 1606 * vectors.h (SCM_VELTS_AS_STACKITEMS): Added this macro to help in
3e892913
GB
1607 eliminating some warnings.
1608
1609 * unif.c, strports.c, print.c, options.c: Fix some warnings on
1610 mis-use of SCM/long
1611
1612 * gc.c, gc.h: Added scm_return_first_int(), and added comment re:
1613 what the scm_return_first* functions do.
1614
7ac030d6
GB
16152000-03-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>, applied by Greg J. Badros, <gjb@cs.washington.edu>
1616
1617 * libguile/*.[ch]: make a distinction between SCM as a generic
1618 name for a Scheme object (now a void*), and SCM as 32 bit word for
1619 storing tags and immediates (now a long int). Introduced
1620 SCM_ASWORD and SCM_ASSCM for conversion. Fixed various dubious
1621 code in the process: arbiter.c (use macros), unif.c (scm_array_p),
a00c95d9 1622
f635d2d4
GB
1623Wed Mar 8 10:15:59 2000 Greg J. Badros <gjb@cs.washington.edu>
1624
1625 * numbers.c: Use SCM_VALIDATE_LONG_COPY, and longs, not ints, in
1626 various logXXX primitives. Thanks Eric Moore!
1627
9eaa7fb6
GB
1628Tue Mar 7 08:05:22 2000 Greg J. Badros <gjb@cs.washington.edu>
1629
1630 * run-test, remaining-docs-needed: Added these scripts. The
1631 second one is only temporary until the docstring additions are
1632 complete. run-test may best live on, but is here mostly for
1633 convenience and awareness for now.
1634
1635 * hash.c: Docs, minor cleanup patch from Dirk Herrman.
1636
49673698
GB
1637Thu Mar 2 16:06:58 2000 Greg J. Badros <gjb@cs.washington.edu>
1638
1639 * error.h, error.c: Added `scm_wrong_type_arg_msg' to support
1640 displaying the expected type. Use SCM_LISTn in a couple places
1641 instead of scm_cons-ing by hand.
1642
1643 * __scm.h: Added SCM_ASSERT_TYPE macro.
1644
1645 * validate.h, scm_validate.h: Added the former, as a renamed
1646 version of the latter with SCM_ASSERT_TYPE used in
1647 SCM_MAKE_VALIDATE (instead of just SCM_ASSERT)
1648
1649 * Makefile.am: Rename scm_validate.h to validate.h.
1650
1651 * *.c, *.h: Include validate.h, not scm_validate.h (old name's
1652 prefix was superfluous).
1653
417bdef8
GB
1654Thu Mar 2 15:33:12 2000 Greg J. Badros <gjb@cs.washington.edu>
1655
1656 * hashtab.c: Improved documentation for lots of functions. Added
1657 handwritten docs for `hash-fold'.
1658
1659Thu Mar 2 15:13:25 2000 Greg J. Badros <gjb@cs.washington.edu>
1660
1661 * list.c: Added hand-written docs for `del{q,v,ete}1!'.
1662
26a760c6
GB
1663Thu Mar 2 12:38:30 2000 Greg J. Badros <gjb@cs.washington.edu>
1664
a00c95d9 1665 * list.c: Moved append docs to append! Thanks Dirk Hermann. Also,
26a760c6
GB
1666 added append docs from R4RS.
1667
1668 * strings.c: Docstring typo fix, + eliminate unneeded IMP tests.
1669 Thanks Dirk Hermann!
1670
1671 * chars.h: Provide SCM_CHARP, SCM_CHAR, SCM_MAKE_CHAR and
1672 deprecate SCM_ICHRP, SCM_ICHR, SCM_MAKICHR. Thanks Dirk Hermann!
a00c95d9 1673
26a760c6
GB
1674 * *.h, *.c: Use SCM_CHARP, SCM_CHAR, SCM_MAKE_CHAR throughout.
1675 Drop use of SCM_P for function prototypes... assume an ANSI C
1676 compiler. Thanks Dirk Hermann!
1677
898942f8
GB
1678Sat Feb 19 12:20:12 2000 Greg J. Badros <gjb@cs.washington.edu>
1679
1680 * ports.c: Made `set-port-column!' and `set-port-line!' each
1681 return SCM_UNSPECIFIED instead of a (not-scheme-object) integer
1682 that caused a seg fault. Also fixed `set-port-column!'s
1683 docstring. Thanks Han-Wen Nienhuys for finding the bug!
1684
84a3df2c
GB
1685Sun Feb 13 19:11:42 2000 Greg J. Badros <gjb@cs.washington.edu>
1686
1687 * arbiters.c, eq.c, gc.c, guardians.c, list.c, ports.c, print.c,
a00c95d9 1688 regex-posix.c, scmsigs.c, stime.c, strings.c, variable.c, stime.c,
84a3df2c
GB
1689 strings.c, variable.c: Added lots of documentation, cleaned up
1690 some existing documentation. Occasionally changed formal params
1691 to match docs. Also folded an #ifdef into the inners of a
1692 primitive instead of having two copies of the primitive
1693 (`get-internal-real-time', from stime.c)
1694
1695Sun Feb 13 18:12:19 2000 Greg J. Badros <gjb@cs.washington.edu>
1696
1697 * ports.c: Added docs for primitives missing them. Written by
1698 hand.
1699
3f557de6
GB
1700Sun Feb 13 09:40:36 2000 Greg J. Badros <gjb@cs.washington.edu>
1701
1702 * guile-doc-snarf.in: Use ${AWK} -f guile-func-name-check, not
1703 just execing guile-func-name-check. Thanks Michael Livshin!
1704
ddcccdb3
GB
1705Thu Feb 10 11:43:23 2000 Greg J. Badros <gjb@cs.washington.edu>
1706
1707 * guile-snarf.awk.in: Tweak to work with Sun/HP awk, removed some
1708 dead code. Patch from Michael Livshin.
1709
1710 * guile-doc-snarf.in: Tweak to work with Sun/HP sh. Patch from
1711 Michael Livshin.
1712
720e8692
GH
17132000-02-09 Gary Houston <ghouston@arglist.com>
1714
1715 * init.c (scm_init_standard_ports): when stdout is a tty, make the
1716 current-output-port unbuffered by default. this is less confusing
1717 for interactive use. it was line-buffered because of a
1718 performance problem with unbuffered ports, but I think it will be
1719 OK now.
1720
43ff3170
GH
17212000-02-08 Gary Houston <ghouston@arglist.com>
1722
1723 * __scm.h: don't define long_long or ulong_long if HAVE_LONG_LONGS
1724 is not defined.
1725
1726 * stime.c (scm_localtime, scm_mktime): if neither HAVE_TM_ZONE nor
1727 HAVE_TZNAME are defined, use an empty string instead of giving two
1728 spurious compile-time errors.
1729
4ba47302
GB
1730Tue Feb 8 13:57:46 2000 Greg J. Badros <gjb@cs.washington.edu>
1731
1732 * ports.c: Doc patches from Richard Kim. Pasted from MIT Scheme.
1733 Thanks Richard!
1734
09a617f7
GB
1735Mon Feb 7 09:07:31 2000 Greg J. Badros <gjb@cs.washington.edu>
1736
1737 * macros.c: Doc patches from Richard Kim. Pasted from scm.texi.
1738
9dbcf010
GB
1739Sun Feb 6 20:26:21 2000 Greg J. Badros <gjb@cs.washington.edu>
1740
1741 * pairs.c: Doc patches from Richard Kim. Pasted from MIT Scheme
1742 (which is GNU GPL'd).
1743
bd9e24b3
GH
17442000-01-31 Gary Houston <ghouston@arglist.com>
1745
1746 * strings.h: don't use SCM_P. don't include <string.h>.
1747 * error.c, gh_data.c, ports.c, script.c, strop.c: include <string.h>.
a00c95d9 1748
bd9e24b3
GH
1749 * strings.c (scm_string_ref): make the 2nd argument compulsory.
1750 previously it defaulted to zero for no good reason that I can see.
1751 use a local variable for SCM_INUM (k). replace
1752 SCM_VALIDATE_INUM_DEF with SCM_VALIDATE_INUM_COPY.
1753
1754 (scm_makfromstr): cosmetic changes.
1755
1756 (scm_string): Accept only chars in the list, not strings, for
1757 conformance to R5RS (particularly for list->string, which is
1758 supposed to be the inverse of string->list.) remove
1759 SCM_DEFER_INTS/SCM_ALLOW_INTS, which is unnecessary since
1760 scm_makstr handles the cell allocation. when reporting wrong-type
1761 arg, don't report the position as 1.
1762
1763 * posix.c (scm_init_posix): intern PIPE_BUF if it's defined.
1764
28d77376
GH
17652000-01-29 Gary Houston <ghouston@arglist.com>
1766
ae1b098b
GH
1767 * posix.c (scm_pipe): rewrote the docstring.
1768
28d77376
GH
1769 * filesys.c (scm_select, retrieve_select_type, get_element,
1770 fill_select_type, set_element): modified so that Scheme
1771 "select" tests port buffers for the ability to provide input
1772 or accept output. Previously only the underlying file descriptors
1773 were checked. Rewrote the docstring.
a00c95d9 1774
7f1497ce
GB
1775Thu Jan 27 10:14:25 2000 Greg J. Badros <gjb@cs.washington.edu>
1776
1777 * vectors.c, symbols.c, strorder.c: Documentation cut and pasted
1778 from Gregg Reynolds. Thanks Gregg!
1779
2288ff9b
GB
1780Thu Jan 27 09:59:38 2000 Greg J. Badros <gjb@cs.washington.edu>
1781
1782 * strop.c (scm_i_index): Obfuscated commented-out SCM_DEFINE by
1783 adding "x" prefix to the line so that guile-func-name-check
1784 doesn't complain unnecessarily.
1785
349af6dd
GB
1786Wed Jan 26 17:33:52 2000 Greg J. Badros <gjb@cs.washington.edu>
1787
1788 * throw.c: Factor out an #ifdef/#else/#endif choice more finely
1789 for maintainability.
1790
1791 * strop.c: Documentation added by Gregg A. Reynolds. Pasted in
1792 from qdocs, RnRs.
1793
a28eb127
GB
1794Wed Jan 26 10:02:11 2000 Greg J. Badros <gjb@cs.washington.edu>
1795
a00c95d9 1796 * tag.c: Added doc for `tag', but mark as deprecated since Mikael
a28eb127
GB
1797 suggests removing tag.c altogether (and using a new `class-of'
1798 instead).
1799
1800 * strings.c: Added documentation from Gregg A. Reynolds. Edited
1801 a bit by me to use FOO instead of @var{foo} and to have the
a00c95d9 1802 summary come before preconditions on input. Also dropped trailing
a28eb127
GB
1803 (rnrs) note.
1804
1805 * gsubr.c: Do not use SCM_DEFINE for `gsubr-apply'. Register the
1806 function with scm_make_subr_opt w/ last arg of 0 so it is not
1807 visible at the Scheme level. Mikael says that this is the right
1808 thing because the first arg to the proc is the guts of a compiled
1809 closure and shouldn't be exposed to the Scheme level.
1810
ac2259fc
GB
1811Tue Jan 25 17:15:47 2000 Greg J. Badros <gjb@cs.washington.edu>
1812
1813 * sort.c: typo in comment fixed.
1814
1815 * keywords.c: Added documentation.
1816
1817 * guardians.c: Added documentation (could be better).
1818
1819 * gc.c: Added docs for gc-set-debug-check-freelist.
1820
1821 * eq.c: Added docs for eq?, eqv? equal? abridged from R4RS.
1822
1823 * boolean.c: Added docs for `not', `boolean?' (by hand).
a00c95d9 1824
d928e0b4
GB
1825Tue Jan 25 13:28:56 2000 Greg J. Badros <gjb@cs.washington.edu>
1826
1827 * random.c: Added documentation, from SLIB page:
1828 http://angela.ctrl-c.liu.se/~calle/scheme/slib_toc.html
1829
1830Mon Jan 24 17:50:20 2000 Greg J. Badros <gjb@cs.washington.edu>
1831
1832 * variable.c, version.c: Added documentation, written by hand
1833 since I could not find anything already written that was
1834 relevant.
1835
d831b039
GH
18362000-01-23 Gary Houston <ghouston@arglist.com>
1837
a00c95d9 1838 * filesys.c (scm_chown): omit port/fdes support if HAVE_FCHOWN is
d831b039
GH
1839 not defined (thanks to Richard Y. Kim).
1840
88ec97ad
GB
1841Thu Jan 20 13:00:38 2000 Greg J. Badros <gjb@cs.washington.edu>
1842
1843 * Makefile.in: Removed, this is auto-generated.
1844
078e9092
GB
1845Thu Jan 20 11:33:47 2000 Dirk Hermann <dirk@ida.ing.tu-bs.de> --applied 01/20/00 gjb
1846
1847 * list.c: Put some variable initialization code at the point of
1848 declaration; Added a comment for list*; Formatting changes.
1849
1850 * load.c: use SCM_NNULLP to make sure the end of a list is not
1851 reached yet.
1852
e7a96050
MD
18532000-01-18 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1854
a177af34
MD
1855 * backtrace.c (scm_display_error_message): Bugfix: Don't use
1856 result of scm_list_p as C boolean.
1857 (scm_display_error_message, scm_set_print_params_x): Use new
1858 validation macros. (Thanks to Dirk Herrmann.)
1859
d06bcb02
MD
1860 * net_db.c (scm_resolv_error): Cast result from hstrerror.
1861
1862 * strports.c (st_end_input): Inserted parenthesis to get operator
1863 grouping correct.
1864
1865 * list.h (scm_init_list): Removed SCM_P around prototypes.
1866
1867 * fports.c, list.c, numbers.c, ports.c, stime.c, symbols.c,
1868 filesys.c, posix.c: Converted docstrings to ANSI C format and
e7a96050
MD
1869 escaped " occurring inside string literals.
1870
682eefe9
MD
1871Tue Jan 18 13:21:08 2000 Mikael Djurfeldt <mdj@r11n07-s.pdc.kth.se>
1872
1873 * posix.c (scm_mknod): Escape " occuring inside docstring.
1874
56cfe22b
MD
18752000-01-18 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
1876
1877 * alist.c, chars.c, debug.c, dynl.c, dynwind.c, error.c, eval.c,
1878 evalext.c, filesys.c, gc.c, hash.c, hashtab.c, ioext.c,
1879 keywords.c, list.c, load.c, macros.c, net_db.c, numbers.c,
1880 objprop.c, ports.c, posix.c, print.c, procprop.c, procs.c,
1881 ramap.c, regex-posix.c, root.c, scmsigs.c, simpos.c, socket.c,
1882 stacks.c, stime.c, strings.c, strop.c, strports.c, struct.c,
1883 symbols.c, throw.c, unif.c, vectors.c, version.c, vports.c,
1884 weaks.c: Converted docstrings to ANSI C format.
a00c95d9 1885
56cfe22b
MD
1886 * filesys.c (scm_chmod), simpos.c (scm_system), version
1887 (scm_version), vports (scm_make_soft_port): Escape " occuring
1888 inside docstring.
1889
fcb1720f
GB
1890Mon Jan 17 11:41:22 2000 Greg J. Badros <gjb@cs.washington.edu>
1891
1892 * scm_validate.h: Added SCM_VALIDATE_ULONG_COPY,
1893 SCM_VALIDATE_LONG_COPY
1894
1895 * numbers.c: Use SCM_VALIDATE_ULONG_COPY, instead of
1896 SCM_VALIDATE_INUM_COPY to let bigger numbers be used. Rename a
1897 couple of formal arguments (and fix their uses) to make arguments
1898 match the documentation.
1899
b9af3d0e
MS
19002000-01-14 <mstachow@alum.mit.edu>
1901
1902 * Makefile.am: Augment path when running guile-doc-snarf so
1903 guile-func-name-check is found.
1904
153511a7
GB
1905Fri Jan 14 09:34:55 2000 Greg J. Badros <gjb@cs.washington.edu>
1906
1907 * scm_validate.h (SCM_NUM2LONG_DEF): Fix this macro to just use
1908 def, not SCM_MAKINUM(def); thanks Janis Bzerins!
1909
59d5245f
GB
1910Wed Jan 12 00:06:53 2000 Greg J. Badros <gjb@cs.washington.edu>
1911
1912 * net_db.c (s_scm_inet_makeaddr): Use SCM_NUM2ULONG since that's
1913 the way guile-1.3.4 worked, but #if 0 out the version using
1914 SCM_VALIDATE_INUM_COPY for stricter testing.
1915
95aec69f
GB
1916Tue Jan 11 18:24:18 2000 Greg J. Badros <gjb@cs.washington.edu>
1917
1918 * guile-doc-snarf.in: Use new $fullfilename for running
1919 guile-func-name-check, and put "$fullfilename" and "$filename" in
1920 quotes at uses to make sure re-splitting on whitespace does not
a00c95d9 1921 occur (so filenames w/ embedded whitespace would work okay, though
95aec69f
GB
1922 I sure hope we never have to deal with that! :-) ). Thanks to
1923 Mikael for pointing out the source_dir != build_dir was broken.
1924
b7ac2837
GB
1925Tue Jan 11 17:42:40 2000 Greg J. Badros <gjb@cs.washington.edu>
1926
1927 * scm_validate.h: Added SCM_NUM2LONG_DEF macro. Make
1928 SCM_OUT_OF_RANGE use SCM_MAKINUM, not scm_long2num. Added
1929 SCM_COERCE_ROSTRING macro. Added SCM_VALIDATE_NONEMPTYLIST
1930 macro. Fix SCM_VALIDATE_STRINGORSUBSTR macro to not use SLOPPY
1931 variants.
1932
1933 * ports.c (scm_port_closed_p): Validate that the arg is a PORT,
1934 then return whether it's an open port (was validating that it was
1935 an open port -- this was a bug I introduced back in December, but
1936 my careful reading of diffs caught it).
1937
1938 * numbers.c: Recombine the two conditional-compilation paths for
1939 all the log* primitives -- they were split based on #ifndef
1940 scm_long2num; factored out a SCM_LOGOP_RETURN macro, and fixed
1941 some bugs and inconsistencies in the two sets of implementations.
1942 (scm_lognot) Fixed *atrocious* re-use of a SCM as an integer!
1943
1944 * ioext.c: Use SCM_ASSERT_RANGE in a couple places, and
1945 SCM_VALIDATE_INUM_COPY once where it should've been used.
1946
1947 * fluids.c (scm_internal_with_fluids): Use
1948 SCM_VALIDATE_LIST_COPYLEN.
1949
1950 * filesys.c: Use SCM_NUM2LONG instead of SCM_VALIDATE_INUM_COPY;
1951 this is questionable as it relaxes type safety, but other changes
1952 were useful and all SCM_NUM2LONG's should probably be
1953 revisited. Use SCM_OUT_OF_RANGE, SCM_WRONG_TYPE_ARG.
1954
1955 * evalext.c: line-break change on 1 line.
1956
1957 * eval.c (nconc2last): Takes a non-empty list as its first
1958 argument, not just a list.
1959
1960 * dynl.c: Use new SCM_COERCE_ROSTRING macro.
1961
1962Tue Jan 11 15:44:23 2000 Greg J. Badros <gjb@cs.washington.edu>
1963
1964 * dynl.c, feature.c, filesys.c, fports.c, list.c, load.c,
1965 net_db.c, sort.c, stacks.c, unif.c: Use SCM_WTA, SCM_MISC_ERROR
1966 where possible.
1967
1968 * symbols.c (scm_sysintern0): Fixed the function name in a
1969 scm_misc_error invocation.
1970
1971 * print.c (scm_simple_format): Do not need SCM_COERCE_SUBSTR, and
1972 use scm_return_first to ward off latent GC bug that Mikael caught.
1973
1974 * async.c: Use SCM_VALIDATE_ASYNC_COPY one place where it wasn't
1975 used before but should've been.
1976
d61f6b02
MD
19772000-01-12 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
1978
1979 * snarf.h (SCM_PROC1): Replaced SCM (*) (...) with
1980 SCM_FUNC_CAST_ARBITRARY_ARGS.
1981
88423ab1
GB
1982Tue Jan 11 13:44:07 2000 Greg J. Badros <gjb@cs.washington.edu>
1983
1984 * guile-func-name-check.in: Added this script to statically check
1985 #define FUNC_NAME, #undef FUNC_NAME in the source.
1986
1987 * sort.c, posix.c: Fix #undef FUNC_NAME lines to not have trailing
1988 redundant comment, semicolon; caught by new guile-func-name-check
1989 script.
1990
1991 * debug.c: Fix mistaken #define FUNC_NAME for scm_make_iloc.
1992 Caught by new guile-func-name-check-script.
1993
1994 * Makefile.am: Added guile-func-name-check to bin_SCRIPTS
1995
1996 * ramap.c: Fix #if 0'd out code to be syntactically acceptable to
1997 guile-func-name-check.
1998
a00c95d9 1999 * guile-doc-snarf.in: Run guile-func-name-check on the file before
88423ab1
GB
2000 doing the snarf.
2001
7f15e635
GB
2002Tue Jan 11 11:31:10 2000 Greg J. Badros <gjb@cs.washington.edu>
2003
2004 * fports.c, ports.c, ports.h, strports.c, vports.c: Make write
2005 port function take const void*, not void*.
2006
bf121b59
GB
2007Tue Jan 11 11:18:07 2000 Greg J. Badros <gjb@cs.washington.edu>
2008
2009 * scm_validate.h, chars.c, ports.c, print.c, read.c, strings.c,
2010 strop.c: Use SCM_VALIDATE_ICHR, SCM_VALIDATE_ICHR_COPY instead of
2011 SCM_VALIDATE_CHAR, SCM_VALIDATE_CHAR_COPY. Change made for
2012 consistency with the other macros dealing with immediate
2013 characters. (Similar to INT -> INUM change a week or so ago).
2014
7965d98f
GB
2015Tue Jan 11 10:41:46 2000 Greg J. Badros <gjb@cs.washington.edu>
2016
2017 * dynl.c, error.c, eval.c, feature.c, filesys.c, fports.c, list.c, load.c,
2018 net_db.c, read.c, socket.c: Update error messages to use ~A for
2019 %s, ~S for %S to work with new `simple-format' format and be
2020 standardized better.
2021
2022 * print.h, print.c (scm_simple_format): Added `simple-format'
2023 primitive. It's the old scm_display_error, with ARGS now a rest
a00c95d9 2024 parameter, and the destination first instead of last (and a couple
7965d98f
GB
2025 new capabilities inspired by `format' -- #t as destination means
2026 current-output-port, #f means return the formatted text as a
2027 string.
2028
2029 * gh.h, gh_data.c, ports.h, ports.c: Added some missing const specifications.
2030
2031 * backtrace.c (scm_display_error_message): Rewrote to use
2032 scm_simple_format() procedure.
2033
2034 * __scm.h: Added commented-out #define of GUILE_DEBUG_FREELIST
2035
f73d2411
MV
20362000-01-09 Marius Vollmer <mvo@zagadka.ping.de>
2037
2038 Finally applied the libltdl patch from Thomas Tanner, with slight
2039 modifications.
2040
2041 * DYNAMIC-LINKING: Removed because it is obsolete.
2042 * dynl.c: Use ANSI prototypes.
2043 (sysdep_dynl_link): Use lt_dlopenext instead of lt_dlopen.
2044 * scmconfig.h.in: Do not change, as it is automatically generated.
a00c95d9 2045
f73d2411
MV
2046 1999-07-25 Thomas Tanner <tanner@ffii.org>
2047
2048 * dynl-dl.c, dynl-dld.c, dynl-shl.c, dynl-vms.c: deleted
2049 (obsolete)
2050 * Makefile.am: likewise, add INCLTDL (libltdl headers) to
2051 INCLUDES, set dlpreopened files in LDFLAGS, link libguile
2052 against libltdl
2053 * dynl.c: use libltdl if DYNAMIC_LINKING is enabled,
2054 * guile.c: register preloaded modules
2055 * scmconfig.h.in: remove obsolete symbols
2056
38c1d3c4
GH
20572000-01-09 Gary Houston <ghouston@arglist.com>
2058
2059 * These changes should make it unnecessary to call tzset from
2060 Scheme after modifying the TZ environment variable, even if the
2061 system date facilities cache the value.
2062 * stime.c (setzone, scm_localtime): added comments.
2063 (tzset): don't define a noop tzset macro if HAVE_TZSET not defined.
2064 (setzone): don't call tzset.
2065 (restorezone): call tzset only if HAVE_TZSET is defined.
2066 (scm_tzset): don't define if HAVE_TZSET not defined. Change the
2067 doc string to indicate that this procedure isn't likely to do
2068 anything useful.
2069 (scm_localtime, scm_strftime, scm_mktime): call tzset if
2070 LOCALTIME_CACHE is defined.
2071
9359d657
MD
20722000-01-09 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
2073
2074 * posix.c (scm_sync): Return SCM_UNSPECIFIED.
2075
f25f761d
GH
20762000-01-09 Gary Houston <ghouston@arglist.com>
2077
2078 * eval.c: define scm_unbound_variable_key ('unbound-variable).
2079 scm_lookupcar1: throw an error with key 'unbound-variable instead
2080 of 'misc-error when an unbound variable is encountered.
2081
a00c95d9 2082 * filesys.c (scm_mkdir, scm_rmdir, scm_getcwd, scm_select,
f25f761d
GH
2083 scm_symlink, scm_readlink, scm_lstat),
2084 posix.c (scm_setpgid, scm_setsid, scm_ctermid, scm_tcgetpgrp,
2085 scm_tcsetpgrp, scm_uname, scm_setlocale, scm_mknod, scm_nice,
2086 scm_sync),
a00c95d9 2087 simpos.c (scm_system),
f25f761d
GH
2088 stime.c (scm_times, scm_strptime):
2089 move the HAVE_XXX feature tests out of the procedure bodies.
2090 don't use SCM_SYSMISSING.
2091 scm_validate.h (SCM_SYSMISSING): removed.
2092 error.h, error.c (scm_sysmissing): comment that this is deprecated.
2093 see ChangeLog entry for 1999-12-28.
2094
a4dd2611
GB
2095Sat Jan 8 19:52:04 2000 Greg J. Badros <gjb@cs.washington.edu>
2096
2097 * scm_validate.h (SCM_VALIDATE_BOOL_COPY): Fix typo.
2098
2099Sat Jan 8 17:06:46 2000 Greg J. Badros <gjb@cs.washington.edu>
2100
2101 * backtrace.c: Fix spelling typo in a comment.
2102
2103 * snarf.h: Use new SCM_DOCS macro to encapsulate the non SCM_INIT
2104 text. Reformatted some of the expansions.
2105
5ac36451
GB
2106Fri Jan 7 15:50:46 2000 Greg J. Badros <gjb@cs.washington.edu>
2107
2108 * scm_validate.h (SCM_OUT_OF_RANGE): Use scm_out_of_range_pos to
2109 report the position of the argument.
2110
a00c95d9 2111 * error.h, error.c (scm_out_of_range_pos): Added this function to
5ac36451 2112 take extra "pos" argument, the position number of the errant
a00c95d9 2113 argument.
5ac36451
GB
2114
2115 * debug.c: Use SCM_OUT_OF_RANGE instead of scm_out_of_range.
2116
2117 * snarf.h: Use SCM_HERE and SCM_INIT as names, not SCM_NOTSNARF
2118 and SCM_SNARFING. Also put the %%% in the SCM_INIT since Mikael
2119 prefers that and I'm reasonably indifferent.
2120
2121Fri Jan 7 15:03:32 2000 Greg J. Badros <gjb@cs.washington.edu>
2122
2123 * snarf.h: Factor out differences between C++ and non-C++ into
2124 SCM_FUNC_CAST_ARBITRARY_ARGS macro. Modify all the snarf macro
2125 definitions to use SCM_NOTSNARF and SCM_SNARFING macros (like
2126 Mikael's macros, below, but changed names and SCM_SNARFING no
2127 longer expands to include %%% -- that must appear in the argument
2128 so that the token appears at the call-site as a reminder).
2129
088bb1d4
MD
21302000-01-07 Mikael Djurfeldt <mdj@thalamus.nada.kth.se>
2131
2132 * snarf.h (SCM_INSITU, SCM_INIT): New snarf macros for use in user
2133 snarf macro definitions.
2134
636480e6
MD
21352000-01-06 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2136
2137 * chars.c (scm_integer_to_char): Use Greg's nice
2138 SCM_VALIDATE_INUM_RANGE macro for argument checking for closer
2139 adherence to R5RS.
2140
7c5628e2
GB
2141Thu Jan 6 11:48:49 2000 Greg J. Badros <gjb@cs.washington.edu>
2142
2143 * *.c, snarf.h: Replace GUILE_PROC1 with SCM_DEFINE1 throughout.
2144
2cc0f8cb
GB
2145Thu Jan 6 11:22:53 2000 Greg J. Badros <gjb@cs.washington.edu>
2146
2147 * Makefile.am (ETAGS_ARGS): Switch to SCM_DEFINE, SCM_DEFINE1
2148 instead of GUILE_PROC.
2149
2150Thu Jan 6 11:21:49 2000 Greg J. Badros <gjb@cs.washington.edu>
2151
a00c95d9 2152 * alist.c: Do not report mismatch errors on some uses of `tmp' (do
2cc0f8cb
GB
2153 this by using SCM_ARG2 instead of `2' in the SCM_VALIDATE_CONS
2154 macro call.
2155
9179dcdd
GB
2156Thu Jan 6 09:54:33 2000 Dirk Herrmann <dirk@ida.ing.tu-bs.de> --gjb applied
2157
2158 * scm_validate.h: Remove some redundant NIMP tests.
2159
2160 * alist.c: minimize scope of the tmp variables, and initialize
2161 them when declared. The strange SCM_NIMP tests are replaced by
2162 SCM_CONSP tests that more closely reflect the intended semantics.
2163 However, we don't get a performance penalty here, because the
2164 SCM_CONSP test was performed by the ALISTCELL test anyway. * The
2165 extremely ugly use of ASRTGO macros was removed: The calls to
2166 ASRTGO were not encapsulated by "#ifndef SCM_RECKLESS", but got a
2167 label parameter that only exists when SCM_RECKLESS is not defined.
2168 This works, because ASRTGO itself is defined in a way that it only
2169 makes use of the label parameter if SCM_RECKLESS is not defined
2170 (shudder!). Does guile make at all use of the possibility to
2171 define SCM_RECKLESS? * Codesize is likely to be reduced, since
2172 instead of two calls to SCM_ASSERT performed by the ALISTCELL test
2173 we now only get one test.
2174
2175 * list.c: Use SCM_NNULLP, not SCM_NIMP as appropriate. Also use
2176 SCM_NULLP instead of SCM_IMP. Drop use of "register" keyword on
2177 some variables in `list?'. Fix `reverse' and `reverse!'
2178 primitives to handle improper lists better.
2179
15b33280
GB
2180Wed Jan 5 11:24:53 2000 Greg J. Badros <gjb@cs.washington.edu>
2181
2182 * *.[ch]: Whitespace changes -- added space after SCM_VALIDATE_*
2183 macros and SCM_DEFINE macros to match GNU coding standards.
2184
ca8cd130
GB
2185Wed Jan 5 11:04:24 2000 Greg J. Badros <gjb@cs.washington.edu>
2186
2187 * *.[ch]: Replace GUILE_PROC w/ SCM_DEFINE.
2188
fb764465
GB
2189Wed Jan 5 10:59:06 2000 Greg J. Badros <gjb@cs.washington.edu>
2190
2191 * *.[ch]: Replace SCM_VALIDATE_INT w/ SCM_VALIDATE_INUM for
2192 better consistency with the names of other SCM_VALIDATE_ macros
2193 and better conformance to guile naming policy.
2194
2195Wed Jan 5 10:50:39 2000 Greg J. Badros <gjb@cs.washington.edu>
2196
2197 * ports.c (s_scm_close_all_ports_except): Use SCM_ARG1 in a
2198 SCM_VALIDATE instead of 1 to avoid a check on the argument (since
2199 it's not the actual name of the formal).
1e484823
GB
2200
2201 * guile-snarf.awk.in: Do argument/number mismatch checking and
2202 print warnings in an Emacs compile-mode parseable format.
2203
2204 * struct.c: Use SCM_ASSERT_RANGE instead of SCM_ASSERT w/
2205 SCM_OUTOFRANGE as 3rd argument.
2206
2207 * random.c: Fix argument/number mismatch (that I introduced :-( ).
2208
2209 * __scm.h: Do not #define SCM_ARG* when snarfing;
2210 lets us distinguish between 1 and SCM_ARG1 when snarfing as only
2211 the former (using the number) requires the argument to match the
2212 formal in the current argument snarfing check.
2213
2214 * snarf.h: Give new definition of SCM_ASSERT when in
a00c95d9 2215 snarfing mode to output a lexically-identifiable sequence that the
1e484823
GB
2216 guile-snarf.awk script uses to verify argument/position matching.
2217
2218 * ramap.c: Remove extraneous #undef FUNC_NAME.
2219
53fc4636
GB
2220Wed Jan 5 08:36:38 2000 Greg J. Badros <gjb@cs.washington.edu>
2221
2222 * guile-doc-snarf.awk.in: Removed -- guile-snarf.awk.in is the
a00c95d9 2223 current version of the same functionality; it writes the .x output
53fc4636
GB
2224 to stdout instead of directly into the file.
2225
2226Wed Jan 5 08:15:04 2000 Greg J. Badros <gjb@cs.washington.edu>
2227
2228 * unif.c, symbols.c, strings.c, stacks.c, random.c, print.c,
2229 posix.c: Eliminated a bunch of SCM_NIMP(..)s that are now
2230 redundant with the safer macros. Patch from Dirk Hermann applied
2231 by hand. Thanks Dirk!
2232
2233 * scm_validate.h: Added SCM_VALIDATE_VECTOR_OR_DVECTOR for some
2234 uses in random.c.
2235
2236 * ramap.c: whitespace change.
2237
3b5345d9
GB
2238Tue Jan 4 14:21:35 2000 Greg J. Badros <gjb@cs.washington.edu>
2239
2240 * options.c, objects.c, keywords.c, gc.c: Some redundant SCM_NIMP
2241 removals from Dirk Hermann.
2242
2243 * alist.c: Rename formals to match the parameter names in the
2244 documentation, updates to documentation. Thanks Dirk Hermann!
2245
169aec65
MD
22462000-01-04 Mikael Djurfeldt <mdj@mdj.nada.kth.se>
2247
db62436e
MD
2248 * eval.c (SCM_CEVAL): Reverse order of
2249 scm_stack_checking_enabled_p and SCM_STACK_OVERFLOW_P
2250 (Thanks to Brad Knotwell.)
169aec65 2251
da43d822
GB
2252Mon Jan 3 08:30:02 2000 Greg Harvey <Greg.Harvey@thezone.net> (applied --01/03/00 gjb)
2253
2254 * gc.c (scm_debug_newcell): Added SCM_SETCAR of the newly
a00c95d9 2255 allocated cell.
da43d822
GB
2256
2257 * pairs.h: Added a comment about the need for the SCM_SETCAR in
2258 SCM_NEWCELL macro.
2259
2260Mon Jan 3 08:25:19 2000 Greg J. Badros <gjb@cs.washington.edu>
2261
2262 * dynl-vms.c, debug.c, coop-threads.c, backtrace.c, eval.c: More
2263 SCM_NIMP tests that were redundant are now eliminated. Patches
2264 from Dirk Hermann applied by hand.
2265
339999c7 2266The ChangeLog continues in the file: "ChangeLog-1996-1999"