Commit | Line | Data |
---|---|---|
9950a42c MV |
1 | 2003-05-17 Marius Vollmer <mvo@zagadka.de> |
2 | ||
3 | * c-tokenize.lex: Gobble up complete lines after a '#'. This | |
4 | removes preprocessor directives from the snarfage that might | |
5 | otherwise confuse us. These directives appear when compiling with | |
6 | "-g3", for example. | |
7 | ||
0068984b HWN |
8 | 2003-05-16 Han-Wen Nienhuys <hanwen@cs.uu.nl> |
9 | ||
26e68795 HWN |
10 | * ChangeLog: add my surname |
11 | ||
0068984b HWN |
12 | * srcprop.c (scm_finish_srcprop): use |
13 | scm_gc_register_collectable_memory() | |
14 | (scm_make_srcprops): idem. | |
15 | ||
131805f0 HWN |
16 | 2003-05-14 Han-Wen Nienhuys <hanwen@cs.uu.nl> |
17 | ||
18 | * gc-malloc.c (scm_gc_register_collectable_memory): avoid | |
19 | wrap-around for scm_mtrigger | |
20 | (scm_gc_register_collectable_memory): abort on overflowing | |
21 | scm_mallocated(). | |
22 | ||
d4611024 KR |
23 | 2003-05-13 Kevin Ryde <user42@zip.com.au> |
24 | ||
25 | * numbers.c (xmpz_cmp_d): New macro, handling infs if gmp doesn't. | |
26 | (scm_num_eq_p, scm_less_p, scm_max, scm_min): Use it. | |
27 | ||
7aaf8dc9 MD |
28 | 2003-05-12 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
29 | ||
dfd03fb9 MD |
30 | * backtrace.c (scm_display_error_message): Introduced fancy |
31 | printing with max level 7 and length 10. (Purpose: avoid printing | |
32 | gigantic objects in error messages.) | |
33 | ||
34 | * print.c, print.h (scm_i_port_with_print_state): New function. | |
35 | ||
36 | * print.c (scm_iprin1, scm_printer_apply, | |
37 | scm_port_with_print_state): Use scm_i_port_with_print_state. | |
38 | (scm_simple_format): Modified not to destroy print states. | |
39 | (print_state_mutex): New mutex. | |
40 | (scm_make_print_state, scm_free_print_state, scm_prin1): | |
41 | Lock/unlock print_state_mutex. | |
42 | ||
7aaf8dc9 MD |
43 | * deprecated.h (SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK): |
44 | Use current names in definitions. | |
45 | ||
a4d9ffa1 KR |
46 | 2003-05-10 Kevin Ryde <user42@zip.com.au> |
47 | ||
48 | * numbers.c (scm_num_eq_p, scm_less_p): Don't pass NaN to mpz_cmp_d. | |
49 | ||
d25e96a4 KR |
50 | * numbers.c (scm_integer_length): On negative bignums, adjust |
51 | mpz_sizeinbase to account for it looking at absolute value where we | |
52 | want ones-complement. | |
53 | ||
54 | * numbers.c (scm_gcd): In bignum/inum, don't pass yy==0 to mpz_gcd_ui | |
55 | since we're only using the ulong return value, and x might not fit. | |
56 | ||
5bf6a6f0 DH |
57 | 2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de> |
58 | ||
59 | * eval.c, eval.h, read.c, read.h (scm_sym_dot): Moved from eval to | |
60 | read. This will allow to make the definition in read.c static. | |
61 | ||
f58c472a DH |
62 | 2003-05-06 Dirk Herrmann <D.Herrmann@tu-bs.de> |
63 | ||
64 | * eval.c, eval.h, evalext.c, evalext.h (scm_m_undefine): Moved | |
65 | from evalext to eval. This will allow to make some of the | |
66 | definitions in eval.c static. | |
67 | ||
90382aeb KR |
68 | 2003-05-06 Kevin Ryde <user42@zip.com.au> |
69 | ||
70 | * numbers.c (scm_difference): In inum - bignum, handle negative inum. | |
71 | (scm_logcount): Use mpz_com, not mpz_neg. | |
72 | ||
3b88ed2a DH |
73 | 2003-05-04 Dirk Herrmann <D.Herrmann@tu-bs.de> |
74 | ||
75 | The purpose of this patch is to make guile's internal memoizers | |
76 | distinguishable from memoizing macros created on the scheme level | |
77 | or from user provided primitive memoizing macros. The reason is, | |
78 | that the internal memoizers are the only ones that are allowed to | |
79 | transform their scheme input into memoizer byte code, while all | |
80 | other memoizing macros may only transform scheme code into new | |
81 | scheme code. | |
82 | ||
83 | To achieve this, a new macro type 'builtin-macro!' is introduced. | |
84 | Currently, 'builtin-macro!'s are handled as memoizing macros, but | |
85 | this will change when the memoizer and executor are separated. | |
86 | ||
87 | * macros.[ch] (scm_i_makbimacro): New. | |
88 | ||
89 | * macros.h (SCM_BUILTIN_MACRO_P): New. | |
90 | ||
91 | * macros.c (macro_print, scm_macro_type): Support builtin-macro!s. | |
92 | ||
93 | * eval.c, goops.c: All of guile's primitive memoizing macros are | |
94 | primitive builtin-macros now. | |
95 | ||
96 | * eval.c (scm_macroexp, SCM_CEVAL): Make sure the primitive | |
97 | builtin-macros are handled equally to memoizing macros. | |
98 | ||
b0780eb1 MV |
99 | 2003-05-04 Marius Vollmer <mvo@zagadka.de> |
100 | ||
101 | * throw.c (scm_ithrow): Remove "asm volatile" hack. It used to | |
102 | work around a bug in GCC 2.95.2 but is now a bug in itself. | |
103 | ||
1cbf4fe9 MV |
104 | 2003-05-02 Marius Vollmer <mvo@zagadka.de> |
105 | ||
106 | * deprecated.h (scm_rstate, scm_rng, SCM_SLOPPY_CONSP, | |
107 | SCM_SLOPPY_NCONSP, scm_tc7_ssymbol, scm_tc7_msymbol, | |
108 | scm_tcs_symbols): New. | |
109 | ||
1a61d41b MV |
110 | 2003-04-30 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
111 | ||
096ecbaf MV |
112 | * deprecated.h, deprecated.c (scm_protect_object, |
113 | scm_unprotect_object, SCM_SETAND_CAR, SCM_SETOR_CAR, | |
114 | SCM_SET_AND_CDR, SCM_SET_OR_CDR, SCM_FREEP, SCM_NFREEP, | |
115 | SCM_GC8MARKP, SCM_SETGC8MARK, SCM_CLRGC8MARK, SCM_GCTYP16, | |
116 | SCM_GCCDR, scm_remember, scm_the_root_module, scm_make_module, | |
117 | scm_ensure_user_module, scm_load_scheme_module, scm_port, | |
118 | scm_ptob_descriptor, scm_port_rw_active, | |
119 | scm_close_all_ports_except): New. | |
120 | ||
1a61d41b MV |
121 | * ports.c (scm_c_port_for_each): New function, mostly copied from |
122 | scm_port_for_each. | |
123 | (scm_port_for_each): Reimplemented using scm_c_port_for_each. | |
124 | * ports.h (scm_c_port_for_each): New prototype. | |
125 | ||
c8e1d354 MD |
126 | 2003-04-28 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
127 | ||
128 | * eval.c (scm_m_atdispatch): Removed until actually needed. (This | |
129 | macro was introduced in anticipation of GOOPS method compilation | |
130 | code.) | |
131 | ||
132 | * goops.c: Removed binding of @dispatch. | |
133 | ||
a4aa2134 DH |
134 | 2003-04-28 Dirk Herrmann <D.Herrmann@tu-bs.de> |
135 | ||
136 | * eval.c, goops.c (@dispatch, @slot-ref, @slot-set!): Move the | |
137 | instructions that bind the macros on the scheme level back to | |
138 | goops.c in order to make sure again that the bindings go into the | |
139 | (oop goops) module and are not visible from the outside. | |
140 | ||
9fbee57e DH |
141 | 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de> |
142 | ||
143 | * eval.c: Non functional change: Separated R5RS and non-R5RS | |
144 | macros into different sections of the file and ordered the | |
145 | memoizers alphabetically. | |
146 | ||
12841895 DH |
147 | 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de> |
148 | ||
149 | * eval.c (scm_ilookup): Rewritten to improve readability. | |
150 | ||
6a3f13f0 DH |
151 | 2003-04-27 Dirk Herrmann <D.Herrmann@tu-bs.de> |
152 | ||
153 | * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2): | |
154 | Partially reverted patch from 2003-04-23 in oder to find a better | |
155 | compromise between readability and debuggability. | |
156 | ||
b0c5d67b DH |
157 | 2003-04-25 Dirk Herrmann <D.Herrmann@tu-bs.de> |
158 | ||
159 | * eval.c, eval.h, goops.c, goops.h (scm_m_atslot_ref, | |
160 | scm_m_atslot_set_x, scm_m_atdispatch): Move the declarations and | |
161 | definitions of the special goops memoizers from goops.[ch] to | |
162 | eval.[ch]. Hmm... it seems that scm_m_atdispatch is not used | |
163 | throughout guile. | |
164 | ||
b9ad392e MD |
165 | 2003-04-24 Mikael Djurfeldt <mdj@kvast.blakulla.net> |
166 | ||
167 | * ports.c, ports.h (scm_i_port_table_mutex): New mutex. | |
168 | ||
169 | * fports.c (scm_evict_ports): Lock/unlock scm_i_port_table_mutex. | |
170 | ||
171 | * ports.c (scm_close_port, scm_flush_all_ports): Ditto. | |
172 | ||
173 | * ioext.c (scm_fdes_to_ports): Ditto. | |
174 | ||
175 | * vports.c (scm_make_soft_port): Changed SCM_DEFER/ALLOW_INTS into | |
176 | lock/unlock scm_i_port_table_mutex. | |
177 | ||
178 | * strports.c (scm_mkstrport): Ditto. | |
179 | ||
180 | * ports.c (scm_void_port, scm_port_for_each): Ditto. | |
181 | ||
182 | * fports.c (scm_fdes_to_port): Ditto. | |
183 | ||
d0b07b5d DH |
184 | 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de> |
185 | ||
186 | This set of patches contains no functional changes, only debatable | |
187 | minor stylistic ones. Still, in order to prepare a patch between | |
188 | my local copy and the CVS version, I decided to submit the changes | |
189 | below. Then, the patch will hopefully only contain relevant | |
190 | modifications :-) | |
191 | ||
192 | * eval.c (iqq): Added const specifier. | |
193 | ||
194 | * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2): | |
195 | Use NULL instead of 0 to indicate that a pointer is returned. | |
196 | Removed some misleading 'fall through' comments. | |
197 | ||
198 | * eval.c (scm_i_call_closure_0, call_closure_1, call_closure_2): | |
199 | Split up long expressions into smaller ones to be more debugging | |
200 | friendly. | |
201 | ||
a98e8e98 DH |
202 | 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de> |
203 | ||
204 | * eval.h (SCM_ENTER_FRAME_HDLR, SCM_APPLY_FRAME_HDLR, | |
205 | SCM_EXIT_FRAME_HDLR): Use SCM_PACK to convert data to a SCM value | |
206 | rather than casting to SCM. | |
207 | ||
c178c3a6 DH |
208 | 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de> |
209 | ||
210 | * sort.c, pairs.h: Removed unnecessary includes. | |
211 | ||
d339981a DH |
212 | 2003-04-23 Dirk Herrmann <D.Herrmann@tu-bs.de> |
213 | ||
214 | * sort.c: Replaced hand-made trampline code by the new official | |
215 | mechanism from eval.c. This fixes a segfault in the new test file | |
216 | sort.test. | |
217 | ||
218 | (quicksort, compare_function, scm_restricted_vector_sort_x, | |
219 | scm_sorted_p, scm_merge, scm_merge_list_x, scm_merge_x, | |
220 | scm_merge_list_step, scm_sort_x, scm_sort, scm_merge_vector_x, | |
221 | scm_merge_vector_step, scm_stable_sort_x, scm_stable_sort, | |
222 | scm_sort_list_x, scm_sort_list): Use trampoline mechanism from | |
223 | eval.c. | |
224 | ||
225 | (subr2less, lsubrless, closureless, applyless, scm_cmp_function, | |
226 | cmp_fun_t): Removed. | |
227 | ||
228 | (compare_function): Added. | |
229 | ||
230 | * sort.c (quicksort, SWAP, stack_node): Replaced pointer | |
231 | arithmetics with index arithmetics. Changed quicksort to work on | |
232 | an array of SCM values instead of an array of characters. Avoid | |
233 | bytewise copying of SCM elements. Avoid allocating memory on the | |
234 | stack with alloca. Fixed some comments. | |
235 | ||
821f18a4 DH |
236 | 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de> |
237 | ||
238 | * eval.c (EXTEND_ENV): Eliminated. | |
239 | ||
240 | (unmemocopy, SCM_CEVAL, SCM_APPLY): Use SCM_EXTEND_ENV instead of | |
241 | EXTEND_ENV. | |
242 | ||
94fb5a6e DH |
243 | 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de> |
244 | ||
245 | * __scm.h (SCM_DEBUG_DEBUGGER_SUPPORT): New compile-time option. | |
246 | ||
247 | * gc.card.c (scm_gc_marked_p): Fixed compiler warning when | |
248 | compiling with SCM_DEBUG==1 by moving definition behind prototype. | |
249 | ||
250 | * gc.card.c (scm_dbg_t_list_cell, scm_dbg_t_double_cell, | |
251 | scm_dbg_gc_marked_p, scm_dbg_gc_get_card, scm_dbg_gc_get_bvec, | |
252 | scm_t_list_cell_struct, scm_t_list_cell, scm_t_double_cell, | |
253 | scm_gc_marked_p, scm_gc_get_card, scm_gc_get_bvec): Fixed | |
254 | functions such that they check if the object is a non-immediate. | |
255 | Further, renamed identifiers to use the scm_dbg_ prefix and made | |
256 | their inclusion into the lib dependent of the | |
257 | SCM_DEBUG_DEBUGGER_SUPPORT compile time option. | |
258 | ||
fce0b22d DH |
259 | 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de> |
260 | ||
261 | * __scm.h: Fixed comment about the SCM_DEBUG_TYPING_STRICTNESS | |
262 | debug option. | |
263 | ||
1685446c DH |
264 | 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de> |
265 | ||
821f18a4 | 266 | * list.c (scm_ilength, scm_last_pair), unif.c (l2ra): Prefer |
1685446c DH |
267 | !SCM_CONSP over SCM_NCONSP. Now, guile itself does not include |
268 | any calls to SCM_NCONSP any more. | |
269 | ||
270 | * unif.c (l2ra): Eliminate redundant check. | |
271 | ||
9ff1720f DH |
272 | 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de> |
273 | ||
274 | * list.c (scm_cons_star), ramap.c (scm_ra_sum, scm_ra_product, | |
275 | scm_array_map_x), unif.c (l2ra): Prefer !SCM_NULLP over | |
276 | SCM_NNULLP. Now, guile itself does not include any calls to | |
277 | SCM_NNULLP any more. | |
278 | ||
05b15362 DH |
279 | 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de> |
280 | ||
281 | * eval.c (unmemocopy, SCM_APPLY, scm_map, scm_for_each, | |
282 | scm_copy_tree): Place assignment expressions which are part of | |
283 | other expressions into an expression of their own. | |
284 | ||
0c88d7df DH |
285 | 2003-04-21 Dirk Herrmann <D.Herrmann@tu-bs.de> |
286 | ||
287 | * goops.c (TEST_CHANGE_CLASS, scm_sys_initialize_object): Don't | |
288 | compare SCM values with !=. | |
289 | ||
5cb22e96 DH |
290 | 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de> |
291 | ||
292 | * eval.c, eval.h, evalext.c, evalext.h (scm_sym_setter, | |
293 | scm_m_generalized_set_x, scm_init_evalext): Move the declaration | |
294 | and definition of the memoizer for the generalized set! macro from | |
295 | evalext.[ch] to eval.[ch]. Use the SCM_SYNTAX snarfer macro to | |
296 | define the macro object. | |
297 | ||
298 | * eval.c, eval.h (s_set_x, scm_s_set_x, scm_m_set_x, | |
299 | scm_m_generalized_set_x): Since now scm_s_set_x is only used in | |
300 | eval.c, it is made static and renamed to s_set_x. | |
301 | ||
302 | * evalext.c (scm_defined_p, scm_m_undefine): Prefer !SCM_<foo> | |
303 | over SCM_N<foo>. | |
304 | ||
a44a9715 DH |
305 | 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de> |
306 | ||
307 | * eval.c, root.h (scm_undefineds, SCM_NUM_PROTECTS, undefineds, | |
308 | scm_init_eval): Made scm_undefineds static in eval.c, renamed it | |
309 | to undefineds and registered the object as a permanent object. | |
310 | ||
311 | * eval.c, eval.h (scm_f_apply, scm_init_eval): Made scm_f_apply | |
312 | static in eval.c, renamed it to f_apply and registered the object | |
313 | as a permanent object. | |
314 | ||
1b43d24c DH |
315 | 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de> |
316 | ||
5cb22e96 | 317 | * eval.c (SCM_BIT7, SCM_BIT8, unmemocopy, SCM_CEVAL): Renamed |
1b43d24c DH |
318 | file-local macro SCM_BIT8 to SCM_BIT7, which is more appropriate. |
319 | ||
aec16f99 DH |
320 | 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de> |
321 | ||
322 | * numbers.c (scm_logtest): Fixed argument bug in the call to | |
323 | mpz_and, which showed up when compiling with SCM_DEBUG defined. | |
324 | ||
f96460ce DH |
325 | 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de> |
326 | ||
327 | * gc-card.c (scm_i_sweep_card, scm_i_init_card_freelist): Fixed | |
328 | type errors that showed up when compiling with SCM_DEBUG defined. | |
329 | ||
d0f6ceb8 DH |
330 | 2003-04-20 Dirk Herrmann <D.Herrmann@tu-bs.de> |
331 | ||
332 | * continuations.c, continuations.h, eval.c, eval.h, extensions.c, | |
333 | gsubr.c, guile.c, init.c, read.c, root.c, root.h, stackchk.h, | |
334 | throw.c: Removed uses of DEBUG_EXTENSIONS and DYNAMIC_LINKING to | |
335 | fix compile errors with --disable-deprecated. | |
336 | ||
19a7a089 RB |
337 | 2003-04-17 Rob Browning <rlb@defaultvalue.org> |
338 | ||
339 | * numbers.c (scm_integer_expt): fix case where we were declaring | |
340 | vars in the middle of a statement block. Thanks to Thamer | |
341 | Al-Harbash. | |
342 | ||
47cd67db MD |
343 | 2003-04-17 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
344 | ||
0fd7dcd3 MD |
345 | * goops.c (TEST_CHANGE_CLASS): Update variable class after class |
346 | change. | |
347 | ||
47cd67db MD |
348 | * eq.c (scm_eqv_p): Turned into a primitive generic. |
349 | ||
3b8b889c RB |
350 | 2003-04-16 Rob Browning <rlb@defaultvalue.org> |
351 | ||
312006bb RB |
352 | * gc_os_dep.c: Added patch for UnixWare and OpenUNIX support. |
353 | Thanks to Boyd Gerber. | |
354 | Added check for __arm__ in addition to arm for LINUX and copied | |
355 | __s390__ defines from upstream libgc. Thanks to James Treacy for | |
356 | reporting the problems. | |
c7ef2ea1 | 357 | |
3b8b889c RB |
358 | * numbers.c (PTRDIFF_MIN): use SCM_CHAR_BIT. |
359 | ||
360 | * socket.c: use SCM_CHAR_BIT. | |
361 | ||
362 | * random.c (scm_c_random_bignum): use SCM_CHAR_BIT. | |
363 | ||
364 | * num2integral.i.c (NUM2INTEGRAL): use SCM_CHAR_BIT. | |
365 | ||
43261b39 MD |
366 | 2003-04-16 Mikael Djurfeldt <mdj@kvast.blakulla.net> |
367 | ||
368 | * feature.c (scm_init_feature): Always add threads feature. | |
369 | ||
58241edc MD |
370 | 2003-04-15 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
371 | ||
372 | * goops.c (scm_sys_fast_slot_ref): Use SCM_SLOT instead of | |
373 | scm_at_assert_bound_ref. (We don't want the unbound check. See | |
374 | oop/goops/active-slot.scm.) | |
375 | ||
94e91275 RB |
376 | 2003-04-14 Rob Browning <rlb@defaultvalue.org> |
377 | ||
378 | * tags.h: scm_t_intptr should have been intptr_t. | |
379 | ||
3071ea27 RB |
380 | 2003-04-13 Rob Browning <rlb@defaultvalue.org> |
381 | ||
382 | * __scm.h (SCM_FLUSH_REGISTER_WINDOWS): don't just rely on "sparc" | |
383 | test. Instead use | |
384 | #if defined (sparc) || defined (__sparc__) || defined (__sparc) | |
385 | as gc_os_dep.c suggests is appropriate. | |
386 | ||
387 | * goops.c (prep_hashsets): make static to match prototype. | |
388 | (scm_sym_args): SCM_SYMBOL -> SCM_GLOBAL_SYMBOL. Thanks to Albert | |
389 | Chin. | |
390 | ||
391 | * c-tokenize.lex: remove trailing comma from enum. Thanks to | |
392 | Albert Chin. | |
393 | ||
394 | * gc_os_dep.c: add NetBSD powerpc config info. Thanks to Thomas | |
395 | Klausner. | |
396 | ||
21ab2aeb MD |
397 | 2003-04-13 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
398 | ||
399 | * goops.c (scm_sys_prep_layout_x): Instance allocation is now | |
400 | indicated through extra fields in getters-n-setters. | |
401 | (scm_add_slot): Adapted to new format of getters_n_setters slot. | |
402 | (Thanks to Andy Wingo.) | |
403 | ||
dff96e95 HWN |
404 | 2003-02-25 Han-Wen Nienhuys <hanwen@cs.uu.nl> |
405 | ||
406 | * gc-segment.c: add comment | |
407 | ||
07921c76 RB |
408 | 2003-04-07 Rob Browning <rlb@defaultvalue.org> |
409 | ||
b5331f10 RB |
410 | * debug.h: change "id" arg name to "info_id" to avoid objective-c |
411 | clash. | |
412 | ||
07921c76 RB |
413 | * num2integral.i.c (NUM2INTEGRAL): fix bug pointed out by Mikael |
414 | and add regression test to standalone/. | |
415 | ||
416 | 2003-04-06 Rob Browning <rlb@defaultvalue.org> | |
417 | ||
418 | * strings.c (scm_mem2string): use memcpy rather than by-hand loop. | |
419 | Thanks to Dale P. Smith. | |
420 | ||
421 | * random.c: #include gmp.h. | |
422 | (scm_c_random_bignum): normalize result on return. | |
423 | ||
424 | * init.c: #include gmp.h. | |
425 | ||
426 | * numbers.h: remove the gmp.h #include (not needed now). | |
427 | ||
428 | * posix.h: change occurences of "id" to something else so we don't | |
429 | cause trouble when included via objective-c (can't hurt, might | |
430 | help). Still have usage in debug.h, though. | |
431 | ||
938f6b7c MD |
432 | 2003-04-06 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
433 | ||
372691d8 MD |
434 | * random.c (scm_c_random_bignum): Don't generate a random number |
435 | equal to m (the second argument of scm_c_random_bignum); only | |
436 | generate numbers in the range 0 <= r < m. | |
c5f268f8 MD |
437 | (scm_c_default_rstate): Use SCM_VARIABLE_REF to access |
438 | scm_var_random_state. | |
372691d8 | 439 | |
938f6b7c MD |
440 | * num2integral.i.c (INTEGRAL2BIG): Put negation of n inside then |
441 | clause. | |
442 | ||
6cdb8c3f RB |
443 | 2003-04-05 Rob Browning <rlb@defaultvalue.org> |
444 | ||
938f6b7c | 445 | * modules.c (scm_module_import_interface): move declaration of |
6cdb8c3f RB |
446 | uses before any code. |
447 | ||
15635be5 MD |
448 | 2003-04-05 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
449 | ||
1ecfd013 MD |
450 | * Makefile.am (scmconfig.h): Look for config.h in top_builddir, |
451 | not top_srcdir. | |
452 | ||
15635be5 MD |
453 | * hashtab.c (rehash_after_gc): Clear to_rehash list before |
454 | processing it in order to avoid an infinite loop. | |
455 | ||
456 | * print.c (scm_prin1): Remember old state of pstate->writingp. | |
457 | ||
73be1d9e MV |
458 | 2003-04-05 Marius Vollmer <mvo@zagadka.de> |
459 | ||
460 | * Changed license terms to the plain LGPL thru-out. | |
461 | ||
ad815c06 RB |
462 | 2003-04-04 Rob Browning <rlb@defaultvalue.org> |
463 | ||
464 | * socket.c (FLIPCPY_NET_HOST_128): new macro. | |
465 | (ipv6_net_to_num, ipv6_num_to_net, bignum_in_ipv6_range_p): | |
466 | rewrite to handle GMP bignums. | |
467 | ||
468 | ||
469 | * random.c (scm_c_random_bignum): rewrite to handle GMP bignums. | |
470 | ||
471 | * ports.c (scm_getc): minor tweak. | |
472 | ||
473 | * numbers.h: remove SCM_BIGDIG conditionals, reorganize, and | |
474 | rewrite to handle GMP bignums. | |
475 | ||
476 | * numbers.c: rewrite *many* functions to handle GMP bignums. | |
477 | ||
478 | * num2integral.i.c (NUM2INTEGRAL, INTEGRAL2NUM, INTEGRAL2BIG): | |
479 | handle GMP bignums. | |
480 | ||
481 | * num2float.i.c (NUM2FLOAT): handle GMP bignums. | |
482 | ||
483 | * init.c (check_config): remove SCM_BIGDIG conditionals. | |
484 | (scm_init_guile_1): test to make sure mpz_t fits in a double_cell. | |
485 | ||
486 | * gc-card.c ("sweep_card"): handle new mpz_t bignums. | |
487 | ||
488 | * eval.c: remove SCM_BIGDIG conditionals. | |
489 | ||
490 | * eq.c (s_scm_eqv_p): scm_i_bigcomp -> scm_i_bigcmp. | |
491 | ||
6cdb8c3f RB |
492 | 2003-03-31 Rob Browning <rlb@defaultvalue.org> |
493 | ||
494 | * Makefile.am (scmconfig.h): change srcdir to builddir. (Thanks | |
495 | to Kevin Ryde.) | |
496 | ||
497 | 2003-03-27 Rob Browning <rlb@defaultvalue.org> | |
498 | ||
499 | * threads.h: fix various preprocessor usages of new public | |
500 | symbols to expect 0 or 1 values rather than 1 or undefined. | |
501 | i.e. change #ifdef to #if, etc. | |
502 | ||
503 | * threads.c: fix various preprocessor usages of new public | |
504 | symbols to expect 0 or 1 values rather than 1 or undefined. | |
505 | i.e. change #ifdef to #if, etc. | |
506 | ||
507 | * tags.h: fix various preprocessor usages of new public | |
508 | symbols to expect 0 or 1 values rather than 1 or undefined. | |
509 | i.e. change #ifdef to #if, etc. | |
510 | ||
511 | * stacks.c: fix various preprocessor usages of new public | |
512 | symbols to expect 0 or 1 values rather than 1 or undefined. | |
513 | i.e. change #ifdef to #if, etc. | |
514 | ||
515 | * stackchk.h: fix various preprocessor usages of new public | |
516 | symbols to expect 0 or 1 values rather than 1 or undefined. | |
517 | i.e. change #ifdef to #if, etc. | |
518 | ||
519 | * stackchk.c: fix various preprocessor usages of new public | |
520 | symbols to expect 0 or 1 values rather than 1 or undefined. | |
521 | i.e. change #ifdef to #if, etc. | |
522 | ||
523 | * sort.c: fix various preprocessor usages of new public | |
524 | symbols to expect 0 or 1 values rather than 1 or undefined. | |
525 | i.e. change #ifdef to #if, etc. | |
526 | ||
527 | * read.c: fix various preprocessor usages of new public | |
528 | symbols to expect 0 or 1 values rather than 1 or undefined. | |
529 | i.e. change #ifdef to #if, etc. | |
530 | ||
531 | * random.c: fix various preprocessor usages of new public | |
532 | symbols to expect 0 or 1 values rather than 1 or undefined. | |
533 | i.e. change #ifdef to #if, etc. | |
534 | ||
535 | * print.c: fix various preprocessor usages of new public | |
536 | symbols to expect 0 or 1 values rather than 1 or undefined. | |
537 | i.e. change #ifdef to #if, etc. | |
538 | ||
539 | * objects.c: fix various preprocessor usages of new public | |
540 | symbols to expect 0 or 1 values rather than 1 or undefined. | |
541 | i.e. change #ifdef to #if, etc. | |
542 | ||
543 | * numbers.h: fix various preprocessor usages of new public | |
544 | symbols to expect 0 or 1 values rather than 1 or undefined. | |
545 | i.e. change #ifdef to #if, etc. | |
546 | ||
547 | * null-threads.c: fix various preprocessor usages of new public | |
548 | symbols to expect 0 or 1 values rather than 1 or undefined. | |
549 | i.e. change #ifdef to #if, etc. | |
550 | ||
551 | * lang.c: fix various preprocessor usages of new public | |
552 | symbols to expect 0 or 1 values rather than 1 or undefined. | |
553 | i.e. change #ifdef to #if, etc. | |
554 | ||
555 | * lang.h: fix various preprocessor usages of new public | |
556 | symbols to expect 0 or 1 values rather than 1 or undefined. | |
557 | i.e. change #ifdef to #if, etc. | |
558 | ||
559 | * iselect.h: fix various preprocessor usages of new public | |
560 | symbols to expect 0 or 1 values rather than 1 or undefined. | |
561 | i.e. change #ifdef to #if, etc. | |
562 | ||
563 | * init.c: fix various preprocessor usages of new public | |
564 | symbols to expect 0 or 1 values rather than 1 or undefined. | |
565 | i.e. change #ifdef to #if, etc. | |
566 | ||
567 | * gh_data.c: fix various preprocessor usages of new public | |
568 | symbols to expect 0 or 1 values rather than 1 or undefined. | |
569 | i.e. change #ifdef to #if, etc. | |
570 | ||
571 | * gh.h: fix various preprocessor usages of new public | |
572 | symbols to expect 0 or 1 values rather than 1 or undefined. | |
573 | i.e. change #ifdef to #if, etc. | |
574 | ||
575 | * gen-scmconfig.c: change most new public symbols to be defined to | |
576 | 0 or 1 rather than being either 1 or undefined. | |
577 | ||
578 | * gc_os_dep.c: fix various preprocessor usages of new public | |
579 | symbols to expect 0 or 1 values rather than 1 or undefined. | |
580 | i.e. change #ifdef to #if, etc. | |
581 | (STACK_GROWS_DOWN): define to 0 or 1 rather than 1 or undef. | |
582 | ||
583 | * gc.h: fix various preprocessor usages of new public | |
584 | symbols to expect 0 or 1 values rather than 1 or undefined. | |
585 | i.e. change #ifdef to #if, etc. | |
586 | ||
587 | * gc-card.c: fix various preprocessor usages of new public | |
588 | symbols to expect 0 or 1 values rather than 1 or undefined. | |
589 | i.e. change #ifdef to #if, etc. | |
590 | ||
591 | * gc-mark.c: fix various preprocessor usages of new public | |
592 | symbols to expect 0 or 1 values rather than 1 or undefined. | |
593 | i.e. change #ifdef to #if, etc. | |
594 | ||
595 | * feature.c: fix various preprocessor usages of new public | |
596 | symbols to expect 0 or 1 values rather than 1 or undefined. | |
597 | i.e. change #ifdef to #if, etc. | |
598 | ||
599 | * evalext.c: fix various preprocessor usages of new public | |
600 | symbols to expect 0 or 1 values rather than 1 or undefined. | |
601 | i.e. change #ifdef to #if, etc. | |
602 | ||
603 | * eval.h: fix various preprocessor usages of new public | |
604 | symbols to expect 0 or 1 values rather than 1 or undefined. | |
605 | i.e. change #ifdef to #if, etc. | |
606 | ||
607 | * eval.c: fix various preprocessor usages of new public | |
608 | symbols to expect 0 or 1 values rather than 1 or undefined. | |
609 | i.e. change #ifdef to #if, etc. | |
610 | ||
611 | * eq.c: fix various preprocessor usages of new public | |
612 | symbols to expect 0 or 1 values rather than 1 or undefined. | |
613 | i.e. change #ifdef to #if, etc. | |
614 | ||
615 | * coop.c: fix various preprocessor usages of new public | |
616 | symbols to expect 0 or 1 values rather than 1 or undefined. | |
617 | i.e. change #ifdef to #if, etc. | |
618 | ||
619 | * coop-threads.c: fix various preprocessor usages of new public | |
620 | symbols to expect 0 or 1 values rather than 1 or undefined. | |
621 | i.e. change #ifdef to #if, etc. | |
622 | ||
623 | * coop-pthreads.c: fix various preprocessor usages of new public | |
624 | symbols to expect 0 or 1 values rather than 1 or undefined. | |
625 | i.e. change #ifdef to #if, etc. | |
626 | ||
627 | * coop-defs.h: fix various preprocessor usages of new public | |
628 | symbols to expect 0 or 1 values rather than 1 or undefined. | |
629 | i.e. change #ifdef to #if, etc. | |
630 | ||
631 | * convert.i.c: fix various preprocessor usages of new public | |
632 | symbols to expect 0 or 1 values rather than 1 or undefined. | |
633 | i.e. change #ifdef to #if, etc. | |
634 | ||
635 | * continuations.c: fix various preprocessor usages of new public | |
636 | symbols to expect 0 or 1 values rather than 1 or undefined. | |
637 | i.e. change #ifdef to #if, etc. | |
638 | ||
639 | * _scm.h: fix various preprocessor usages of new public symbols to | |
640 | expect 0 or 1 values rather than 1 or undefined. i.e. change | |
641 | #ifdef to #if, etc. | |
642 | ||
d11d697a MV |
643 | 2003-03-26 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
644 | ||
9686f86d MV |
645 | * init.c (scm_init_guile_1): Call scm_i_init_deprecated. |
646 | ||
647 | * deprecated.c, deprecated.h: New files, to collect deprecated | |
648 | things in one place. | |
649 | * Makefile.am: Added them in all the right places. | |
650 | ||
d11d697a MV |
651 | * Makefile.am (EXTRA_DIST): Added "scmconfig.h.top". |
652 | (scmconfig.h): Get "scmconfig.h.top" from $(srcdir) so that VPATH | |
653 | builds work. | |
9686f86d MV |
654 | (DOT_X_FILES): Removed "iselect.x". |
655 | (DOT_DOC_FILES): Removed "iselect.doc". | |
d11d697a | 656 | |
e3c0c3b9 RB |
657 | 2003-03-25 Rob Browning <rlb@defaultvalue.org> |
658 | ||
659 | * win32-socket.h: #include "libguile/__scm.h". Replace usage of | |
660 | HAVE_WINSOCK2_H with SCM_HAVE_WINSOCK2_H. | |
661 | ||
662 | * win32-socket.c: #include <config.h> if HAVE_CONFIG_H. | |
663 | ||
664 | * vports.c: #include <config.h> if HAVE_CONFIG_H. | |
665 | ||
666 | * unif.c: #include <config.h> if HAVE_CONFIG_H. Replace usage of | |
667 | HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". | |
668 | ||
669 | * threads.h: replace usage of struct timespect with | |
670 | scm_t_timespec. Replace usage of USE_PTHREAD_THREADS with | |
671 | SCM_USE_PTHREAD_THREADS. Remove typedef for struct timespec in | |
672 | favor of scm_t_timespec from scmconfig.h. | |
673 | ||
674 | * threads.c: move libguile/_scm.h include to the top so we pick up | |
675 | any critical defines like _GNU_SOURCE early. Replace usage of | |
676 | struct timespect with scm_t_timespec. Replace usage of | |
677 | STACK_GROWS_UP with SCM_STACK_GROWS_UP. Replace usage of | |
678 | USE_PTHREAD_THREADS with SCM_USE_PTHREAD_THREADS. | |
679 | ||
680 | * threads-plugin.h: replace usage of struct timespect with | |
681 | scm_t_timespec. | |
682 | ||
683 | * threads-plugin.c: #include <config.h> if HAVE_CONFIG_H. Replace | |
684 | usage of struct timespect with scm_t_timespec. | |
685 | ||
686 | * tags.h: move HAVE_STDINT_H handling to scmconfig.h. Move | |
687 | HAVE_INTTYPES_H handling to scmconfig.h. #include | |
688 | "libguile/__scm.h". Rework handling for scm_t_bits, | |
689 | scm_t_signed_bits, SCM_T_BITS_MAX, SCM_T_SIGNED_BITS_MAX, | |
690 | SCM_T_SIGNED_BITS_MIN, and SIZEOF_SCM_T_BITS to use scm_t_intptr, | |
691 | scm_t_uintptr, SCM_SIZEOF_INTPTR_T, and SCM_SIZEOF_UINTPTR_T, and | |
692 | SCM_SIZEOF_UNSIGNED_LONG. Rename usage of HAVE_ARRAYS to | |
693 | SCM_HAVE_ARRAYS. | |
694 | ||
695 | * symbols.c: #include <config.h> if HAVE_CONFIG_H. | |
696 | ||
697 | * struct.c: #include <config.h> if HAVE_CONFIG_H. | |
698 | ||
699 | * strports.c: #include <config.h> if HAVE_CONFIG_H. | |
700 | ||
701 | * strop.c: #include <config.h> if HAVE_CONFIG_H. | |
702 | ||
703 | * stime.h: move handling of time related headers to scmconfig.h. | |
704 | ||
705 | * stime.c: #include <config.h> if HAVE_CONFIG_H. | |
706 | ||
707 | * stacks.c: replace usage of STACK_GROWS_UP with | |
708 | SCM_STACK_GROWS_UP. | |
709 | ||
710 | * sort.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of | |
711 | HAVE_ARRAYS to SCM_HAVE_ARRAYS. | |
712 | ||
713 | * socket.c: #include <config.h> if HAVE_CONFIG_H. Replace usage | |
714 | of uint32 and HAVE_UINT_32 with scm_t_int32. | |
715 | ||
716 | * smob.c: #include <config.h> if HAVE_CONFIG_H. | |
717 | ||
718 | * simpos.c: #include <config.h> if HAVE_CONFIG_H. | |
719 | ||
720 | * script.c: #include <config.h> if HAVE_CONFIG_H. | |
721 | ||
722 | * scmsigs.c: #include <config.h> if HAVE_CONFIG_H. | |
723 | ||
724 | * scmconfig.h.top: new file -- preamble for scmconfig.h. | |
725 | ||
726 | * rw.c: #include <config.h> if HAVE_CONFIG_H. | |
727 | ||
728 | * regex-posix.c: #include <config.h> if HAVE_CONFIG_H. | |
729 | ||
730 | * read.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS. | |
731 | ||
732 | * rdelim.c: #include <config.h> if HAVE_CONFIG_H. | |
733 | ||
734 | * random.c: #include <config.h> if HAVE_CONFIG_H. Replace usage | |
735 | of LONG32, LONG64, SIZEOF_LONG, and HAVE_LONG_LONGS with | |
736 | scm_t_int32, scm_t_int64, and SCM_HAVE_T_INT64. Rename usage of | |
737 | HAVE_ARRAYS to SCM_HAVE_ARRAYS. | |
738 | ||
739 | * ramap.c: replace usage of HAVE_LONG_LONGS with | |
740 | "SCM_SIZEOF_LONG_LONG != 0". | |
741 | ||
742 | * putenv.c: #include <config.h> if HAVE_CONFIG_H. #include | |
743 | "libguile/scmconfig.h". | |
744 | ||
745 | * pthread-threads.c: #include <config.h> if HAVE_CONFIG_H. | |
746 | ||
747 | * print.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS. | |
748 | Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". | |
749 | ||
750 | * posix.c: #include <config.h> if HAVE_CONFIG_H. | |
751 | ||
752 | * ports.c: #include <config.h> if HAVE_CONFIG_H. | |
753 | ||
754 | * objects.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS. | |
755 | ||
756 | * numbers.h: replace usage of HAVE_FLOATINGPOINT_H with | |
757 | SCM_HAVE_FLOATINGPOINT_H. Replace usage of HAVE_IEEEFP_H with | |
758 | SCM_HAVE_IEEEFP_H. Replace usage of HAVE_NAN_H with | |
759 | SCM_HAVE_NAN_H. Replace usage of STDC_HEADERS with | |
760 | SCM_HAVE_STDC_HEADERS. Replace usage of ptrdiff_t with | |
761 | scm_t_ptrdiff. Replace usage of HAVE_LONG_LONGS with | |
762 | "SCM_SIZEOF_LONG_LONG != 0". | |
763 | ||
764 | * numbers.c: #include <config.h> if HAVE_CONFIG_H. Replace usage | |
765 | of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". Replace | |
766 | usage of ptrdiff_t with scm_t_ptrdiff. Replace usage of | |
767 | SIZEOF_PTRDIFF_T with SCM_SIZEOF_SCM_T_PTRDIFF. | |
768 | ||
769 | * num2integral.i.c: #include <config.h> if HAVE_CONFIG_H. | |
770 | ||
771 | * null-threads.h: replace usage of struct timespect with | |
772 | scm_t_timespec. | |
773 | ||
774 | * net_db.c: #include <config.h> if HAVE_CONFIG_H. | |
775 | ||
776 | * mkstemp.c: #include <config.h> if HAVE_CONFIG_H. #include | |
777 | "libguile/__scm.h". Remove definition of gcc_uint64_t in favor of | |
778 | scm_t_uint64 and rename usages. | |
779 | ||
780 | * mallocs.c: #include <config.h> if HAVE_CONFIG_H. | |
781 | ||
782 | * load.c: #include <config.h> if HAVE_CONFIG_H. | |
783 | ||
784 | * iselect.h: move handling of time related headers to scmconfig.h. | |
785 | Rename usage of HAVE_SYS_SELECT_H to SCM_HAVE_SYS_SELECT_H. | |
786 | Rename usage of HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Rename | |
787 | usage of USE_COOP_THREADS to SCM_USE_COOP_THREADS. | |
788 | ||
789 | * iselect.c: #include <config.h> if HAVE_CONFIG_H. Rename usage | |
790 | of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of | |
791 | USE_NULL_THREADS to SCM_USE_NULL_THREADS. | |
792 | ||
793 | * ioext.c: #include <config.h> if HAVE_CONFIG_H. | |
794 | ||
795 | * inline.h: #include "libguile/__scm.h" at the top. Change code | |
796 | to use SCM_C_INLINE and SCM_INLINE_C_INCLUDINT_INLINE_H to decide | |
797 | what to do instead of creating a new public #define. Rename usage | |
798 | of USE_COOP_THREADS to SCM_USE_COOP_THREADS. Rename usage of | |
799 | USE_NULL_THREADS to SCM_USE_NULL_THREADS. Rename usage of | |
800 | USE_COPT_THREADS to SCM_USE_COPT_THREADS. | |
801 | ||
802 | * inline.c: rearrange handling -- now we just #define | |
803 | SCM_INLINE_C_INCLUDING_INLINE_H to 1 and #include | |
804 | "libguile/inline.h". scmconfig.h will define SCM_C_INLINE as | |
805 | appropriate, and we use that in inline.h along with the above | |
806 | define to determine how to respond. | |
807 | ||
808 | * init.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of | |
809 | HAVE_ARRAYS to SCM_HAVE_ARRAYS. | |
810 | ||
811 | * guile.c: #include <config.h> if HAVE_CONFIG_H. | |
812 | ||
813 | * gh_data.c: #include <config.h> if HAVE_CONFIG_H. Rename usage | |
814 | of HAVE_ARRAYS to SCM_HAVE_ARRAYS. | |
815 | ||
816 | * gh.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS. | |
817 | ||
818 | * gen-scmconfig.h.in: new file -- see gen-scmconfig.c for details. | |
819 | ||
820 | * gen-scmconfig.c: new file -- see comments in file for details. | |
821 | ||
822 | * gdbinit.c: #include <config.h> if HAVE_CONFIG_H. | |
823 | ||
824 | * gc_os_dep.c: #include <config.h> if HAVE_CONFIG_H. Replace | |
825 | usage of STACK_GROWS_UP with SCM_STACK_GROWS_UP. | |
826 | ||
827 | * gc.h: replace usage of SIZEOF_LONG with | |
828 | SCM_SIZEOF_UNSIGNED_LONG. Replace usage of USE_PTHREAD_THREADS | |
829 | with SCM_USE_PTHREAD_THREADS. Remove SCM_SIZEOF_LONG definition | |
830 | since we handle that in scmconfig.h now. | |
831 | ||
832 | * gc.c: #include <config.h> if HAVE_CONFIG_H. | |
833 | ||
834 | * gc-mark.c: #include <config.h> if HAVE_CONFIG_H. Rename usage | |
835 | of HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of | |
836 | HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". | |
837 | ||
838 | * gc-malloc.c: #include <config.h> if HAVE_CONFIG_H. | |
839 | ||
840 | * gc-card.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS. | |
841 | Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". | |
842 | ||
843 | * fports.c: #include <config.h> if HAVE_CONFIG_H. | |
844 | ||
845 | * filesys.c: #include <config.h> if HAVE_CONFIG_H. | |
846 | ||
847 | * feature.c: #include <config.h> if HAVE_CONFIG_H. Rename usage | |
848 | of USE_NULL_THREADS to SCM_USE_NULL_THREADS. | |
849 | ||
850 | * extensions.c: #include <config.h> if HAVE_CONFIG_H. | |
851 | ||
852 | * evalext.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS. | |
853 | Replace usage of HAVE_LONG_LONGS with "SCM_SIZEOF_LONG_LONG != 0". | |
854 | ||
855 | * eval.c: #include <config.h> if HAVE_CONFIG_H. #include | |
856 | "libguile/__scm.h" rather than scmconfig.h. Rename usage of | |
857 | HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS | |
858 | with "SCM_SIZEOF_LONG_LONG != 0". | |
859 | ||
860 | * error.c: #include <config.h> if HAVE_CONFIG_H. | |
861 | ||
862 | * eq.c: #include <config.h> if HAVE_CONFIG_H. Rename usage of | |
863 | HAVE_ARRAYS to SCM_HAVE_ARRAYS. Replace usage of HAVE_LONG_LONGS | |
864 | with "SCM_SIZEOF_LONG_LONG != 0". | |
865 | ||
866 | * deprecation.c: #include <config.h> if HAVE_CONFIG_H. | |
867 | ||
868 | * coop.c: replace usage of struct timespect with scm_t_timespec. | |
869 | #include <config.h> if HAVE_CONFIG_H. | |
870 | ||
871 | * coop-threads.c: #include "libguile/_scm.h" early. Replace | |
872 | usage of struct timespect with scm_t_timespec. Replace usage of | |
873 | STACK_GROWS_UP with SCM_STACK_GROWS_UP. | |
874 | ||
875 | * coop-pthreads.c: #include "libguile/_scm.h" early. Replace | |
876 | usage of struct timespect with scm_t_timespec. Replace usage of | |
877 | STACK_GROWS_UP with SCM_STACK_GROWS_UP. | |
878 | ||
879 | * coop-defs.h: move handling of time related headers to | |
880 | scmconfig.h. Add #include "libguile/__scm.h". Rename usage of | |
881 | HAVE_WINSOCK2_H to SCM_HAVE_WINSOCK2_H. Replace usage of struct | |
882 | timespect with scm_t_timespec. | |
883 | ||
884 | * convert.i.c: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS. | |
885 | ||
886 | * convert.h: rename usage of HAVE_ARRAYS to SCM_HAVE_ARRAYS. | |
887 | ||
888 | * convert.c: #include <config.h> if HAVE_CONFIG_H. Rename usage | |
889 | of HAVE_ARRAYS to SCM_HAVE_ARRAYS. | |
890 | ||
891 | * continuations.c: move libguile/_scm.h include to the top so we | |
892 | pick up any critical defines like _GNU_SOURCE early. | |
893 | ||
894 | * backtrace.c: #include <config.h> if HAVE_CONFIG_H. | |
895 | ||
896 | * async.c: #include <config.h> if HAVE_CONFIG_H. | |
897 | ||
898 | * alloca.c: #include <config.h> if HAVE_CONFIG_H. | |
899 | ||
900 | * _scm.h: #include <config.h> if HAVE_CONFIG_H. | |
901 | Rename usage of USE_PTHREAD_THREADS to SCM_USE_PTHREAD_THREADS. | |
902 | ||
903 | * __scm.h: move libguile/scmconfig.h include up to the top, so | |
904 | we're sure to pick up any critical defines like _GNU_SOURCE early. | |
905 | #include <limits.h> removed in favor of scmconfig.h inclusion when | |
906 | appropriate. STDC_HEADERS based inclusion of stdlib.h, | |
907 | sys/types.h, stddef.h, and sys/stdtypes.h removed in favor of | |
908 | scmconfig.h inclusion when appropriate. Various Win32 related | |
909 | definitions removed in favor of scmconfig.h inclusion when | |
910 | appropriate. | |
911 | (HAVE_UINTPTR_T): definition removed (see NEWS). | |
912 | (SIZEOF_PTRDIFF_T): definition removed (see NEWS). | |
913 | (HAVE_LONG_LONGS): definition removed (see NEWS). | |
914 | (HAVE_LONG_LONG): definition removed (see NEWS). | |
915 | (HAVE_PTRDIFF_T): definition removed (see NEWS). | |
916 | ||
917 | * Makefile.am: scmconfig.h is now generated by building and | |
918 | running gen-scmconfig.h and capturing its output. gen-scmconfig | |
919 | uses config.h and the configure.in generated gen-scmconfig.h to | |
920 | decide what to output. See gen-scmconfig.c for details. | |
921 | (noinst_PROGRAMS): add gen-scmconfig. | |
922 | (gen_scmconfig_SOURCES): new variable. | |
923 | (gen-scmconfig.$(OBJEXT)): new target - be careful to handle | |
924 | cross-compiling right. | |
925 | (scmconfig.h): build scmconfig.h from gen-scmconfig's output. | |
926 | (BUILT_SOURCES): add scmconfig.h. | |
927 | ||
25e0bf97 MV |
928 | 2003-03-19 Marius Vollmer <mvo@zagadka.de> |
929 | ||
930 | * gc_os_dep.c: Added defines for sparc-unknown-netbsdelf1.5 from | |
931 | Adrian Bunk. Thanks! | |
932 | ||
74b6d6e4 MD |
933 | 2003-03-19 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
934 | ||
935 | * goops.c (make_class_from_template): New fourth arg: | |
936 | applicablep. | |
937 | (scm_class_extended_generic_with_setter, scm_class_self): Fixed | |
938 | cpls. | |
939 | ||
940 | * smob.c (scm_set_smob_apply): Call scm_i_inherit_applicable. | |
941 | ||
942 | * goops.c, objects.c, objects.h (scm_make_extended_class): New | |
943 | second arg: applicablep. | |
944 | (scm_i_inherit_applicable): New function. | |
945 | ||
946 | * goops.c, goops.h (scm_class_applicable, | |
947 | scm_class_extended_accessor): New classes. | |
948 | ||
5c9e7dad DH |
949 | 2003-03-18 Dirk Herrmann <D.Herrmann@tu-bs.de> |
950 | ||
951 | * procs.c (scm_procedure_documentation): Removed redundant | |
952 | SCM_NIMP test and replaced other calls to SCM_IMP by more explicit | |
953 | predicates. | |
954 | ||
f8af5c6d MD |
955 | 2003-03-11 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
956 | ||
c614a00b MD |
957 | * list.c, list.h (scm_filter, scm_filter_x): New functions. |
958 | ||
109c2c9f MD |
959 | * modules.c (scm_module_import_interface): New function. |
960 | ||
f8af5c6d MD |
961 | * goops.c, goops.h (scm_class_accessor_method): Renamed from |
962 | scm_class_accessor. | |
963 | (scm_class_accessor): New class. | |
964 | ||
a48d60b1 MD |
965 | 2003-03-06 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
966 | ||
967 | * goops.c (scm_primitive_generic_generic): Enable primitive | |
968 | generic if not enabled. | |
969 | (scm_sys_goops_loaded): Setup unextended primitive generics. | |
970 | ||
971 | * goops.c, goops.h (scm_c_extend_primitive_generic): New function. | |
972 | ||
973 | * snarf.h (SCM_PRIMITIVE_GENERIC, SCM_PRIMITIVE_GENERIC_1): New | |
974 | snarf macros. | |
975 | ||
976 | * numbers.c (scm_abs): Use SCM_PRIMITIVE_GENERIC. (This is only a | |
977 | testing example. All uses of SCM_GPROC should be converted.) | |
978 | ||
979 | * procprop.c (scm_stand_in_scm_proc): Use scm_assq instead of | |
980 | scm_assoc. | |
981 | ||
982 | * eq.c (scm_equal_p): Turned into a primitive generic. | |
983 | ||
84edc049 RB |
984 | 2003-02-27 Rob Browning <rlb@defaultvalue.org> |
985 | ||
986 | * Makefile.am (scmconfig.h): new target -- generate file from | |
987 | ../config.h. | |
988 | (modinclude_HEADERS): remove version.h. | |
989 | (nodist_modinclude_HEADERS): add version.h. | |
990 | ||
ea5c9285 MD |
991 | 2003-02-24 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
992 | ||
b4a1358c MD |
993 | This fixes a serious GC bug, introduced during the latest |
994 | reorganization of the GC, which disabled freeing of structs and | |
995 | GOOPS objects: | |
996 | ||
997 | * struct.c (scm_struct_prehistory): Init scm_i_structs_to_free to | |
998 | SCM_EOL. | |
53af8255 MD |
999 | (scm_struct_prehistory): Move scm_free_structs to |
1000 | scm_before_mark_c_hook. | |
ea5c9285 | 1001 | |
b4a1358c MD |
1002 | * gc-card.c (sweep_card): Check that we haven't swept structs on |
1003 | this card before. That can happen if scm_i_sweep_all_segments has | |
1004 | been called from some other place than scm_igc. | |
1005 | ||
c35738c1 MD |
1006 | 2003-02-19 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
1007 | ||
231a4ea8 MD |
1008 | * environments.c (DEFAULT_OBARRAY_SIZE): Changed from 137 to 31 |
1009 | (since hash tables now adapt their size). | |
1010 | ||
1011 | * modules.c (scm_modules_prehistory): Changed from 2001 to 1533 | |
1012 | (current number of prehistory bindings; hashtable code will select | |
1013 | a prime which is greater than this value). | |
1014 | ||
1015 | * symbols.c (scm_symbols_prehistory): Changed from 1009 to 2139 | |
1016 | (current number of initial symbols). | |
1017 | ||
1018 | * properties.c (scm_init_properties): Don't specify size of | |
1019 | scm_properties_whash. | |
1020 | ||
1021 | * objprop.c (scm_init_objprop): Don't specify size of | |
1022 | scm_object_whash. | |
1023 | ||
1024 | * keywords.c (scm_init_keywords): Don't specify a hash table size. | |
1025 | ||
c35738c1 MD |
1026 | * hooks.c (scm_c_hook_add): Fixed bug in append mode. |
1027 | ||
1028 | The following changes introduce the use of resizable hash tables | |
1029 | throughout Guile. It also renames the old *-hash-table* functions | |
1030 | to *-alist-vector* and places them, together with the rest of the | |
1031 | weak vector support, in the module (ice-9 weak-vector). We should | |
1032 | probably introduce a new, better, API for weak references, for | |
1033 | example "weak pairs" a la MIT-Scheme. (In Chez scheme, they even | |
1034 | look like and are used like ordinary pairs.) | |
1035 | ||
1036 | * environments.c (obarray_enter, obarray_retrieve, obarray_remove, | |
1037 | leaf_environment_fold, obarray_remove_all): Use hashtable | |
1038 | accessors. | |
1039 | ||
1040 | * gc.c (scm_init_storage): Moved hook initialization to | |
1041 | scm_storage_prehistory. | |
1042 | (scm_storage_prehistory): New function. | |
1043 | (scm_igc): Added commentary about placement of | |
1044 | scm_after_sweep_c_hook. | |
1045 | ||
1046 | * gc-mark.c (scm_mark_all): Use hashtable accessors. | |
1047 | (scm_gc_mark_dependencies): Use SCM_WVECT_WEAK_KEY_P and | |
1048 | SCM_WVECT_WEAK_VALUE_P. | |
1049 | ||
1050 | * hashtab.c, hashtab.h (scm_hash_for_each, scm_hash_map): New | |
1051 | functions. | |
1052 | (scm_vector_to_hash_table, scm_c_make_resizing_hash_table): | |
1053 | Removed. | |
1054 | (scm_make_weak_key_hash_table, scm_make_weak_value_hash_table, | |
1055 | scm_make_doubly_weak_hash_table): Moved here from weaks.c. | |
1056 | ||
1057 | * init.c (scm_init_guile_1): Removed call to scm_init_weaks; Added | |
1058 | calls to scm_storage_prehistory and scm_hashtab_prehistory. | |
1059 | ||
1060 | * modules.c (module-reverse-lookup): Use hashtable accessors. | |
1061 | ||
1062 | * symbols.c, symbols.h (scm_i_hash_symbol): New function. | |
1063 | ||
1064 | * weaks.c, weaks.h (scm_make_weak_key_alist_vector, | |
1065 | scm_make_weak_value_alist_vector, | |
1066 | scm_make_doubly_weak_alist_vector): New functions. | |
1067 | ||
1068 | * weaks.c (scm_init_weaks_builtins): New function. | |
1069 | ||
1070 | * weaks.h (SCM_WVECTF_WEAK_KEY, SCM_WVECTF_WEAK_VALUE, | |
1071 | SCM_WVECTF_NOSCAN, SCM_WVECT_WEAK_KEY_P, SCM_WVECT_WEAK_VALUE_P, | |
1072 | SCM_WVECT_NOSCAN_P): New macros. | |
1073 | ||
1074 | * weaks.c (scm_scan_weak_vectors): Use SCM_WVECT_WEAK_KEY_P | |
1075 | and SCM_WVECT_WEAK_VALUE_P. | |
1076 | ||
1077 | * weaks.c, weaks.h (scm_i_allocate_weak_vector): Renamed from | |
1078 | allocate_weak_vector and exported. | |
1079 | ||
0a4c1355 MD |
1080 | 2003-02-13 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
1081 | ||
1082 | * hashtab.c: Undid thread safety. (We decided that it's better to | |
1083 | let the user explicitly protect the tables (or not) according what | |
1084 | is suitable for the application.) | |
1085 | ||
87ca11ff MD |
1086 | 2003-02-12 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
1087 | ||
1088 | * hashtab.c (scm_hash_fn_remove_x, scm_internal_hash_fold): Made | |
1089 | thread safe and handle resizing tables. | |
1090 | (scm_ihashx, scm_sloppy_assx, scm_delx_x): Removed | |
1091 | SCM_DEFER/ALLOW_INTS. | |
1092 | ||
f59a096e MD |
1093 | 2003-02-11 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
1094 | ||
1095 | * hashtab.c (scm_vector_to_hash_table, | |
1096 | scm_c_make_resizing_hash_table, scm_make_hash_table): New | |
1097 | functions. | |
1098 | (scm_hash_fn_get_handle, scm_hash_fn_create_handle_x): Made thread | |
1099 | safe and handle resizing tables. | |
1100 | ||
1101 | * weaks.c (scm_make_weak_key_hash_table, | |
1102 | scm_make_weak_value_hash_table, scm_make_doubly_weak_hash_table): | |
1103 | Size argument made optional. Return resizable table if not | |
1104 | specified. | |
1105 | ||
4b612c5b MD |
1106 | 2003-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
1107 | ||
1108 | * eval.c (scm_trampoline_0, scm_trampoline_1, scm_trampoline_2): | |
1109 | Fixed formals tests for closures. (Thanks to Kevin Ryde.) | |
1110 | ||
b3d7f6df MD |
1111 | 2003-02-05 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
1112 | ||
1113 | * debug.c (scm_procedure_source): Handle all objects for which | |
1114 | procedure? is #t. (Thanks to Bill Schottstaedt.) | |
1115 | ||
756414cf MD |
1116 | 2003-01-23 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
1117 | ||
361d631f MD |
1118 | * futures.c (mark_futures): Don't need to mark data of recycled |
1119 | futures. | |
1120 | (scan_futures, cleanup_undead): Be smarter about marking | |
1121 | futures---avoid unnecessary passes through future lists. | |
1122 | ||
756414cf MD |
1123 | * futures.h, futures.c: New files; Introduced recycling of |
1124 | futures. For fine-grained threading this lifts performance to | |
1125 | another level. We can now use parallelization in inner loops of | |
1126 | Guile programs without impossible overhead. | |
1127 | ||
1128 | * threads.h, threads.c: Moved futures to their own file. | |
1129 | ||
1130 | * Makefile.am (libguile_la_SOURCES): Added futures.c. | |
1131 | (DOT_X_FILES): Added futures.x. | |
1132 | (DOT_DOC_FILES): Added futures.doc. | |
1133 | (modinclude_HEADERS): Added futures.h. | |
1134 | ||
1135 | * threads.c, threads.h (scm_i_create_thread): Renamed from | |
1136 | create_thread and made global. | |
1137 | ||
1138 | * futures.c (scm_make_future): New procedure. | |
1139 | ||
1140 | * eval.c: #include "libguile/futures.h". | |
1141 | ||
1142 | * init.c: #include "futures.h" | |
1143 | (scm_init_guile_1): Call scm_init_futures. | |
1144 | ||
1145 | * stime.c (SCM_TIME_UNITS_PER_SECOND): Renamed from CLKTCK. | |
1146 | ||
1147 | * stime.h (SCM_TIME_UNITS_PER_SECOND): Definition moved here. | |
1148 | ||
1149 | * eval.c, eval.h (scm_trampoline_0, scm_i_call_closure_0): New | |
1150 | functions. | |
1151 | ||
1152 | * eval.c (scm_trampoline_1): Fixed arguments test for closures. | |
1153 | ||
b4debead MD |
1154 | 2003-01-22 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
1155 | ||
1156 | * threads.c (create_thread): Don't unwind dynwind chain of parent | |
1157 | thread before creation. Just start the new thread with an empty | |
1158 | dynwind chain. | |
1159 | ||
93f26b7b MD |
1160 | 2003-01-20 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
1161 | ||
1162 | * evalext.c, evalext.h (scm_self_evaluating_p): New function. | |
1163 | ||
38d8927c MD |
1164 | 2003-01-10 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
1165 | ||
41c96c32 MD |
1166 | * threads.c (scm_timed_wait_condition_variable): Support timed |
1167 | waiting also for simple condition variables. | |
1168 | ||
38d8927c MD |
1169 | * goops.c (TEST_CHANGE_CLASS): Use scm_change_object_class instead |
1170 | of calling the procedure change-object-class. | |
1171 | ||
9cf5d9b7 MD |
1172 | 2003-01-09 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
1173 | ||
1174 | * ramap.c (scm_ramapc): Typo in error message. | |
1175 | ||
bbf8d523 MD |
1176 | 2003-01-08 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
1177 | ||
b46fae00 MD |
1178 | * goops.c (scm_sys_prep_layout_x): Bugfix: Only create layout for |
1179 | slots with instance allocation. | |
1180 | ||
bbf8d523 MD |
1181 | * goops.c, goops.h (scm_class_extended_generic_with_setter): New |
1182 | class. | |
1183 | (scm_compute_applicable_methods): Use scm_generic_function_methods. | |
1184 | ||
1185 | * goops.c (scm_generic_function_methods): Support extended | |
1186 | generic functions. | |
1187 | ||
ebf9b47c MD |
1188 | 2002-12-29 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
1189 | ||
1190 | * eval.c (unmemocopy): Bugfix: scm_sym_delay --> scm_sym_future. | |
2e37d6a2 | 1191 | Thanks to Neil for pointing this out! |
ebf9b47c | 1192 | |
14a9ba3f NJ |
1193 | 2002-12-29 Neil Jerram <neil@ossau.uklinux.net> |
1194 | ||
1195 | * lang.h: Remove declarations matching definitions removed from | |
1196 | lang.c (just below). | |
1197 | ||
c6a040a8 NJ |
1198 | 2002-12-28 Neil Jerram <neil@ossau.uklinux.net> |
1199 | ||
6054d805 NJ |
1200 | * lang.c (scm_nil_cons, scm_nil_car, scm_nil_cdr, scm_null, |
1201 | scm_m_while, scm_nil_eq): Remove definitions that were superfluous | |
1202 | and already commented out. | |
1203 | ||
c6a040a8 NJ |
1204 | * read.h (scm_lreadparen), read.c (scm_lreadr, scm_read_token, |
1205 | scm_lreadparen): Support reading vectors with Elisp syntax if | |
1206 | SCM_ELISP_READ_EXTENSIONS is defined. (SCM_ELISP_READ_EXTENSIONS | |
1207 | is not currently defined, and there isn't even a configure switch | |
1208 | to enable it yet.) | |
1209 | ||
3742c12f MV |
1210 | 2002-12-26 Marius Vollmer <mvo@zagadka.ping.de> |
1211 | ||
1212 | * Makefile.am (c-tokenize.o): Refer to source via $< so that vpath | |
1213 | builds work. | |
1214 | (EXTRA_DIST): Added version.h.in. | |
1215 | ||
fb50ef08 MD |
1216 | 2002-12-21 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
1217 | ||
1218 | This change makes it possible for one thread to do lazy sweeping | |
1219 | while other threads are running. Now only the mark phase need to | |
1220 | have all threads asleep. We should look further into this issue. | |
1221 | Presently, I've put the locking of scm_i_sweep_mutex at | |
1222 | "conservative" places due to my current lack of knowledge about | |
1223 | the garbage collector. Please feel free to restrict these regions | |
1224 | further to allow for maximal parallelism! | |
1225 | ||
1226 | * gc.c, gc.h (scm_i_sweep_mutex): New mutex. | |
1227 | ||
1228 | * gc.c (scm_gc_for_newcell), gc-malloc.c (scm_realloc, | |
1229 | scm_gc_register_collectable_memory): Substitute locking of | |
1230 | scm_i_sweep_mutex for calls to scm_i_thread_put_to_sleep. | |
1231 | (scm_igc): Lock sweep mutex here instead of in callers; Calls to | |
1232 | scm_i_thread_put_to_sleep/scm_i_thread_wake_up used to demarkate | |
1233 | the single-thread section (which now only contains the mark | |
1234 | phase). | |
1235 | (scm_gc): Don't lock sweeo mutex here since scm_igc locks it; | |
1236 | Removed SCM_DEFER/ALLOW_INTS. Simply call scm_igc directly. | |
1237 | ||
1238 | * threads.c (gc_section_mutex): Removed. | |
1239 | ||
9ed24633 MD |
1240 | 2002-12-19 Mikael Djurfeldt <mdj@kvast.blakulla.net> |
1241 | ||
0d48aca5 MD |
1242 | * threads.c (create_thread): Clear parent field in root state in |
1243 | order not to unnecessarily remember dead threads. | |
1244 | ||
9ed24633 MD |
1245 | * eval.c (call_subr2o_1, call_lsubr2_2): New functions. |
1246 | (scm_trampoline_1, scm_trampoline_2): Use them. | |
1247 | ||
29717c89 MD |
1248 | 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net> |
1249 | ||
1250 | Partial introduction of real plugin interface. | |
1251 | ||
1252 | * Makefile.am (modinclude_HEADERS): Added threads-plugin.h. | |
1253 | (EXTRA_DIST): Added threads-plugin.c. | |
1254 | ||
1255 | * threads-plugin.h, threads-plugin.c: New files. | |
1256 | ||
1257 | * threads.h: #include "libguile/threads-plugin.h". | |
1258 | ||
1259 | * threads.c: #include "libguile/threads-plugin.c". | |
1260 | ||
1261 | * pthread-threads.c: Temporarily remove debugging functions. | |
1262 | ||
1263 | * threads.c, threads.h (scm_yield): Added back. | |
1264 | ||
e29e0b09 MD |
1265 | 2002-12-18 Mikael Djurfeldt <mdj@kvast.blakulla.net> |
1266 | ||
1267 | * threads.c (really_launch): Detach before unlocking | |
1268 | thread_admin_mutex in order not to risk being joined. | |
1269 | (scm_i_thread_put_to_sleep, scm_i_thread_wake_up): Keep | |
1270 | thread_admin_mutex locked during GC. | |
1271 | ||
1272 | * pthread-threads.c, pthread-threads.h: Improvements to debugging | |
1273 | functions. | |
1274 | ||
0b6843b1 | 1275 | 2002-12-16 Mikael Djurfeldt <mdj@kvast.blakulla.net> |
93cd4dcd | 1276 | |
6da2dfc4 MD |
1277 | * pthread-threads.c, pthread-threads.h (SCM_DEBUG_THREADS): Added |
1278 | support for debugging mutex operations. | |
1279 | ||
1b92fb6b MD |
1280 | * threads.c (scm_thread): Removed filed joining_threads. |
1281 | (thread_print): Print thread number as well as address of thread | |
1282 | structure. | |
0b6843b1 MD |
1283 | (scm_join_thread): Bugfix. |
1284 | (scm_lock_mutex, scm_try_mutex, scm_unlock_mutex, | |
1285 | scm_timed_wait_condition_variable, scm_signal_condition_variable, | |
1286 | scm_broadcast_condition_variable): Use the low-level API. | |
1287 | (scm_all_threads): Return copy of thread list (to prevent | |
1288 | unintended destruction). | |
1289 | (scm_threads_prehistory): Initialize heap_mutex of fake thread. | |
1b92fb6b | 1290 | |
93cd4dcd MD |
1291 | * pthread-threads.c, pthread-threads.h, threads.c: Fixes to |
1292 | pthread "native" recursive mutex support. | |
1293 | ||
2ff4f181 MD |
1294 | 2002-12-15 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
1295 | ||
28d52ebb MD |
1296 | * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): New definitions. |
1297 | Simply lock a thread C API recursive mutex. | |
1298 | (SCM_NONREC_CRITICAL_SECTION_START, | |
1299 | SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START, | |
1300 | SCM_REC_CRITICAL_SECTION_END): Removed. | |
1301 | ||
1302 | * eval.c: Replaced SOURCE_SECTION_START / SOURCE_SECTION_END with | |
1303 | direct calls to scm_rec_mutex_lock / unlock around the three calls | |
1304 | to scm_m_expand_body. | |
1305 | ||
1306 | * eval.c, eval.h (promise_free): New function. | |
1307 | (scm_force): Rewritten; Now thread-safe; Removed | |
1308 | SCM_DEFER/ALLOW_INTS. | |
1309 | ||
1310 | * pthread-threads.h: Added partially implemented plugin interface | |
1311 | for recursive mutexes. These are, for now, only intended to be | |
1312 | used internally within the Guile implementation. | |
1313 | ||
1314 | * pthread-threads.c: New file. | |
1315 | ||
1316 | * threads.c: Conditionally #include "pthread-threads.c". | |
1317 | ||
1318 | * eval.c, eval.h (scm_makprom, scm_force): Rewritten to be | |
1319 | thread-safe; | |
1320 | ||
1321 | * snarf.h (SCM_MUTEX, SCM_GLOBAL_MUTEX, SCM_REC_MUTEX, | |
1322 | SCM_GLOBAL_REC_MUTEX): New macros. | |
1323 | ||
1324 | * eval.c, threads.c, threads.h, snarf.h: Rewrote critical section | |
1325 | macros---use mutexes instead. | |
1326 | ||
1327 | * tags.h (SCM_IM_FUTURE): New tag. | |
1328 | ||
1329 | * eval.c (scm_m_future): New primitive macro. | |
1330 | (SCM_CEVAL): Support futures. | |
1331 | (unmemocopy): Support unmemoization of futures. | |
1332 | ||
1333 | * print.c (scm_isymnames): Name of future isym. | |
1334 | ||
2ff4f181 MD |
1335 | * version.c: Unmade some changes to my private copy that got |
1336 | committed by mistake. | |
1337 | ||
392d2833 MD |
1338 | 2002-12-11 Mikael Djurfeldt <mdj@kvast.blakulla.net> |
1339 | ||
e200ddee MD |
1340 | * gc-malloc.c, gc.h, init.c: Reverted gc-malloc change of |
1341 | 2002-12-10. | |
1342 | ||
392d2833 MD |
1343 | * gc.c (scm_igc): Don't call scm_i_thread_invalidate_freelists. |
1344 | ||
1345 | * gc.c (scm_gc_sweep): Call it here instead, which is a more | |
1346 | logical place. | |
1347 | ||
1348 | * threads.c (create_thread): Remember root object until the handle | |
1349 | of the new thread is on all_threads list. | |
1350 | ||
1351 | * root.c (scm_make_root): Moved copying of fluids until after | |
1352 | creation of root handle so that the fluids are GC protected. Also | |
1353 | removed the critical section. | |
1354 | ||
c4c52ebe MD |
1355 | 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net> |
1356 | ||
960c408c MD |
1357 | * gc-malloc.c, gc.h (scm_gc_malloc_prehistory): New function. |
1358 | ||
3cdde9d6 | 1359 | * gc-malloc.c (malloc_mutex): New mutex. |
960c408c | 1360 | (scm_gc_malloc_prehistory): Initialize it. |
3cdde9d6 MD |
1361 | (scm_realloc): Serialize call to realloc |
1362 | (scm_calloc): Same for calloc. | |
1363 | Thanks to Wolfgang Jaehrling! | |
1364 | (Now we have to make sure all calls to malloc/realloc are made | |
1365 | through scm_malloc.) | |
1366 | ||
960c408c MD |
1367 | * init.c (scm_init_guile_1): Call scm_gc_malloc_prehistory. |
1368 | ||
c4c52ebe MD |
1369 | * threads.c (really_launch): Release heap (to prevent deadlock). |
1370 | (create_thread): Release heap before locking thread admin mutex. | |
1371 | ||
b0dc3d71 MD |
1372 | 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net> |
1373 | ||
1374 | * threads.c (scm_i_thread_invalidate_freelists): New | |
1375 | function. | |
1376 | ||
1377 | * gc.c (scm_igc): Call scm_i_thread_invalidate_freelists. | |
1378 | ||
1379 | * modules.c (scm_export): Inserted a return statement. | |
1380 | ||
06e80f59 HWN |
1381 | 2002-12-10 Han-Wen Nienhuys <hanwen@cs.uu.nl> |
1382 | ||
1383 | * modules.c (scm_export): new function | |
1384 | ||
1385 | * gc-card.c: add a note about malloc()/free() overhead. | |
1386 | ||
a12611c3 MD |
1387 | 2002-12-10 Mikael Djurfeldt <mdj@kvast.blakulla.net> |
1388 | ||
1389 | * Makefile.am (c-tokenize.$(OBJEXT)): Don't look for c-tokenize.c | |
1390 | in srcdir. | |
1391 | ||
c7fabadf MD |
1392 | 2002-12-10 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
1393 | ||
1394 | These changes remove scm_ints_disabled (which hasn't has any | |
1395 | effect in Guile for quite some time). | |
1396 | ||
1397 | * async.c, error.h (scm_ints_disabled): Removed. | |
1398 | ||
1399 | * gc.c (scm_gc_for_newcell), init.c (scm_init_guile_1), | |
1400 | root.c (scm_internal_cwdr), gdbint.c (SCM_BEGIN_FOREIGN_BLOCK, | |
1401 | SCM_END_FOREIGN_BLOCK): Don't touch scm_ints_disabled. | |
1402 | (old_ints): Removed. | |
1403 | ||
1404 | * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS): Define as a recursive | |
1405 | critical section. | |
1406 | (SCM_REDEFER_INTS, SCM_ALLOW_INTS): Define as SCM_DEFER_INTS and | |
1407 | SCM_ALLOW_INTS. | |
1408 | ||
9bc4701c MD |
1409 | 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
1410 | ||
52340b65 MD |
1411 | * threads.c (scm_mutex_lock, scm_cond_wait, scm_cond_timedwait): |
1412 | Removed accidental #if 0 around these functions. | |
1413 | ||
9bc4701c MD |
1414 | These changes are the start of support for preemptive |
1415 | multithreading. Marius and I have agreed that I commit this code | |
1416 | into the repository although it isn't thoroughly tested and surely | |
1417 | introduces many bugs. The bugs should only be exposed when using | |
1418 | threads, though. Signalling and error handling for threads is | |
1419 | very likely broken. Work on making the implementation cleaner and | |
1420 | more efficient is needed. | |
1421 | ||
1422 | * __scm.h (SCM_ALLOW_INTS_ONLY): Removed. | |
1423 | (SCM_NONREC_CRITICAL_SECTION_START, | |
1424 | SCM_NONREC_CRITICAL_SECTION_END, SCM_REC_CRITICAL_SECTION_START, | |
1425 | SCM_REC_CRITICAL_SECTION_END): New macros. | |
1426 | (SCM_CRITICAL_SECTION_START/END): Defined here. | |
1427 | ||
1428 | * eval.c: Insert SOURCE_SECTION_START / SOURCE_SECTION_END around | |
1429 | the three calls to scm_m_expand_body. | |
1430 | ||
1431 | * gc.h: #include "libguile/pthread-threads.h"; | |
1432 | (SCM_FREELIST_CREATE, SCM_FREELIST_LOC): New macros. | |
1433 | ||
1434 | * gc.c (scm_i_freelist, scm_i_freelist2): Defined to be of type | |
1435 | scm_t_key; | |
1436 | ||
1437 | * gc.c, gc-freelist.c, inline.h: Use SCM_FREELIST_LOC for freelist | |
1438 | access. | |
1439 | ||
1440 | * gc-freelist.c (scm_gc_init_freelist): Create freelist keys. | |
1441 | ||
1442 | * gc-freelist.c, threads.c (really_launch): Use | |
1443 | SCM_FREELIST_CREATE. | |
1444 | ||
1445 | * gc-malloc.c (scm_realloc, scm_gc_register_collectable_memory): | |
1446 | ||
1447 | * gc.c (scm_i_expensive_validation_check, scm_gc, | |
1448 | scm_gc_for_newcell): Put threads to sleep before doing GC-related | |
1449 | heap administration so that those pieces of code are executed | |
1450 | single-threaded. We might consider rewriting these code sections | |
1451 | in terms of a "call_gc_code_singly_threaded" construct instead of | |
1452 | calling the pair of scm_i_thread_put_to_sleep () and | |
1453 | scm_i_thread_wake_up (). Also, we would want to have as many of | |
1454 | these sections eleminated. | |
1455 | ||
1456 | * init.c (scm_init_guile_1): Call scm_threads_prehistory. | |
1457 | ||
1458 | * inline.h: #include "libguile/threads.h" | |
1459 | ||
1460 | * pthread-threads.h: Macros now conform more closely to the | |
1461 | pthreads interface. Some of them now take a second argument. | |
1462 | ||
1463 | * threads.c, threads.h: Many changes. | |
1464 | ||
1465 | 2002-12-09 Mikael Djurfeldt <djurfeldt@nada.kth.se> | |
1466 | ||
1467 | * Makefile.am (version.h): Changed $^ --> $< in rule for | |
1468 | version.h. | |
1469 | ||
b2cbe8d8 RB |
1470 | 2002-12-08 Rob Browning <rlb@defaultvalue.org> |
1471 | ||
1472 | * version.h.in (SCM_MICRO_VERSION): use @--@ substitution now. | |
1473 | (SCM_MINOR_VERSION): use @--@ substitution now. | |
1474 | (SCM_MICRO_VERSION): use @--@ substitution now. | |
1475 | (scm_effective_version): new function prototype. | |
1476 | ||
1477 | * version.c (scm_effective_version): new function, also add | |
1478 | effective-version. | |
1479 | ||
1480 | * Makefile.am (schemelibdir): VERSION -> GUILE_EFFECTIVE_VERSION. | |
1481 | (libpath.h): use GUILE_EFFECTIVE_VERSION to compute | |
1482 | SCM_LIBRARY_DIR. | |
1483 | (version.h): generate this here rather than configure.in. This | |
1484 | approach tracks source edits better (i.e. more immediately). | |
1485 | Might be worth considering for other .in files too. | |
1486 | ||
5441c65c MV |
1487 | 2002-12-02 Marius Vollmer <mvo@zagadka.ping.de> |
1488 | ||
1489 | Reorganized thread package selection. A thread package now only | |
1490 | implements a small set of pthread like functions and Guile | |
1491 | implements the rest on top of that. Guile's implementation is | |
1492 | what the "coop-pthreads" package has been previously. Support for | |
1493 | "coop" threads has been removed until I get time to add it again. | |
1494 | ||
1495 | * Makefile.am (libguile_la_SOURCES): Removed iselect.c. | |
1496 | (noinst_HEADERS): Removed coop-threads.c, coop-threads.h, coop.c, | |
1497 | null-threads.c, coop-pthreads.c. | |
1498 | (modinclude_HEADERS): Removed coop-defs.h, coop-pthreads.h. Added | |
1499 | pthread-threads.h. | |
1500 | ||
1501 | * validate.h (SCM_VALIDATE_THREAD): Moved to threads.h. | |
1502 | ||
1503 | * threads.h: Do not include "libguile/coop-defs.h". Include | |
1504 | "libguile/pthread-threads.h" for USE_COPT_THREADS. Removed | |
1505 | (previously deprecated) C level thread API prototypes. They are | |
1506 | now in the thread package specific headers, "null-threads.h" and | |
1507 | "pthread-threads.h". | |
1508 | (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR): | |
1509 | New. | |
1510 | (scm_threads_init): Removed. | |
1511 | (SCM_CRITICAL_SECTION_START, SCM_CRITICAL_SECTION_END, | |
1512 | SCM_THREAD_SWITCHING_CODE, scm_i_switch_counter, | |
1513 | SCM_I_THREAD_SWITCH_COUNT): Define here. | |
1514 | (scm_single_thread_p): Removed. | |
1515 | (scm_call_with_new_thread): Take two args directly instead of list | |
1516 | of two args. | |
1517 | (scm_i_thread_data, scm_i_set_thread_data, SCM_THREAD_LOCAL_DATA, | |
1518 | SCM_SET_THREAD_LOCAL_DATA): Define here. | |
1519 | ||
1520 | * threads.c: Merged with "coop-pthreads.c". | |
1521 | ||
1522 | * null-threads.h: Implement pthread-like API as a set of macros. | |
1523 | ||
1524 | * pthread-threads.h: New, implement pthread-like API by deferring | |
1525 | to pthread itself. | |
1526 | ||
1527 | * init.c (scm_init_guile_1): Do not call scm_init_iselect, which | |
1528 | has been lost in the reorganization. | |
1529 | ||
504d99c5 MD |
1530 | 2002-12-01 Mikael Djurfeldt <mdj@linnaeus> |
1531 | ||
1532 | The following change makes it possible to move procedure | |
1533 | application dispatch outside inner loops. The motivation was | |
1534 | clean implementation of efficient replacements of R5RS primitives | |
1535 | in SRFI-1. | |
1536 | ||
1537 | The semantics is clear: scm_trampoline_N returns an optimized | |
1538 | version of scm_call_N (or NULL if the procedure isn't applicable | |
1539 | on N args). | |
1540 | ||
1541 | Applying the optimization to map and for-each increases efficiency | |
1542 | noticeably. For example, (map abs ls) is 8 times faster than | |
1543 | before. | |
1544 | ||
1545 | * eval.h (scm_t_trampoline_1, scm_t_trampoline_2): New types. | |
1546 | ||
1547 | * eval.c, eval.h (scm_trampoline_1, scm_trampoline_2): New functions. | |
1548 | ||
1549 | * eval.c (call_subr2_2, call_lsubr_2, call_closure_2): New functions; | |
1550 | (map, for-each): Handle also application on two args as a special | |
1551 | case; Use trampolines. | |
1552 | ||
1553 | Other changes: | |
1554 | ||
1555 | * sort.c (scm_cmp_function): Choose subr2less for scm_tc7_subr_2o; | |
1556 | (subr2oless): Removed. | |
1557 | (scm_restricted_vector_sort_x): Use scm_return_first to keep the | |
1558 | vector GC protected. | |
1559 | ||
1560 | * eval.c (check_map_args): Use scm_out_of_range_pos instead of | |
1561 | scm_out_of_range. | |
1562 | ||
63dd3413 DH |
1563 | 2002-11-24 Dirk Herrmann <D.Herrmann@tu-bs.de> |
1564 | ||
1565 | * evalext.[ch] (scm_m_undefine, undefine): Deprecated. | |
1566 | ||
4ba5f279 MD |
1567 | 2002-11-17 Mikael Djurfeldt <mdj@linnaeus> |
1568 | ||
1569 | * debug.c (scm_make_iloc): Added missing "return". | |
1570 | ||
56ae231f MV |
1571 | 2002-11-17 Marius Vollmer <mvo@zagadka.ping.de> |
1572 | ||
1573 | * strports.c (scm_eval_string_in_module): Validate second arg to | |
1574 | be a module. Thanks to Arno Peters! | |
1575 | ||
80b28865 DH |
1576 | 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de> |
1577 | ||
1578 | * .cvsignore: remove goops.c | |
1579 | ||
c88b1456 DH |
1580 | 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de> |
1581 | ||
1582 | * modules.c (scm_env_top_level, scm_lookup_closure_module, | |
1583 | module_variable, scm_module_lookup_closure, | |
1584 | scm_module_transformer, scm_sym2var, scm_module_reverse_lookup, | |
1585 | scm_system_module_env_p): Don't compare SCM values with C | |
1586 | operators == or !=. Avoid SCM_IMP predicates. Prefer !SCM_FALSEP | |
1587 | over SCM_NFALSEP. | |
1588 | ||
a8a19efc DH |
1589 | 2002-11-16 Dirk Herrmann <D.Herrmann@tu-bs.de> |
1590 | ||
1591 | * eval.h (SCM_MAKE_ILOC): New macro. | |
1592 | ||
1593 | * debug.c (scm_make_iloc): Use SCM_MAKE_ILOC instead of computing | |
1594 | the iloc bitpattern here. | |
1595 | ||
76734914 MD |
1596 | 2002-11-14 Mikael Djurfeldt <mdj@linnaeus> |
1597 | ||
1598 | * coop-pthreads.c, coop-pthreads.h: scm_internal_select should be | |
1599 | part of the API, otherwise it's difficult to write Guile | |
1600 | extensions using non-blocking I/O => moved #include | |
1601 | "libguile/iselect.h" from coop-pthreads.c --> coop-pthreads.h. | |
1602 | ||
1603 | * coop-pthreads.c (scm_unlock_mutex): Changed s_lock_mutex --> | |
1604 | s_unlock_mutex. | |
1605 | ||
8b5b4a75 MV |
1606 | 2002-11-10 Marius Vollmer <mvo@zagadka.ping.de> |
1607 | ||
1608 | * __scm.h (USE_THREADS, GUILE_ISELECT): Do not define here. They | |
1609 | are defined in configure.in. | |
1610 | ||
1611 | * threads.c: Removed SCM_API from function definitions. SCM_API | |
1612 | is only for declarations. | |
1613 | ||
e5a83084 MD |
1614 | 2002-11-07 Mikael Djurfeldt <mdj@linnaeus> |
1615 | ||
9be8bb45 MD |
1616 | * coop-pthreads.h: Added support for thread specific data to the |
1617 | generic C API for the coop-pthreads case. | |
1618 | ||
e5a83084 MD |
1619 | * threads.c, threads.h (scm_cond_init): Undo unintentional API |
1620 | change. | |
6c214b62 | 1621 | (scm_cond_broadcast): Added missing function. |
e5a83084 | 1622 | |
7edf178e MV |
1623 | 2002-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
1624 | ||
1625 | * coop.c (coop_next_runnable_thread): Removed, wich should have | |
1626 | happened when GUILE_ISELECT was hard-wired. | |
1627 | ||
7f5b1b77 MV |
1628 | 2002-11-03 Marius Vollmer <mvo@zagadka.ping.de> |
1629 | ||
7caa1b07 MV |
1630 | * Makefile.am (libguile_la_SOURCES): Added threads.c |
1631 | (DOT_DOC_FILES): Added threads.doc. | |
1632 | (DOT_X_FILES): Added threads.x. | |
1633 | (EXTRA_libguile_la_SOURCES): Removed threads.c. | |
1634 | (noinst_HEADERS): Added coop-pthreads.c. | |
1635 | (modinclude_HEADERS): Added coop-pthreads.h. | |
1636 | ||
1637 | * __scm.h (USE_THREADS, GUILE_ISELECT): Define when | |
1638 | SCM_DEBUG_DEPRECATED. Removed their use thru-out Guile. | |
1639 | ||
bb11cbf4 MV |
1640 | * iselect.c: Include "_scm.h" before testing HAVE_UNISTD_H. |
1641 | Thanks to Bill Schottstaedt! | |
1642 | ||
1d4cbbed MV |
1643 | * numbers.c (scm_integer_expt): Make 0^z == 0 for z != 0. |
1644 | ||
7f5b1b77 MV |
1645 | * _scm.h (HAVE_RESTARTABLE_SYSCALLS): Do define even when |
1646 | SCM_COPT_THREADS is defined. | |
1647 | (SCM_SYSCALL): Use EINTR-expection version when SCM_COPT_THREADS | |
1648 | is defined. | |
1649 | ||
1650 | * coop-pthreads.c: Some harmless renamings of internal stuff. | |
1651 | (create_thread): New, generalized version of | |
1652 | scm_call_with_new_thread. | |
1653 | (scm_call_with_new_thread): Use it. | |
1654 | (scm_spawn_thread): New, use create_thread. | |
1655 | ||
d52f53b1 MV |
1656 | 2002-11-02 Marius Vollmer <mvo@zagadka.ping.de> |
1657 | ||
1658 | * coop-pthreads.c, coop-pthreads.h: Redone completely, you might | |
1659 | start testing it now. | |
1660 | ||
1661 | * _scm.h: Include <errno.h< so that SCM_SYSCALL is correctly | |
1662 | defined when HAVE_RESTARTABLE_SYSCALLS is not defined. | |
1663 | (HAVE_RESTARTABLE_SYSCALLS): Do not define when USE_COPT_THREADS | |
1664 | is defined. | |
1665 | ||
30f920c3 MV |
1666 | 2002-10-27 Marius Vollmer <mvo@zagadka.ping.de> |
1667 | ||
1668 | * scmsigs.c (signal_cell_handlers, install_handler_data, | |
1669 | scm_delq_spine_x, really_install_handler, install_handler): New | |
1670 | scheme for triggering signal handlers, to simplify take_signal. | |
1671 | (take_signal): Simplified, to avoid race conditions. | |
1672 | (scm_sigaction_for_thread): Use new Scheme. Validate that thread | |
1673 | hasn't exited yet. | |
1674 | ||
1675 | * async.c (scm_async_click): Reset pending_asyncs, handle | |
1676 | signal_asyncs. Don't set cdr of a non-signal async to #f. | |
1677 | (scm_i_queue_async_cell): Do not check cdr of cell for #f, queue | |
1678 | always. Set pending_asyncs. | |
1679 | (scm_system_async_mark_for_thread): Check that thread has not | |
1680 | exited. | |
1681 | (scm_unmask_signals, decrease_block): Call scm_async_click after | |
1682 | block_asyncs becomes zero. | |
1683 | ||
1684 | * __scm.h (SCM_ASYNC_CLICK): Check pending_asyncs instead of | |
1685 | active_asyncs. | |
1686 | ||
1687 | * root.h (scm_root_state): Added pending_asyncs and signal_asyncs | |
1688 | fields. | |
1689 | * root.c (root_mark): Mark them. | |
1690 | (make_root): Initialize them. | |
1691 | ||
1692 | * iselect.c, iselect.h: Replaced GUILE_ISELECT with | |
1693 | USE_COOP_THREADS. | |
1694 | (scm_internal_select): Define one version for USE_COOP_THREADS and | |
1695 | one for USE_NULL_THREADS. | |
1696 | (scm_init_iselect): Likewise. | |
1697 | ||
1698 | * inline.h (scm_cell, scm_double_cell): Also allow | |
1699 | USE_COPT_THREADS to not protect the slot initializers. | |
1700 | ||
1701 | * init.c (scm_init_guile_1): Call scm_init_thread_procs. This is | |
1702 | because threads need to be initialized before the stack, but | |
1703 | gsubrs such as scm_timed_condition_variable_wait can only be | |
1704 | created later. | |
1705 | ||
1706 | * threads.h: Include "coop-pthreads.h" when requested. | |
1707 | (scm_threads_make_mutex, scm_threads_lock_mutex, | |
1708 | scm_threads_unlock_mutex, scm_threads_monitor): Removed, they were | |
1709 | not implemented anyway. | |
1710 | (scm_init_thread_procs, scm_try_mutex, | |
1711 | scm_timed_condition_variable_wait, | |
1712 | scm_broadcast_condition_variable, scm_c_thread_exited_p, | |
1713 | scm_thread_exited_p): New prototypes. | |
1714 | (struct timespec): Define if not already defined. | |
1715 | (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock, | |
1716 | scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init, | |
1717 | scm_cond_wait, scm_cond_timedwait, scm_cond_signal, | |
1718 | scm_cond_broadcast, scm_cond_destroy): Declarations moved here and | |
1719 | deprecated. | |
1720 | ||
1721 | * threads.c: Include <errno.h>. Include "coop-pthreads.c" when | |
1722 | requested. | |
1723 | (scm_thread_exited_p): New. | |
1724 | (scm_try_mutex, scm_broadcast_condition_variable): Newly | |
1725 | registered procedures. | |
1726 | (scm_wait_condition_variable, scm_timed_wait_condition_variable): | |
1727 | Use the latter as the procedure for "wait-condition-variable", | |
1728 | thus offering a optional timeout parameter to Scheme. | |
1729 | (scm_wait_condition_variable): Implement in terms of | |
1730 | scm_timed_wait_condition_variable. | |
1731 | (scm_mutex_init, scm_mutex_lock, scm_mutex_trylock, | |
1732 | scm_mutex_unlock, scm_mutex_destroy, scm_cond_init, | |
1733 | scm_cond_wait, scm_cond_timedwait, scm_cond_signal, | |
1734 | scm_cond_broadcast, scm_cond_destroy): Implement in terms of | |
1735 | scm_make_mutex, etc, and deprecate. | |
1736 | (scm_init_threads): Do not create smobs, leave this to | |
1737 | scm_threads_init. Do not include "threads.x" file. | |
1738 | (scm_init_thread_procs): New, include "threads.x" here. | |
1739 | ||
1740 | * null-threads.h (scm_null_mutex, scm_null_mutex_init, | |
1741 | scm_null_mutex_lock, scm_null_mutex_unlock, | |
1742 | scm_null_mutex_destroy, scm_null_condvar, scm_null_condvar_init, | |
1743 | scm_null_condvar_wait, scm_null_condvar_signal, | |
1744 | scm_null_condvar_destroy): Removed. | |
1745 | (scm_mutex_init, scm_mutex_lock, scm_mutex_unlock, scm_cond_init, | |
1746 | scm_cond_wait, scm_cond_signal, scm_cond_broadcast, | |
1747 | scm_cond_destory): Do not define, they are now deprecated and | |
1748 | handled by threads.{h,c}. | |
1749 | ||
1750 | * null-threads.c (scm_null_mutex, scm_null_cond): Define here. | |
1751 | (scm_threads_init): Create smobs here, using the appropriate | |
1752 | sizes. | |
1753 | (block): Removed, now unused. | |
1754 | (scm_c_thread_exited_p): New. | |
1755 | (scm_null_mutex_init, scm_null_mutex_lock, scm_null_mutex_unlock, | |
1756 | scm_null_mutex_destroy, scm_null_condvar_init, | |
1757 | scm_null_condvar_wait, scm_null_condvar_signal, | |
1758 | scm_null_condvar_destroy): Removed and updated users to do their | |
1759 | task directly. | |
1760 | (scm_try_mutex, timeval_subtract, | |
1761 | scm_timed_wait_condition_variable, | |
1762 | scm_broadcast_condition_variable): New. | |
1763 | (scm_wait_condition_variable): Removed. | |
1764 | ||
1765 | * coop-defs.h (coop_m): Added 'level' field. | |
1766 | (scm_t_mutex, scm_mutex_init, scm_mutex_lock, scm_mutex_trylock, | |
1767 | scm_mutex_unlock, scm_mutex_destroy, scm_t_cond, scm_cond_init, | |
1768 | scm_cond_wait, scm_cond_timedwait, scm_cond_signal, | |
1769 | scm_cond_broadcast, scm_cond_destroy, struct timespec): Do not | |
1770 | define. | |
1771 | (coop_condition_variable_broadcast): New. | |
1772 | ||
1773 | * coop-threads.c (scm_threads_init): Create smobs here, using the | |
1774 | appropriate sizes. | |
1775 | (scm_c_thread_exited_p, scm_try_mutex, | |
1776 | scm_timed_wait_condition_variable, | |
1777 | scm_broadcast_condition_variable): New. | |
1778 | (scm_wait_condition_variable): Removed. | |
1779 | ||
1780 | * coop.c (coop_new_mutex_init): Initialize level. | |
1781 | (coop_mutex_trylock, coop_mutex_lock, coop_mutex_unlock): maintain | |
1782 | level. | |
1783 | (coop_condition_variable_signal): Renamed to | |
1784 | coop_condition_variable_broadcast and reimplemented in terms of | |
1785 | that. Thus... | |
1786 | (coop_condition_variable_broadcast): New. | |
1787 | ||
1788 | * goops.c (hell_mutex): Reimplemented using scm_make_mutex, etc. | |
1789 | ||
1790 | * coop-pthreads.h, coop-pthreads.c: New, but unfinished. | |
1791 | ||
087ed40d MV |
1792 | 2002-10-21 Marius Vollmer <mvo@zagadka.ping.de> |
1793 | ||
65a23095 MV |
1794 | * null-threads.c: Include <time.h>. Also, use <...> for inclusion |
1795 | of system headers. | |
1796 | ||
087ed40d MV |
1797 | * async.c, goops.h, modules.h, validate.h (SCM_MAKE_VALIDATE_MSG): |
1798 | New. Use it instead of SCM_MAKE_VALIDATE in lots of places to | |
30f920c3 | 1799 | give better error messages. Thanks to Bill Schottstaedt! |
087ed40d | 1800 | |
5ec1d2c8 DH |
1801 | 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de> |
1802 | ||
1803 | * evalext.h, evalext.c (scm_definedp, scm_defined_p): Renamed | |
1804 | scm_definedp to scm_defined_p and deprecated scm_definedp. | |
1805 | ||
100ae50d DH |
1806 | 2002-10-19 Dirk Herrmann <D.Herrmann@tu-bs.de> |
1807 | ||
1808 | * async.h, async.c (scm_system_async): Fixed deprecation to work | |
1809 | correctly when deprecated features are excluded. | |
1810 | ||
2794cb50 MV |
1811 | 2002-10-16 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
1812 | ||
1813 | * async.c (scm_system_async_mark_for_thread): Validate thread | |
1814 | argument. | |
1815 | ||
1816 | * coop-threads.c (scm_i_thread_root): Do not validate argument. | |
1817 | ||
1818 | * feature.c (scm_init_feature): Don't add 'threads' for | |
1819 | USE_NULL_THREADS. | |
1820 | ||
1821 | * inline.h (scm_cell, scm_double_cell): Also allow | |
1822 | USE_NULL_THREADS to not protect the slot initializers. | |
1823 | ||
1824 | * scmsigs.c (scm_sigaction_for_thread): It's "USE_THREADS" not | |
1825 | "USE_THREAD". | |
1826 | ||
1827 | * Makefile.am (noinst_HEADERS): Added null-threads.c. | |
1828 | (modinclude_HEADERS): Added null-threads.h. | |
1829 | ||
1830 | * threads.h: Include null-threads.h when !USE_COOP_THREADS. | |
1831 | * threads.c: Include null-threads.c when !USE_COOP_THREADS. | |
1832 | (scm_init_threads): Use generic type names scm_t_mutex and | |
1833 | scm_t_cond instead of coop_m and coop_c. | |
1834 | ||
1835 | * null-threads.c, null-threads.h: New files. | |
1836 | ||
ff810d7a MV |
1837 | 2002-10-15 Marius Vollmer <mvo@zagadka.ping.de> |
1838 | ||
1839 | * Makefile.am: Replaced "$<" in non-pattern rules with its value. | |
1840 | This is to support makes that know about "$<" only in pattern | |
1841 | rules, like Sun's make. | |
1842 | ||
a90bdb73 MV |
1843 | 2002-10-13 Marius Vollmer <mvo@zagadka.ping.de> |
1844 | ||
1845 | * Makefile.am (libpath.h): Fixed typo in top_srcdir_absolute | |
1846 | substitution. Thanks to David Allouche! | |
1847 | ||
e71a8bf2 DH |
1848 | 2002-10-13 Dirk Herrmann <D.Herrmann@tu-bs.de> |
1849 | ||
1850 | * evalext.h: Replaced SCM_DEBUG_DEPRECATED with | |
1851 | !SCM_ENABLE_DEPRECATED. | |
1852 | ||
41f77ff5 MV |
1853 | 2002-10-11 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
1854 | ||
504d99c5 | 1855 | * async.c (scm_system_async_mark_for_thread): Only call |
41f77ff5 MV |
1856 | scm_i_thread_root when USE_THREADS is defined. Use scm_root |
1857 | otherwise. | |
1858 | ||
1859 | * scmsigs.c (take_signal): Only call scm_i_thread_root when | |
1860 | USE_THREADS is defined. Use scm_root otherwise. | |
1861 | (scm_sigaction_for_thread): Ignore THREAD argument when | |
1862 | USE_THREADS is not defined. Also, move THREAD argument defaulting | |
1863 | out of HAVE_SIGACTION section, which was a bug. | |
1864 | ||
6d16b125 MV |
1865 | 2002-10-10 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
1866 | ||
1867 | * scmsigs.c (scm_sigaction_for_thread): Store original handler in | |
1868 | signal_handlers, not the closure that is used as the async. | |
1869 | The closure is stored in signal_handler_cells, as previously. | |
1870 | ||
acfa1f52 MV |
1871 | 2002-10-10 Marius Vollmer <mvo@zagadka.ping.de> |
1872 | ||
1873 | * root.h (scm_root_state): Added 'block_async' slot. | |
1874 | (scm_active_asyncs): Removed abbrev. | |
1875 | * root.c (scm_make_root): Initialize 'block_asyncs' slot. | |
1876 | ||
1877 | * __scm.h (SCM_ASYNC_TICK): Do without the scm_active_asyncs | |
1878 | abbrev. | |
1879 | ||
1880 | * async.h (scm_call_with_blocked_asyncs, | |
1881 | scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs, | |
1882 | scm_c_call_with_unblocked_asyncs): New prototypes. | |
1883 | (scm_mask_signals, scm_unmask_signals): Deprecated. | |
1884 | (scm_mask_ints): Turned into a macro. | |
1885 | * async.c (scm_mask_ints): Removed. | |
1886 | (scm_run_asyncs): Do not set scm_mask_ints while running an async. | |
1887 | this should not be necessary. | |
1888 | (scm_async_click): Test block_asyncs instead of scm_mask_ints. | |
1889 | (scm_mask_signals, scm_unmask_signals): Deprecated. Emit | |
1890 | deprecation warning and check for errornous use. Set block_asyncs | |
1891 | instead of scm_mask_ints. | |
1892 | (increase_block, decrease_block, scm_call_with_blocked_asyncs, | |
1893 | scm_call_with_unblocked_asyncs, scm_c_call_with_blocked_asyncs, | |
1894 | scm_c_call_with_unblocked_asyncs): New. | |
1895 | ||
1896 | * script.c (scm_compile_shell_switches): Do not set scm_mask_ints. | |
1897 | Asyncs are enabled by default. | |
1898 | ||
34010f56 NJ |
1899 | 2002-10-09 Neil Jerram <neil@ossau.uklinux.net> |
1900 | ||
1901 | * vports.c (scm_make_soft_port): Allow vector argument to carry a | |
1902 | 6th element: an input waiting thunk. | |
1903 | (sf_input_waiting): New. | |
1904 | ||
9310d6f2 MV |
1905 | 2002-10-05 Marius Vollmer <mvo@zagadka.ping.de> |
1906 | ||
1907 | * root.c (root_mark): Mark active_asyncs slot. | |
1908 | ||
1909 | * async.c (scm_async_click): Set the cdr of a executed handler | |
1910 | cell to SCM_BOOL_F, not SCM_EOL. | |
1911 | (scm_i_queue_async_cell): Queue the cell at the end of the list, | |
1912 | and only if the handler procedure is not already present. | |
1913 | (scm_system_async_mark_for_thread): Initialize cdr of handler cell | |
1914 | with SCM_BOOL_F. | |
1915 | * scmsigs.c (scm_sigaction_for_thread): Likewise. | |
1916 | ||
ac48c719 RB |
1917 | 2002-10-04 Rob Browning <rlb@defaultvalue.org> |
1918 | ||
1360a142 RB |
1919 | * guile.c (main): switch to scm_lt_dlset_preloaded_symbols; |
1920 | ||
1921 | * dynl.c (sysdep_dynl_link): switch to scm_lt_dlhandle, | |
1922 | scm_lt_dlopenext, and scm_lt_dlerror. | |
1923 | (sysdep_dynl_unlink): switch to scm_lt_dlhandle, scm_lt_dlclose, | |
1924 | and scm_lt_dlerror. | |
1925 | (sysdep_dynl_func): switch to scm_lt_dlhandle, scm_lt_dlsym, | |
1926 | and scm_lt_dlerror. | |
1927 | (sysdep_dynl_init): switch to scm_lt_dlinit(); | |
1928 | ||
1929 | * Makefile.am (libguile_la_LIBADD): switch to use | |
1930 | libguile-ltdl.la. | |
1931 | ||
504d99c5 | 1932 | * numbers.c (scm_integer_expt): (expt 0 1) should be 1. |
ac48c719 | 1933 | |
497092c9 MV |
1934 | 2002-10-04 Marius Vollmer <mvo@zagadka.ping.de> |
1935 | ||
1936 | * scmsigs.h (scm_sigaction_for_thread): New prototype. | |
1937 | * scmsigs.c (got_signal): Removed. | |
1938 | (signal_handler_cells, signal_handler_threads): New. | |
1939 | (take_signal): Queue the cell of the signal for the specified | |
1940 | thread. Reset the signal handler on systems that don't have | |
1941 | sigaction. | |
1942 | (sys_deliver_signals): Removed. | |
1943 | (close_1): New. | |
1944 | (scm_sigaction_for_thread): Renamed from scm_sigaction and | |
1945 | extended to also set the thread of a signal and allocate a cell | |
1946 | for it. Keep the Scheme name "sigaction". Check that signum is | |
1947 | within range. Also, use SCM_VECTOR_REF instead of SCM_VELTS. | |
1948 | (scm_sigaction): Implement in terms of scm_sigaction_for_thread. | |
1949 | (scm_init_scmsigs): Allocate signal_handler_cells and | |
1950 | signal_handler_threads vectors. | |
1951 | ||
1952 | * async.c: Removed GUILE_OLD_ASYNC_CLICK code. Reorganized so | |
1953 | that system asnycs and user asyncs are separated. Reimplemented | |
1954 | system asyncs to work per-thread. | |
1955 | ||
1956 | * gc.c (scm_init_gc): Do not use scm_system_async. | |
1957 | ||
1958 | * async.h (scm_asyncs_pending, scm_set_tick_rate, | |
1959 | scm_set_switch_rate, scm_system_async_mark_from_signal_handler): | |
1960 | Removed prototypes. | |
1961 | (scm_i_queue_async_cell): New. | |
1962 | ||
1963 | * __scm.h (scm_asyncs_pending_p): Removed. | |
1964 | (SCM_ASYNC_CLICK): Check scm_active_asyncs instead of | |
1965 | scm_asyncs_pending_p. | |
1966 | ||
1967 | * async.h (scm_system_async_mark_for_thread): New prototype. | |
1968 | ||
1969 | * __scm.h: Removed GUILE_OLD_ASYNC_CLICK code. | |
1970 | ||
1971 | * root.h (scm_root_state): Added new "active_asyncs" slot. | |
1972 | * root.c (scm_make_root): Initialize it to SCM_EOL. | |
1973 | ||
1974 | * coop-defs.h (coop_t): Added new "handle" slot. | |
1975 | * coop-threads.c (all_threads, scm_current_thread, | |
1976 | scm_all_threads, scm_i_thread_root): New. | |
1977 | (scm_threads_init): Add main thread to all_threads. | |
1978 | (scheme_launch_thread): Remove thread from all_threads when it | |
1979 | terminates. | |
1980 | (scm_call_with_new_thread): Initialize handle slot of coop_t | |
1981 | structure and add new thread to all_threads. | |
1982 | (scm_spawn_thread): Likewise. | |
1983 | ||
1984 | * threads.h (scm_current_thread, scm_all_threads): New prototypes. | |
1985 | * threads.c (scm_current_thread, scm_all_threads): Register as | |
1986 | primitives. | |
1987 | ||
1988 | * dynl.c: Use scm_lt_ prefix for libltdl functions. | |
1989 | ||
480fa28d NJ |
1990 | 2002-09-29 Neil Jerram <neil@ossau.uklinux.net> |
1991 | ||
1992 | * script.c (scm_compile_shell_switches): Fix bad spelling of | |
1993 | `explicitly' in comment. | |
1994 | ||
1995 | 2002-09-28 Neil Jerram <neil@ossau.uklinux.net> | |
1996 | ||
1997 | * posix.c (scm_geteuid, scm_getegid, scm_seteuid, scm_setegid): | |
1998 | Refer to provided? in doc string rather than deprecated feature?. | |
1999 | ||
3553e1d1 GH |
2000 | 2002-09-24 Gary Houston <ghouston@arglist.com> |
2001 | ||
2002 | * inline.h (scm_double_cell): prevent reordering of statements | |
2003 | with any following code (for GCC 3 strict-aliasing). | |
2004 | * numbers.c (scm_make_real), num2float.i.c (FLOAT2NUM): removed | |
2005 | the earlier version of the reordering prevention. | |
2006 | ||
4ad0814a HWN |
2007 | 2002-09-19 Han-Wen Nienhuys <hanwen@cs.uu.nl> |
2008 | ||
2009 | * inline.h (scm_double_cell): move SET_GCMARK set out of if body. | |
2010 | ||
e88e4f2e HWN |
2011 | 2002-09-09 Han-Wen Nienhuys <hanwen@cs.uu.nl> |
2012 | ||
2013 | * gc-malloc.c (scm_gc_register_collectable_memory): more overflow | |
2014 | protection. | |
2015 | ||
1e71eafb HWN |
2016 | 2002-09-08 Han-Wen Nienhuys <hanwen@cs.uu.nl> |
2017 | ||
2018 | * inline.h: include stdio.h | |
2019 | ||
2020 | * smob.c (free_print): abort if scm_debug_cell_accesses_p is set | |
2021 | ||
61ef9c1f HWN |
2022 | 2002-09-05 Han-Wen Nienhuys <hanwen@cs.uu.nl> |
2023 | ||
dac04e9f HWN |
2024 | * gc-segment.c (scm_i_make_initial_segment): check user settings |
2025 | for sanity. | |
2026 | ||
2027 | * gc-malloc.c (scm_gc_init_malloc): check user settings for | |
2028 | sanity. | |
dac04e9f HWN |
2029 | |
2030 | * gc-freelist.c (scm_init_freelist): check user settings for sanity. | |
2031 | ||
ffd72400 HWN |
2032 | * struct.h: change scm_structs_to_free to scm_i_structs_to_free |
2033 | ||
2034 | * gc-malloc.c (scm_gc_register_collectable_memory): use floats; | |
1e71eafb HWN |
2035 | these won't ever wrap around with high memory usage. Thanks to |
2036 | Sven Hartrumpf for finding this. | |
ffd72400 | 2037 | |
5bd4a949 HWN |
2038 | * gc-freelist.c: include <stdio.h> |
2039 | ||
61ef9c1f HWN |
2040 | * gc-malloc.c: add DEBUGINFO for mtrigger GCs. |
2041 | ||
ffd0ef3b MV |
2042 | 2002-09-01 Marius Vollmer <mvo@zagadka.ping.de> |
2043 | ||
a27e3d14 MV |
2044 | * vectors.h (SCM_VECTOR_REF): New. |
2045 | ||
ffd0ef3b MV |
2046 | * snarf.h (SCM_DEFINE_PUBLIC): New. |
2047 | ||
f8a1712b MV |
2048 | 2002-08-30 Marius Vollmer <mvo@zagadka.ping.de> |
2049 | ||
2050 | * socket.c (scm_addr_vector): Added size of address to arguments. | |
2051 | Use it to avoid accessing a non-existent path in a sockaddr_un. | |
2052 | Changed all callers. | |
2053 | ||
7200a36b HWN |
2054 | 2002-08-29 Han-Wen Nienhuys <hanwen@cs.uu.nl> |
2055 | ||
1383773b HWN |
2056 | * gc.h: remove DOUBLECELL card flags. |
2057 | ||
2058 | * gc-malloc.c (scm_calloc): try to use calloc() before calling | |
2059 | scm_realloc(). | |
2060 | ||
2061 | * gc-segment.c (scm_i_initialize_heap_segment_data): remove card | |
2062 | init loop; handle this from scm_init_card_freelist() | |
2063 | ||
2064 | * gc-card.c (scm_init_card_freelist): init bit vector here. | |
2065 | ||
7200a36b | 2066 | * numbers.c (scm_make_real): prevent reordering of statements |
8fa5786d | 2067 | num2float.i.c (FLOAT2NUM): idem |
7200a36b | 2068 | |
9981de3a HWN |
2069 | 2002-08-27 Han-Wen Nienhuys <hanwen@cs.uu.nl> |
2070 | ||
2071 | * eval.h: prepend libguile/ to include path | |
2072 | ||
19647556 MV |
2073 | 2002-08-26 Marius Vollmer <mvo@zagadka.ping.de> |
2074 | ||
2075 | * script.c (scm_compile_shell_switches): Added "2002" to Copyright | |
2076 |