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