(scm_tables_prehistory): Remove.
[bpt/guile.git] / libguile / ChangeLog
CommitLineData
4d81111e
KR
12004-04-25 Kevin Ryde <user42@zip.com.au>
2
3 * socket.c (VALIDATE_INET6): Correction to bignum_in_ipv6_range_p
4 call. Reported by Hyperdivision.
5
6 * threads.c (scm_yield): Correction, actually call scm_thread_yield.
7 Reported by Hyperdivision.
8
9 * unif.c (s_scm_make_uve): Remove unused local variable. Reported by
10 Hyperdivision.
11
7e6e6b37
DH
122004-04-22 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
13
14 Hide the implementation of ilocs and isyms in eval.c.
15
16 * deprecated.h (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
17 SCM_ICDRP), eval.c (SCM_IFRINC, SCM_ICDR, SCM_IFRAME, SCM_IDIST,
18 SCM_ICDRP), eval.h (SCM_ICDR, SCM_IFRINC, SCM_IFRAME, SCM_IDIST,
19 SCM_ICDRP): Deprecated and added to deprecated.h. Moved from
20 eval.h to eval.c.
21
22 * deprecated.c (scm_isymnames), deprecated.h (scm_isymnames,
23 SCM_ISYMNUM, SCM_ISYMCHARS), eval.c (SCM_ISYMNUM, isymnames,
24 scm_unmemocopy, CEVAL), print.c (scm_isymnames), tags.h
25 (SCM_ISYMNUM, scm_isymnames, SCM_ISYMCHARS): Deprecated
26 scm_isymnames, SCM_ISYMNUM and SCM_ISYMCHARS and added to
27 deprecated.[hc]. Moved scm_isymnames from print.c to eval.c and
28 renamed to isymnames. Moved SCM_ISYMNUM from tags.h to eval.c and
29 renamed to ISYMNUM.
30
31 * eval.c (scm_i_print_iloc, scm_i_print_isym), eval.h
32 (scm_i_print_iloc, scm_i_print_isym), print.c (scm_iprin1):
33 Extracted printing of ilocs and isyms to guile internal functions
34 scm_i_print_iloc, scm_i_print_isym of eval.c.
35
caab294f
KR
362004-04-22 Kevin Ryde <user42@zip.com.au>
37
7aaf4758
KR
38 * numbers.c (scm_bit_extract): Use SCM_SRS for signed right shift.
39
caab294f
KR
40 * numbers.c (scm_round): Test for x already an integer, to avoid bad
41 rounding in x+0.5 when x is a big value already an integer. In
42 certain hardware rounding cases x+0.5 can give an adjacent integer,
43 leading to that as the result, when we really just wanted x itself.
44
b1cb24ff
DH
452004-04-19 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
46
47 * eval.c (scm_unmemocopy): Fixed unmemoization of let*.
48
49 (deval_args, CEVAL): Minor improvements: Reduced variable scopes,
50 added const qualifiers, cast intentionally unused expressions to
51 void for emphasis, improved comment.
52
5065b40d
DH
532004-04-18 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
54
55 * tags.h (scm_tags, scm_tc8_tags, scm_tc9_flag, scm_tc8_flag,
56 scm_tc8_isym): Renamed scm_tags to scm_tc8_tags. Renamed
57 scm_tc9_flag to scm_tc8_flag. Introduced new identifier
58 scm_tc8_isym. Defined tc8-tags relative to scm_tc3_imm24.
59 Defined the tc8-tag for flags to be 0x04, which will mean that
60 SCM_BOOL_F will also have the value 0x04 instead of 0x013c. Due
61 to the reduced number of bits and the simpler bit pattern for
62 SCM_BOOL_F, certain machines may be able to use more efficient
63 processor instructions to deal with SCM_BOOL_F.
64
65 (SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA): Removed. These have
66 never been defined in a released version, thus no need to
67 deprecate them.
68
69 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Flags now use tc8
70 instead of tc9 tags.
71
72 (SCM_ISYMP, SCM_MAKISYM, SCM_ISYMNUM): Isyms now use tc8 instead
73 of tc9 tags.
74
75 (SCM_MAKSPCSYM): Removed. It is almost impossible that user code
76 could have used this definition.
77
78 (SCM_IM_AND, SCM_IM_BEGIN, SCM_IM_CASE, SCM_IM_COND, SCM_IM_DO,
79 SCM_IM_IF, SCM_IM_LAMBDA, SCM_IM_LET, SCM_IM_LETSTAR,
80 SCM_IM_LETREC, SCM_IM_OR, SCM_IM_QUOTE, SCM_IM_SET_X): Now encoded
81 as isyms, as special isyms don't exist any more.
82
9fa6c119
KR
832004-04-18 Kevin Ryde <user42@zip.com.au>
84
e08d2eee
KR
85 * filesys.c (scm_readdir): Use readdir_r when available, for thread
86 safety.
87
9fa6c119
KR
88 * numbers.c (scm_max, scm_min): For big/real, use SCM_SWAP rather than
89 explicit swapping code.
90
c9cdd396
KR
912004-04-15 Kevin Ryde <user42@zip.com.au>
92
93 * cpp_sig_symbols.in: Add SIGSYS.
94
95 * list.c (scm_append_x): Use iterative style, to avoid non-tail
96 recursion.
97
98 * numbers.c (scm_max, scm_min): For inum/frac, frac/inum, big/frac,
99 frac/big and frac/frac, use scm_less_p for exact comparison.
100
83ac9c59
KR
101 * numbers.c (scm_gcd): For inum/big, use mpz_gcd_ui by sharing code
102 with big/inum.
103
84a4be9a
KR
104 * numbers.c (xisinf): Add a comment about solaris 7 lacking isinf.
105
84fad130
HWN
1062004-04-06 Han-Wen Nienhuys <hanwen@xs4all.nl>
107
6b69393d
HWN
108 * inline.h (scm_cell): use SCM_GC_CELL_WORD for checking tag.
109
84fad130
HWN
110 * chars.h (scm_init_chars): change scm_{upcase,downcase} to
111 scm_c_{up,down}case.
112 (SCM_MAKE_CHAR): add (unsigned char) cast. This prevents havoc
113 when hi-bit ASCII is subjected to SCM_MAKE_CHAR().
114
c3110a30
KR
1152004-04-06 Kevin Ryde <user42@zip.com.au>
116
0b288f36
KR
117 * numbers.c (scm_ash): Remove stray "}" in docstring.
118
ea2508c8
KR
119 * numbers.c (scm_make_ratio): For inum/bignum integer detection, use
120 x==SCM_MOST_NEGATIVE_FIXNUM explicitly, for clarity and to avoid
121 calling mpz_cmp_ui in most cases.
122
c3110a30
KR
123 * numbers.c (scm_quotient, scm_remainder): In inum/big, use mpz_cmp_ui
124 for big == abs(most-negative-fixnum) special case.
125 (abs_most_negative_fixnum): Remove, no longer used.
126
127 * scmsigs.c (scm_sigaction_for_thread): Correction to signum range
128 test, avoids SCM_VECTOR_REF outside bounds of signal_handlers on
129 calling (sigaction NSIG).
130
131 * simpos.c (scm_system_star): Fix execargv memory leak, merge parent
132 and fork error cases to do this.
133
dec40cd2
DH
1342004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
135
136 * eval.c (CEVAL): Don't distinguish between short and long
137 instructions when dispatching - just always dispatch on the
138 instruction code, which is common for short and long instructions.
139 Further, removed unnecessary goto statements and added comment.
140
0e7bb795
DH
1412004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
142
143 * eval.c (scm_unmemocopy): Don't distinguish between short and
144 long instructions when dispatching - just always dispatch on the
145 instruction code, which is common for short and long instructions.
146 Further, removed unnecessary goto statements, fixed indentation
147 and replaced SCM_IMP predicates by SCM_NULLP.
148
f9986767
DH
1492004-04-03 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
150
151 * eval.c (scm_lookupcar1, CEVAL): Use SCM_ILOCP instead of
152 comparison with SCM_ILOC00. In CEVAL, eliminate goto-label
153 'checkmacro'.
154
fbc42231
KR
1552004-03-31 Kevin Ryde <user42@zip.com.au>
156
157 * simpos.c: Include <signal.h> for SIG_IGN and friends.
158
434f2f7a
DH
1592004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
160
161 Introduce scm_debug_mode_p as a replacement for scm_debug_mode and
162 SCM_DEBUGGINGP:
163
164 * debug.h (scm_debug_mode_p, scm_debug_mode, SCM_DEBUGGINGP),
165 eval.c (scm_debug_mode_p): Deprecated scm_debug_mode and
166 SCM_DEBUGGINGP. Provided scm_debug_mode_p instead, to have one
167 single interface that also matches the naming conventions.
168 Probably scm_debug_mode_p should be part of the private interface
169 anyway.
170
171 * debug.h (scm_debug_mode_p), backtrace.c (display_error_body),
172 eval.c (SCM_APPLY, scm_trampoline_0, scm_trampoline_1,
173 scm_trampoline_2): Change uses of scm_debug_mode or SCM_DEBUGGINGP
174 to scm_debug_mode_p.
175
176
177 Deprecate direct access to scm_ceval, scm_deval and scm_ceval_ptr:
178
179 * eval.h (scm_ceval, scm_deval, scm_ceval_ptr), debug.h
180 (scm_ceval_ptr): Deprecated. Moved declaration of scm_ceval_ptr
181 from debug.h to eval.h.
182
183 * debug.h (SCM_RESET_DEBUG_MODE): Don't access scm_ceval_ptr any
184 more, just leave it with setting scm_debug_mode_p, which is
185 equivalent for practical purposes.
186
187 * deprecated.h (SCM_XEVAL, SCM_XEVALCAR): Call scm_i_eval_x
188 instead of *scm_ceval_ptr. Leave all evaluating to scm_i_eval_x.
189
190 * gdbint.c (gdb_eval): Call scm_i_eval_x instead of scm_ceval.
191
192 * eval.c (ceval, deval, scm_ceval, scm_deval): Made scm_ceval
193 static and renamed it to ceval throughout. Provide a new exported
194 but deprecated function scm_ceval as a wrapper for backwards
195 compatibility. The same is done for the deval/scm_deval pair of
196 functions.
197
198 * eval.c (CEVAL, SCM_CEVAL): Renamed SCM_CEVAL to CEVAL
199 throughout. Defined CEVAL to ceval or deval, based on compilation
200 phase.
201
202 * eval.c (SCM_XEVAL, SCM_XEVALCAR): Dispatch on scm_debug_mode_p
203 to ceval and deval instead of calling *scm_ceval_ptr.
204
205 * eval.c (dispatching_eval): New deprecated static function.
206
207 * eval.c (scm_ceval_ptr): Initialized to dispatching_eval in order
208 to emulate its old behaviour as closely as possible.
209
210
211 Change the evaluator such that only expressions for which pair? is
212 true are passed to CEVAL, and such that all other expressions are
213 evaluated outside of CEVAL:
214
215 * eval.c (EVAL): New, provided in analogy to EVALCAR. Evaluate an
216 expression that is assumed to be memoized already. All but
217 expressions of the form '(<form> <form> ...)' are evaluated inline
218 without calling an evaluator.
219
220 * eval.c (SCM_XEVAL, SCM_XEVALCAR, EVALCAR): Evaluate all but
221 expressions of the form '(<form> <form> ...)' inline without
222 calling an evaluator.
223
224 * eval.c (scm_i_eval_x, scm_i_eval, scm_ceval, scm_deval): Handle
225 the special case of unmemoized symbols passed on the top level.
226
227 * eval.c (CEVAL): Change calls to CEVAL to EVAL, except where it
228 is known that the expression passed to CEVAL is of the form
229 '(<form> <form> ...)'. Remove handling of the tc7-objects, since
230 now it is known that the input expression of CEVAL is a pair.
231
2322004-03-29 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
5fb64383
DH
233
234 * eval.c (is_self_quoting_p): New static function.
235
236 (scm_m_quote): Use is_self_quoting_p.
237
238 (copy_tree): Corrected typo in comment.
239
84fad130 240>>>>>>> 1.2042
702551e6
HWN
2412004-03-28 Han-Wen Nienhuys <hanwen@xs4all.nl>
242
bfefbf18
HWN
243 * eval.c (s_scm_copy_tree): idem.
244
245 * list.c (s_scm_filter): remove "pointer" from doc string.
246
702551e6
HWN
247 * gc.h (SCM_GC_CELL_TYPE): SCM_GC_CELL_TYPE uses SCM_GC_CELL_OBJECT.
248
249 * goops.h (SCM_NUMBER_OF_SLOTS): don't SCM_UNPACK the result.
250
251 * backtrace.c ("display_backtrace_body"): SCM_PACK before SCM_EQ_P
252 (display_frame): idem.
253 (display_backtrace_file_and_line): idem.
254
255 * tags.h (SCM_UNPACK): stricter typechecking on SCM_UNPACK
256 arguments.
257
3cd23214
KR
2582004-03-26 Kevin Ryde <user42@zip.com.au>
259
88a7ae1f
KR
260 * filesys.c (scm_getcwd, scm_readlink): Avoid memory leak on errors.
261
3cd23214
KR
262 * numbers.c (scm_modulo): For inum/big and big/big, remove test of
263 big==0 since that never occurs.
264
265 * numbers.c, numbers.h (scm_modulo_expt): Renamed from
266 scm_modular_expt, matching scheme level name `modulo-expt'.
267
268 * numbers.c (scm_modular_expt): Return a negative remainder for a
269 negative divisor, the same as `modulo' does.
270
2712004-03-26 Eric Hanchrow <offby1@blarg.net>
272
273 * numbers.c, numbers.h (scm_modular_expt): New function.
274
2926035a
KR
2752004-03-25 Kevin Ryde <user42@zip.com.au>
276
277 * numbers.c (scm_min, scm_max): Correction to big/real and real/big,
278 return inexact as required by r5rs.
279
62360b89
DH
2802004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
281
282 * eval.c: Separated some definitions relevant for execution from
283 the memoization part of the file.
284
285 (copy_tree): New static function
286
287 (scm_copy_tree): Rewritten to fix two kinds or bugs: First, cyclic
288 structures are detected now and will lead to an exception instead
289 of forcing guile to run in an endless loop, using up all the
290 system's memory. Second, arrays in the cdr of an improper list
291 are now copied. See the new test cases in eval.test.
292
2932004-03-24 Dirk Herrmann <dirk@dirk-herrmanns-seiten.de>
b28f5b3c
DH
294
295 * posix.c (scm_gethostname): Make sure len is initialised before
296 it is used. Restructured to (hopefully) represent possible
297 configurations more clearly in the code. Added unwind handler.
298
3bd3bae8
KR
2992004-03-23 Kevin Ryde <user42@zip.com.au>
300
301 * posix.c (scm_gethostname): Use sysconf(_SC_HOST_NAME_MAX) and/or
302 MAXHOSTNAMELEN when available.
303
254bf78d
MV
3042004-03-21 Marius Vollmer <mvo@zagadka.de>
305
306 * read.c (skip_scsh_block_comment): Also recognize '\r' as a line
307 terminator. Rewritten the logic as a state machine, I must have
308 been doing too much VHDL lately...
309
310 * eval.c (scm_ceval, scm_deval): Explicitely evaluate ports to
311 themselves. Thanks to Han-Wen Nienhuys!
312
313 * list.c: Changed docstrings so that they no longer talk about
314 returning 'pointers' to something.
315
009c34a2
HWN
3162004-03-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
317
318 * gc.c: remove set_debug_cell_accesses! when
319 SCM_DEBUG_CELL_ACCESSES is not defined. Scheme source code should
320 use (if (defined? 'set-debug-cell-accesses!) .. ) to switch on
321 debugging conditionally.
322
54733c95
KR
3232004-03-21 Kevin Ryde <user42@zip.com.au>
324
325 * stime.c (scm_gmtime): Use gmtime_r when available, for thread safety.
326
bbaf8747
KR
3272004-03-20 Kevin Ryde <user42@zip.com.au>
328
329 * posix.c (scm_gethostname): Preserve errno across free() call.
330
726f82e7
HWN
3312004-03-18 Han-Wen Nienhuys <hanwen@xs4all.nl>
332
333 * gc-card.c (sweep_card): use SCM_GC_SET_CELL_WORD for setting
334 free cells.
335
e1350d6a
KR
3362004-03-14 Kevin Ryde <user42@zip.com.au>
337
338 * stime.c: Define _GNU_SOURCE for strptime prototype from glibc.
339 (strptime): Use HAVE_DECL_STRPTIME for when to give own prototype.
340
62055253
KR
3412004-03-07 Kevin Ryde <user42@zip.com.au>
342
343 * stime.c (scm_gmtime): Return bd_time->tm_zone when available, rather
344 than "GMT" always.
345 (filltime): Make zname parameter "const".
346
92e64b87
MD
3472004-03-03 Mikael Djurfeldt <mdj@chunk.mit.edu>
348
349 * threads.c, threads.h (scm_c_scm2thread): New function.
350
004ad931
KR
3512004-02-29 Kevin Ryde <user42@zip.com.au>
352
353 * numbers.c (guile_ieee_init): Use C99 INFINITY and NAN when
354 available. Test HAVE_DINFINITY and HAVE_DQNAN for those globals, in
355 particular don't assume "defined (__alpha__) && ! defined (linux)"
356 means OSF. Remove "SCO" code, which was not really SCO specific and
357 which John W. Eaton advises should be long past being needed.
358
359 * posix.c (scm_execl, scm_execlp, scm_execle): Avoid memory leak under
360 error throw.
361
72ea45ac
KR
3622004-02-24 Kevin Ryde <user42@zip.com.au>
363
364 * posix.c (scm_cuserid): Use a private result buffer, for thread safe.
365
2af0602e
KR
3662004-02-22 Kevin Ryde <user42@zip.com.au>
367
368 * numbers.c (scm_max, scm_min): For one arg, dispatch to generic for
369 complex, same as for two args. (Handle only inum, big, real, frac).
370
b114eafe
KR
3712004-02-21 Kevin Ryde <user42@zip.com.au>
372
373 * posix.c (scm_crypt): Use new HAVE_CRYPT.
374 (<crypt.h>): Remove HAVE_LIBCRYPT condition.
db752bb5 375 Reported by Andreas Voegele.
b114eafe 376
1e55d288
NJ
3772004-02-20 Neil Jerram <neil@ossau.uklinux.net>
378
379 * list.c (scm_list_n): Add #if SCM_DEBUG_CELL_ACCESSES_P around
380 validation.
381
382 * read.c (scm_lreadparen): Removed.
383 (scm_lreadparen1): Renamed scm_i_lreadparen.
384
eb741d98
HWN
3852004-02-20 Han-Wen Nienhuys <hanwen@xs4all.nl>
386
387 * list.c (scm_list_n): validate non-immediate arguments;
388 this will catch forgotten a SCM_UNDEFINED.
389
4e28ba5e
MV
3902004-02-18 Marius Vollmer <mvo@zagadka.de>
391
392 * gc.h (scm_gc_cells_collected): Removed duplicated declaration.
393 Thanks to Bill Schottstaedt!
394
395 * socket.h (scm_gethost): Removed prototype it is already in
396 "net_db.h". Thanks to Bill Schottstaedt!
397
ef861ead
KR
3982004-02-18 Kevin Ryde <user42@zip.com.au>
399
400 * num2integral.i.c (INTEGRAL2BIG): WORDS_BIGENDIAN not right for word
401 order parameter to mpz_import, in fact with just one word there's no
402 order to worry about at all.
403
404 * numbers.c (scm_num_eq_p): For real==frac, complex==frac, frac==real
405 and frac==complex, make an exact comparison rather than converting
406 with fraction2double.
407
408 * posix.c, putenv.c, stime.c (environ): Use _NSGetEnviron in Darwin
409 shared library, since environ is not directly available there.
410
411 * script.c (scm_shell_usage): Print to stdout for --help, per GNU
412 standard.
413
414 * stime.c (scm_localtime, scm_gmtime, scm_mktime): Provide a default
415 errno EINVAL in case localtime and gmtime don't set it.
416 (scm_mktime, scm_strptime): Forcibly use errno EINVAL for our
417 SCM_SYSERROR, since mktime and strptime generally don't set errno.
418
ae43d08e 4192004-02-16 Kevin Ryde <kevin@swox.se>
292dfa7f 420
c9ea6462
KR
421 * gc-malloc.c (scm_done_malloc, scm_done_free): Allow negative sizes,
422 which were permitted in the past for these.
423
292dfa7f
KR
424 * num2float.i.c (NUM2FLOAT): Expand isfinite to !xisinf, as per
425 previous change to numbers.c.
426
ae43d08e
KR
427 * script.c (scm_shell_usage): Print bug-guile email address, as per
428 GNU standard. Reported by Han-Wen Nienhuys.
429
711a9fd7
MD
4302004-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
431
432 * unif.c (scm_make_uve): Removed local variable and simplified
433 code in order to avoid compiler used uninitialized warnings.
434
435 * hashtab.c, hashtab.h (scm_hash_map_to_list): Renamed from
436 scm_hash_map.
437 (scm_hash_fold): Use scm_call_3 directly in the call to
438 scm_internal_hash_fold instead of going via fold_proc (which is
439 now removed).
440 (scm_hash_for_each): Use a trampoline +
441 scm_internal_hash_for_each_handle.
442 (scm_internal_hash_for_each_handle, scm_hash_for_each_handle): New
443 functions.
444
3da7f6b2
KR
4452004-02-12 Kevin Ryde <user42@zip.com.au>
446
344a212f
KR
447 * ports.c (scm_port_line): In docstring, note first line is 0.
448 (scm_set_port_line_x): In docstring, note first line is 0.
449 (scm_port_column): In docstring, there's no default to current input
450 port, and remove shared port-line @defun.
451 (scm_set_port_column_x): In docstring, there's no default to current
452 input port, note first column is 0, remove shared set-port-line!
453 @defun.
454
3da7f6b2
KR
455 * ramap.c (scm_array_fill_x): For fvect and dvect, use scm_num2dbl to
456 convert args the same way that array-set! does.
457
458 * unif.c (scm_make_uve, scm_array_p): Allow fraction 1/3 as prototype
459 for dvect.
460 (scm_array_p): Add missing "break"s in switch, fix llvect test look
461 for "l" not "s", fix dvect to be false for singp(prot) since such a
462 value is for fvect.
463 (scm_array_prototype): Return 1/3 for dvect, rather than 0.33..33.
88531a74
KR
464 (exactly_one_third): New variable.
465 (scm_init_unif): Initialize it.
3da7f6b2 466
cd21f5eb
NJ
4672004-02-10 Neil Jerram <neil@ossau.uklinux.net>
468
469 * read.c (scm_read_opts): Change `escaped-parens' to
470 `elisp-strings'.
471
16353acc
NJ
4722004-02-08 Neil Jerram <neil@ossau.uklinux.net>
473
474 * read.c (scm_read_opts): New opts `elisp-vectors' and
475 `escaped-parens'.
476 (s_vector): New.
477 (scm_lreadr): Use scm_lreadparen1 instead of scm_lreadparen. Make
478 handling of elisp vector syntax dependent on SCM_ENABLE_ELISP and
479 `elisp-vectors' option instead of SCM_ELISP_READ_EXTENSIONS.
480 Allow "\(" and "\)" in strings when SCM_ENABLE_ELISP defined and
481 `escaped-parens' option set.
482 (scm_read_token): If elisp vector syntax active, disallow [ and ]
483 in tokens.
484 (scm_lreadparen): Rewrite as interface to scm_lreadparen1.
485 (scm_lreadparen1): New.
486
487 * read.h: Remove conditionally compiled last arg to
488 scm_lreadparen.
489 (SCM_ELISP_VECTORS_P, SCM_ESCAPED_PARENS_P): New.
490
f62b9dff
HWN
4912004-01-23 Han-Wen Nienhuys <hanwen@xs4all.nl>
492
493 * eval.c (m_expand_body): remove stray variable new_body.
494
ef5b6b61
MV
4952004-01-22 Marius Vollmer <mvo@zagadka.de>
496
497 * eval.c (m_expand_body): Rewrite the expression in place (by
498 overwriting FORMS) also when a letrec is constructed, not only
499 when no definitions are found. Do not return rewritten expression
500 to emphasize the in-place rewriting. Changed all users.
501
7eec4c37
HWN
5022004-01-19 Han-Wen Nienhuys <hanwen@xs4all.nl>
503
504 * gc.c: add protected_object_count, a number that is dumped from
505 gc_stats()
506
25ffbdac
MV
5072004-01-11 Marius Vollmer <mvo@zagadka.de>
508
509 * dynwind.h, dynwind.c (scm_frame_unwind,
510 scm_frame_unwind_handler): Renamed and changed all uses.
511 (scm_frame_rewind, scm_frame_rewind_handler): Likewise.
512
08568c95
KR
5132004-01-11 Kevin Ryde <user42@zip.com.au>
514
515 * unif.c (scm_bit_count, scm_bit_position, s_scm_bit_set_star_x,
516 s_scm_bit_count_star, s_scm_bit_invert_x): Clarify docstrings, as per
517 changes made to scheme-compound.texi.
518
5565749c
MV
5192004-01-10 Marius Vollmer <mvo@zagadka.de>
520
25ffbdac
MV
521 * print.c (scm_print_symbol_name): Handle #{`foo}#, #{,foo}#,
522 #{.}#, and all numeric strings specially. Thanks to Paul Jarc!
523
524 * guile-snarf.in: Use mkdir to create a unique temporary directory
525 that we can safely use. Thanks to Stefan Nordhausen!
5565749c 526
fc6bb283
MV
5272004-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
528
7ebccde8
MV
529 * dynwind.h, dynwind.c (scm_i_dowinds): Removed 'explicit'
530 argument since it is always zero now. Changed all callers.
531 Removed code for handling fluids.
96e3b2f8
MV
532
533 * fluids.c (scm_c_with_fluids): Use frames instead of adding to
534 the wind chain explicitely. Use scm_c_with_fluid for the common
535 case of only one fluid.
536 (scm_with_fluid): New.
537 (scm_c_with_fluid): Use frames instead of scm_c_with_fluids.
538
fc6bb283 539 * fluids.h, fluids.c (scm_frame_fluid): New.
96e3b2f8
MV
540 (scm_with_fluid): New.
541 (scm_i_swap_fluids, scm_i_swap_fluids_reverse): Removed.
fc6bb283
MV
542
543 * dynwind.c (scm_frame_end): Do not use scm_i_dowinds. Instead,
544 do the unwinding directly. It is simple enough.
545
546 * dynwind.h, dynwind.c: Did the following renamings:
547 scm_begin_frame -> scm_frame_begin,
548 scm_end_frame -> scm_frame_end,
549 scm_on_unwind -> scm_frame_unwind,
550 scm_on_rewind -> scm_frame_rewind,
551 scm_on_unwind_with_scm -> scm_frame_unwind_with_scm,
552 scm_on_rewind_with_scm -> scm_frame_rewind_with_scm.
553 Changed all uses.
554
555 * aync.h, async.c: Did the follwing renamings:
556 scm_with_blocked_asyncs -> scm_frame_block_asyncs,
557 scm_with_unblocked_asyncs -> scm_frame_unblock_asyncs.
558 Changed all uses.
559
560 * ports.h, ports.c: Did the follwing renamings:
561 scm_with_current_input_port -> scm_frame_current_input_port,
562 scm_with_current_output_port -> scm_frame_current_output_port,
563 scm_with_current_error_port -> scm_frame_current_error_port.
564 Changed all uses.
565
298ab996
KR
5662004-01-07 Kevin Ryde <user42@zip.com.au>
567
568 * numbers.c (s_bignum): Remove, not used since gmp bignums.
569 Reported by Richard Todd.
570
ba40113e
KR
571 * threads-plugin.h (SCM_MUTEX_MAXSIZE): Increase to 12*sizeof(long),
572 for the benefit of powerpc-apple-darwin5.5. Reported by Richard Todd.
573
298ab996
KR
574 * unif.c (scm_aind): Test SCM_CONSP rather than !SCM_NULLP while
575 traversing the args list, fixes segv if an improper list is given.
576 Reported by Rouben Rostamian.
577
aacff585
MV
5782004-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
579
580 * ports.c (swap_ports, scm_with_current_foo_port): Do not allocate
581 swap_data on stack, use a 'malloc obj'.
582
583 * fluids.h, fluids.c (scm_make_initial_fluids, scm_copy_fluids,
584 scm_swap_fluids, scm_swap_fluids_reverse): Renamed to
585 scm_i_... since they are internal. Changed all uses.
586
587 * dynwind.c (frame_print): Removed, use the default printer.
588 (WINDER_F_MARK, WINDER_MARK_P, winder_mark): New.
589 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New. Use above
590 to protect SCM values.
591
592 * dynwind.h (SCM_F_WIND_EXPLICITELY,
593 SCM_F_WIND_EXPLICITLY): It's "explicitly" not "explicitely", damn.
594 Changed all uses.
595 (scm_on_unwind_with_scm, scm_on_rewind_with_scm): New.
596
49c00ecc
MV
5972004-01-05 Marius Vollmer <mvo@zagadka.de>
598
599 * ports.h, ports.c (scm_with_current_input_port,
600 scm_with_current_output_port, scm_with_current_error_port): New.
601
602 * async.h, async.c (scm_with_blocked_asyncs,
603 scm_with_unblocked_asyncs): New.
604
dab514a8
MV
6052004-01-03 Marius Vollmer <mvo@zagadka.de>
606
607 * dynwind.h, scm_dynwind.c (scm_t_frame_flags, scm_t_wind_flags,
608 scm_begin_frame, scm_end_frame, scm_on_unwind, scm_on_rewind):
609 New.
610 (scm_dowinds, scm_i_dowinds): scm_dowinds has been renamed to
611 scm_i_dowinds and extended to handle frames and to invoke a 'turn'
612 function when the outermost wind point has been reached. The
613 latter is used to copy a continuation stack at the right time.
614 scm_dowinds remains available.
615 (SCM_GUARDSP, SCM_BEFORE_GUARD, SCM_AFTER_GUARD, SCM_GUARD_DATA,
616 tc16_guard, guards_print): Removed.
617 (scm_internal_dynamic_wind): Reimplemented using frames.
618
619 * continuations.c (copy_stack): New, do only the stack copying
620 part of copy_stack_and_call.
621 (copy_stack_and_call): Copy the stack after unwinding and before
622 rewinding.
623 (scm_dynthrow): Do not call scm_dowinds, this is now done by
624 copy_stack_and_call.
625
441a25d9
KR
6262004-01-04 Kevin Ryde <user42@zip.com.au>
627
628 * numbers.c (scm_less_p): Don't convert frac to float for compares,
dab514a8 629 can give bad results due to rounding.
441a25d9 630
e0499207
KR
631 * stime.c (scm_current_time, scm_gettimeofday): Add a comment about
632 setzone/restorezone protection for DOS.
633
89fcf1b4
MV
6342003-12-26 Marius Vollmer <mvo@zagadka.de>
635
636 * gen-scmconfig.h.in, gen-scmconfig.c: Arrange for scm_t_intmax
637 and scm_t_uintmax to be defined in scmconfig.h
638
caff34d4
KR
6392003-12-03 Kevin Ryde <user42@zip.com.au>
640
641 * numbers.c (scm_less_p): Remove spurious xisnan from frac+big case.
642
643 * numbers.c (scm_make_ratio): Check for numerator equal to
644 SCM_MOST_NEGATIVE_FIXNUM and bignum denominator the negative of that,
645 giving integer -1.
646
647 * numbers.c (scm_real_part): Return fraction unchanged rather than
648 converting to flonum.
649
2d0b85ac
DH
6502003-11-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
651
652 * modules.c (module_variable): Fixed (and thus simplified) the
653 definition of SCM_BOUND_THING_P to reflect the fact that since
654 after the 1.4 series of guile, obarrays only hold variable
655 objects.
656
2297981d
MV
6572003-11-30 Marius Vollmer <mvo@zagadka.de>
658
659 * numbers.c (scm_logand): It's "#b...", not "#\b...".
660
661 From Paul Jarc:
662
663 * read.c (scm_lreadr): Signal an error for invalid escape
664 sequences in strings. Code cleanups too.
665
666 * print.c (scm_iprin1): use \xNN hexadecimal sequences when
667 writing control characters in strings.
668
6692003-11-21 Marius Vollmer <mvo@zagadka.de>
670
671 * ports.c (scm_drain_input): Bug fix: only access the port after
672 checking that it indeed is one.
673
5c264007
DH
6742003-11-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
675
676 * eval.c (s_bad_define): New static identifier.
677
678 (m_body): Fixed comment.
679
680 (scm_m_define): Don't generate memoized code for definitions that
681 are not on the top level. As a consequence, no memoized code at
682 all is generated for definitions any more: Top level definitions
683 are executed immediately during memoization and internal
684 definitions are handled separately in m_expand_body.
685
686 (scm_unmemocopy, unmemocopy): Removed code for unmemoizing
687 definitions. Consequently, there is no unmemoizing code any more
688 that might modify the environment. Thus, the old scm_unmemocopy
689 is removed and the old unmemocopy is renamed to scm_unmemocopy.
690
691 (SCM_CEVAL): The SCM_IM_DEFINE keyword can no longer occur in
692 memoized code. Call EVALCAR for continuations. Prefer !SCM_NULLP
693 over SCM_NIMP in places, where the argument is known to be part of
694 a proper list.
695
018d4730
KR
6962003-11-21 Kevin Ryde <user42@zip.com.au>
697
698 * numbers.c (scm_abs): Allocate a new real only for negatives, as done
699 for bignums.
700
701 * numbers.c (scm_bit_extract): Use mpz functions, rearrange inum case
702 to share some shifting.
703
704 * numbers.c (scm_integer_expt): Don't mpz_init after scm_i_clonebig or
705 scm_i_mkbig, since they do so already. Don't mpz_clear a bignum SCM,
706 since gc does this.
707
4bca30d8
MV
7082003-11-19 Marius Vollmer <mvo@zagadka.de>
709
fb16d26e
MV
710 * numbers.c (scm_make_ratio): Rewritten to have a simpler
711 structure. Previously, not all cases with a negative denominator
712 were covered.
713
4bca30d8
MV
714 * numbers.c (mem2decimal_from_point): use scm_divide instead of
715 scm_divide2real when forming the fractional part. This allows
716 "#e1.2" to yield 6/5.
717
718 * numbers.c (scm_i_fraction_equalp): Do not treat the return value
719 of scm_equal_p as a C boolean, use SCM_FALSEP. Previously, all
720 fractions were equal to each other regardless of value. Ooops.
721
722 * numbers.c (scm_rationalize): Return an inexact result when given
723 inexact arguments.
724
725 * numbers.c (scm_exact_p, scm_inexact_p): Throw error for
726 non-numbers.
727
bdf26b60
MV
7282003-11-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
729
730 Support for exact fractions from Bill Schottstaedt! Thanks!
731
732 * print.c (scm_iprin1): Handle fractions.
733
734 * objects.h (scm_class_fraction): New.
735 * objects.c (scm_class_fraction): New.
736 (scm_class_of): Handle fractions.
737
738 * hash.c (scm_hasher): Handle fractions.
739
740 * numbers.c: New code for handling fraction all over the place.
741 (scm_odd_p, scm_even_p): Handle inexact integers.
742 (scm_rational_p): New function, same as scm_real_p.
743 (scm_round_number, scm_truncate_number, scm_ceiling, scm_floor):
744 New exact functions that replace the inexact 'dsubr'
745 implementations.
746 (scm_numerator, scm_denominator): New.
747
748 * numbers.h (SCM_NUMP): Recognize fractions.
749 (SCM_FRACTIONP, SCM_SLOPPY_FRACTIONP, SCM_FRACTION_NUMERATOR,
750 SCM_FRACTION_DENOMINATOR, SCM_FRACTION_SET_NUMERATOR,
751 SCM_FRACTION_SET_DENOMINATOR, SCM_FRACTION_REDUCED_BIT,
752 SCM_FRACTION_REDUCED_SET, SCM_FRACTION_REDUCED_CLEAR,
753 SCM_FRACTION_REDUCED): New.
754 (scm_floor, scm_ceiling, scm_truncate_number, scm_round_number):
755 New prototypes.
756 (scm_make_ratio, scm_rationalize, scm_numerator, scm_denominator,
757 scm_rational_p): New prototypes.
758 (scm_i_dbl2num, scm_i_fraction2double, scm_i_fraction_equalp,
759 scm_i_print_fraction): New prototypes.
760
761 * goops.c (create_standard_classes): Create "<fraction>" class.
762
763 * gc-mark.c (scm_gc_mark_dependencies): Handle fractions.
764
765 * gc-card.c (scm_i_sweep_card): Include scm_tc16_fraction as a
766 case in the switch, but do nothing for now.
767
768 * eval.c (SCM_CEVAL, SCM_APPLY, call_dsubr_1): Convert fractions
769 to doubles when calling 'dsubr' functions.
770
771 * eq.c (scm_eqv_p, scm_equal_p): Handle fractions.
772
28fda544
RB
7732003-11-18 Rob Browning <rlb@defaultvalue.org>
774
775 * gen-scmconfig.c (main): remove public definition of
776 SCM_SIZEOF___INT64 and SCM_SIZEOF_UNSIGNED___INT64 and add
777 direct typedef of long_long and ulong_long inside deprecated block
778 when appropriate.
779
780 * deprecated.h: move long_long and ulong_long definitions to
781 gen-scmconfig.c so that we don't need to add SCM_SIZEOF___INT64
782 and SCM_SIZEOF_UNSIGNED___INT64 to the public namespace.
783
b58e7420
MV
7842003-11-17 Marius Vollmer <mvo@zagadka.de>
785
9a1d7d7c
MV
786 * hash.c (scm_string_hash): New hashing algorithm that takes the
787 complete string into account.
788
b58e7420
MV
789 * eval.c (scm_m_generalized_set_x): Macroexpand the target when it
790 is a list. This allows (@ ...) to work with set!.
9a1d7d7c
MV
791 (scm_m_generalized_set_x): Use ASSERT_SYNTAX_2 instead of
792 SCM_ASSYNT.
b58e7420
MV
793
794 * script.c (scm_compile_shell_switches): Use scm_c_read_string for
795 the "-e" option instead of scm_str2symbol. This allows things
796 like (@ ...) to be specified for the entry point.
797
461bffb1
DH
7982003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
799
800 * eval.c (scm_m_letstar): Create memoized code in place to
801 minimize consing.
802
6f81708a
DH
8032003-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
804
805 * eval.c (s_splicing): Commented and reformulated.
806
807 (lookup_global_symbol, lookup_symbol): New static functions.
808
809 (s_test, s_bindings, s_duplicate_bindings, s_variable): Removed.
810
811 (try_macro_lookup, literal_p): Use lookup_symbol instead of
812 creating a temporary pair for scm_lookupcar.
813
814 (scm_unmemocar, unmemocar): Renamed scm_unmemocar to unmemocar,
815 created deprecated wrapper function scm_unmemocar.
816
817 (SCM_VALIDATE_NON_EMPTY_COMBINATION, scm_sym_else,
818 scm_sym_unquote, scm_sym_uq_splicing, scm_sym_enter_frame,
819 scm_sym_apply_frame, scm_sym_exit_frame, scm_sym_trace, f_apply,
820 undefineds, sym_three_question_marks): Moved around without
821 modifications.
822
823 * eval.c, eval.h (scm_macroexp, scm_unmemocar): Deprecated.
824
910b5125
DH
8252003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
826
827 * eval.c (try_macro_lookup, expand_user_macros, is_system_macro_p,
828 m_expand_body, scm_m_expand_body): Grouped together with m_body.
829 No further modifications.
830
c86c440b
DH
8312003-11-15 Dirk Herrmann <D.Herrmann@tu-bs.de>
832
833 * eval.c (s_mixed_body_forms): New static identifier.
834
835 (canonicalize_define, scm_m_define): The check for a bad
836 expression is performed in canonicalize_define now.
837
838 (try_macro_lookup, expand_user_macros, is_system_macro_p): New
839 static helper functions for m_expand_body.
840
841 (m_expand_body): Use ASSERT_SYNTAX to signal syntax errors. Only
842 expand user defined macros. Fixed handling of the definition/
843 expression boundary. Fixed handling of definitions grouped with
844 'begin. Use canonicalize_define to expand definitions.
845
3890131a
MV
8462003-11-13 Marius Vollmer <mvo@zagadka.de>
847
b58e7420
MV
848 * read.c (scm_lreadr): detect EOF after backslash, and interpret
849 \xNN hexadecimal sequences. From Paul Jarc, thanks!
850
5df36eac
MV
851 * snarf.h (SCM_SMOB, SCM_GLOBAL_SMOB, SCM_SMOB_MARK,
852 SCM_GLOBAL_SMOB_MARK, SCM_SMOB_FREE, SCM_GLOBAL_SMOB_FREE,
853 SCM_SMOB_PRINT, SCM_GLOBAL_SMOB_PRINT, SCM_SMOB_EQUALP,
854 SCM_GLOBAL_SMOB_EQUALP, SCM_SMOB_APPLY, SCM_GLOBAL_SMOB_APPLY):
855 New macros from Paul Jarc. Thanks!
856
3890131a
MV
857 * gc_os_dep.c (scm_get_stack_base): Provide a definition that
858 return NULL when the machine type is unknown. Previously,
859 gc_os_dep.c would refuse to compile.
860
430b8401
DH
8612003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
862
863 * eval.c (scm_m_body, m_body, scm_m_lambda, memoize_named_let,
864 scm_m_let, scm_m_letrec, m_expand_body): Renamed static function
865 scm_m_body to m_body.
866
328dc9a3
DH
8672003-11-09 Dirk Herrmann <D.Herrmann@tu-bs.de>
868
869 * eval.c, eval.h (scm_m_expand_body, m_expand_body): Deprecated
870 public use of scm_m_expand_body in eval.h. In eval.c, renamed
871 scm_m_expand_body to m_expand_body and made it static. Added
872 deprecated wrapper scm_m_expand_body.
873
874 (scm_eval_body, SCM_CEVAL, SCM_APPLY): Use m_expand_body instead
875 of scm_m_expand_body.
876
c2337a61
KR
8772003-11-09 Kevin Ryde <user42@zip.com.au>
878
879 * dynl.c (scm_dynamic_unlink): Need scm_list_1 on error message
880 argument. Reported by Mike Gran.
881
ced8edb0
DH
8822003-11-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
883
884 * eval.c (s_missing_body_expression): New static identifier.
885
886 (s_body): Removed.
887
888 (scm_m_expand_body): Fixed core dump when passing a body with
889 defines, but without expressions (see additions to syntax.test).
890 Use ASSERT_SYNTAX to signal syntax errors.
891
0f572ba7
DH
8922003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
893
894 * eval.c (canonicalize_define): New static helper function.
895
896 (memoize_define, canonicalize_define): Extract handling of
897 function currying to canonicalize_define.
898
2510c810
DH
8992003-11-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
900
901 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
902 Make sure that error checking in debug mode is not worse than in
903 standard mode.
904
34adf7ea
DH
9052003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
906
907 * eval.c (scm_m_body, scm_m_lambda): Documentation strings are not
908 handled in scm_m_body any more, but rather in scm_m_lambda.
909
910 (scm_m_body, memoize_named_let, scm_m_let, scm_m_letstar,
911 scm_m_letrec, scm_m_expand_body): Check for validity is done by
912 calling functions of scm_m_body.
913
914 (scm_m_lambda): Avoid unnecessary consing when creating the
915 memoized code.
916
89bff2fc
DH
9172003-11-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
918
919 * eval.c (s_expression): Added comment.
920
921 (s_empty_combination, error_unbound_variable): New static
922 identifiers.
923
924 (SCM_VALIDATE_NON_EMPTY_COMBINATION, SCM_EVALIM2, scm_lookupcar1):
925 Use ASSERT_SYNTAX, syntax_error or error_unbound_variable to
926 signal syntax errors.
927
928 (SCM_CEVAL): Separated handling of evaluator bytecodes and other
929 scheme objects.
930
60a49842
DH
9312003-10-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
932
933 * eval.c (unmemocar, sym_three_question_marks, scm_unmemocar):
934 Grouped together with unmemocopy, without modifications.
935
936 (build_binding_list, unmemocopy): Renamed names of list arguments
937 and variables to reflect the actual order of the list elements.
938
70c1c108
DH
9392003-10-22 Dirk Herrmann <D.Herrmann@tu-bs.de>
940
941 * eval.c (s_defun): New static identifier.
942
943 (scm_m_nil_cond, scm_m_atfop, scm_m_undefine): Add comments. Use
944 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
945 when creating the memoized code.
946
0ee39677
KR
9472003-10-19 Kevin Ryde <user42@zip.com.au>
948
949 * numbers.c (scm_ash): Revise docstring as per recent update to manual.
950
951 * numbers.c (scm_i_big2dbl): Rewrite, carefully rounding to "closest"
952 in accordance with R5RS, which just mpz_get_d doesn't really give.
953
9a848baf
DH
9542003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
955
956 * eval.c (s_bad_slot_number): New static identifier.
957
958 (scm_m_atslot_ref, scm_m_atslot_set_x): Use ASSERT_SYNTAX to
959 signal syntax errors. Avoid unnecessary consing when creating the
960 memoized code.
961
da48db62
DH
9622003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
963
964 * eval.c (scm_m_cont, scm_m_at_call_with_values,
965 scm_m_generalized_set_x): Use ASSERT_SYNTAX to signal syntax
966 errors. Avoid unnecessary consing when creating the memoized
967 code.
968
969 (scm_m_generalized_set_x): Let scm_m_set_x handle the R5RS
970 standard case. Make sure line and file information are copied to
971 every created expression.
972
82b3e2c6
DH
9732003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
974
975 * eval.c (scm_m_set_x, scm_m_apply, scm_m_atbind): Use
976 ASSERT_SYNTAX to signal syntax errors. Avoid unnecessary consing
977 when creating the memoized code.
978
979 (scm_m_atbind): Reversed the order, in which the init expressions
980 are stored and executed. The order of execution is now equal to
981 the order in which the initializers of the let-forms are executed.
982 Use check_bindings and transform_bindings.
983
984 (SCM_CEVAL): Eliminated SCM_NIMP in favor of more appropriate
985 !SCM_NULLP. Added some comments.
986
21628685
DH
9872003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
988
989 * eval.c: Sorted include files alphabetically.
990
991 (scm_m_begin): Added comment.
992
993 (scm_m_or): Use ASSERT_SYNTAX to signal syntax errors. Avoid
994 unnecessary consing when creating the memoized code.
995
996 (iqq, scm_m_quasiquote, scm_m_quote): Use ASSERT_SYNTAX to signal
997 syntax errors. Be more specific about the kind of error that was
998 detected.
999
1000 (scm_m_quote, unmemocopy): As an optimization, vector constants
1001 are now inserted unquoted into the memoized code. During
1002 unmemoization the quotes are added again to provide syntactically
1003 correct code.
1004
d6754c23
DH
10052003-10-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
1006
1007 * eval.c (scm_m_let, scm_m_letstar, scm_m_letrec,
1008 scm_m_expand_body, check_bindings): Extracted syntax checking of
1009 bindings to new static function check_bindings.
1010
1011 (scm_m_let, memoize_named_let): Extracted handling of named let to
1012 new static function memoize_named_let.
1013
1014 (transform_bindings, scm_m_let, scm_m_letstar, scm_m_letrec): Use
1015 ASSERT_SYNTAX to signal syntax errors. Be more specific about the
1016 kind of error that was detected. Avoid use of SCM_CDRLOC. Avoid
1017 unnecessary consing when creating the memoized code.
1018
03a3e941
DH
10192003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
1020
1021 * eval.c (s_bad_formals, s_bad_formal, s_duplicate_formal): New
1022 static identifiers.
1023
1024 (s_clauses, s_formals, s_duplicate_formals): Removed.
1025
1026 (scm_m_lambda): Use ASSERT_SYNTAX to signal syntax errors. Be more
1027 specific about the kind of error that was detected. Prepare for
1028 easier integration of changes for separated memoization.
1029
da48db62 10302003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
4610b011
DH
1031
1032 * eval.c (s_duplicate_binding): New static identifier.
1033
1034 (scm_m_case): Call scm_c_memq instead of implementing it inline.
1035
1036 (scm_m_define): Added comment about how we check for duplicate
1037 formals.
1038
1039 (scm_m_do): Added check for duplicate bindings.
1040
1041 (scm_m_if): Use ASSERT_SYNTAX to signal syntax errors. Avoid
1042 unnecessary consing when creating the memoized code.
1043
1044 (scm_c_improper_memq, c_improper_memq, scm_m_lambda): Renamed
1045 scm_c_improper_memq to c_improper_memq, since it is not exported.
1046
1047 (transform_bindings): Call scm_c_memq rather than
1048 scm_c_improper_memq.
1049
1050 (SCM_CEVAL): Simplified handling of SCM_IM_IF forms.
1051
da48db62 10522003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
a954ce1d
DH
1053
1054 * eval.c (s_bad_bindings, s_bad_binding, s_bad_exit_clause): New
1055 static identifiers.
1056
1057 (scm_m_do): Use ASSERT_SYNTAX to signal syntax errors. Be more
1058 specific about the kind of error that was detected. Avoid use of
1059 SCM_CDRLOC. Avoid unnecessary consing when creating the memoized
1060 code, this way also making sure that file name, line number
1061 information etc. remain available.
1062
da48db62 10632003-10-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
8ae95199
DH
1064
1065 * eval.c (memoize_as_thunk_prototype): New static function.
1066
1067 (scm_m_delay, scm_m_future): Use memoize_as_thunk_prototype.
1068 Avoid unnecessary consing when creating the memoized code.
1069
9b9a35b6
KR
10702003-10-12 Kevin Ryde <user42@zip.com.au>
1071
1072 * list.c (scm_append): Track argument number and use in error.
1073
cc56ba80
DH
10742003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
1075
1076 * eval.c (s_missing_expression, s_bad_variable): New static
1077 identifiers.
1078
1079 (scm_m_define): Use ASSERT_SYNTAX to signal syntax errors. Prefer
1080 R5RS terminology for the naming of variables. Be more specific
1081 about the kind of error that was detected. Make sure file name,
1082 line number etc. are added to all freshly created expressions.
1083 Avoid unnecessary consing when creating the memoized code.
1084
609a8b86
DH
10852003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
1086
1087 * eval.c (s_extra_expression, s_misplaced_else_clause,
1088 s_bad_cond_clause, s_missing_recipient): New static identifiers.
1089
1090 (s_extra_case_clause): Removed.
1091
1092 (scm_m_case, scm_m_cond): If a clause appears after an else
1093 clause, report a misplaced else clause.
1094
1095 (scm_m_cond): Use ASSERT_SYNTAX to signal syntax errors. Be more
1096 specific about the kind of error that was detected. Handle bound
1097 'else and '=>. Avoid unnecessary consing when creating the
1098 memoized code.
1099
1100 (scm_m_cond, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
1101 the syntactic keyword 'else and SCM_IM_ARROW to memoize the
1102 syntactic keyword '=>.
1103
58a2510b
DH
11042003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
1105
1106 * eval.c (scm_m_case): Allow empty lists of case labels.
1107
2a6f7afe
DH
11082003-10-11 Dirk Herrmann <D.Herrmann@tu-bs.de>
1109
1110 * tags.h (SCM_IM_ELSE, SCM_IM_ARROW): New memoizer codes.
1111
1112 * print.c (scm_isymnames): Add names for the new memoizer codes.
1113
1114 * eval.c (s_missing_clauses, s_bad_case_clause,
1115 s_extra_case_clause, s_bad_case_labels, s_duplicate_case_label,
1116 literal_p): New static identifiers.
1117
1118 (scm_m_case): Use ASSERT_SYNTAX to signal syntax errors. Be more
1119 specific about the kind of error that was detected. Check for
1120 duplicate case labels. Handle bound 'else. Avoid unnecessary
1121 consing when creating the memoized code.
1122
1123 (scm_m_case, unmemocopy, SCM_CEVAL): Use SCM_IM_ELSE to memoize
1124 the syntactic keyword 'else.
1125
e6729603
DH
11262003-10-10 Dirk Herrmann <D.Herrmann@tu-bs.de>
1127
1128 * eval.c (s_bad_expression, syntax_error_key, syntax_error,
1129 ASSERT_SYNTAX, ASSERT_SYNTAX_2): New static identifiers.
1130
1131 (scm_m_and): Use ASSERT_SYNTAX to signal syntax errors. Avoid
1132 unnecessary consing when creating the memoized code.
1133
9ddeb776
KR
11342003-10-09 Kevin Ryde <user42@zip.com.au>
1135
1136 * numbers.c (scm_inexact_to_exact): Don't depend on what double->long
1137 cast gives for values bigger than a long, or for nan or inf.
1138
df5af69a
DH
11392003-10-08 Dirk Herrmann <D.Herrmann@tu-bs.de>
1140
1141 * smob.h (scm_make_smob_type): Made the declaration match the
1142 definition.
1143
da0e6c2b
MV
11442003-10-07 Marius Vollmer <mvo@zagadka.de>
1145
1146 * goops.c, objects.h, smob.c, smob.h: Make type names char
1147 const * instead of char *. Thanks to Paul Jarc!
1148
591924eb
KR
11492003-10-02 Kevin Ryde <user42@zip.com.au>
1150
ff6ea7b9 1151 * strports.c (scm_call_with_output_string): scm_get_output_string
591924eb
KR
1152 rather than scm_strport_to_string, so as to guard against the port
1153 having been closed by the called procedure. Reported by Nic Ferrier.
1154
f03314f9
DH
11552003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
1156
1157 * numbers.h (SCM_INEXACTP): Removed uses of SCM_TYP16S.
1158
1159 * tags.h, deprecated.h (SCM_TYP16S): Deprecated and moved from
1160 tags.h to deprecated.h.
1161
534c55a9
DH
11622003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
1163
1164 This set of patches introduces a new tc7 code scm_tc7_number for
1165 numbers. Bignums, reals and complex numbers are turned from smobs
1166 into subtypes of scm_tc7_number.
1167
1168 * tags.h (scm_tc7_number): New.
1169
1170 * eq.c (scm_equal_p), eval.c (SCM_CEVAL), evalext.c
1171 (scm_self_evaluating_p), gc-card.c (scm_i_sweep_card), gc-mark.c
1172 (scm_gc_mark_dependencies), goops.c (create_smob_classes), hash.c
1173 (scm_hasher), numbers.c, numbers.h (SCM_NUMP), objects.c
1174 (scm_class_of), print.c (scm_iprin1), smob.c
1175 (scm_smob_prehistory): Don't handle bignums, reals and complex
1176 numbers as subtypes of scm_tc7_smob any more.
1177
1178 * numbers.h, tags.h (scm_tc16_big, scm_tc16_real,
1179 scm_tc16_complex): Moved definitions from tags.h to numbers.h.
1180
29c4382a
DH
11812003-09-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
1182
1183 * numbers.c (scm_make_complex), gc-card.c (scm_i_sweep_card): Use
1184 sizeof (scm_t_complex) to determine the memory size of the
1185 malloc'd area for complex numbers.
1186
47ae1f0e
DH
11872003-09-17 Dirk Herrmann <D.Herrmann@tu-bs.de>
1188
1189 * numbers.c (scm_bigequal): Fixed.
1190
859b6b2f
MV
11912003-09-16 Marius Vollmer <mvo@zagadka.de>
1192
1193 * stime.c (scm_current_time): 'time' does not set errno so don't
1194 use SCM_SYSERROR for reporting errors.
1195
e17d318f
DH
11962003-09-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
1197
1198 This set of patches eliminates the dependency between the
1199 implementation of evaluator specific memoization codes and special
1200 constants like #f, '() etc. ('flags'), which are not evaluator
1201 specific. The goal is to remove definitions of evaluator
1202 memoization codes completely from the public interface. This will
1203 make it possible to experiment more freely with optimizations of
1204 guile's internal representation of memoized code.
1205
1206 * objects.c (scm_class_of): Eliminate dependency on SCM_ISYMNUM.
1207
1208 * print.c (iflagnames): New array, holding the printed names of
1209 guile's special constants ('flags').
1210
1211 (scm_isymnames): Now holds only the printed names of the
1212 memoization codes.
1213
1214 (scm_iprin1): Separate the handling of memoization codes and
1215 guile's special constants.
1216
1217 * tags.h (scm_tc9_flag, SCM_ITAG9, SCM_MAKE_ITAG9, SCM_ITAG9_DATA,
1218 SCM_IFLAGNUM): new
1219
1220 (scm_tc8_char, scm_tc8_iloc, SCM_BOOL_F, SCM_BOOL_T,
1221 SCM_UNDEFINED, SCM_EOF_VAL, SCM_EOL, SCM_UNSPECIFIED, SCM_UNBOUND,
1222 SCM_ELISP_NIL, SCM_IM_DISPATCH, SCM_IM_SLOT_REF,
1223 SCM_IM_SLOT_SET_X, SCM_IM_DELAY, SCM_IM_FUTURE,
1224 SCM_IM_CALL_WITH_VALUES, SCM_IM_NIL_COND, SCM_IM_BIND): Changed
1225 values.
1226
1227 (SCM_IFLAGP): SCM_IFLAGP now only tests for flags.
1228
1229 (SCM_IFLAGP, SCM_MAKIFLAG, SCM_IFLAGNUM): Generalized to use the
1230 tc9 macros and scm_tc9_flag.
1231
eecac806
MV
12322003-09-15 Marius Vollmer <mvo@zagadka.de>
1233
1234 * posix.c (scm_setgroups): Check that the gid list is not too
1235 long. Thanks to Paul Jarc!
1236
22f2cf2d
DH
12372003-09-14 Dirk Herrmann <D.Herrmann@tu-bs.de>
1238
1239 * tags.h: Reduced the number of short instructions from 14 to 13.
1240 The typecode of the former 14th short instruction is now used to
1241 represent long instructions. Changed some comments to reflect
1242 this fact.
1243
1244 (SCM_MAKISYM): ISYMs get a new tc7 code, namely the one that was
1245 previously used by SCM_IM_DEFINE.
1246
1247 (SCM_IM_DEFINE): Turned into a long instruction.
1248
1249 * eval.c (unmemocopy, SCM_CEVAL): Treat SCM_IM_DEFINE as a long
1250 instruction.
1251
1252 * eval.c (SCM_CEVAL): Since characters and iflags have now a tc7
1253 code that is separate from all instructions, one level of dispatch
1254 for long instructions can be eliminated.
1255
1256 * print.c (scm_isymnames): Removed some commented code.
1257
62f548e1
MV
12582003-09-12 Marius Vollmer <mvo@zagadka.de>
1259
97a61c5f
MV
1260 * __scm.h (SCM_FENCE): Use __memory_barrier with the Intel
1261 compiler on IA64.
1262
50e0ba57
MV
1263 * hashtab.h (scm_tc16_hashtable): Added "extern" declaration.
1264
1265 * modules.c (scm_module_reverse_lookup): Check that the obarray
1266 really is a hashtable and do nothing if not.
1267
62f548e1
MV
1268 * inline.h: Use "extern inline" only with GCC. Use "static
1269 inline" else.
1270
0d5e3480
DH
12712003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
1272
1273 * numbers.h (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Removed uses
1274 of SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
1275
1276 * numbers.h, deprecated.h (SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP,
1277 SCM_SLOPPY_COMPLEXP): Deprecated and moved from numbers.h to
1278 deprecated.h.
1279
6b412e91
DH
12802003-09-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
1281
1282 * eq.c (scm_eqv_p, scm_equal_p): Removed uses of
1283 SCM_SLOPPY_INEXACTP, SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
1284
1285 * eq.c (scm_eqv_p, scm_equal_p): Reordered comparisons from
1286 0.0==some_expression to some_expression==0.0. The latter is
1287 better readable. The former is preferred by some people, since it
1288 leads to a compiler error when confusing == with =. However, when
1289 using gcc, a warning will be issued if in an if-statement an
1290 assigment appears. Since many Guile developers are using gcc,
1291 such errors will not remain unnoticed anyway. We can therefore
1292 focus on better readability.
1293
7e3b25bf
DH
12942003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
1295
1296 * tags.h: Added description of Guile's type system. Removed some
1297 old and misleading comments.
1298
3ea39242
DH
12992003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
1300
1301 * unit.c (scm_cvref): Eliminate unnecessary uses of SCM_NIMP,
1302 SCM_SLOPPY_REALP and SCM_SLOPPY_COMPLEXP.
1303
5d7d39ff
DH
13042003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
1305
1306 * numbers.h (SCM_MAKINUM): Define in terms of scm_tc2_int.
1307
1308 (SCM_INEXACTP, SCM_REALP, SCM_COMPLEXP): Define in terms of the
1309 respective SLOPPY macro.
1310
baa84a20
DH
13112003-09-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
1312
1313 * eq.c (scm_equal_p): Use SCM_TYP7 to check if an object is of
1314 type string, not SCM_TYP7S.
1315
ba15f500
KR
13162003-09-03 Kevin Ryde <user42@zip.com.au>
1317
1318 * numbers.c (scm_lognot): Correction to docstring, ones-complement not
1319 2s-complement.
1320
53bb8782
KR
1321 * stime.c (scm_strptime): Add comment about glibc strptime %s and
1322 current timezone requiring SCM_DEFER_INTS.
1323
defdc4b4
NJ
13242003-08-30 Neil Jerram <neil@ossau.uklinux.net>
1325
1326 * script.c (scm_compile_shell_switches): Make -s switch optional
1327 if file to be loaded does not begin with a `-'. (Thanks to Aaron
1328 VanDevender for the patch!)
1329
0f008a15
KR
13302003-08-30 Kevin Ryde <user42@zip.com.au>
1331
1332 * numbers.c (scm_lognot): Rewrite using ~ and mpz_com, for directness
1333 and to have non-integer types rejected as per other logical funcs.
1334
438a3ba1
KR
13352003-08-28 Kevin Ryde <user42@zip.com.au>
1336
1337 * gc.h (scm_remember_upto_here_1): Revise comments on the asm form.
1338
98dceb37
KR
13392003-08-23 Kevin Ryde <user42@zip.com.au>
1340
1341 * simpos.c (scm_system): Remove SCM_DEFER_INTS, system() should be
1342 thread safe, and could take a long time too.
1343
1fa79a38
KR
13442003-08-22 Kevin Ryde <user42@zip.com.au>
1345
1346 * numbers.c (scm_difference): Correction to bignum - negative inum.
1347
d97f9b42
KR
13482003-08-14 Kevin Ryde <user42@zip.com.au>
1349
1350 * gc.h (scm_remember_upto_here_1, scm_remember_upto_here_2)
1351 [__GNUC__]: Use volatile asm macros rather than a function call.
1352 * gc.c (scm_remember_upto_here_1, scm_remember_upto_here_2): Undefine
1353 macros while defining functions.
1354
1355 * simpos.c (getenv): Use <stdlib.h> for prototype.
1356 (scm_system): In docstring, refer to status:exit-val rather than
1357 "functions above".
1358
b9052fcc
KR
13592003-08-09 Kevin Ryde <user42@zip.com.au>
1360
1361 * srcprop.c (scm_source_properties): Return plist from hash if it's a
1362 list set by source-properties! rather than an SRCPROPS object,
1363
8e5b4b9e
KR
13642003-07-29 Kevin Ryde <user42@zip.com.au>
1365
1366 * properties.c (scm_primitive_property_ref): In docstring, note
1367 parameters to not-found-proc, use hyphens rather than underscores for
1368 that parameter name.
1369 (scm_primitive_property_set_x): In docstring, VAL is the value
1370 parameter not CODE.
1371
20703ac4
MV
13722003-07-27 Marius Vollmer <mvo@zagadka.de>
1373
c6ccee34
MV
1374 * print.c (scm_print_symbol_name): handle more weird characters by
1375 escaping the symbol name properly. Thanks to Paul Jarc!
1376
2f4931bf
MV
1377 * posix.h (scm_setgroups): New prototype.
1378 * posix.c (scm_setgroups): New. Thanks to Paul Jarc!
1379 (scm_getgroups): Handle groups ids that don't fit into a fixnum.
1380 Don't use SCM_WRITABLE_VELTS.
1381
265c456f
MV
1382 * gc.h (SCM_GC_SET_CELL_BVEC): New.
1383 * gc-card.c (scm_i_init_card_freelist): Use it. Thanks to
1384 Matthias Koeppe!
1385
20703ac4
MV
1386 * __scm.h (SCM_C_INLINE_KEYWORD): New.
1387 * numbers.c: Use it in place of SCM_C_INLINE so that the code
1388 compiles when SCM_C_INLINE is undefined.
1389
59c4bb82
DH
13902003-07-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
1391
1392 * __scm.h: Reformulated the architecture and compiler properties
1393 in terms of properties of scm_t_bits and SCM variables rather than
1394 in terms of c standard types. This is since it is not known which
1395 of the standard types scm_t_bits and SCM variables will be defined
1396 to.
1397
d7850c8d
KR
13982003-07-24 Kevin Ryde <user42@zip.com.au>
1399
1400 * numbers.c (scm_angle): Use scm_flo0 for non-negative inum, bignum
1401 and real.
1402
8a0c514f
KR
14032003-07-18 Kevin Ryde <user42@zip.com.au>
1404
1405 * numbers.c (scm_product): In complex * bignum, correction to
1406 REAL/IMAG fetch, x is the complex, not y.
1407
0aacf84e
MD
14082003-07-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1409
1410 * numbers.c (scm_odd_p, scm_even_p): Bugfix: Treat result of
1411 scm_inf_p test as Scheme values.
1412 (scm_sum): Bugfix: Normalize bignum created from a negative bignum
1413 and a positive inum.
1414 Use GNU indentation style.
1415
192de9a4
DH
14162003-07-12 Dirk Herrmann <D.Herrmann@tu-bs.de>
1417
1418 * values.c (scm_values): Build lists of length 1 by using
1419 scm_list_1 instead of using scm_cons.
1420
bbb4438a
KR
14212003-07-10 Kevin Ryde <user42@zip.com.au>
1422
b58c85ce
KR
1423 * deprecation.c (scm_c_issue_deprecation_warning_fmt): Add va_end.
1424 * list.c (scm_list_n): Ditto.
1425
bbb4438a
KR
1426 * gc-malloc.c (scm_gc_realloc): Define "ptr" at start of function.
1427
287f8ad1
KR
14282003-07-08 Matthias Koeppe <mkoeppe@merkur.math.uni-magdeburg.de>
1429
1430 * tags.h (scm_t_bits, scm_t_signed_bits, etc): Avoid solaris empty
1431 defines of INTPTR_MAX and UINTPTR_MAX, combine conditionals for
1432 scm_t_bits and scm_t_signed_bits to avoid any chance of one and not
1433 the other using intptr_t.
1434
005d2366
KR
14352003-07-08 Kevin Ryde <user42@zip.com.au>
1436
0aacf84e 1437 * numbers.c (scm_make_polar): Use sincos, when available.
005d2366
KR
1438 (scm_magnitude): Use hypot.
1439
1440 * ports.c (scm_char_ready_p, scm_peek_char): In docstrings, don't use
1441 @footnote since it doesn't go through to guile-procedures.txt.
1442
1443 * threads.c (scm_call_with_new_thread): In docstring, use "( )"
1444 outside @var to quieten makeinfo, and use @code.
1445
cbfe8e62
HWN
14462003-07-06 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1447
1448 * gc-malloc.c (decrease_mtrigger): new function
1449 (increase_mtrigger): new function, separate debug registering and
1450 mtrigger administration.
1451 (scm_gc_realloc): bugfix: do mtrigger administration before the
1452 actual realloc, for the realloc might invalidate a GC-d segment of
1453 memory. Thanks to Sam Hocevar for pointing this out.
1454 (scm_gc_realloc): use scm_malloc_reregister instead of
1455 unregistering and registering in sequence.
1456
aeb4c2e1
HWN
14572003-07-03 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1458
1459 * __scm.h (SCM_ASSERT): change "else" expansion to "do { } while (0)"
1460
4c27f8d2
HWN
14612003-07-02 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1462
1463 * __scm.h (SCM_ASRTGO): add "else" to macro expansions with if
1464 clauses.
1465
983e697d
MV
14662003-06-29 Marius Vollmer <mvo@zagadka.de>
1467
1468 * deprecated.h (SCM_OPDIRP, scm_fport, scm_option, scm_srcprops,
1469 scm_srcprops_chunk, scm_info_frame, scm_stack, scm_array,
1470 scm_array_dim, SCM_ARRAY_CONTIGUOUS, SCM_FUNC_NAME, SCM_WTA,
1471 RETURN_SCM_WTA, SCM_VALIDATE_NUMBER_COPY,
1472 SCM_VALIDATE_NUMBER_DEF_COPY, SCM_VALIDATE_OPDIR): Re-added from
1473 the release_1_6 branch.
1474
78b6566e
SJ
14752003-06-25 Stefan Jahn <stefan@lkcc.org>
1476
1477 * continuations.c: Redeclaration of getcontext() via the
1478 __asm__ ("getcontext") directive.
1479
1480 * continuations.h: Include <ucontext.h> instead of
1481 <sys/ucontext.h>.
1482
1ebb8497
KR
14832003-06-21 Kevin Ryde <user42@zip.com.au>
1484
1485 * numbers.c (_GNU_SOURCE): #define, to get C99 things.
1486 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, $asinh, $acosh,
1487 $atanh, truncate): Use C library asinh, acosh, atanh and trunc, when
1488 available.
1489 (scm_inexact_to_exact): Expand isfinite to its definition !xisinf.
1490 (isfinite): Remove, conflicts with C99 isfinite().
1491
fbf85ba4
MV
14922003-06-19 Marius Vollmer <mvo@zagadka.de>
1493
1494 * deprecated.h, deprecated.c (scm_strhash, scm_sym2ovcell_soft,
1495 scm_sym2ovcell, scm_intern_obarray_soft, scm_intern_obarray,
1496 scm_symbol_value0, scm_string_to_obarray_symbol scm_intern_symbol,
1497 scm_unintern_symbol, scm_symbol_binding, scm_symbol_interned_p,
1498 scm_symbol_bound_p, scm_symbol_set_x, scm_gentemp): Re-added from
1499 the release_1_6 branch.
1500
fcc5d734
SJ
15012003-06-14 Stefan Jahn <stefan@lkcc.org>
1502
1503 * threads.h: Redefined scm_getspecific() and scm_setspecific()
1504 to be functions instead of macros.
1505
1506 * threads.c: Conditionalized inclusion of <sys/time.h> and
1507 <unistd.h>.
1508 (scm_getspecific, scm_setspecific): Made these two function
1509 real part of the API.
1510
1511 * posix.c (s_scm_putenv): Added some code to make a
1512 (putenv "FOO="), i.e. setting an empty string, work also on
1513 Win32 systems. Thanks to Kevin Ryde for the proposal.
1514
c3ae8e07
KR
15152003-06-12 Kevin Ryde <user42@zip.com.au>
1516
75b14838
KR
1517 * posix.c (scm_putenv): Free temporary ptr in mingw unset. Add
1518 freebsd to comment about need to use unsetenv.
c3ae8e07 1519
9d9fa092
MV
15202003-06-02 Marius Vollmer <mvo@zagadka.de>
1521
1522 * ports.c (scm_peek_char): Safe the column of the port around the
1523 getc/ungetc calls. Thanks to Dr. Peter Ivanyi!
1524
f2478375
KR
15252003-06-07 Kevin Ryde <user42@zip.com.au>
1526
1527 * tags.h: Use inttypes.h and stdint.h when available, for INTPTR_MAX
1528 and friends required by scm_t_bits setups.
1529
6375e040
DH
15302003-06-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
1531
1532 * tags.h (scm_tc2_int): Added.
1533
1534 * tags.h (scm_tc3_int_1, scm_tc3_int_2): Expressed in terms of
1535 scm_tc2_int.
1536
1537 * tags.h (scm_tcs_cons_imcar, scm_tcs_cons_nimcar, scm_tcs_struct,
1538 scm_tcs_closures): Hard coded values replaced by symbolic ones.
1539
f5c6ec2f
DH
15402003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
1541
1542 * eval.c: Partially undid my patch from 2003-05-31. This patch
1543 caused the segfault referenced in the previous changelog entry.
1544
47dbd81e
DH
15452003-06-05 Dirk Herrmann <D.Herrmann@tu-bs.de>
1546
1547 * tags.h: Fixed comment about the immediate type code layout.
1548
1549 * eval.c: Fixed handling of non-special instructions. Without
1550 this patch, guile will segfault on (#\0) and similar instructions.
1551
3ec52c51
KR
15522003-06-05 Kevin Ryde <user42@zip.com.au>
1553
1554 * numbers.c (scm_max, scm_min): For inum, bignum and real, if other
1555 operand is NaN, then return NaN. Also avoid passing NaN to mpz_cmp_d.
1556
e418bd7c
KR
1557 * read.c (scm_input_error): Pass arg list parameter to scm_error_scm,
1558 rather than SCM_EOL. Needed by "Unknown # object" case in scm_lreadr.
1559
d0624e39
DH
15602003-06-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
1561
1562 * __scm.h, gc-card.c (SCM_DEBUG_DEBUGGER_SUPPORT,
1563 SCM_DEBUG_DEBUGGING_SUPPORT): Renamed macro
1564 SCM_DEBUG_DEBUGGER_SUPPORT to SCM_DEBUG_DEBUGGING_SUPPORT and
1565 generalized it to apply not only to C level functions but also to
1566 scheme level functions.
1567
1568 * debug.c, debug.h, eval.c (make-iloc, scm_make_iloc, iloc?,
1569 scm_iloc_p, dbg-make-iloc, scm_dbg_make_iloc, dbg-iloc?,
1570 scm_dbg_iloc_p): Moved functions scm_make_iloc, scm_iloc_p to
1571 eval.c, made them available under SCM_DEBUG_DEBUGGING_SUPPORT == 1
1572 only and renamed them to scm_dbg_make_iloc, scm_dbg_iloc_p,
1573 respectively.
1574
1575 * deprecated.h, eval.c, eval.h (SCM_ILOC00, SCM_IDINC,
1576 SCM_IDSTMSK): Deprecated. The macro definitions are moved from
1577 eval.h into eval.c and a copy is placed into deprecated.h.
1578
1579 * eval.c, eval.h (SCM_MAKE_ILOC): Removed from eval.h and placed
1580 into eval.c. This definition was not part of the API in any
1581 officially released version of guile and thus does not need to go
1582 through a phase of deprecation.
1583
e90c3a89
DH
15842003-06-02 Dirk Herrmann <D.Herrmann@tu-bs.de>
1585
d0624e39
DH
1586 * deprecated.c, deprecated.h, eval.c, eval.h (scm_s_expression,
1587 scm_s_test, scm_s_body, scm_s_bindings, scm_s_variable,
1588 scm_s_clauses, scm_s_formals): Deprecated. In eval.c the
e90c3a89
DH
1589 definitions are make static and renamed from scm_s_xxx to s_xxx.
1590 In deprecated.c the original definitions are copied.
1591
d0624e39
DH
1592 * deprecated.h, eval.c, eval (SCM_EVALIM2, SCM_EVALIM, SCM_XEVAL,
1593 SCM_XEVALCAR): Deprecated. The macro definitions are moved from
e90c3a89
DH
1594 eval.h into eval.c and a copy (slightly modified to work in user
1595 code) is placed into deprecated.h.
1596
1597 * eval.c: Use the local static s_xxx definitions instead of the
1598 scm_s_xxx definitions throughout.
1599
14b18ed6
DH
16002003-06-01 Dirk Herrmann <D.Herrmann@tu-bs.de>
1601
1602 This set of patches separates the representation of the cxr family
1603 of functions (car, cdr etc.) from the dsubr family of functions
1604 (i. e. functions that take a double precision floating point
1605 argument). Further, the algorithm for handling the cxr function
1606 is improved.
1607
1608 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_1), numbers.c
1609 (scm_asinh, scm_acosh, scm_atanh, scm_truncate, scm_round, floor,
1610 ceil, sqrt, fabs, exp, log, sin, cos, tan, asin, acos, atan, sinh,
1611 cosh, tanh), objects.c (scm_class_of), procprop.c
1612 (scm_i_procedure_arity), ramap.c (scm_array_map_x), tags.h
1613 (scm_tc7_dsubr, scm_tcs_subrs): Introduce scm_tc7_dsubr as new
1614 typecode for the dsubr family of functions.
1615
1616 * ramap.c (ramap_cxr, ramap_dsubr): Renamed ramap_cxr to
1617 ramap_dsubr.
1618
1619 * eval.c (SCM_CEVAL, SCM_APPLY, call_cxr_1), pairs.c
1620 (scm_init_pairs): Make use of the (now usable) second cell element
1621 of a scm_tc7_cxr function to implement the cxr family of functions
1622 more efficiently.
1623
2ca0d207
DH
16242003-05-31 Dirk Herrmann <D.Herrmann@tu-bs.de>
1625
1626 * eval.c (SCM_CEVAL, SCM_APPLY, scm_trampoline_0,
1627 scm_trampoline_1, scm_trampoline_2): Postpone error cases to the
1628 end of an if-else-if-sequence of checks.
1629
9a069bdd
DH
16302003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
1631
1632 * eval.c (SCM_CEVAL): Improved readability of call-with-values
1633 execution. Generalize apply_closure to apply_proc and use that
1634 for call-with-values.
1635
e910e9d2
DH
16362003-05-30 Dirk Herrmann <D.Herrmann@tu-bs.de>
1637
1638 * eval.c (SCM_CEVAL): Avoid one level of indirection when applying
1639 a non closure.
1640
1e498fbd
SJ
16412003-05-30 Stefan Jahn <stefan@lkcc.org>
1642
1643 * posix.c (s_scm_putenv): Use the new HAVE_UNSETENV
1644 appropriately for mingw32 hosts.
1645
1646 * numbers.h: Defining copysign(), isnan() and finite() to
1647 be prefixed by a single '_' for mingw32 hosts.
1648
c47e2599
KR
16492003-05-30 Kevin Ryde <user42@zip.com.au>
1650
1651 * numbers.c (z_negative_one): New variable.
1652 (scm_init_numbers): Initialize it.
1653 (scm_logcount): Use it and mpz_hamdist to count zeros for negatives.
1654
2e945bcc
SJ
16552003-05-29 Stefan Jahn <stefan@lkcc.org>
1656
1657 * win32-dirent.c: Use malloc() instead of scm_malloc().
1658
1659 * stime.c (s_scm_strftime): Add a type cast to avoid compiler
1660 warning.
1661
1662 * posix.c (s_scm_putenv): Disable use of unsetenv() for the
1663 mingw32 build.
1664
1665 * modules.c (s_scm_module_import_interface): Renamed local
1666 variable interface to _interface. Seems like 'interface'
1667 is a special compiler directive for the mingw32 compiler.
1668
1669 * mkstemp.c: Provide prototype to avoid compiler warning.
1670
1671 * load.c (s_scm_search_path): Fixed absolute and relative
1672 path detections for native Windows platforms.
1673
1674 * gc.h, threads.h: Export some more symbols using SCM_API (necessary
1675 to build on mingw32).
1676
1677 * gc-freelist.c ("s_scm_map_free_list",
1678 "s_scm_gc_set_debug_check_freelist_x"): Fixed use of FUNC_NAME.
1679
1680 * fports.c (fport_fill_input): Disable use of
1681 fport_wait_for_input() on Win32 platforms.
1682
1683 * filesys.c (s_scm_basename): Fixed __MINGW32__ code.
1684
1685 * Makefile.am: Modified some rules for cross compiling.
1686
ddd8f927
DH
16872003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
1688
1689 * eval.c (SCM_CEVAL): In case of an application, all checks for a
1690 proper function object and the correct number of arguments are now
1691 performed in the application part of SCM_CEVAL.
1692
1693 (scm_badformalsp): Removed.
1694
f8ba2197
DH
16952003-05-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
1696
1697 * deprecated.c (scm_read_and_eval_x): Fixed C99-ism.
1698
79f55b7c
MD
16992003-05-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1700
a502595f
MD
1701 * num2integral.i.c (NUM2INTEGRAL): Avoid warning about conditional
1702 always being false by inserting preprocessor conditional. (Thanks
1703 to Bruce Korb.)
1704
79f55b7c
MD
1705 * __scm.h (SCM_STACK_PTR): New macro. (Cast argument through
1706 (void *) in order to avoid an aliasing warning; thanks to Bruce
1707 Korb.)
1708
1709 * stackchk.h (SCM_STACK_OVERFLOW_P): Use SCM_STACK_PTR.
1710
1711 * threads.c (suspend, launch_thread, scm_threads_mark_stacks): Use
1712 SCM_STACK_PTR.
1713
1714 * threads.c (scm_threads_mark_stacks): Bugfix: Changed
1715 thread->base --> t->base.
1716
1717 * eval.c (SCM_CEVAL): Don't cast argument of SCM_STACK_OVERFLOW_P.
1718
47dee228
MV
17192003-05-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1720
1721 * deprecated.h, deprecated.c (scm_makstr, scm_makfromstr,
1722 scm_variable_set_name_hint, scm_builtin_variable,
1723 scm_internal_with_fluids, scm_make_gsubr,
1724 scm_make_gsubr_with_generic, scm_create_hook, SCM_LIST0,
1725 SCM_LIST1, SCM_LIST2, SCM_LIST3, SCM_LIST4, SCM_LIST5, SCM_LIST6,
1726 SCM_LIST7, SCM_LIST8, SCM_LIST9, scm_listify, scm_sloppy_memq,
85494587
MV
1727 scm_sloppy_memv, scm_sloppy_member, scm_read_and_eval_x,
1728 scm_subr_entry, SCM_SUBR_DOC, scm_make_subr,
1729 scm_make_subr_with_generic, scm_make_subr_opt,
1730 scm_call_catching_errors, scm_make_smob_type_mfpe,
1731 scm_set_smob_mfpe, scm_strprint_obj, scm_read_0str, scm_eval_0str,
1732 SCM_CHARS, SCM_UCHARS, SCM_LENGTH): Re-added from the release_1_6
1733 branch. Some have been slightly rewritten.
1734 (scm_i_object_chars, scm_i_object_length): New, to support
1735 SCM_CHARS, SCM_UCHARS, and SCM_LENTH.
1736
e681d187
DH
17372003-05-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
1738
1739 * eval.c (scm_m_do, unmemocopy, SCM_CEVAL): Reversed order of
1740 names and inits in the memoized code of do.
1741
7e59d9d4
MD
17422003-05-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1743
1744 * c-tokenize.lex (yyget_lineno, yyget_in, yyget_out, yyget_leng,
1745 yyget_text, yyset_lineno, yyset_in, yyset_out, yyget_debug,
1746 yyset_debug, yylex_destroy): Added prototypes (otherwise we'll get
1747 a compilation error if error-on-warning is enabled).
1748
9950a42c
MV
17492003-05-17 Marius Vollmer <mvo@zagadka.de>
1750
1751 * c-tokenize.lex: Gobble up complete lines after a '#'. This
1752 removes preprocessor directives from the snarfage that might
1753 otherwise confuse us. These directives appear when compiling with
1754 "-g3", for example.
1755
0068984b
HWN
17562003-05-16 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1757
26e68795
HWN
1758 * ChangeLog: add my surname
1759
0068984b
HWN
1760 * srcprop.c (scm_finish_srcprop): use
1761 scm_gc_register_collectable_memory()
1762 (scm_make_srcprops): idem.
1763
131805f0
HWN
17642003-05-14 Han-Wen Nienhuys <hanwen@cs.uu.nl>
1765
1766 * gc-malloc.c (scm_gc_register_collectable_memory): avoid
1767 wrap-around for scm_mtrigger
1768 (scm_gc_register_collectable_memory): abort on overflowing
1769 scm_mallocated().
1770
d4611024
KR
17712003-05-13 Kevin Ryde <user42@zip.com.au>
1772
1773 * numbers.c (xmpz_cmp_d): New macro, handling infs if gmp doesn't.
1774 (scm_num_eq_p, scm_less_p, scm_max, scm_min): Use it.
1775
7aaf8dc9
MD
17762003-05-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1777
dfd03fb9
MD
1778 * backtrace.c (scm_display_error_message): Introduced fancy
1779 printing with max level 7 and length 10. (Purpose: avoid printing
1780 gigantic objects in error messages.)
1781
1782 * print.c, print.h (scm_i_port_with_print_state): New function.
1783
1784 * print.c (scm_iprin1, scm_printer_apply,
1785 scm_port_with_print_state): Use scm_i_port_with_print_state.
1786 (scm_simple_format): Modified not to destroy print states.
1787 (print_state_mutex): New mutex.
1788 (scm_make_print_state, scm_free_print_state, scm_prin1):
1789 Lock/unlock print_state_mutex.
1790
7aaf8dc9
MD
1791 * deprecated.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK):
1792 Use current names in definitions.
1793
a4d9ffa1
KR
17942003-05-10 Kevin Ryde <user42@zip.com.au>
1795
1796 * numbers.c (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d.
1797
d25e96a4
KR
1798 * numbers.c (scm_integer_length): On negative bignums, adjust
1799 mpz_sizeinbase to account for it looking at absolute value where we
1800 want ones-complement.
1801
1802 * numbers.c (scm_gcd): In bignum/inum, don't pass yy==0 to mpz_gcd_ui
1803 since we're only using the ulong return value, and x might not fit.
1804
5bf6a6f0
DH
18052003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
1806
1807 * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to
1808 read. This will allow to make the definition in read.c static.
1809
f58c472a
DH
18102003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de>
1811
1812 * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved
1813 from evalext to eval. This will allow to make some of the
1814 definitions in eval.c static.
1815
90382aeb
KR
18162003-05-06 Kevin Ryde <user42@zip.com.au>
1817
1818 * numbers.c (scm_difference): In inum - bignum, handle negative inum.
1819 (scm_logcount): Use mpz_com, not mpz_neg.
1820
3b88ed2a
DH
18212003-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de>
1822
1823 The purpose of this patch is to make guile's internal memoizers
1824 distinguishable from memoizing macros created on the scheme level
1825 or from user provided primitive memoizing macros. The reason is,
1826 that the internal memoizers are the only ones that are allowed to
1827 transform their scheme input into memoizer byte code, while all
1828 other memoizing macros may only transform scheme code into new
1829 scheme code.
1830
1831 To achieve this, a new macro type 'builtin-macro!' is introduced.
1832 Currently, 'builtin-macro!'s are handled as memoizing macros, but
1833 this will change when the memoizer and executor are separated.
1834
1835 * macros.[ch] (scm_i_makbimacro): New.
1836
1837 * macros.h (SCM_BUILTIN_MACRO_P): New.
1838
1839 * macros.c (macro_print, scm_macro_type): Support builtin-macro!s.
1840
1841 * eval.c, goops.c: All of guile's primitive memoizing macros are
1842 primitive builtin-macros now.
1843
1844 * eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive
1845 builtin-macros are handled equally to memoizing macros.
1846
b0780eb1
MV
18472003-05-04 Marius Vollmer <mvo@zagadka.de>
1848
1849 * throw.c (scm_ithrow): Remove "asm volatile" hack. It used to
1850 work around a bug in GCC 2.95.2 but is now a bug in itself.
1851
1cbf4fe9
MV
18522003-05-02 Marius Vollmer <mvo@zagadka.de>
1853
1854 * deprecated.h (scm_rstate, scm_rng, SCM_SLOPPY_CONSP,
1855 SCM_SLOPPY_NCONSP, scm_tc7_ssymbol, scm_tc7_msymbol,
1856 scm_tcs_symbols): New.
1857
1a61d41b
MV
18582003-04-30 Marius Vollmer <marius.vollmer@uni-dortmund.de>
1859
096ecbaf
MV
1860 * deprecated.h, deprecated.c (scm_protect_object,
1861 scm_unprotect_object, SCM_SETAND_CAR, SCM_SETOR_CAR,
1862 SCM_SET_AND_CDR, SCM_SET_OR_CDR, SCM_FREEP, SCM_NFREEP,
1863 SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16,
1864 SCM_GCCDR, scm_remember, scm_the_root_module, scm_make_module,
1865 scm_ensure_user_module, scm_load_scheme_module, scm_port,
1866 scm_ptob_descriptor, scm_port_rw_active,
1867 scm_close_all_ports_except): New.
1868
1a61d41b
MV
1869 * ports.c (scm_c_port_for_each): New function, mostly copied from
1870 scm_port_for_each.
1871 (scm_port_for_each): Reimplemented using scm_c_port_for_each.
1872 * ports.h (scm_c_port_for_each): New prototype.
1873
c8e1d354
MD
18742003-04-28 Mikael Djurfeldt <djurfeldt@nada.kth.se>
1875
1876 * eval.c (scm_m_atdispatch): Removed until actually needed. (This
1877 macro was introduced in anticipation of GOOPS method compilation
1878 code.)
1879
1880 * goops.c: Removed binding of @dispatch.
1881
a4aa2134
DH
18822003-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de>
1883
1884 * eval.c, goops.c (@dispatch, @slot-ref, @slot-set!): Move the
1885 instructions that bind the macros on the scheme level back to
1886 goops.c in order to make sure again that the bindings go into the
1887 (oop goops) module and are not visible from the outside.
1888
9fbee57e
DH
18892003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
1890
1891 * eval.c: Non functional change: Separated R5RS and non-R5RS
1892 macros into different sections of the file and ordered the
1893 memoizers alphabetically.
1894
12841895
DH
18952003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
1896
1897 * eval.c (scm_ilookup): Rewritten to improve readability.
1898
6a3f13f0
DH
18992003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de>
1900
1901 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
1902 Partially reverted patch from 2003-04-23 in oder to find a better
1903 compromise between readability and debuggability.
1904
b0c5d67b
DH
19052003-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de>
1906
1907 * eval.c, eval.h, goops.c, goops.h (scm_m_atslot_ref,
1908 scm_m_atslot_set_x, scm_m_atdispatch): Move the declarations and
1909 definitions of the special goops memoizers from goops.[ch] to
1910 eval.[ch]. Hmm... it seems that scm_m_atdispatch is not used
1911 throughout guile.
1912
b9ad392e
MD
19132003-04-24 Mikael Djurfeldt <mdj@kvast.blakulla.net>
1914
1915 * ports.c, ports.h (scm_i_port_table_mutex): New mutex.
1916
1917 * fports.c (scm_evict_ports): Lock/unlock scm_i_port_table_mutex.
1918
1919 * ports.c (scm_close_port, scm_flush_all_ports): Ditto.
1920
1921 * ioext.c (scm_fdes_to_ports): Ditto.
1922
1923 * vports.c (scm_make_soft_port): Changed SCM_DEFER/ALLOW_INTS into
1924 lock/unlock scm_i_port_table_mutex.
1925
1926 * strports.c (scm_mkstrport): Ditto.
1927
1928 * ports.c (scm_void_port, scm_port_for_each): Ditto.
1929
1930 * fports.c (scm_fdes_to_port): Ditto.
1931
d0b07b5d
DH
19322003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
1933
1934 This set of patches contains no functional changes, only debatable
1935 minor stylistic ones. Still, in order to prepare a patch between
1936 my local copy and the CVS version, I decided to submit the changes
1937 below. Then, the patch will hopefully only contain relevant
1938 modifications :-)
1939
1940 * eval.c (iqq): Added const specifier.
1941
1942 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
1943 Use NULL instead of 0 to indicate that a pointer is returned.
1944 Removed some misleading 'fall through' comments.
1945
1946 * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2):
1947 Split up long expressions into smaller ones to be more debugging
1948 friendly.
1949
a98e8e98
DH
19502003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
1951
1952 * eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR,
1953 SCM_EXIT_FRAME_HDLR): Use SCM_PACK to convert data to a SCM value
1954 rather than casting to SCM.
1955
c178c3a6
DH
19562003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
1957
1958 * sort.c, pairs.h: Removed unnecessary includes.
1959
d339981a
DH
19602003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de>
1961
1962 * sort.c: Replaced hand-made trampline code by the new official
1963 mechanism from eval.c. This fixes a segfault in the new test file
1964 sort.test.
1965
1966 (quicksort, compare_function, scm_restricted_vector_sort_x,
1967 scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x,
1968 scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x,
1969 scm_merge_vector_step, scm_stable_sort_x, scm_stable_sort,
1970 scm_sort_list_x, scm_sort_list): Use trampoline mechanism from
1971 eval.c.
1972
1973 (subr2less, lsubrless, closureless, applyless, scm_cmp_function,
1974 cmp_fun_t): Removed.
1975
1976 (compare_function): Added.
1977
1978 * sort.c (quicksort, SWAP, stack_node): Replaced pointer
1979 arithmetics with index arithmetics. Changed quicksort to work on
1980 an array of SCM values instead of an array of characters. Avoid
1981 bytewise copying of SCM elements. Avoid allocating memory on the
1982 stack with alloca. Fixed some comments.
1983
821f18a4
DH
19842003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
1985
1986 * eval.c (EXTEND_ENV): Eliminated.
1987
1988 (unmemocopy, SCM_CEVAL, SCM_APPLY): Use SCM_EXTEND_ENV instead of
1989 EXTEND_ENV.
1990
94fb5a6e
DH
19912003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
1992
1993 * __scm.h (SCM_DEBUG_DEBUGGER_SUPPORT): New compile-time option.
1994
1995 * gc.card.c (scm_gc_marked_p): Fixed compiler warning when
1996 compiling with SCM_DEBUG==1 by moving definition behind prototype.
1997
1998 * gc.card.c (scm_dbg_t_list_cell, scm_dbg_t_double_cell,
1999 scm_dbg_gc_marked_p, scm_dbg_gc_get_card, scm_dbg_gc_get_bvec,
2000 scm_t_list_cell_struct, scm_t_list_cell, scm_t_double_cell,
2001 scm_gc_marked_p, scm_gc_get_card, scm_gc_get_bvec): Fixed
2002 functions such that they check if the object is a non-immediate.
2003 Further, renamed identifiers to use the scm_dbg_ prefix and made
2004 their inclusion into the lib dependent of the
2005 SCM_DEBUG_DEBUGGER_SUPPORT compile time option.
2006
fce0b22d
DH
20072003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
2008
2009 * __scm.h: Fixed comment about the SCM_DEBUG_TYPING_STRICTNESS
2010 debug option.
2011
1685446c
DH
20122003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
2013
821f18a4 2014 * list.c (scm_ilength, scm_last_pair), unif.c (l2ra): Prefer
1685446c
DH
2015 !SCM_CONSP over SCM_NCONSP. Now, guile itself does not include
2016 any calls to SCM_NCONSP any more.
2017
2018 * unif.c (l2ra): Eliminate redundant check.
2019
9ff1720f
DH
20202003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
2021
2022 * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product,
2023 scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over
2024 SCM_NNULLP. Now, guile itself does not include any calls to
2025 SCM_NNULLP any more.
2026
05b15362
DH
20272003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
2028
2029 * eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each,
2030 scm_copy_tree): Place assignment expressions which are part of
2031 other expressions into an expression of their own.
2032
0c88d7df
DH
20332003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de>
2034
2035 * goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't
2036 compare SCM values with !=.
2037
5cb22e96
DH
20382003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
2039
2040 * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter,
2041 scm_m_generalized_set_x, scm_init_evalext): Move the declaration
2042 and definition of the memoizer for the generalized set! macro from
2043 evalext.[ch] to eval.[ch]. Use the SCM_SYNTAX snarfer macro to
2044 define the macro object.
2045
2046 * eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x,
2047 scm_m_generalized_set_x): Since now scm_s_set_x is only used in
2048 eval.c, it is made static and renamed to s_set_x.
2049
2050 * evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo>
2051 over SCM_N<foo>.
2052
a44a9715
DH
20532003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
2054
2055 * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds,
2056 scm_init_eval): Made scm_undefineds static in eval.c, renamed it
2057 to undefineds and registered the object as a permanent object.
2058
2059 * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply
2060 static in eval.c, renamed it to f_apply and registered the object
2061 as a permanent object.
2062
1b43d24c
DH
20632003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
2064
5cb22e96 2065 * eval.c (SCM_BIT7, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed
1b43d24c
DH
2066 file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate.
2067
aec16f99
DH
20682003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
2069
2070 * numbers.c (scm_logtest): Fixed argument bug in the call to
2071 mpz_and, which showed up when compiling with SCM_DEBUG defined.
2072
f96460ce
DH
20732003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
2074
2075 * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed
2076 type errors that showed up when compiling with SCM_DEBUG defined.
2077
d0f6ceb8
DH
20782003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de>
2079
2080 * continuations.c, continuations.h, eval.c, eval.h, extensions.c,
2081 gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h,
2082 throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to
2083 fix compile errors with --disable-deprecated.
2084
19a7a089
RB
20852003-04-17 Rob Browning <rlb@defaultvalue.org>
2086
2087 * numbers.c (scm_integer_expt): fix case where we were declaring
2088 vars in the middle of a statement block. Thanks to Thamer
2089 Al-Harbash.
2090
47cd67db
MD
20912003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2092
0fd7dcd3
MD
2093 * goops.c (TEST_CHANGE_CLASS): Update variable class after class
2094 change.
2095
47cd67db
MD
2096 * eq.c (scm_eqv_p): Turned into a primitive generic.
2097
3b8b889c
RB
20982003-04-16 Rob Browning <rlb@defaultvalue.org>
2099
312006bb
RB
2100 * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support.
2101 Thanks to Boyd Gerber.
2102 Added check for __arm__ in addition to arm for LINUX and copied
2103 __s390__ defines from upstream libgc. Thanks to James Treacy for
2104 reporting the problems.
c7ef2ea1 2105
3b8b889c
RB
2106 * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT.
2107
2108 * socket.c: use SCM_CHAR_BIT.
2109
2110 * random.c (scm_c_random_bignum): use SCM_CHAR_BIT.
2111
2112 * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT.
2113
43261b39
MD
21142003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
2115
2116 * feature.c (scm_init_feature): Always add threads feature.
2117
58241edc
MD
21182003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2119
2120 * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of
2121 scm_at_assert_bound_ref. (We don't want the unbound check. See
2122 oop/goops/active-slot.scm.)
2123
94e91275
RB
21242003-04-14 Rob Browning <rlb@defaultvalue.org>
2125
2126 * tags.h: scm_t_intptr should have been intptr_t.
2127
3071ea27
RB
21282003-04-13 Rob Browning <rlb@defaultvalue.org>
2129
2130 * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc"
2131 test. Instead use
2132 #if defined (sparc) || defined (__sparc__) || defined (__sparc)
2133 as gc_os_dep.c suggests is appropriate.
2134
2135 * goops.c (prep_hashsets): make static to match prototype.
2136 (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert
2137 Chin.
2138
2139 * c-tokenize.lex: remove trailing comma from enum. Thanks to
2140 Albert Chin.
2141
2142 * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas
2143 Klausner.
2144
21ab2aeb
MD
21452003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2146
2147 * goops.c (scm_sys_prep_layout_x): Instance allocation is now
2148 indicated through extra fields in getters-n-setters.
2149 (scm_add_slot): Adapted to new format of getters_n_setters slot.
2150 (Thanks to Andy Wingo.)
2151
dff96e95
HWN
21522003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl>
2153
2154 * gc-segment.c: add comment
2155
07921c76
RB
21562003-04-07 Rob Browning <rlb@defaultvalue.org>
2157
b5331f10
RB
2158 * debug.h: change "id" arg name to "info_id" to avoid objective-c
2159 clash.
2160
07921c76
RB
2161 * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael
2162 and add regression test to standalone/.
2163
21642003-04-06 Rob Browning <rlb@defaultvalue.org>
2165
2166 * strings.c (scm_mem2string): use memcpy rather than by-hand loop.
2167 Thanks to Dale P. Smith.
2168
2169 * random.c: #include gmp.h.
2170 (scm_c_random_bignum): normalize result on return.
2171
2172 * init.c: #include gmp.h.
2173
2174 * numbers.h: remove the gmp.h #include (not needed now).
2175
2176 * posix.h: change occurences of "id" to something else so we don't
2177 cause trouble when included via objective-c (can't hurt, might
2178 help). Still have usage in debug.h, though.
2179
938f6b7c
MD
21802003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2181
372691d8
MD
2182 * random.c (scm_c_random_bignum): Don't generate a random number
2183 equal to m (the second argument of scm_c_random_bignum); only
2184 generate numbers in the range 0 <= r < m.
c5f268f8
MD
2185 (scm_c_default_rstate): Use SCM_VARIABLE_REF to access
2186 scm_var_random_state.
372691d8 2187
938f6b7c
MD
2188 * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then
2189 clause.
2190
6cdb8c3f
RB
21912003-04-05 Rob Browning <rlb@defaultvalue.org>
2192
938f6b7c 2193 * modules.c (scm_module_import_interface): move declaration of
6cdb8c3f
RB
2194 uses before any code.
2195
15635be5
MD
21962003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2197
1ecfd013
MD
2198 * Makefile.am (scmconfig.h): Look for config.h in top_builddir,
2199 not top_srcdir.
2200
15635be5
MD
2201 * hashtab.c (rehash_after_gc): Clear to_rehash list before
2202 processing it in order to avoid an infinite loop.
2203
2204 * print.c (scm_prin1): Remember old state of pstate->writingp.
2205
73be1d9e
MV
22062003-04-05 Marius Vollmer <mvo@zagadka.de>
2207
2208 * Changed license terms to the plain LGPL thru-out.
2209
ad815c06
RB
22102003-04-04 Rob Browning <rlb@defaultvalue.org>
2211
2212 * socket.c (FLIPCPY_NET_HOST_128): new macro.
2213 (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p):
2214 rewrite to handle GMP bignums.
2215
2216
2217 * random.c (scm_c_random_bignum): rewrite to handle GMP bignums.
2218
2219 * ports.c (scm_getc): minor tweak.
2220
2221 * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and
2222 rewrite to handle GMP bignums.
2223
2224 * numbers.c: rewrite *many* functions to handle GMP bignums.
2225
2226 * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG):
2227 handle GMP bignums.
2228
2229 * num2float.i.c (NUM2FLOAT): handle GMP bignums.
2230
2231 * init.c (check_config): remove SCM_BIGDIG conditionals.
2232 (scm_init_guile_1): test to make sure mpz_t fits in a double_cell.
2233
2234 * gc-card.c ("sweep_card"): handle new mpz_t bignums.
2235
2236 * eval.c: remove SCM_BIGDIG conditionals.
2237
2238 * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp.
2239
6cdb8c3f
RB
22402003-03-31 Rob Browning <rlb@defaultvalue.org>
2241
2242 * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks
2243 to Kevin Ryde.)
2244
22452003-03-27 Rob Browning <rlb@defaultvalue.org>
2246
2247 * threads.h: fix various preprocessor usages of new public
2248 symbols to expect 0 or 1 values rather than 1 or undefined.
2249 i.e. change #ifdef to #if, etc.
2250
2251 * threads.c: fix various preprocessor usages of new public
2252 symbols to expect 0 or 1 values rather than 1 or undefined.
2253 i.e. change #ifdef to #if, etc.
2254
2255 * tags.h: fix various preprocessor usages of new public
2256 symbols to expect 0 or 1 values rather than 1 or undefined.
2257 i.e. change #ifdef to #if, etc.
2258
2259 * stacks.c: fix various preprocessor usages of new public
2260 symbols to expect 0 or 1 values rather than 1 or undefined.
2261 i.e. change #ifdef to #if, etc.
2262
2263 * stackchk.h: fix various preprocessor usages of new public
2264 symbols to expect 0 or 1 values rather than 1 or undefined.
2265 i.e. change #ifdef to #if, etc.
2266
2267 * stackchk.c: fix various preprocessor usages of new public
2268 symbols to expect 0 or 1 values rather than 1 or undefined.
2269 i.e. change #ifdef to #if, etc.
2270
2271 * sort.c: fix various preprocessor usages of new public
2272 symbols to expect 0 or 1 values rather than 1 or undefined.
2273 i.e. change #ifdef to #if, etc.
2274
2275 * read.c: fix various preprocessor usages of new public
2276 symbols to expect 0 or 1 values rather than 1 or undefined.
2277 i.e. change #ifdef to #if, etc.
2278
2279 * random.c: fix various preprocessor usages of new public
2280 symbols to expect 0 or 1 values rather than 1 or undefined.
2281 i.e. change #ifdef to #if, etc.
2282
2283 * print.c: fix various preprocessor usages of new public
2284 symbols to expect 0 or 1 values rather than 1 or undefined.
2285 i.e. change #ifdef to #if, etc.
2286
2287 * objects.c: fix various preprocessor usages of new public
2288 symbols to expect 0 or 1 values rather than 1 or undefined.
2289 i.e. change #ifdef to #if, etc.
2290
2291 * numbers.h: fix various preprocessor usages of new public
2292 symbols to expect 0 or 1 values rather than 1 or undefined.
2293 i.e. change #ifdef to #if, etc.
2294
2295 * null-threads.c: fix various preprocessor usages of new public
2296 symbols to expect 0 or 1 values rather than 1 or undefined.
2297 i.e. change #ifdef to #if, etc.
2298
2299 * lang.c: fix various preprocessor usages of new public
2300 symbols to expect 0 or 1 values rather than 1 or undefined.
2301 i.e. change #ifdef to #if, etc.
2302
2303 * lang.h: fix various preprocessor usages of new public
2304 symbols to expect 0 or 1 values rather than 1 or undefined.
2305 i.e. change #ifdef to #if, etc.
2306
2307 * iselect.h: fix various preprocessor usages of new public
2308 symbols to expect 0 or 1 values rather than 1 or undefined.
2309 i.e. change #ifdef to #if, etc.
2310
2311 * init.c: fix various preprocessor usages of new public
2312 symbols to expect 0 or 1 values rather than 1 or undefined.
2313 i.e. change #ifdef to #if, etc.
2314
2315 * gh_data.c: fix various preprocessor usages of new public
2316 symbols to expect 0 or 1 values rather than 1 or undefined.
2317 i.e. change #ifdef to #if, etc.
2318
2319 * gh.h: fix various preprocessor usages of new public
2320 symbols to expect 0 or 1 values rather than 1 or undefined.
2321 i.e. change #ifdef to #if, etc.
2322
2323 * gen-scmconfig.c: change most new public symbols to be defined to
2324 0 or 1 rather than being either 1 or undefined.
2325
2326 * gc_os_dep.c: fix various preprocessor usages of new public
2327 symbols to expect 0 or 1 values rather than 1 or undefined.
2328 i.e. change #ifdef to #if, etc.
2329 (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef.
2330
2331 * gc.h: fix various preprocessor usages of new public
2332 symbols to expect 0 or 1 values rather than 1 or undefined.
2333 i.e. change #ifdef to #if, etc.
2334
2335 * gc-card.c: fix various preprocessor usages of new public
2336 symbols to expect 0 or 1 values rather than 1 or undefined.
2337 i.e. change #ifdef to #if, etc.
2338
2339 * gc-mark.c: fix various preprocessor usages of new public
2340 symbols to expect 0 or 1 values rather than 1 or undefined.
2341 i.e. change #ifdef to #if, etc.
2342
2343 * feature.c: fix various preprocessor usages of new public
2344 symbols to expect 0 or 1 values rather than 1 or undefined.
2345 i.e. change #ifdef to #if, etc.
2346
2347 * evalext.c: fix various preprocessor usages of new public
2348 symbols to expect 0 or 1 values rather than 1 or undefined.
2349 i.e. change #ifdef to #if, etc.
2350
2351 * eval.h: fix various preprocessor usages of new public
2352 symbols to expect 0 or 1 values rather than 1 or undefined.
2353 i.e. change #ifdef to #if, etc.
2354
2355 * eval.c: fix various preprocessor usages of new public
2356 symbols to expect 0 or 1 values rather than 1 or undefined.
2357 i.e. change #ifdef to #if, etc.
2358
2359 * eq.c: fix various preprocessor usages of new public
2360 symbols to expect 0 or 1 values rather than 1 or undefined.
2361 i.e. change #ifdef to #if, etc.
2362
2363 * coop.c: fix various preprocessor usages of new public
2364 symbols to expect 0 or 1 values rather than 1 or undefined.
2365 i.e. change #ifdef to #if, etc.
2366
2367 * coop-threads.c: fix various preprocessor usages of new public
2368 symbols to expect 0 or 1 values rather than 1 or undefined.
2369 i.e. change #ifdef to #if, etc.
2370
2371 * coop-pthreads.c: fix various preprocessor usages of new public
2372 symbols to expect 0 or 1 values rather than 1 or undefined.
2373 i.e. change #ifdef to #if, etc.
2374
2375 * coop-defs.h: fix various preprocessor usages of new public
2376 symbols to expect 0 or 1 values rather than 1 or undefined.
2377 i.e. change #ifdef to #if, etc.
2378
2379 * convert.i.c: fix various preprocessor usages of new public
2380 symbols to expect 0 or 1 values rather than 1 or undefined.
2381 i.e. change #ifdef to #if, etc.
2382
2383 * continuations.c: fix various preprocessor usages of new public
2384 symbols to expect 0 or 1 values rather than 1 or undefined.
2385 i.e. change #ifdef to #if, etc.
2386
2387 * _scm.h: fix various preprocessor usages of new public symbols to
2388 expect 0 or 1 values rather than 1 or undefined. i.e. change
2389 #ifdef to #if, etc.
2390
d11d697a
MV
23912003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de>
2392
9686f86d
MV
2393 * init.c (scm_init_guile_1): Call scm_i_init_deprecated.
2394
2395 * deprecated.c, deprecated.h: New files, to collect deprecated
2396 things in one place.
2397 * Makefile.am: Added them in all the right places.
2398
d11d697a
MV
2399 * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top".
2400 (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH
2401 builds work.
9686f86d
MV
2402 (DOT_X_FILES): Removed "iselect.x".
2403 (DOT_DOC_FILES): Removed "iselect.doc".
d11d697a 2404
e3c0c3b9
RB
24052003-03-25 Rob Browning <rlb@defaultvalue.org>
2406
2407 * win32-socket.h: #include "libguile/__scm.h". Replace usage of
2408 HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H.
2409
2410 * win32-socket.c: #include <config.h> if HAVE_CONFIG_H.
2411
2412 * vports.c: #include <config.h> if HAVE_CONFIG_H.
2413
2414 * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of
2415 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
2416
2417 * threads.h: replace usage of struct timespect with
2418 scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with
2419 SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in
2420 favor of scm_t_timespec from scmconfig.h.
2421
2422 * threads.c: move libguile/_scm.h include to the top so we pick up
2423 any critical defines like _GNU_SOURCE early. Replace usage of
2424 struct timespect with scm_t_timespec. Replace usage of
2425 STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of
2426 USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS.
2427
2428 * threads-plugin.h: replace usage of struct timespect with
2429 scm_t_timespec.
2430
2431 * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace
2432 usage of struct timespect with scm_t_timespec.
2433
2434 * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move
2435 HAVE_INTTYPES_H handling to scmconfig.h. #include
2436 "libguile/__scm.h". Rework handling for scm_t_bits,
2437 scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX,
2438 SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr,
2439 scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and
2440 SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to
2441 SCM_HAVE_ARRAYS.
2442
2443 * symbols.c: #include <config.h> if HAVE_CONFIG_H.
2444
2445 * struct.c: #include <config.h> if HAVE_CONFIG_H.
2446
2447 * strports.c: #include <config.h> if HAVE_CONFIG_H.
2448
2449 * strop.c: #include <config.h> if HAVE_CONFIG_H.
2450
2451 * stime.h: move handling of time related headers to scmconfig.h.
2452
2453 * stime.c: #include <config.h> if HAVE_CONFIG_H.
2454
2455 * stacks.c: replace usage of STACK_GROWS_UP with
2456 SCM_STACK_GROWS_UP.
2457
2458 * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
2459 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
2460
2461 * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
2462 of uint32 and HAVE_UINT_32 with scm_t_int32.
2463
2464 * smob.c: #include <config.h> if HAVE_CONFIG_H.
2465
2466 * simpos.c: #include <config.h> if HAVE_CONFIG_H.
2467
2468 * script.c: #include <config.h> if HAVE_CONFIG_H.
2469
2470 * scmsigs.c: #include <config.h> if HAVE_CONFIG_H.
2471
2472 * scmconfig.h.top: new file -- preamble for scmconfig.h.
2473
2474 * rw.c: #include <config.h> if HAVE_CONFIG_H.
2475
2476 * regex-posix.c: #include <config.h> if HAVE_CONFIG_H.
2477
2478 * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
2479
2480 * rdelim.c: #include <config.h> if HAVE_CONFIG_H.
2481
2482 * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
2483 of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with
2484 scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of
2485 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
2486
2487 * ramap.c: replace usage of HAVE_LONG_LONGS with
2488 "SCM_SIZEOF_LONG_LONG != 0".
2489
2490 * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include
2491 "libguile/scmconfig.h".
2492
2493 * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H.
2494
2495 * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
2496 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
2497
2498 * posix.c: #include <config.h> if HAVE_CONFIG_H.
2499
2500 * ports.c: #include <config.h> if HAVE_CONFIG_H.
2501
2502 * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
2503
2504 * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with
2505 SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with
2506 SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with
2507 SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with
2508 SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with
2509 scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with
2510 "SCM_SIZEOF_LONG_LONG != 0".
2511
2512 * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage
2513 of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace
2514 usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of
2515 SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF.
2516
2517 * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H.
2518
2519 * null-threads.h: replace usage of struct timespect with
2520 scm_t_timespec.
2521
2522 * net_db.c: #include <config.h> if HAVE_CONFIG_H.
2523
2524 * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include
2525 "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of
2526 scm_t_uint64 and rename usages.
2527
2528 * mallocs.c: #include <config.h> if HAVE_CONFIG_H.
2529
2530 * load.c: #include <config.h> if HAVE_CONFIG_H.
2531
2532 * iselect.h: move handling of time related headers to scmconfig.h.
2533 Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H.
2534 Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename
2535 usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS.
2536
2537 * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
2538 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
2539 USE_NULL_THREADS to SCM_USE_NULL_THREADS.
2540
2541 * ioext.c: #include <config.h> if HAVE_CONFIG_H.
2542
2543 * inline.h: #include "libguile/__scm.h" at the top. Change code
2544 to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide
2545 what to do instead of creating a new public #define. Rename usage
2546 of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of
2547 USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of
2548 USE_COPT_THREADS to SCM_USE_COPT_THREADS.
2549
2550 * inline.c: rearrange handling -- now we just #define
2551 SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include
2552 "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as
2553 appropriate, and we use that in inline.h along with the above
2554 define to determine how to respond.
2555
2556 * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
2557 HAVE_ARRAYS to SCM_HAVE_ARRAYS.
2558
2559 * guile.c: #include <config.h> if HAVE_CONFIG_H.
2560
2561 * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
2562 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
2563
2564 * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
2565
2566 * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details.
2567
2568 * gen-scmconfig.c: new file -- see comments in file for details.
2569
2570 * gdbinit.c: #include <config.h> if HAVE_CONFIG_H.
2571
2572 * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace
2573 usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP.
2574
2575 * gc.h: replace usage of SIZEOF_LONG with
2576 SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS
2577 with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition
2578 since we handle that in scmconfig.h now.
2579
2580 * gc.c: #include <config.h> if HAVE_CONFIG_H.
2581
2582 * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
2583 of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of
2584 HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
2585
2586 * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H.
2587
2588 * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
2589 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
2590
2591 * fports.c: #include <config.h> if HAVE_CONFIG_H.
2592
2593 * filesys.c: #include <config.h> if HAVE_CONFIG_H.
2594
2595 * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
2596 of USE_NULL_THREADS to SCM_USE_NULL_THREADS.
2597
2598 * extensions.c: #include <config.h> if HAVE_CONFIG_H.
2599
2600 * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
2601 Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0".
2602
2603 * eval.c: #include <config.h> if HAVE_CONFIG_H. #include
2604 "libguile/__scm.h" rather than scmconfig.h. Rename usage of
2605 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
2606 with "SCM_SIZEOF_LONG_LONG != 0".
2607
2608 * error.c: #include <config.h> if HAVE_CONFIG_H.
2609
2610 * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of
2611 HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS
2612 with "SCM_SIZEOF_LONG_LONG != 0".
2613
2614 * deprecation.c: #include <config.h> if HAVE_CONFIG_H.
2615
2616 * coop.c: replace usage of struct timespect with scm_t_timespec.
2617 #include <config.h> if HAVE_CONFIG_H.
2618
2619 * coop-threads.c: #include "libguile/_scm.h" early. Replace
2620 usage of struct timespect with scm_t_timespec. Replace usage of
2621 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
2622
2623 * coop-pthreads.c: #include "libguile/_scm.h" early. Replace
2624 usage of struct timespect with scm_t_timespec. Replace usage of
2625 STACK_GROWS_UP with SCM_STACK_GROWS_UP.
2626
2627 * coop-defs.h: move handling of time related headers to
2628 scmconfig.h. Add #include "libguile/__scm.h". Rename usage of
2629 HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct
2630 timespect with scm_t_timespec.
2631
2632 * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
2633
2634 * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
2635
2636 * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage
2637 of HAVE_ARRAYS to SCM_HAVE_ARRAYS.
2638
2639 * continuations.c: move libguile/_scm.h include to the top so we
2640 pick up any critical defines like _GNU_SOURCE early.
2641
2642 * backtrace.c: #include <config.h> if HAVE_CONFIG_H.
2643
2644 * async.c: #include <config.h> if HAVE_CONFIG_H.
2645
2646 * alloca.c: #include <config.h> if HAVE_CONFIG_H.
2647
2648 * _scm.h: #include <config.h> if HAVE_CONFIG_H.
2649 Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS.
2650
2651 * __scm.h: move libguile/scmconfig.h include up to the top, so
2652 we're sure to pick up any critical defines like _GNU_SOURCE early.
2653 #include <limits.h> removed in favor of scmconfig.h inclusion when
2654 appropriate. STDC_HEADERS based inclusion of stdlib.h,
2655 sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of
2656 scmconfig.h inclusion when appropriate. Various Win32 related
2657 definitions removed in favor of scmconfig.h inclusion when
2658 appropriate.
2659 (HAVE_UINTPTR_T): definition removed (see NEWS).
2660 (SIZEOF_PTRDIFF_T): definition removed (see NEWS).
2661 (HAVE_LONG_LONGS): definition removed (see NEWS).
2662 (HAVE_LONG_LONG): definition removed (see NEWS).
2663 (HAVE_PTRDIFF_T): definition removed (see NEWS).
2664
2665 * Makefile.am: scmconfig.h is now generated by building and
2666 running gen-scmconfig.h and capturing its output. gen-scmconfig
2667 uses config.h and the configure.in generated gen-scmconfig.h to
2668 decide what to output. See gen-scmconfig.c for details.
2669 (noinst_PROGRAMS): add gen-scmconfig.
2670 (gen_scmconfig_SOURCES): new variable.
2671 (gen-scmconfig.$(OBJEXT)): new target - be careful to handle
2672 cross-compiling right.
2673 (scmconfig.h): build scmconfig.h from gen-scmconfig's output.
2674 (BUILT_SOURCES): add scmconfig.h.
2675
25e0bf97
MV
26762003-03-19 Marius Vollmer <mvo@zagadka.de>
2677
2678 * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from
2679 Adrian Bunk. Thanks!
2680
74b6d6e4
MD
26812003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2682
2683 * goops.c (make_class_from_template): New fourth arg:
2684 applicablep.
2685 (scm_class_extended_generic_with_setter, scm_class_self): Fixed
2686 cpls.
2687
2688 * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable.
2689
2690 * goops.c, objects.c, objects.h (scm_make_extended_class): New
2691 second arg: applicablep.
2692 (scm_i_inherit_applicable): New function.
2693
2694 * goops.c, goops.h (scm_class_applicable,
2695 scm_class_extended_accessor): New classes.
2696
5c9e7dad
DH
26972003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de>
2698
2699 * procs.c (scm_procedure_documentation): Removed redundant
2700 SCM_NIMP test and replaced other calls to SCM_IMP by more explicit
2701 predicates.
2702
f8af5c6d
MD
27032003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2704
c614a00b
MD
2705 * list.c, list.h (scm_filter, scm_filter_x): New functions.
2706
109c2c9f
MD
2707 * modules.c (scm_module_import_interface): New function.
2708
f8af5c6d
MD
2709 * goops.c, goops.h (scm_class_accessor_method): Renamed from
2710 scm_class_accessor.
2711 (scm_class_accessor): New class.
2712
a48d60b1
MD
27132003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2714
2715 * goops.c (scm_primitive_generic_generic): Enable primitive
2716 generic if not enabled.
2717 (scm_sys_goops_loaded): Setup unextended primitive generics.
2718
2719 * goops.c, goops.h (scm_c_extend_primitive_generic): New function.
2720
2721 * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New
2722 snarf macros.
2723
2724 * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a
2725 testing example. All uses of SCM_GPROC should be converted.)
2726
2727 * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of
2728 scm_assoc.
2729
2730 * eq.c (scm_equal_p): Turned into a primitive generic.
2731
84edc049
RB
27322003-02-27 Rob Browning <rlb@defaultvalue.org>
2733
2734 * Makefile.am (scmconfig.h): new target -- generate file from
2735 ../config.h.
2736 (modinclude_HEADERS): remove version.h.
2737 (nodist_modinclude_HEADERS): add version.h.
2738
ea5c9285
MD
27392003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2740
b4a1358c
MD
2741 This fixes a serious GC bug, introduced during the latest
2742 reorganization of the GC, which disabled freeing of structs and
2743 GOOPS objects:
2744
2745 * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to
2746 SCM_EOL.
53af8255
MD
2747 (scm_struct_prehistory): Move scm_free_structs to
2748 scm_before_mark_c_hook.
ea5c9285 2749
b4a1358c
MD
2750 * gc-card.c (sweep_card): Check that we haven't swept structs on
2751 this card before. That can happen if scm_i_sweep_all_segments has
2752 been called from some other place than scm_igc.
2753
c35738c1
MD
27542003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2755
231a4ea8
MD
2756 * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31
2757 (since hash tables now adapt their size).
2758
2759 * modules.c (scm_modules_prehistory): Changed from 2001 to 1533
2760 (current number of prehistory bindings; hashtable code will select
2761 a prime which is greater than this value).
2762
2763 * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139
2764 (current number of initial symbols).
2765
2766 * properties.c (scm_init_properties): Don't specify size of
2767 scm_properties_whash.
2768
2769 * objprop.c (scm_init_objprop): Don't specify size of
2770 scm_object_whash.
2771
2772 * keywords.c (scm_init_keywords): Don't specify a hash table size.
2773
c35738c1
MD
2774 * hooks.c (scm_c_hook_add): Fixed bug in append mode.
2775
2776 The following changes introduce the use of resizable hash tables
2777 throughout Guile. It also renames the old *-hash-table* functions
2778 to *-alist-vector* and places them, together with the rest of the
2779 weak vector support, in the module (ice-9 weak-vector). We should
2780 probably introduce a new, better, API for weak references, for
2781 example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even
2782 look like and are used like ordinary pairs.)
2783
2784 * environments.c (obarray_enter, obarray_retrieve, obarray_remove,
2785 leaf_environment_fold, obarray_remove_all): Use hashtable
2786 accessors.
2787
2788 * gc.c (scm_init_storage): Moved hook initialization to
2789 scm_storage_prehistory.
2790 (scm_storage_prehistory): New function.
2791 (scm_igc): Added commentary about placement of
2792 scm_after_sweep_c_hook.
2793
2794 * gc-mark.c (scm_mark_all): Use hashtable accessors.
2795 (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and
2796 SCM_WVECT_WEAK_VALUE_P.
2797
2798 * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New
2799 functions.
2800 (scm_vector_to_hash_table, scm_c_make_resizing_hash_table):
2801 Removed.
2802 (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table,
2803 scm_make_doubly_weak_hash_table): Moved here from weaks.c.
2804
2805 * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added
2806 calls to scm_storage_prehistory and scm_hashtab_prehistory.
2807
2808 * modules.c (module-reverse-lookup): Use hashtable accessors.
2809
2810 * symbols.c, symbols.h (scm_i_hash_symbol): New function.
2811
2812 * weaks.c, weaks.h (scm_make_weak_key_alist_vector,
2813 scm_make_weak_value_alist_vector,
2814 scm_make_doubly_weak_alist_vector): New functions.
2815
2816 * weaks.c (scm_init_weaks_builtins): New function.
2817
2818 * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE,
2819 SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P,
2820 SCM_WVECT_NOSCAN_P): New macros.
2821
2822 * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P
2823 and SCM_WVECT_WEAK_VALUE_P.
2824
2825 * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from
2826 allocate_weak_vector and exported.
2827
0a4c1355
MD
28282003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2829
2830 * hashtab.c: Undid thread safety. (We decided that it's better to
2831 let the user explicitly protect the tables (or not) according what
2832 is suitable for the application.)
2833
87ca11ff
MD
28342003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2835
2836 * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made
2837 thread safe and handle resizing tables.
2838 (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed
2839 SCM_DEFER/ALLOW_INTS.
2840
f59a096e
MD
28412003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2842
2843 * hashtab.c (scm_vector_to_hash_table,
2844 scm_c_make_resizing_hash_table, scm_make_hash_table): New
2845 functions.
2846 (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread
2847 safe and handle resizing tables.
2848
2849 * weaks.c (scm_make_weak_key_hash_table,
2850 scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table):
2851 Size argument made optional. Return resizable table if not
2852 specified.
2853
4b612c5b
MD
28542003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2855
2856 * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2):
2857 Fixed formals tests for closures. (Thanks to Kevin Ryde.)
2858
b3d7f6df
MD
28592003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2860
2861 * debug.c (scm_procedure_source): Handle all objects for which
2862 procedure? is #t. (Thanks to Bill Schottstaedt.)
2863
756414cf
MD
28642003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2865
361d631f
MD
2866 * futures.c (mark_futures): Don't need to mark data of recycled
2867 futures.
2868 (scan_futures, cleanup_undead): Be smarter about marking
2869 futures---avoid unnecessary passes through future lists.
2870
756414cf
MD
2871 * futures.h, futures.c: New files; Introduced recycling of
2872 futures. For fine-grained threading this lifts performance to
2873 another level. We can now use parallelization in inner loops of
2874 Guile programs without impossible overhead.
2875
2876 * threads.h, threads.c: Moved futures to their own file.
2877
2878 * Makefile.am (libguile_la_SOURCES): Added futures.c.
2879 (DOT_X_FILES): Added futures.x.
2880 (DOT_DOC_FILES): Added futures.doc.
2881 (modinclude_HEADERS): Added futures.h.
2882
2883 * threads.c, threads.h (scm_i_create_thread): Renamed from
2884 create_thread and made global.
2885
2886 * futures.c (scm_make_future): New procedure.
2887
2888 * eval.c: #include "libguile/futures.h".
2889
2890 * init.c: #include "futures.h"
2891 (scm_init_guile_1): Call scm_init_futures.
2892
2893 * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK.
2894
2895 * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here.
2896
2897 * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New
2898 functions.
2899
2900 * eval.c (scm_trampoline_1): Fixed arguments test for closures.
2901
b4debead
MD
29022003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2903
2904 * threads.c (create_thread): Don't unwind dynwind chain of parent
2905 thread before creation. Just start the new thread with an empty
2906 dynwind chain.
2907
93f26b7b
MD
29082003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2909
2910 * evalext.c, evalext.h (scm_self_evaluating_p): New function.
2911
38d8927c
MD
29122003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2913
41c96c32
MD
2914 * threads.c (scm_timed_wait_condition_variable): Support timed
2915 waiting also for simple condition variables.
2916
38d8927c
MD
2917 * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead
2918 of calling the procedure change-object-class.
2919
9cf5d9b7
MD
29202003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2921
2922 * ramap.c (scm_ramapc): Typo in error message.
2923
bbf8d523
MD
29242003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2925
b46fae00
MD
2926 * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for
2927 slots with instance allocation.
2928
bbf8d523
MD
2929 * goops.c, goops.h (scm_class_extended_generic_with_setter): New
2930 class.
2931 (scm_compute_applicable_methods): Use scm_generic_function_methods.
2932
2933 * goops.c (scm_generic_function_methods): Support extended
2934 generic functions.
2935
ebf9b47c
MD
29362002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2937
2938 * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future.
2e37d6a2 2939 Thanks to Neil for pointing this out!
ebf9b47c 2940
14a9ba3f
NJ
29412002-12-29 Neil Jerram <neil@ossau.uklinux.net>
2942
2943 * lang.h: Remove declarations matching definitions removed from
2944 lang.c (just below).
2945
c6a040a8
NJ
29462002-12-28 Neil Jerram <neil@ossau.uklinux.net>
2947
6054d805
NJ
2948 * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null,
2949 scm_m_while, scm_nil_eq): Remove definitions that were superfluous
2950 and already commented out.
2951
c6a040a8
NJ
2952 * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token,
2953 scm_lreadparen): Support reading vectors with Elisp syntax if
2954 SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS
2955 is not currently defined, and there isn't even a configure switch
2956 to enable it yet.)
2957
3742c12f
MV
29582002-12-26 Marius Vollmer <mvo@zagadka.ping.de>
2959
2960 * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath
2961 builds work.
2962 (EXTRA_DIST): Added version.h.in.
2963
fb50ef08
MD
29642002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se>
2965
2966 This change makes it possible for one thread to do lazy sweeping
2967 while other threads are running. Now only the mark phase need to
2968 have all threads asleep. We should look further into this issue.
2969 Presently, I've put the locking of scm_i_sweep_mutex at
2970 "conservative" places due to my current lack of knowledge about
2971 the garbage collector. Please feel free to restrict these regions
2972 further to allow for maximal parallelism!
2973
2974 * gc.c, gc.h (scm_i_sweep_mutex): New mutex.
2975
2976 * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc,
2977 scm_gc_register_collectable_memory): Substitute locking of
2978 scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep.
2979 (scm_igc): Lock sweep mutex here instead of in callers; Calls to
2980 scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate
2981 the single-thread section (which now only contains the mark
2982 phase).
2983 (scm_gc): Don't lock sweeo mutex here since scm_igc locks it;
2984 Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly.
2985
2986 * threads.c (gc_section_mutex): Removed.
2987
9ed24633
MD
29882002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net>
2989
0d48aca5
MD
2990 * threads.c (create_thread): Clear parent field in root state in
2991 order not to unnecessarily remember dead threads.
2992
9ed24633
MD
2993 * eval.c (call_subr2o_1, call_lsubr2_2): New functions.
2994 (scm_trampoline_1, scm_trampoline_2): Use them.
2995
29717c89
MD
29962002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
2997
2998 Partial introduction of real plugin interface.
2999
3000 * Makefile.am (modinclude_HEADERS): Added threads-plugin.h.
3001 (EXTRA_DIST): Added threads-plugin.c.
3002
3003 * threads-plugin.h, threads-plugin.c: New files.
3004
3005 * threads.h: #include "libguile/threads-plugin.h".
3006
3007 * threads.c: #include "libguile/threads-plugin.c".
3008
3009 * pthread-threads.c: Temporarily remove debugging functions.
3010
3011 * threads.c, threads.h (scm_yield): Added back.
3012
e29e0b09
MD
30132002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net>
3014
3015 * threads.c (really_launch): Detach before unlocking
3016 thread_admin_mutex in order not to risk being joined.
3017 (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep
3018 thread_admin_mutex locked during GC.
3019
3020 * pthread-threads.c, pthread-threads.h: Improvements to debugging
3021 functions.
3022
0b6843b1 30232002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net>
93cd4dcd 3024
6da2dfc4
MD
3025 * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added
3026 support for debugging mutex operations.
3027
1b92fb6b
MD
3028 * threads.c (scm_thread): Removed filed joining_threads.
3029 (thread_print): Print thread number as well as address of thread
3030 structure.
0b6843b1
MD
3031 (scm_join_thread): Bugfix.
3032 (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex,
3033 scm_timed_wait_condition_variable, scm_signal_condition_variable,
3034 scm_broadcast_condition_variable): Use the low-level API.
3035 (scm_all_threads): Return copy of thread list (to prevent
3036 unintended destruction).
3037 (scm_threads_prehistory): Initialize heap_mutex of fake thread.
1b92fb6b 3038
93cd4dcd
MD
3039 * pthread-threads.c, pthread-threads.h, threads.c: Fixes to
3040 pthread "native" recursive mutex support.
3041
2ff4f181
MD
30422002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se>
3043
28d52ebb
MD
3044 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions.
3045 Simply lock a thread C API recursive mutex.
3046 (SCM_NONREC_CRITICAL_SECTION_START,
3047 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
3048 SCM_REC_CRITICAL_SECTION_END): Removed.
3049
3050 * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with
3051 direct calls to scm_rec_mutex_lock / unlock around the three calls
3052 to scm_m_expand_body.
3053
3054 * eval.c, eval.h (promise_free): New function.
3055 (scm_force): Rewritten; Now thread-safe; Removed
3056 SCM_DEFER/ALLOW_INTS.
3057
3058 * pthread-threads.h: Added partially implemented plugin interface
3059 for recursive mutexes. These are, for now, only intended to be
3060 used internally within the Guile implementation.
3061
3062 * pthread-threads.c: New file.
3063
3064 * threads.c: Conditionally #include "pthread-threads.c".
3065
3066 * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be
3067 thread-safe;
3068
3069 * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX,
3070 SCM_GLOBAL_REC_MUTEX): New macros.
3071
3072 * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section
3073 macros---use mutexes instead.
3074
3075 * tags.h (SCM_IM_FUTURE): New tag.
3076
3077 * eval.c (scm_m_future): New primitive macro.
3078 (SCM_CEVAL): Support futures.
3079 (unmemocopy): Support unmemoization of futures.
3080
3081 * print.c (scm_isymnames): Name of future isym.
3082
2ff4f181
MD
3083 * version.c: Unmade some changes to my private copy that got
3084 committed by mistake.
3085
392d2833
MD
30862002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net>
3087
e200ddee
MD
3088 * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of
3089 2002-12-10.
3090
392d2833
MD
3091 * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists.
3092
3093 * gc.c (scm_gc_sweep): Call it here instead, which is a more
3094 logical place.
3095
3096 * threads.c (create_thread): Remember root object until the handle
3097 of the new thread is on all_threads list.
3098
3099 * root.c (scm_make_root): Moved copying of fluids until after
3100 creation of root handle so that the fluids are GC protected. Also
3101 removed the critical section.
3102
c4c52ebe
MD
31032002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
3104
960c408c
MD
3105 * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function.
3106
3cdde9d6 3107 * gc-malloc.c (malloc_mutex): New mutex.
960c408c 3108 (scm_gc_malloc_prehistory): Initialize it.
3cdde9d6
MD
3109 (scm_realloc): Serialize call to realloc
3110 (scm_calloc): Same for calloc.
3111 Thanks to Wolfgang Jaehrling!
3112 (Now we have to make sure all calls to malloc/realloc are made
3113 through scm_malloc.)
3114
960c408c
MD
3115 * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory.
3116
c4c52ebe
MD
3117 * threads.c (really_launch): Release heap (to prevent deadlock).
3118 (create_thread): Release heap before locking thread admin mutex.
3119
b0dc3d71
MD
31202002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
3121
3122 * threads.c (scm_i_thread_invalidate_freelists): New
3123 function.
3124
3125 * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists.
3126
3127 * modules.c (scm_export): Inserted a return statement.
3128
06e80f59
HWN
31292002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl>
3130
3131 * modules.c (scm_export): new function
3132
3133 * gc-card.c: add a note about malloc()/free() overhead.
3134
a12611c3
MD
31352002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net>
3136
3137 * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c
3138 in srcdir.
3139
c7fabadf
MD
31402002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se>
3141
3142 These changes remove scm_ints_disabled (which hasn't has any
3143 effect in Guile for quite some time).
3144
3145 * async.c, error.h (scm_ints_disabled): Removed.
3146
3147 * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1),
3148 root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK,
3149 SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled.
3150 (old_ints): Removed.
3151
3152 * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive
3153 critical section.
3154 (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and
3155 SCM_ALLOW_INTS.
3156
9bc4701c
MD
31572002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
3158
52340b65
MD
3159 * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait):
3160 Removed accidental #if 0 around these functions.
3161
9bc4701c
MD
3162 These changes are the start of support for preemptive
3163 multithreading. Marius and I have agreed that I commit this code
3164 into the repository although it isn't thoroughly tested and surely
3165 introduces many bugs. The bugs should only be exposed when using
3166 threads, though. Signalling and error handling for threads is
3167 very likely broken. Work on making the implementation cleaner and
3168 more efficient is needed.
3169
3170 * __scm.h (SCM_ALLOW_INTS_ONLY): Removed.
3171 (SCM_NONREC_CRITICAL_SECTION_START,
3172 SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START,
3173 SCM_REC_CRITICAL_SECTION_END): New macros.
3174 (SCM_CRITICAL_SECTION_START/END): Defined here.
3175
3176 * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around
3177 the three calls to scm_m_expand_body.
3178
3179 * gc.h: #include "libguile/pthread-threads.h";
3180 (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros.
3181
3182 * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type
3183 scm_t_key;
3184
3185 * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist
3186 access.
3187
3188 * gc-freelist.c (scm_gc_init_freelist): Create freelist keys.
3189
3190 * gc-freelist.c, threads.c (really_launch): Use
3191 SCM_FREELIST_CREATE.
3192
3193 * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory):
3194
3195 * gc.c (scm_i_expensive_validation_check, scm_gc,
3196 scm_gc_for_newcell): Put threads to sleep before doing GC-related
3197 heap administration so that those pieces of code are executed
3198 single-threaded. We might consider rewriting these code sections
3199 in terms of a "call_gc_code_singly_threaded" construct instead of
3200 calling the pair of scm_i_thread_put_to_sleep () and
3201 scm_i_thread_wake_up (). Also, we would want to have as many of
3202 these sections eleminated.
3203
3204 * init.c (scm_init_guile_1): Call scm_threads_prehistory.
3205
3206 * inline.h: #include "libguile/threads.h"
3207
3208 * pthread-threads.h: Macros now conform more closely to the
3209 pthreads interface. Some of them now take a second argument.
3210
3211 * threads.c, threads.h: Many changes.
3212
32132002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se>
3214
3215 * Makefile.am (version.h): Changed $^ --> $< in rule for
3216 version.h.
3217
b2cbe8d8
RB
32182002-12-08 Rob Browning <rlb@defaultvalue.org>
3219
3220 * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now.
3221 (SCM_MINOR_VERSION): use @--@ substitution now.
3222 (SCM_MICRO_VERSION): use @--@ substitution now.
3223 (scm_effective_version): new function prototype.
3224
3225 * version.c (scm_effective_version): new function, also add
3226 effective-version.
3227
3228 * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION.
3229 (libpath.h): use GUILE_EFFECTIVE_VERSION to compute
3230 SCM_LIBRARY_DIR.
3231 (version.h): generate this here rather than configure.in. This
3232 approach tracks source edits better (i.e. more immediately).
3233 Might be worth considering for other .in files too.
3234
5441c65c
MV
32352002-12-02 Marius Vollmer <mvo@zagadka.ping.de>
3236
3237 Reorganized thread package selection. A thread package now only
3238 implements a small set of pthread like functions and Guile
3239 implements the rest on top of that. Guile's implementation is
3240 what the "coop-pthreads" package has been previously. Support for
3241 "coop" threads has been removed until I get time to add it again.
3242
3243 * Makefile.am (libguile_la_SOURCES): Removed iselect.c.
3244 (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c,
3245 null-threads.c, coop-pthreads.c.
3246 (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added
3247 pthread-threads.h.
3248
3249 * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h.
3250
3251 * threads.h: Do not include "libguile/coop-defs.h". Include
3252 "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed
3253 (previously deprecated) C level thread API prototypes. They are
3254 now in the thread package specific headers, "null-threads.h" and
3255 "pthread-threads.h".
3256 (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR):
3257 New.
3258 (scm_threads_init): Removed.
3259 (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END,
3260 SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter,
3261 SCM_I_THREAD_SWITCH_COUNT): Define here.
3262 (scm_single_thread_p): Removed.
3263 (scm_call_with_new_thread): Take two args directly instead of list
3264 of two args.
3265 (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA,
3266 SCM_SET_THREAD_LOCAL_DATA): Define here.
3267
3268 * threads.c: Merged with "coop-pthreads.c".
3269
3270 * null-threads.h: Implement pthread-like API as a set of macros.
3271
3272 * pthread-threads.h: New, implement pthread-like API by deferring
3273 to pthread itself.
3274
3275 * init.c (scm_init_guile_1): Do not call scm_init_iselect, which
3276 has been lost in the reorganization.
3277
504d99c5
MD
32782002-12-01 Mikael Djurfeldt <mdj@linnaeus>
3279
3280 The following change makes it possible to move procedure
3281 application dispatch outside inner loops. The motivation was
3282 clean implementation of efficient replacements of R5RS primitives
3283 in SRFI-1.
3284
3285 The semantics is clear: scm_trampoline_N returns an optimized
3286 version of scm_call_N (or NULL if the procedure isn't applicable
3287 on N args).
3288
3289 Applying the optimization to map and for-each increases efficiency
3290 noticeably. For example, (map abs ls) is 8 times faster than
3291 before.
3292
3293 * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types.
3294
3295 * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions.
3296
3297 * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions;
3298 (map, for-each): Handle also application on two args as a special
3299 case; Use trampolines.
3300
3301 Other changes:
3302
3303 * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o;
3304 (subr2oless): Removed.
3305 (scm_restricted_vector_sort_x): Use scm_return_first to keep the
3306 vector GC protected.
3307
3308 * eval.c (check_map_args): Use scm_out_of_range_pos instead of
3309 scm_out_of_range.
3310
63dd3413
DH
33112002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de>
3312
3313 * evalext.[ch] (scm_m_undefine, undefine): Deprecated.
3314
4ba5f279
MD
33152002-11-17 Mikael Djurfeldt <mdj@linnaeus>
3316
3317 * debug.c (scm_make_iloc): Added missing "return".
3318
56ae231f
MV
33192002-11-17 Marius Vollmer <mvo@zagadka.ping.de>
3320
3321 * strports.c (scm_eval_string_in_module): Validate second arg to
3322 be a module. Thanks to Arno Peters!
3323
80b28865
DH
33242002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
3325
3326 * .cvsignore: remove goops.c
3327
c88b1456
DH
33282002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
3329
3330 * modules.c (scm_env_top_level, scm_lookup_closure_module,
3331 module_variable, scm_module_lookup_closure,
3332 scm_module_transformer, scm_sym2var, scm_module_reverse_lookup,
3333 scm_system_module_env_p): Don't compare SCM values with C
3334 operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP
3335 over SCM_NFALSEP.
3336
a8a19efc
DH
33372002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de>
3338
3339 * eval.h (SCM_MAKE_ILOC): New macro.
3340
3341 * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing
3342 the iloc bitpattern here.
3343
76734914
MD
33442002-11-14 Mikael Djurfeldt <mdj@linnaeus>
3345
3346 * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be
3347 part of the API, otherwise it's difficult to write Guile
3348 extensions using non-blocking I/O => moved #include
3349 "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h.
3350
3351 * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex -->
3352 s_unlock_mutex.
3353
8b5b4a75
MV
33542002-11-10 Marius Vollmer <mvo@zagadka.ping.de>
3355
3356 * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They
3357 are defined in configure.in.
3358
3359 * threads.c: Removed SCM_API from function definitions. SCM_API
3360 is only for declarations.
3361
e5a83084
MD
33622002-11-07 Mikael Djurfeldt <mdj@linnaeus>
3363
9be8bb45
MD
3364 * coop-pthreads.h: Added support for thread specific data to the
3365 generic C API for the coop-pthreads case.
3366
e5a83084
MD
3367 * threads.c, threads.h (scm_cond_init): Undo unintentional API
3368 change.
6c214b62 3369 (scm_cond_broadcast): Added missing function.
e5a83084 3370
7edf178e
MV
33712002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3372
3373 * coop.c (coop_next_runnable_thread): Removed, wich should have
3374 happened when GUILE_ISELECT was hard-wired.
3375
7f5b1b77
MV
33762002-11-03 Marius Vollmer <mvo@zagadka.ping.de>
3377
7caa1b07
MV
3378 * Makefile.am (libguile_la_SOURCES): Added threads.c
3379 (DOT_DOC_FILES): Added threads.doc.
3380 (DOT_X_FILES): Added threads.x.
3381 (EXTRA_libguile_la_SOURCES): Removed threads.c.
3382 (noinst_HEADERS): Added coop-pthreads.c.
3383 (modinclude_HEADERS): Added coop-pthreads.h.
3384
3385 * __scm.h (USE_THREADS, GUILE_ISELECT): Define when
3386 SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile.
3387
bb11cbf4
MV
3388 * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H.
3389 Thanks to Bill Schottstaedt!
3390
1d4cbbed
MV
3391 * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0.
3392
7f5b1b77
MV
3393 * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when
3394 SCM_COPT_THREADS is defined.
3395 (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS
3396 is defined.
3397
3398 * coop-pthreads.c: Some harmless renamings of internal stuff.
3399 (create_thread): New, generalized version of
3400 scm_call_with_new_thread.
3401 (scm_call_with_new_thread): Use it.
3402 (scm_spawn_thread): New, use create_thread.
3403
d52f53b1
MV
34042002-11-02 Marius Vollmer <mvo@zagadka.ping.de>
3405
3406 * coop-pthreads.c, coop-pthreads.h: Redone completely, you might
3407 start testing it now.
3408
3409 * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly
3410 defined when HAVE_RESTARTABLE_SYSCALLS is not defined.
3411 (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS
3412 is defined.
3413
30f920c3
MV
34142002-10-27 Marius Vollmer <mvo@zagadka.ping.de>
3415
3416 * scmsigs.c (signal_cell_handlers, install_handler_data,
3417 scm_delq_spine_x, really_install_handler, install_handler): New
3418 scheme for triggering signal handlers, to simplify take_signal.
3419 (take_signal): Simplified, to avoid race conditions.
3420 (scm_sigaction_for_thread): Use new Scheme. Validate that thread
3421 hasn't exited yet.
3422
3423 * async.c (scm_async_click): Reset pending_asyncs, handle
3424 signal_asyncs. Don't set cdr of a non-signal async to #f.
3425 (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue
3426 always. Set pending_asyncs.
3427 (scm_system_async_mark_for_thread): Check that thread has not
3428 exited.
3429 (scm_unmask_signals, decrease_block): Call scm_async_click after
3430 block_asyncs becomes zero.
3431
3432 * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of
3433 active_asyncs.
3434
3435 * root.h (scm_root_state): Added pending_asyncs and signal_asyncs
3436 fields.
3437 * root.c (root_mark): Mark them.
3438 (make_root): Initialize them.
3439
3440 * iselect.c, iselect.h: Replaced GUILE_ISELECT with
3441 USE_COOP_THREADS.
3442 (scm_internal_select): Define one version for USE_COOP_THREADS and
3443 one for USE_NULL_THREADS.
3444 (scm_init_iselect): Likewise.
3445
3446 * inline.h (scm_cell, scm_double_cell): Also allow
3447 USE_COPT_THREADS to not protect the slot initializers.
3448
3449 * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is
3450 because threads need to be initialized before the stack, but
3451 gsubrs such as scm_timed_condition_variable_wait can only be
3452 created later.
3453
3454 * threads.h: Include "coop-pthreads.h" when requested.
3455 (scm_threads_make_mutex, scm_threads_lock_mutex,
3456 scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were
3457 not implemented anyway.
3458 (scm_init_thread_procs, scm_try_mutex,
3459 scm_timed_condition_variable_wait,
3460 scm_broadcast_condition_variable, scm_c_thread_exited_p,
3461 scm_thread_exited_p): New prototypes.
3462 (struct timespec): Define if not already defined.
3463 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
3464 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
3465 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
3466 scm_cond_broadcast, scm_cond_destroy): Declarations moved here and
3467 deprecated.
3468
3469 * threads.c: Include <errno.h>. Include "coop-pthreads.c" when
3470 requested.
3471 (scm_thread_exited_p): New.
3472 (scm_try_mutex, scm_broadcast_condition_variable): Newly
3473 registered procedures.
3474 (scm_wait_condition_variable, scm_timed_wait_condition_variable):
3475 Use the latter as the procedure for "wait-condition-variable",
3476 thus offering a optional timeout parameter to Scheme.
3477 (scm_wait_condition_variable): Implement in terms of
3478 scm_timed_wait_condition_variable.
3479 (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
3480 scm_mutex_unlock, scm_mutex_destroy, scm_cond_init,
3481 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
3482 scm_cond_broadcast, scm_cond_destroy): Implement in terms of
3483 scm_make_mutex, etc, and deprecate.
3484 (scm_init_threads): Do not create smobs, leave this to
3485 scm_threads_init. Do not include "threads.x" file.
3486 (scm_init_thread_procs): New, include "threads.x" here.
3487
3488 * null-threads.h (scm_null_mutex, scm_null_mutex_init,
3489 scm_null_mutex_lock, scm_null_mutex_unlock,
3490 scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init,
3491 scm_null_condvar_wait, scm_null_condvar_signal,
3492 scm_null_condvar_destroy): Removed.
3493 (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init,
3494 scm_cond_wait, scm_cond_signal, scm_cond_broadcast,
3495 scm_cond_destory): Do not define, they are now deprecated and
3496 handled by threads.{h,c}.
3497
3498 * null-threads.c (scm_null_mutex, scm_null_cond): Define here.
3499 (scm_threads_init): Create smobs here, using the appropriate
3500 sizes.
3501 (block): Removed, now unused.
3502 (scm_c_thread_exited_p): New.
3503 (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock,
3504 scm_null_mutex_destroy, scm_null_condvar_init,
3505 scm_null_condvar_wait, scm_null_condvar_signal,
3506 scm_null_condvar_destroy): Removed and updated users to do their
3507 task directly.
3508 (scm_try_mutex, timeval_subtract,
3509 scm_timed_wait_condition_variable,
3510 scm_broadcast_condition_variable): New.
3511 (scm_wait_condition_variable): Removed.
3512
3513 * coop-defs.h (coop_m): Added 'level' field.
3514 (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock,
3515 scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init,
3516 scm_cond_wait, scm_cond_timedwait, scm_cond_signal,
3517 scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not
3518 define.
3519 (coop_condition_variable_broadcast): New.
3520
3521 * coop-threads.c (scm_threads_init): Create smobs here, using the
3522 appropriate sizes.
3523 (scm_c_thread_exited_p, scm_try_mutex,
3524 scm_timed_wait_condition_variable,
3525 scm_broadcast_condition_variable): New.
3526 (scm_wait_condition_variable): Removed.
3527
3528 * coop.c (coop_new_mutex_init): Initialize level.
3529 (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain
3530 level.
3531 (coop_condition_variable_signal): Renamed to
3532 coop_condition_variable_broadcast and reimplemented in terms of
3533 that. Thus...
3534 (coop_condition_variable_broadcast): New.
3535
3536 * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc.
3537
3538 * coop-pthreads.h, coop-pthreads.c: New, but unfinished.
3539
087ed40d
MV
35402002-10-21 Marius Vollmer <mvo@zagadka.ping.de>
3541
65a23095
MV
3542 * null-threads.c: Include <time.h>. Also, use <...> for inclusion
3543 of system headers.
3544
087ed40d
MV
3545 * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG):
3546 New. Use it instead of SCM_MAKE_VALIDATE in lots of places to
30f920c3 3547 give better error messages. Thanks to Bill Schottstaedt!
087ed40d 3548
5ec1d2c8
DH
35492002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
3550
3551 * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed
3552 scm_definedp to scm_defined_p and deprecated scm_definedp.
3553
100ae50d
DH
35542002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de>
3555
3556 * async.h, async.c (scm_system_async): Fixed deprecation to work
3557 correctly when deprecated features are excluded.
3558
2794cb50
MV
35592002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3560
3561 * async.c (scm_system_async_mark_for_thread): Validate thread
3562 argument.
3563
3564 * coop-threads.c (scm_i_thread_root): Do not validate argument.
3565
3566 * feature.c (scm_init_feature): Don't add 'threads' for
3567 USE_NULL_THREADS.
3568
3569 * inline.h (scm_cell, scm_double_cell): Also allow
3570 USE_NULL_THREADS to not protect the slot initializers.
3571
3572 * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not
3573 "USE_THREAD".
3574
3575 * Makefile.am (noinst_HEADERS): Added null-threads.c.
3576 (modinclude_HEADERS): Added null-threads.h.
3577
3578 * threads.h: Include null-threads.h when !USE_COOP_THREADS.
3579 * threads.c: Include null-threads.c when !USE_COOP_THREADS.
3580 (scm_init_threads): Use generic type names scm_t_mutex and
3581 scm_t_cond instead of coop_m and coop_c.
3582
3583 * null-threads.c, null-threads.h: New files.
3584
ff810d7a
MV
35852002-10-15 Marius Vollmer <mvo@zagadka.ping.de>
3586
3587 * Makefile.am: Replaced "$<" in non-pattern rules with its value.
3588 This is to support makes that know about "$<" only in pattern
3589 rules, like Sun's make.
3590
a90bdb73
MV
35912002-10-13 Marius Vollmer <mvo@zagadka.ping.de>
3592
3593 * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute
3594 substitution. Thanks to David Allouche!
3595
e71a8bf2
DH
35962002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de>
3597
3598 * evalext.h: Replaced SCM_DEBUG_DEPRECATED with
3599 !SCM_ENABLE_DEPRECATED.
3600
41f77ff5
MV
36012002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3602
504d99c5 3603 * async.c (scm_system_async_mark_for_thread): Only call
41f77ff5
MV
3604 scm_i_thread_root when USE_THREADS is defined. Use scm_root
3605 otherwise.
3606
3607 * scmsigs.c (take_signal): Only call scm_i_thread_root when
3608 USE_THREADS is defined. Use scm_root otherwise.
3609 (scm_sigaction_for_thread): Ignore THREAD argument when
3610 USE_THREADS is not defined. Also, move THREAD argument defaulting
3611 out of HAVE_SIGACTION section, which was a bug.
3612
6d16b125
MV
36132002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
3614
3615 * scmsigs.c (scm_sigaction_for_thread): Store original handler in
3616 signal_handlers, not the closure that is used as the async.
3617 The closure is stored in signal_handler_cells, as previously.
3618
acfa1f52
MV
36192002-10-10 Marius Vollmer <mvo@zagadka.ping.de>
3620
3621 * root.h (scm_root_state): Added 'block_async' slot.
3622 (scm_active_asyncs): Removed abbrev.
3623 * root.c (scm_make_root): Initialize 'block_asyncs' slot.
3624
3625 * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs
3626 abbrev.
3627
3628 * async.h (scm_call_with_blocked_asyncs,
3629 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
3630 scm_c_call_with_unblocked_asyncs): New prototypes.
3631 (scm_mask_signals, scm_unmask_signals): Deprecated.
3632 (scm_mask_ints): Turned into a macro.
3633 * async.c (scm_mask_ints): Removed.
3634 (scm_run_asyncs): Do not set scm_mask_ints while running an async.
3635 this should not be necessary.
3636 (scm_async_click): Test block_asyncs instead of scm_mask_ints.
3637 (scm_mask_signals, scm_unmask_signals): Deprecated. Emit
3638 deprecation warning and check for errornous use. Set block_asyncs
3639 instead of scm_mask_ints.
3640 (increase_block, decrease_block, scm_call_with_blocked_asyncs,
3641 scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs,
3642 scm_c_call_with_unblocked_asyncs): New.
3643
3644 * script.c (scm_compile_shell_switches): Do not set scm_mask_ints.
3645 Asyncs are enabled by default.
3646
34010f56
NJ
36472002-10-09 Neil Jerram <neil@ossau.uklinux.net>
3648
3649 * vports.c (scm_make_soft_port): Allow vector argument to carry a
3650 6th element: an input waiting thunk.
3651 (sf_input_waiting): New.
3652
9310d6f2
MV
36532002-10-05 Marius Vollmer <mvo@zagadka.ping.de>
3654
3655 * root.c (root_mark): Mark active_asyncs slot.
3656
3657 * async.c (scm_async_click): Set the cdr of a executed handler
3658 cell to SCM_BOOL_F, not SCM_EOL.
3659 (scm_i_queue_async_cell): Queue the cell at the end of the list,
3660 and only if the handler procedure is not already present.
3661 (scm_system_async_mark_for_thread): Initialize cdr of handler cell
3662 with SCM_BOOL_F.
3663 * scmsigs.c (scm_sigaction_for_thread): Likewise.
3664
ac48c719
RB
36652002-10-04 Rob Browning <rlb@defaultvalue.org>
3666
1360a142
RB
3667 * guile.c (main): switch to scm_lt_dlset_preloaded_symbols;
3668
3669 * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle,
3670 scm_lt_dlopenext, and scm_lt_dlerror.
3671 (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose,
3672 and scm_lt_dlerror.
3673 (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym,
3674 and scm_lt_dlerror.
3675 (sysdep_dynl_init): switch to scm_lt_dlinit();
3676
3677 * Makefile.am (libguile_la_LIBADD): switch to use
3678 libguile-ltdl.la.
3679
504d99c5 3680 * numbers.c (scm_integer_expt): (expt 0 1) should be 1.
ac48c719 3681
497092c9
MV
36822002-10-04 Marius Vollmer <mvo@zagadka.ping.de>
3683
3684 * scmsigs.h (scm_sigaction_for_thread): New prototype.
3685 * scmsigs.c (got_signal): Removed.
3686 (signal_handler_cells, signal_handler_threads): New.
3687 (take_signal): Queue the cell of the signal for the specified
3688 thread. Reset the signal handler on systems that don't have
3689 sigaction.
3690 (sys_deliver_signals): Removed.
3691 (close_1): New.
3692 (scm_sigaction_for_thread): Renamed from scm_sigaction and
3693 extended to also set the thread of a signal and allocate a cell
3694 for it. Keep the Scheme name "sigaction". Check that signum is
3695 within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS.
3696 (scm_sigaction): Implement in terms of scm_sigaction_for_thread.
3697 (scm_init_scmsigs): Allocate signal_handler_cells and
3698 signal_handler_threads vectors.
3699
3700 * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so
3701 that system asnycs and user asyncs are separated. Reimplemented
3702 system asyncs to work per-thread.
3703
3704 * gc.c (scm_init_gc): Do not use scm_system_async.
3705
3706 * async.h (scm_asyncs_pending, scm_set_tick_rate,
3707 scm_set_switch_rate, scm_system_async_mark_from_signal_handler):
3708 Removed prototypes.
3709 (scm_i_queue_async_cell): New.
3710
3711 * __scm.h (scm_asyncs_pending_p): Removed.
3712 (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of
3713 scm_asyncs_pending_p.
3714
3715 * async.h (scm_system_async_mark_for_thread): New prototype.
3716
3717 * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code.
3718
3719 * root.h (scm_root_state): Added new "active_asyncs" slot.
3720 * root.c (scm_make_root): Initialize it to SCM_EOL.
3721
3722 * coop-defs.h (coop_t): Added new "handle" slot.
3723 * coop-threads.c (all_threads, scm_current_thread,
3724 scm_all_threads, scm_i_thread_root): New.
3725 (scm_threads_init): Add main thread to all_threads.
3726 (scheme_launch_thread): Remove thread from all_threads when it
3727 terminates.
3728 (scm_call_with_new_thread): Initialize handle slot of coop_t
3729 structure and add new thread to all_threads.
3730 (scm_spawn_thread): Likewise.
3731
3732 * threads.h (scm_current_thread, scm_all_threads): New prototypes.
3733 * threads.c (scm_current_thread, scm_all_threads): Register as
3734 primitives.
3735
3736 * dynl.c: Use scm_lt_ prefix for libltdl functions.
3737
480fa28d
NJ
37382002-09-29 Neil Jerram <neil@ossau.uklinux.net>
3739
3740 * script.c (scm_compile_shell_switches): Fix bad spelling of
3741 `explicitly' in comment.
3742
37432002-09-28 Neil Jerram <neil@ossau.uklinux.net>
3744
3745 * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid):
3746 Refer to provided? in doc string rather than deprecated feature?.
3747
3553e1d1
GH
37482002-09-24 Gary Houston <ghouston@arglist.com>
3749
3750 * inline.h (scm_double_cell): prevent reordering of statements
3751 with any following code (for GCC 3 strict-aliasing).
3752 * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed
3753 the earlier version of the reordering prevention.
3754
4ad0814a
HWN
37552002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl>
3756
3757 * inline.h (scm_double_cell): move SET_GCMARK set out of if body.
3758
e88e4f2e
HWN
37592002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl>
3760
3761 * gc-malloc.c (scm_gc_register_collectable_memory): more overflow
3762 protection.
3763
1e71eafb
HWN
37642002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl>
3765
3766 * inline.h: include stdio.h
3767
3768 * smob.c (free_print): abort if scm_debug_cell_accesses_p is set
3769
61ef9c1f
HWN
37702002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl>
3771
dac04e9f
HWN
3772 * gc-segment.c (scm_i_make_initial_segment): check user settings
3773 for sanity.
3774
3775 * gc-malloc.c (scm_gc_init_malloc): check user settings for
3776 sanity.
dac04e9f
HWN
3777
3778 * gc-freelist.c (scm_init_freelist): check user settings for sanity.
3779
ffd72400
HWN
3780 * struct.h: change scm_structs_to_free to scm_i_structs_to_free
3781
3782 * gc-malloc.c (scm_gc_register_collectable_memory): use floats;
1e71eafb
HWN
3783 these won't ever wrap around with high memory usage. Thanks to
3784 Sven Hartrumpf for finding this.
ffd72400 3785
5bd4a949
HWN
3786 * gc-freelist.c: include <stdio.h>
3787
61ef9c1f
HWN
3788 * gc-malloc.c: add DEBUGINFO for mtrigger GCs.
3789
ffd0ef3b
MV
37902002-09-01 Marius Vollmer <mvo@zagadka.ping.de>
3791
a27e3d14
MV
3792 * vectors.h (SCM_VECTOR_REF): New.
3793
ffd0ef3b
MV
3794 * snarf.h (SCM_DEFINE_PUBLIC): New.
3795
f8a1712b
MV
37962002-08-30 Marius Vollmer <mvo@zagadka.ping.de>
3797
3798 * socket.c (scm_addr_vector): Added size of address to arguments.
3799 Use it to avoid accessing a non-existent path in a sockaddr_un.
3800 Changed all callers.
3801
7200a36b
HWN
38022002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl>
3803
1383773b
HWN
3804 * gc.h: remove DOUBLECELL card flags.
3805
3806 * gc-malloc.c (scm_calloc): try to use calloc() before calling
3807 scm_realloc().
3808
3809 * gc-segment.c (scm_i_initialize_heap_segment_data): remove card
3810 init loop; handle this from scm_init_card_freelist()
3811
3812 * gc-card.c (scm_init_card_freelist): init bit vector here.
3813
7200a36b 3814 * numbers.c (scm_make_real): prevent reordering of statements
8fa5786d 3815 num2float.i.c (FLOAT2NUM): idem
7200a36b 3816
9981de3a
HWN
38172002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl>
3818
3819 * eval.h: prepend libguile/ to include path
3820
19647556
MV
38212002-08-26 Marius Vollmer <mvo@zagadka.ping.de>
3822
3823 * script.c (scm_compile_shell_switches): Added "2002" to Copyright
3824