Commit | Line | Data |
---|---|---|
461f34aa MV |
1 | 2005-03-08 Marius Vollmer <mvo@zagadka.de> |
2 | ||
3 | libltdl is no longer distributed. We expect it to be installed | |
4 | already. | |
5 | ||
6 | * Makefile.am (INCLUDES): Removed @LTDLINCL@. | |
7 | (libguile_la_LIBADD): Removed @LIBLTDL@. | |
8 | ||
4e047c3e MV |
9 | 2005-03-07 Marius Vollmer <mvo@zagadka.de> |
10 | ||
11 | * threads.h, async.h, threads.c (SCM_CRITICAL_SECTION_START, | |
12 | SCM_CRITICAL_SECTION_END): Moved here from threads.h since now | |
13 | they also block/unblock execution of asyncs and call | |
14 | scm_async_click which is declared in async.h but threads.h can not | |
15 | include async.h since async.h already includes threads.h. | |
16 | (scm_i_critical_section_level): New, for checking mistakes in the | |
17 | use of the SCM_CRITICAL_SECTION_* macros. | |
18 | (scm_i_critical_section_mutex): Make it a recursive mutex so that | |
19 | critical sections can be nested. | |
20 | ||
21 | * throw.c (scm_ithrow): Abort when scm_i_critical_section_level is | |
22 | not zero. | |
23 | ||
24 | * threads.h, threads.c (scm_frame_lock_mutex): New. | |
25 | (scm_frame_critical_section): Take mutex as argument. | |
26 | (framed_critical_section_mutex): New, used as default for above. | |
27 | (scm_init_threads): Initialize it. | |
28 | (scm_threads_prehistory): Do not initialize thread_admin_mutex and | |
29 | scm_i_critical_section_mutex; both are initialized statically. | |
30 | ||
31 | * continuation.c, deprecated.c, goops.c, guardians.c keywords.c, | |
32 | libguile_la-arrays.loT, objprop.c, ports.c, smob.c, sort.s, | |
b9d9ad3a MV |
33 | srcprop.c, stime.c, struct.c, throw.c, regex-posix.c: Include |
34 | "libguile/async.h" for SCM_CRITICAL_SECTION_START/END. | |
4e047c3e MV |
35 | |
36 | * debug.c (scm_debug_options): Replace | |
37 | SCM_CRITICAL_SECTION_START/END with a frame and | |
38 | scm_frame_critical_section. | |
39 | ||
40 | * continuations.c (scm_make_continuation): No longer a critical | |
41 | section. | |
42 | (scm_dynthrow): Abort when scm_i_critical_section_level is | |
43 | not zero. | |
44 | ||
d0a45bff MV |
45 | 2005-03-04 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
46 | ||
db6673e5 MV |
47 | * threads.c (scm_try_mutex): Renamed argument for consistency. |
48 | ||
d0a45bff MV |
49 | * root.c (scm_call_with_dynamic_root): New docstring. |
50 | ||
51 | * eval.c: Define _GNU_SOURCE. | |
52 | ||
9de87eea MV |
53 | 2005-03-02 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
54 | ||
55 | Big merge from the mvo-thread-cleanup branch. The main changes | |
56 | are: | |
57 | ||
58 | - The dynamic roots functionality has been split into dynamic | |
59 | states and continuations barriers. Fluids have been | |
60 | reimplemented and can now be garbage collected. | |
61 | ||
62 | - Initialization of Guile now works in a multi-thread friendly | |
63 | manner. Threads can freely enter and leave guile mode. | |
64 | ||
65 | - Blocking on mutexes or condition variables or while selecting | |
66 | can now be reliably interrupted via system asyncs. | |
67 | ||
68 | - The low-level threading interface has been removed. | |
69 | ||
70 | - Signals are delivered via a pipe to a dedicated 'signal delivery | |
71 | thread'. | |
72 | ||
73 | - SCM_DEFER_INTS, SCM_ALLOW_INTS etc have been deprecated. | |
74 | ||
75 | * throw.c (scm_handle_by_message): Exit only the current thread, | |
76 | not the whole process. | |
77 | (scm_handle_by_message_noexit): Exit when catching 'quit. | |
78 | ||
79 | * scmsigs.c (take_signal, signal_delivery_thread, | |
80 | start_signal_delivery_thread, ensure_signal_delivery_thread, | |
81 | install_handler): Reimplemented signal delivery as explained in | |
82 | the comments. | |
83 | ||
84 | * pthreads-threads.h (scm_i_pthread_t, scm_i_pthread_self, | |
85 | scm_i_pthread_create, scm_i_pthread_detach, scm_i_pthread_exit, | |
86 | scm_i_sched_yield, scm_i_pthread_sigmask, | |
87 | SCM_I_PTHREAD_MUTEX_INITIALIZER, | |
88 | SCM_I_PTHREAD_RECURSIVE_MUTEX_INITIALIZER, scm_i_pthread_mutex_t , | |
89 | scm_i_pthread_mutex_init, scm_i_pthread_mutex_destroy, | |
90 | scm_i_pthread_mutex_trylock, scm_i_pthread_mutex_lock, | |
91 | scm_i_pthread_mutex_unlock, SCM_I_PTHREAD_COND_INITIALIZER, | |
92 | scm_i_pthread_cond_t, scm_i_pthread_cond_init, | |
93 | scm_i_pthread_cond_destroy, scm_i_pthread_cond_signal, | |
94 | scm_i_pthread_cond_broadcast, scm_i_pthread_cond_wait, | |
95 | scm_i_pthread_cond_timedwait, scm_i_pthread_once_t, | |
96 | SCM_I_PTHREAD_ONCE_INIT, scm_i_pthread_once, scm_i_pthread_key_t , | |
97 | scm_i_pthread_key_create, scm_i_pthread_setspecific, | |
98 | scm_i_pthread_getspecific, scm_i_scm_pthread_mutex_lock, | |
99 | scm_i_frame_pthread_mutex_lock, scm_i_scm_pthread_cond_wait, | |
100 | scm_i_scm_pthread_cond_timedwait): Provide the obvious mapping | |
101 | when using pthreads. | |
102 | * null-threads.c, null-threads.h: Provide dummy definitions for | |
103 | the above symbols when not using pthreads. | |
104 | ||
105 | * modules.h, modules.c (scm_frame_current_module): New. | |
106 | ||
107 | * load.c (scm_primitive_load): Use scm_i_frame_current_load_port | |
108 | instead of scm_internal_dynamic_wind. | |
109 | ||
110 | * init.h, init.c (restart_stack, start_stack): Removed. | |
111 | (scm_boot_guile, invoke_main_func): Simply use scm_with_guile. | |
112 | (scm_boot_guile_1): Removed. | |
113 | (scm_i_init_mutex): New. | |
114 | (really_cleanup_for_exit, cleanup_for_exit): New. | |
115 | (scm_init_guile_1, scm_i_init_guile): Renamed former to latter. | |
116 | Moved around some init funcs. Call | |
117 | scm_init_threads_default_dynamic_state. Register cleanup_for_exit | |
118 | with atexit. | |
119 | ||
120 | * hashtab.c (scm_hash_fn_create_handle_x, scm_hash_fn_remove_x): | |
121 | Use "!scm_is_eq" instead of "!=". | |
122 | ||
123 | * ge-scmconfig.c, gen-scmconfig.h.in (SCM_I_GSC_USE_COOP_THREADS, | |
124 | SCM_USE_COOP_THREADS): Removed. | |
125 | ||
126 | * gc.c (scm_igc): Take care that scm_gc_running_p is properly | |
127 | maintained. Unlock scm_i_sweep_mutex before running | |
128 | scm_after_gc_c_hook. | |
129 | (scm_permanent_object): Allocate outside of critical section. | |
130 | (cleanup): Removed. | |
131 | ||
132 | * fluids.h, fluids.c: Reimplemented completely. | |
133 | (SCM_FLUID_NUM, SCM_FAST_FLUID_REF, | |
134 | SCM_FAST_FLUID_SET): Reimplemented as functions. | |
135 | (scm_is_fluid): New. | |
136 | (scm_i_make_initial_fluids, scm_i_copy_fluids): Removed. | |
137 | (scm_make_dynamic_state, scm_dynamic_state_p, | |
138 | scm_is_dynamic_state, scm_current_dynamic_state, | |
139 | scm_set_current_dynamic_state, scm_frame_current_dynamic_state, | |
140 | scm_c_with_dynamic_state, scm_with_dynamic_state, | |
141 | scm_i_make_initial_dynamic_state, scm_fluids_prehistory): New. | |
142 | ||
143 | * feature.c (progargs_fluid): New. | |
144 | (scm_program_arguments, scm_set_program_arguments): Use it instead | |
145 | of scm_progargs. | |
146 | (scm_init_feature): Allocate it. Also, only add "threads" feature | |
147 | when SCM_USE_PTHREAD_THREADS is true. | |
148 | ||
149 | * eval.c (scm_makprom): Use scm_make_recursive_mutex instead of | |
150 | scm_make_rec_mutex, with all the consequences. | |
151 | (scm_eval_x, scm_eval): Use scm_frame_begin etc instead of | |
152 | scm_internal_dynamic_wind. Handle dynamic states as second | |
153 | argument. | |
154 | ||
155 | * threads.h, threads.c (scm_internal_select): Renamed to | |
156 | scm_std_select and discouraged old name. | |
157 | (scm_thread_sleep, scm_thread_usleep): Likewise, as scm_std_sleep | |
158 | and scm_std_usleep. | |
159 | (scm_tc16_fair_mutex, scm_tc16_fair_condvar, SCM_MUTEXP, | |
160 | SCM_FAIR_MUTEX_P, SCM_MUTEX_DATA, SCM_CONDVARP, | |
161 | SCM_FAIR_CONDVAR_P, SCM_CONDVAR_DATA, SCM_THREADP, | |
162 | SCM_THREAD_DATA): Removed. | |
163 | (SCM_I_IS_THREAD, SCM_I_THREAD_DATA): New. | |
164 | (scm_i_thread): New. | |
165 | (SCM_VALIDATE_THREAD, SCM_VALIDATE_MUTEX, SCM_VALIDATE_CONDVAR): | |
166 | Use scm_assert_smob_type. | |
167 | (scm_c_scm2thread, scm_thread_join, scm_thread_detach, | |
168 | scm_thread_self, scm_thread_yield, scm_mutex_init, | |
169 | scm_mutex_destroy, scm_mutex_trylock, scm_mutex_unlock, | |
170 | scm_rec_mutex_init, scm_rec_mutex_destroy, scm_make_rec_mutex, | |
171 | scm_rec_mutex_free, scm_rec_mutex_lock, scm_rec_mutex_trylock, | |
172 | scm_cond_init, scm_cond_destroy, scm_cond_wait, | |
173 | scm_cond_timedwait, scm_cond_signal, scm_cond_broadcast, | |
174 | scm_key_create, scm_key_delete, scm_setspecific, scm_getspecific, | |
175 | scm_thread_select): Removed. Replaced with scm_i_pthread | |
176 | functions as appropriate. | |
177 | (scm_in_guile, scm_outside_guile): Removed. | |
178 | (scm_t_guile_ticket, scm_leave_guile, scm_enter_guile): Return and | |
179 | take a ticket. | |
180 | (scm_with_guile, scm_without_guile, scm_i_with_guile_and_parent): | |
181 | New. | |
182 | (scm_i_frame_single_threaded): New. | |
183 | (scm_init_threads_default_dynamic_state): New. | |
184 | (scm_i_create_thread): Removed. | |
185 | (scm_make_fair_mutex, scm_make_fair_condition_variable): Removed. | |
186 | (scm_make_recursive_mutex): New. | |
187 | (scm_frame_critical_section): New. | |
188 | (SCM_CURRENT_THREAD, SCM_I_CURRENT_THREAD): Renamed former to | |
189 | latter, changed all uses. | |
190 | (scm_i_dynwinds, scm_i_setdynwinds, scm_i_last_debug_frame, | |
191 | scm_i_set_last_debug_frame): New, use them instead of scm_root | |
192 | stuff. | |
193 | (SCM_THREAD_LOCAL_DATA, SCM_SET_THREAD_LOCAL_DATA, | |
194 | scm_i_root_state_key,m scm_i_set_thread_data): Removed. | |
195 | (scm_pthread_mutex_lock, scm_frame_pthread_mutex_lock, | |
196 | scm_pthread_cond_wait, scm_pthread_cond_timedwait). | |
197 | (remqueue): Allow the removal of already removed cells. Indicate | |
198 | whether a real removal has happened. | |
199 | (scm_thread): Removed, replaced with scm_i_thread. | |
200 | (make_thread, init_thread_creatant): Removed. | |
201 | (cur_thread): Removed. | |
202 | (block_self, unblock_from_queue): New. | |
203 | (block, timed_block, unblock): Removed. | |
204 | (guilify_self_1, guilify_self_2, do_thread_exit, | |
205 | init_thread_key_once, init_thread_key, | |
206 | scm_i_init_thread_for_guile, get_thread_stack_base, | |
207 | scm_init_guile): New initialisation method. | |
208 | (scm_call_with_new_thread, scm_spawn_thread): Use it to simplify | |
209 | thread creation. | |
210 | (fair_mutex, fat_mutex, etc, fair_condvar, fat_condvar): Renamed | |
211 | "fair" to fat and implemented new semantics, including reliable | |
212 | interruption. | |
213 | (all_threads): Now a pointer to a scm_i_thread, not a SCM. | |
214 | (scm_threads_mark_stacks): Explicitly mark handle. | |
215 | (scm_std_select): Allow interruption by also selecting on the | |
216 | sleep_pipe. | |
217 | (scm_i_thread_put_to_sleep): Handle recursive requests for | |
218 | single-threadedness. | |
219 | (scm_threads_prehistory, scm_init_threads): Put current thread | |
220 | into guile mode via guileify_self_1 and guileify_self_2, | |
221 | respectively. | |
222 | ||
223 | * fluid.h (SCM_FLUIDP): Deprecated. | |
224 | ||
225 | * coop-threads.c: Removed. | |
226 | ||
227 | * continuations.h, continuations.c (scm_with_continuation_barrier, | |
228 | scm_c_with_continuation_barrier, scm_i_with_continuation_barrier): | |
229 | New. | |
230 | ||
231 | * async.h, async.c (scm_i_setup_sleep, scm_i_reset_sleep): New. | |
232 | (async_mutex): New. | |
233 | (scm_async_click): Protected with async_mutex. Do not deal with | |
234 | signal_asyncs, which are gone. Set cdr of handled async cell to | |
235 | #f. | |
236 | (scm_i_queue_async_cell): Protected with async_mutex. Interrupt | |
237 | current sleep. | |
238 | (scm_system_async_mark_for_thread): Do not use scm_current_thread | |
239 | since that might not work during early initialization. | |
240 | ||
241 | * __scm.h (SCM_DEFER_INTS, SCM_ALLOW_INTS, SCM_REDEFER_INTS, | |
242 | SCM_REALLOW_INTS): Deprecated by moving into deprecated.h and | |
243 | deprecated.c. Replaced all uses with SCM_CRITICAL_SECTION_START | |
244 | and SCM_CRITICAL_SECTION_END. | |
245 | (SCM_ENTER_A_SECTION, SCM_EXIT_A_SECTION): Removed. Replaced with | |
246 | SCM_CRITICAL_SECTION_START/END. | |
247 | ||
248 | * Makefile.am (modinclude_HEADER): Removed threads-plugin.h. | |
249 | (libguile_la_SOURCES): Added null-threads.c | |
250 | (EXTRA_libguile_la_SOURCES): Removed pthread-threads.c and | |
251 | threads-plugin.c. | |
252 | * pthread-threads.c, threads-plugin.c, threads-plugin.h: Removed. | |
253 | ||
254 | * root.h, root.c (scm_tc16_root, SCM_ROOTP, SCM_ROOT_STATE, | |
255 | scm_root_state, scm_stack_base, scm_save_regs_gc_mark, | |
256 | scm_errjmp_bad, scm_rootcont, scm_dynwinds, scm_progargs, | |
257 | scm_last_debug_frame, scm_exitval, scm_cur_inp, scm_outp, | |
258 | scm_cur_err, scm_cur_loadp, scm_root, scm_set_root, | |
259 | scm_make_root): Removed or deprecated. Replaced with references | |
260 | to the current thread, dynamic state, continuation barrier, or | |
261 | some fluid, as appropriate. | |
262 | (root_mark, root_print): Removed. | |
263 | (scm_internal_cwdr): Reimplemented guts with | |
264 | scm_frame_current_dynamic_state and | |
265 | scm_i_with_continuation_barrier. | |
266 | (scm_dynamic_root): Return current continuation barrier. | |
267 | ||
268 | ||
ad3d5a65 MV |
269 | 2005-02-28 Marius Vollmer <mvo@zagadka.de> |
270 | ||
271 | * socket.c (scm_setsockopt): Handle IP_ADD_MEMBERSHIP and | |
272 | IP_DROP_MEMBERSHIP options. Also, reorganized the code a bit for | |
273 | cleanliness. | |
274 | (scm_init_socket): Define IP_ADD_MEMBERSHIP and | |
275 | IP_DROP_MEMBERSHIP. | |
276 | Thanks to Greg Troxel! | |
277 | ||
73a90115 MD |
278 | 2005-02-27 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
279 | ||
280 | * gh.h: Bugfix: Include <libguile.h> outside of the extern "C" | |
281 | block. | |
282 | ||
5d2cb3ab MV |
283 | 2005-02-25 Marius Vollmer <mvo@zagadka.de> |
284 | ||
285 | * hashtab.c (scm_i_rehash): Remove elements from old bucket vector | |
286 | so that no two weak alist vectors share a spine. | |
287 | (scm_hash_fn_create_handle_x): Deal with a possible rehashing | |
288 | during GC before inserting the new alist cell. | |
289 | ||
838c4126 MV |
290 | 2005-02-23 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
291 | ||
292 | * hashtab.c (scm_i_rehash): Cope with the case that a GC modifies | |
293 | the hashtable. | |
294 | (scm_hash_fn_create_handle_x): Likewise. | |
295 | * vectors.h (SCM_I_SET_WVECT_TYPE): New, for use in scm_i_rehash. | |
296 | ||
29fed193 MD |
297 | 2005-02-10 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
298 | ||
299 | * unif.c (prototype_to_type): Bugfix: Don't compare prototype to | |
300 | the prototypical examples mentioned in the old reference manual. | |
301 | Instead keep the old semantics of dispatching on type. (Yes, this | |
302 | is extremely ugly, but the whole point of keeping the deprecated | |
303 | interface is not to break old code.) | |
304 | ||
9cc49060 MD |
305 | 2005-02-08 Mikael Djurfeldt <djurfeldt@nada.kth.se> |
306 | ||
307 | * deprecated.h (SCM_ARRAY_DIMS): Rename scm_i_attay_dims --> | |
308 | scm_i_array_dims. | |
309 | ||
8447f463 KR |
310 | 2005-01-28 Kevin Ryde <user42@zip.com.au> |
311 | ||
312 | * numbers.c (scm_ash): Rewrite using shifts, much faster than | |
313 | integer-expt and multiply/divide. Inexacts and fractions no longer | |
314 | supported (they happened to work before for left shifts, but not | |
315 | right). Don't really need inexacts and fractions, since ash is | |
316 | documented as a "bitwise operation", and all the rest of those only | |
317 | take exact integers. | |
318 | ||
1367aa5e HWN |
319 | 2005-01-27 Han-Wen Nienhuys <hanwen@xs4all.nl> |
320 | ||
856fca7e HWN |
321 | * gc-card.c (scm_i_card_statistics): map structs, closures and |
322 | subrs to one tag. | |
323 | ||
1367aa5e | 324 | * gc.c (s_scm_gc_live_object_stats): return alist, not hashtable. |
856fca7e | 325 | (tag_table_to_type_alist): ignore unknown types. |
1367aa5e HWN |
326 | |
327 | * gc-segment.c (scm_i_all_segments_statistics): new function. | |
328 | (scm_i_heap_segment_statistics): new function | |
329 | ||
330 | * gc.c (s_scm_gc_live_object_stats): new GUILE callable: return | |
331 | statistics on the number of live objects of each type. | |
332 | ||
333 | * gc-card.c (scm_i_tag_name): new function. | |
334 | (scm_i_card_statistics): new function. | |
335 | ||
333db3b8 KR |
336 | 2005-01-24 Kevin Ryde <user42@zip.com.au> |
337 | ||
338 | * posix.c (scm_setlocale): Force errno=EINVAL for an error, since | |
339 | POSIX and C99 don't document errno being set. Reported by Bruno | |
340 | Haible. | |
341 | (scm_flock): Update docstring from manual. | |
342 | ||
8447f463 KR |
343 | * random.c (scm_i_init_rstate): Compare w to -1 not 0xffffffffUL, now |
344 | that it's an scm_t_int32. Otherwise gcc 3.4 says it's always false on | |
345 | a 64-bit system. | |
346 | ||
347 | * scmsigs.c (scm_sigaction_for_thread): Use scm_to_long for | |
348 | sa_handler, needs to be a long on 64-bit systems where int is only 32 | |
349 | bits. | |
350 | ||
88f59e53 MV |
351 | 2005-01-20 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
352 | ||
0eeb2611 MV |
353 | * environments.c (obarray_enter, obarray_replace): Call |
354 | SCM_HASHTABLE_INCREMENT when adding a new entry. | |
355 | ||
88f59e53 MV |
356 | * objects.c: Include goops.h for the scm_class_of prototype. |
357 | ||
358 | * hashtab.c (hashtable_size, HASHTABLE_SIZE_N): Restrict hashtable | |
359 | sizes to be smaller than the maximum lengths of vectors. | |
360 | ||
219b2868 MV |
361 | 2005-01-18 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
362 | ||
363 | * ports.c, smob.c: Include "libguile/goops.h". | |
364 | ||
365 | * objects.h, objects.c, goops.c, goops.h (scm_class_boolean, | |
366 | scm_class_char, scm_class_pair, scm_class_procedure, | |
367 | scm_class_string, scm_class_symbol, | |
368 | scm_class_procedure_with_setter, scm_class_primitive_generic, | |
369 | scm_class_vector, scm_class_null, scm_class_real, | |
370 | scm_class_complex, scm_class_integer, scm_class_fraction, | |
371 | scm_class_unknown, scm_port_class, scm_smob_class, | |
372 | scm_no_applicable_method, scm_class_of): Moved from objects to | |
373 | goops since they are only useable once goops has been loaded. | |
374 | (scm_classes_initialized): Removed. | |
375 | (scm_class_of): Do not check it. | |
376 | (create_standard_classes): Do not set it. | |
377 | ||
009c6b9c MV |
378 | 2005-01-17 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
379 | ||
50472546 MV |
380 | * objects.h, objects.c (scm_classes_initialized): New. |
381 | (scm_class_of): Signal error when scm_classes_initialized is zero. | |
382 | * goops.c (create_standard_classes): Set scm_classes_initialized | |
383 | to one. | |
384 | ||
009c6b9c MV |
385 | * random.c (scm_random_solid_sphere_x): Use |
386 | scm_c_generalized_vector_length instead of | |
387 | scm_uniform_vector_length. | |
388 | ||
7719cbe9 MV |
389 | 2005-01-16 Marius Vollmer <mvo@zagadka.de> |
390 | ||
391 | * script.c (scm_compile_shell_switches): Removed debugging output. | |
392 | ||
1ec44fed KR |
393 | 2005-01-15 Kevin Ryde <user42@zip.com.au> |
394 | ||
395 | * numbers.c (scm_logtest, scm_logbit_p, scm_integer_expt): Update | |
396 | docstrings from manual. | |
397 | * random.c (scm_random_solid_sphere_x): Update docstring from manual. | |
398 | ||
6e4cd850 MV |
399 | 2005-01-14 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
400 | ||
0b5a0521 MV |
401 | * random.c: Don't check for definedness of SCM_HAVE_T_INT64, check |
402 | its value. | |
403 | ||
404 | Implement u64 and s64 uniform numeric vectors with bignums when | |
405 | scm_t_uint64 and scm_t_int64 are not available. | |
406 | ||
407 | * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_take_u64vector, | |
408 | scm_array_handle_u64_elements, | |
409 | scm_array_handle_u64_writable_elements, scm_u64vector_elements, | |
410 | scm_u64vector_writable_elements): Do not define when scm_t_uint64 | |
411 | is not available. | |
412 | (scm_take_s64vector, scm_array_handle_s64_elements, | |
413 | scm_array_handle_s64_writable_elements, scm_s64vector_elements, | |
414 | scm_s64vector_writable_elements): Likewise for scm_t_int64. | |
415 | (uvec_sizes, uvec_print, uvec_equalp): Use SCM bignums when | |
416 | scm_t_int64/scm_t_uint64 are not available. | |
417 | (uvec_mark): New, to mark the bignums. | |
418 | (alloc_uvec): Initialize bignums. | |
419 | (uvec_fast_ref): Return bignums directly. | |
420 | (scm_uint64_min, scm_uint64_max, scm_int64_min, scm_int64_max, | |
421 | assert_exact_integer): New. | |
422 | (uvec_fast_set): Use them to validate the bignums. | |
423 | (scm_init_srfi_4): Set mark function of smob when needed. | |
424 | Initialize scm_uint64_min, scm_uint64_max, scm_int64_min, | |
425 | scm_int64_max. | |
426 | ||
6e4cd850 MV |
427 | Recognize 1.4 -e syntax. |
428 | ||
429 | * script.c (sym_at, sym_atat, sym_main, all_symbols): New. | |
430 | (scm_compile_shell_switches): Use them to recognize and convert | |
431 | 1.4 "-e" syntax. | |
432 | ||
3b698afe MV |
433 | 2005-01-12 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
434 | ||
435 | * deprecated.h, deprecated.c, strings.h, strings.c: Turn all | |
436 | deprecated features that once were macros but are now functions | |
437 | back into macros. | |
438 | ||
d6dc83a9 MV |
439 | 2005-01-11 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
440 | ||
49086691 MV |
441 | * eval.c, debug.h (SCM_WARN_DEPRECATED): New debug option. |
442 | * deprecation.c (scm_issue_deprecation_warning, | |
443 | scm_c_issue_deprecation_warning_fmt): Use it. | |
444 | (mode): Removed. | |
445 | (print_summary): New. | |
446 | (scm_init_deprecation): Initialize SCM_WARN_DEPRECATED instead of | |
447 | mode. | |
448 | ||
d6dc83a9 MV |
449 | Deprecated SCM_ARRAY* macros. |
450 | ||
451 | * unif.h, unif.c, ramap.c, vectors.c, srfi-4.c, srfi-4.i.c | |
452 | (SCM_ARRAYP, SCM_I_ARRAYP): Renamed former to latter internal | |
453 | version. Changed all uses. | |
454 | (scm_tc16_array, scm_i_tc16_array, | |
455 | scm_tc16_enclosed_array, scm_i_tc16_enclosed_array, | |
456 | SCM_ARRAY_FLAG_CONTIGUOUS, SCM_I_ARRAY_FLAG_CONTIGUOUS, | |
457 | SCM_ENCLOSE_ARRAYP, SCM_I_ENCLOSE_ARRAYP, | |
458 | SCM_ARRAY_NDIM, SCM_I_ARRAY_NDIM, | |
459 | SCM_ARRAY_CONTP, SCM_I_ARRAY_CONTP, | |
460 | SCM_ARRAY_MEM, SCM_I_ARRAY_MEM, | |
461 | SCM_ARRAY_V, SCM_I_ARRAY_V, | |
462 | SCM_ARRAY_BASE, SCM_I_ARRAY_BASE, | |
463 | SCM_ARRAY_DIMS, SCM_I_ARRAY_DIMS, | |
464 | scm_t_array, scm_i_t_array): Likewise. | |
465 | (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG): | |
466 | Moved from unif.h to unif.c. | |
467 | (scm_c_array_rank): New. | |
468 | (scm_array_rank): Reimplement using it. | |
469 | ||
470 | * deprecated.h, deprecated.c (SCM_ARRAYP, SCM_ARRAY_NDIM, | |
471 | SCM_ARRAY_CONTP, SCM_ARRAY_MEM, SCM_ARRAY_V, SCM_ARRAY_BASE, | |
472 | SCM_ARRAY_DIMS, scm_t_array): New deprecated versions. | |
473 | ||
dc91d8de MV |
474 | 2005-01-11 Marius Vollmer <mvo@zagadka.de> |
475 | ||
476 | * ramap.c: Replace uses of scm_make_ra with scm_i_make_ra. | |
477 | (GVREF, GVSET): New abbreviations. Use them everywhere instead of | |
478 | scm_c_generalized_vector_ref and scm_cvref, and | |
479 | scm_c_generalized_vector_set_x, respectively. | |
480 | (RVREF, IVDEP, BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE, | |
481 | UNARY_ELTS_CODE, UNARY_PAIR_ELTS_CODE): Removed since unused. | |
482 | ||
483 | * unif.h, unif.c (indices_to_pos, scm_array_handle_pos): Renamed | |
484 | former to latter and made public. Changed all uses. | |
485 | (scm_i_make_ra): Made public, changed tag param to enclosed flag. | |
486 | (scm_make_ra): Deprecated, changed all uses to scm_i_make_ra. | |
487 | (scm_i_shap2ra): New internal version of scm_shap2ra. | |
488 | (scm_shap2ra): Deprecated, changed all uses to scm_i_shap2ra. | |
489 | (scm_i_ra_set_contp): New internal version of scm_ra_set_contp. | |
490 | (scm_ra_set_contp): Deprecated, changed all uses to | |
491 | scm_i_ra_set_contp. | |
492 | (scm_cvref, scm_aind, scm_raprin1): Deprecated. | |
493 | ||
66d33784 MV |
494 | 2005-01-10 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
495 | ||
b06f099d MV |
496 | * eval.c (scm_eval): Added example to docstring. Thanks to Issac |
497 | Trotts! | |
498 | ||
5d35ad81 MV |
499 | * unif.c (scm_list_to_typed_array): Allow the specification of the |
500 | upper bound as well. This is needed for empty arrays. | |
501 | (l2ra): Give needed number of elements in error message. | |
502 | (scm_i_print_array): Print length information for arrays that need | |
503 | it. | |
504 | (scm_i_read_array): Parse it. | |
505 | ||
66d33784 MV |
506 | * deprecated.h, deprecated.c (SCM_CHARS, SCM_UCHARS, SCM_LENGTH, |
507 | scm_i_object_chars, scm_i_object_length): Brought back from the | |
508 | dead. | |
509 | ||
d7d7d401 MV |
510 | 2005-01-10 Marius Vollmer <mvo@zagadka.de> |
511 | ||
74c58fce MV |
512 | * ramap.c: Replaced single-index uses of scm_array_set_x with |
513 | scm_c_generalized_vector_set_x. | |
514 | ||
d7d7d401 MV |
515 | * unif.c (scm_array_rank, scm_array_dimensions, |
516 | scm_shared_array_offset, scm_shared_array_increments, | |
517 | scm_array_ref, scm_array_set_x): Use scm_t_array_handle operations | |
518 | to simplify code and make it more general. | |
519 | (scm_shared_array_root): Work with all kinds of arrays, including | |
520 | naked vectors. | |
521 | (indices_to_pos): New. | |
74c58fce MV |
522 | (scm_make_shared_array): Use it instead of scm_aind; use handle |
523 | for oldra. | |
524 | ||
4475d3fe KR |
525 | 2005-01-10 Kevin Ryde <user42@zip.com.au> |
526 | ||
527 | * posix.c (scm_mkstemp): Update docstring from manual. | |
528 | ||
d3ddc95e KR |
529 | * stime.c (scm_mktime): Missing default errno=EINVAL from prev change. |
530 | ||
8c8491f5 MV |
531 | 2005-01-09 Marius Vollmer <mvo@zagadka.de> |
532 | ||
b89ecc6f MV |
533 | * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_i_uniform_vector_ref_proc, |
534 | scm_i_uniform_vector_set_proc): New. | |
535 | (u8ref, u8set, s8ref, s8set, etc): New. | |
536 | (uvec_reffers, uvec_setters): New. | |
537 | (uvec_to_list): Use generic scm_array_handle_ref instead of | |
538 | uvec_fast_ref since scm_array_handle_ref should be faster now. | |
8cb01d9f MV |
539 | (coerce_to_uvec, scm_c_uniform_vector_ref, |
540 | scm_c_uniform_vector_set_x): Likewise. | |
b89ecc6f MV |
541 | |
542 | * unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set): | |
543 | New. | |
544 | (scm_t_array_handle): Added ref, set, elements and | |
545 | writable_elements for fast inline operation of | |
546 | scm_array_handle_ref and scm_array_handle_set. | |
547 | (scm_array_handle_ref, scm_array_handle_set): Moved to inline.h | |
548 | and replaced with inline code that simply calls the ref/set | |
549 | members of the handle. | |
550 | (enclosed_ref, vector_ref, string_ref, bitvector_ref, memoize_ref, | |
551 | enclosed_set, vector_set, string_set, bitvector_set, memoize_set): | |
552 | New. | |
553 | (scm_array_handle_get): Initialize ref/set fields to memoize_ref | |
554 | and memoize_set. | |
555 | (scm_bitvector_fill_x, scm_bitvector_to_list, scm_bit_count, | |
556 | scm_bit_position, scm_bit_set_star_x, scm_bit_count_star, | |
557 | scm_bit_invert_x): Correctly multiply index with increment in the | |
558 | general case. | |
559 | ||
8c8491f5 MV |
560 | * unif.c (scm_array_handle_set): Correctly execute only one |
561 | alternative. D'Oh! | |
562 | (scm_list_to_typed_array, l2ra): Use scm_t_array_handle to fill | |
563 | the array; this covers all cases with much simpler code. | |
564 | ||
565 | * srfi-4.c (scm_uniform_element_size): Deprecated implementation | |
566 | as well. | |
567 | ||
cd5d55c7 MV |
568 | 2005-01-09 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
569 | ||
570 | * srfi-4.c (uvec_type): New. | |
571 | (uvec_to_list, uvec_ref, uvec_set_x, scm_c_uniform_vector_ref, | |
572 | scm_c_uniform_vector_x): Use it to get concrete type. | |
573 | ||
574 | * unif.h (scm_t_array_dim): Changed type of members to ssize_t, to | |
575 | fit the docs. | |
576 | ||
577 | * unif.c (ra2l): Handle zero rank arrays. | |
578 | (scm_i_print_array): Print zero rank arrays specially. | |
579 | (tag_to_type): Return #t for an empty tag, not the empty symbol. | |
580 | (scm_i_read_array): Allow zero rank arrays. | |
581 | ||
a4aad74e MV |
582 | 2005-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
583 | ||
584 | * hashtab.h, hashtab.c (SCM_HASHTAB_BUCKET_LOC): Removed. | |
585 | (scan_weak_hashtables): Rewrote its use with SCM_HASHTAB_BUCKET | |
586 | and SCM_SET_HASHTAB_BUCKET. | |
587 | ||
588 | * print.h, print.c (scm_print_state, SCM_PRINT_STATE_LAYOUT): | |
589 | Removed ref_stack field. | |
590 | (PSTATE_STACK_REF, PSTATE_STACK_SET): New, for accessing the stack | |
591 | of a print state. Use them everywhere instead of ref_stack. | |
592 | ||
3a40d5e1 MV |
593 | * srfi-4.h (scm_uniform_element_size): Deprecated for real. |
594 | ||
a4aad74e MV |
595 | * srfi-4.c: Include deprecation.h. |
596 | ||
597 | * vectors.h, vectors.c, unif.h, unif.c, deprecated.h, | |
598 | deprecated.c, eq.c | |
599 | (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Removed. | |
600 | (scm_vector_elements, scm_vector_writable_elements, | |
601 | scm_generalized_vector_get_handle): Moved to vectors.[hc] from | |
602 | unif.[hc]. | |
603 | (SCM_SIMPLE_VECTOR_LOC): Removed. | |
604 | (SCM_VECTOR_MAX_LENGTH, SCM_VECTOR_LENGTH, SCM_VELTS, | |
605 | SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET, | |
606 | scm_vector_equal_p): Moved from vectors.[hc] to deprecated.[hc]. | |
607 | (scm_vector_equal_p, scm_i_vector_equal_p): Renamed former to | |
608 | latter. Changed use in eq.c. | |
609 | ||
f01fe441 MV |
610 | 2005-01-07 Marius Vollmer <mvo@zagadka.de> |
611 | ||
612 | Make the uniform vector routines also deal with one dimensional | |
613 | arrays. | |
614 | ||
615 | * srfi-4.c (SCM_IS_UVEC): New, use it instead of | |
616 | SCM_SMOB_PREDICATE in this file. | |
617 | (is_uvec): Also recognize one-dimensional uniform numeric arrays | |
618 | of the right type. | |
619 | (scm_is_uniform_vector): Likewise. | |
620 | (uvec_fast_ref): Made BASE param const. | |
621 | (uvec_writable_elements, uvec_elements): New. | |
622 | (uvec_to_list, uvec_ref, uvec_set_x, uvec_length, | |
623 | scm_c_uniform_vector_length, scm_c_uniform_vector_ref, | |
624 | scm_c_uniform_set_x): Use them to also deal with one-dimensional | |
625 | arrays. | |
626 | (scm_uniform_vector_ref, scm_uniform_vector_set_x): Deprecate old | |
627 | argument convention. | |
628 | (scm_uniform_vector_to_list): Let uvec_to_list do all the | |
629 | checking. | |
630 | (scm_uniform_vector_length): Use uvec_length. | |
631 | ||
2aaf5726 MV |
632 | 2005-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
633 | ||
634 | * srfi-4.h, srfi-4.c (scm_c_uniform_vector_element_size, | |
635 | scm_c_uniform_vector_size): Removed. | |
636 | (scm_array_handle_uniform_element_size): New. | |
637 | ||
638 | ||
639 | * unif.h (scm_array_handle_ref, scm_array_handle_set): Changed | |
640 | type of POS parameter to be signed, positions can be negative. | |
641 | (scm_array_handle_release): New, changed all uses of | |
642 | scm_t_array_handle to properly call it. | |
643 | (scm_vector_get_handle, scm_generalized_vector_get_handle): | |
644 | Renamed former to latter, changed all uses. | |
645 | ||
34ae52fc MV |
646 | 2005-01-05 Marius Vollmer <mvo@zagadka.de> |
647 | ||
648 | Updated bitvector routines to also use scm_t_array_handles. | |
649 | ||
650 | * unif.h (scm_bitvector_elements, | |
651 | scm_bitvector_writable_elements): Use a scm_t_array_handle and | |
652 | deliver offset, length and increment to caller. Changed all uses. | |
653 | (scm_bitvector_release_elements, | |
654 | scm_frame_bitvector_release_elements, | |
655 | scm_bitvector_release_writable_elements, | |
656 | scm_frame_bitvector_release_writable_elements): Removed. | |
657 | (scm_array_handle_bit_elements, | |
658 | scm_array_handle_bit_writable_elements, | |
659 | scm_array_handle_bit_elements_offset): New. | |
660 | (scm_make_typed_array): The special value for non-initialized | |
661 | arrays is now SCM_UNSPECIFIED. The old special value SCM_BOOL_F | |
662 | was a valid value to fill bitvectors with, so it can't really be | |
663 | specialed out. | |
664 | ||
c4cb7628 KR |
665 | 2005-01-04 Kevin Ryde <user42@zip.com.au> |
666 | ||
667 | * stime.c (scm_strftime): Free t.tm_zone produced by bdtime2c. | |
668 | Reported by Bill Schottstaedt. | |
669 | ||
0356881d MV |
670 | 2005-01-02 Marius Vollmer <mvo@zagadka.de> |
671 | ||
672 | * sort.c (quicksort): Added INC parameter for non-contigous | |
673 | vectors. | |
674 | (quicksort1): New, for contigous vectors. Both functions are | |
675 | generated from the same code by including "quicksort.i.c". | |
676 | (scm_restricted_vector_sort_x): Call one of quicksort and | |
677 | quicksort1, depending on increment of vector. | |
678 | (scm_sort): Simply call scm_sort_x on a copy of the list or | |
679 | vector. | |
680 | (scm_merge_vector_x, scm_merge_vector_step): Changed indices to | |
681 | size_t, added inc parameter. | |
682 | (scm_stable_sort_x): Allocate temporary storage as Scheme vector | |
683 | so that it doesn't leak. | |
684 | (scm_stable_sort): Simply call scm_stable_sort_x on a copy of the | |
685 | list or vector. | |
686 | ||
687 | * ramap.c (scm_array_map_x): Do not try to convert fill value | |
688 | before filling, any necessary conversion is done while storing. | |
689 | ||
690 | * gc-card.c (scm_i_sweep_card): Call scm_i_vector_free instead of | |
691 | doing it inline. | |
692 | ||
693 | * hashtab.c, hashtab.h (SCM_HASHTABLE_BUCKETS): Removed. | |
694 | (SCM_HASHTABLE_BUCKET, SCM_HASHTABLE_BUCKET_LOC): New. Replaced | |
695 | all uses of SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET. | |
696 | ||
697 | * tags.h, weaks.c, vports.c, hashtab.c, convert.c, sort.c, | |
698 | convert.c, convert.h, convert.i.c, deprecated.c, environments.c, | |
699 | eval.c, filesys.c, fluids.c, gc-mark.c, gh.h, gh_data.c, goops.c, | |
700 | hash.c, init.c, libguile_la-arrays.loT, modules.c, net_db.c, | |
701 | objects.c, ports.c, posix.c, print.c, random.c, read.c, | |
702 | regex-posix.c, scmsigs.c, socket.c, stime.c, symbols.c: Use new | |
703 | vector elements API or simple vector API, as appropriate. Removed | |
704 | SCM_HAVE_ARRAYS ifdefery. Replaced all uses of | |
705 | SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET. | |
706 | ||
707 | * srfi-4.h, srfi-4.c, | |
708 | srfi-4.i.c (scm_array_handle_uniform_elements, | |
709 | scm_array_handle_uniform_writable_elements, | |
710 | scm_uniform_vector_elements, | |
711 | scm_uniform_vector_writable_elements): | |
712 | (scm_<foo>vector_elements, scm_<foo>vector_writable_elements): Use | |
713 | scm_t_array_handle, deliver length and increment. | |
714 | (scm_array_handle_<foo>_elements, | |
715 | scm_array_handle_<foo>_writable_elements): New. | |
716 | ||
717 | * gen-scmconfig.h.in (SCM_I_GSC_HAVE_ARRAYS): Removed. | |
718 | * gen-scmconfig.c: Hard code SCM_HAVE_ARRAYS to "1". | |
719 | ||
720 | * unif.h, unif.c (scm_t_array_handle, scm_array_get_handle, | |
721 | scm_array_handle_rank, scm_array_handle_dims, scm_array_handle_ref | |
722 | scm_array_handle_set, scm_array_handle_elements | |
723 | scm_array_handle_writable_elements, scm_vector_get_handle): New. | |
724 | (scm_make_uve, scm_array_prototype, scm_list_to_uniform_array, | |
725 | scm_dimensions_to_uniform_array): Deprecated for real. | |
726 | (scm_array_p, scm_i_array_p): Use latter for SCM_DEFINE since | |
727 | snarfing wont allow a mismatch between C and Scheme arglists. | |
728 | (scm_make_shared_array, scm_enclose_array): Correctly use | |
729 | scm_c_generalized_vector_length instead of | |
730 | scm_uniform_vector_length. | |
731 | ||
732 | * validate.h (SCM_VALIDATE_VECTOR, | |
733 | SCM_VALIDATE_VECTOR_OR_DVECTOR): use scm_is_simple_vector instead | |
734 | of SCM_VECTORP. | |
735 | ||
736 | * weaks.h, weaks.c: Use new internal weak vector API from | |
737 | vectors.h. | |
738 | ||
739 | * Makefile.am (libguile_la_SOURCES, DOT_X_FILES, DOT_DOC_FILES, | |
740 | EXTRA_libguile_la_SOURCES): Changed ramap.c and unif.c from being | |
741 | 'extra' to being regular sources. | |
742 | (noinst_HEADERS): Added quicksort.i.c. | |
743 | * quicksort.i.c: New file. | |
744 | ||
745 | * vectors.h, vector.c (SCM_VECTORP, SCM_VECTOR_LENGTH, SCM_VELTS, | |
746 | SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET): Deprecated | |
747 | and reimplemented. Replaced all uses with scm_vector_elements, | |
748 | scm_vector_writable_elements, or SCM_SIMPLE_VECTOR_*, as | |
749 | appropriate. | |
750 | (scm_is_simple_vector, SCM_SIMPLE_VECTOR_LENGTH, | |
751 | SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET, | |
752 | SCM_SIMPLE_VECTOR_LOC): New. | |
753 | (SCM_VECTOR_BASE, SCM_SET_VECTOR_BASE, SCM_VECTOR_MAX_LENGTH, | |
754 | SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH, | |
755 | SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS): | |
756 | Removed. | |
757 | (scm_vector_copy): New. | |
758 | (scm_vector_elements, scm_vector_writable_elements): Use | |
759 | scm_t_array_handle, deliver length and increment. Moved to | |
760 | unif.h. Changed all uses. | |
761 | (scm_vector_release_elements, | |
762 | scm_vector_release_writable_elements, | |
763 | (scm_frame_vector_release_elements, | |
764 | scm_frame_vector_release_writable_elements): Removed. | |
765 | (SCM_I_IS_VECTOR, SCM_I_VECTOR_ELTS, SCM_I_VECTOR_WELTS, | |
766 | SCM_I_VECTOR_LENGTH, scm_i_vector_free): New internal API. | |
767 | (SCM_I_WVECTP SCM_I_WVECT_LENGTH SCM_I_WVECT_VELTS | |
768 | SCM_I_WVECT_GC_WVELTS SCM_I_WVECT_TYPE SCM_I_WVECT_GC_CHAIN | |
769 | SCM_I_SET_WVECT_GC_CHAIN, scm_i_allocate_weak_vector): New, for | |
770 | weak vectors. | |
771 | ||
0336d18b MV |
772 | 2004-12-29 Marius Vollmer <mvo@zagadka.de> |
773 | ||
774 | No longer use creators to specify the type of an array. Creators | |
775 | expose the fact that arrays are wrapped around vectors, but that | |
776 | might change. | |
777 | ||
778 | * srfi-4.h (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector, | |
779 | scm_i_proc_make_u16vector, scm_i_proc_make_s16vector, | |
780 | scm_i_proc_make_u32vector, scm_i_proc_make_s32vector, | |
781 | scm_i_proc_make_u64vector, scm_i_proc_make_s64vector, | |
782 | scm_i_proc_make_f32vector, scm_i_proc_make_f64vector, | |
783 | scm_i_proc_make_c32vector, scm_i_proc_make_c64vector, | |
784 | uvec_proc_vars): Removed. | |
785 | (scm_i_generalized_vector_creator): Removed. | |
786 | (scm_i_generalized_vector_type): New. | |
787 | ||
788 | * unif.h, unif.c (scm_typed_array_p, scm_make_array, | |
789 | scm_make_typed_array, scm_array_type, scm_list_to_array, | |
790 | scm_list_to_typed_array, scm_is_array, scm_is_typed_array): New. | |
791 | (scm_array_creator): Removed. | |
792 | (scm_array_p): Deprecated second PROT argument. | |
793 | (scm_dimensions_to_uniform_array, scm_list_to_uniform_array): | |
794 | Deprecated, reimplemented in terms of scm_make_typed_array and | |
795 | scm_list_to_typed_array. | |
796 | (scm_i_proc_make_vector, scm_i_proc_make_string, | |
797 | scm_i_proc_make_bitvector): Removed. | |
798 | (type_creator_table, init_type_creator_table, type_to_creator, | |
799 | make_typed_vector): New. | |
800 | (scm_i_convert_old_prototype): Removed. | |
801 | (prototype_to_type): New. | |
802 | (scm_make_uve): Deprecated, reimplemented using make_typed_vector. | |
803 | (scm_array_dimensions): Use scm_list_1 instead of scm_cons for | |
804 | minor added clarity. | |
805 | (scm_make_shared_array, scm_ra2contig): Use make_typed_vector | |
806 | instead of scm_make_uve. | |
807 | (tag_creator_table, scm_i_tag_to_creator): Removed. | |
808 | (tag_to_type): New. | |
809 | (scm_i_read_array): Use scm_list_to_typed_array instead of | |
810 | scm_list_to_uniform_array. | |
811 | ||
277e8472 MV |
812 | 2004-12-27 Marius Vollmer <mvo@zagadka.de> |
813 | ||
32b26202 MV |
814 | * unif.h, unif.c (scm_bitvector_elements): Made return value "const". |
815 | (scm_bitvector_writable_elements): New. | |
816 | (scm_bitvector_release, scm_bitvector_release_elements): | |
817 | Renamed former to latter. Added explicit call to | |
818 | scm_remember_upto_here_1. | |
819 | (scm_frame_bitvector_release, | |
820 | scm_frame_bitvector_release_elements): Renamed former to latter. | |
821 | (scm_bitvector_release_writable_elements, | |
822 | scm_bitvector_release_writable_elements): New. | |
823 | Changed all uses as required by the changes above. | |
824 | ||
825 | * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_uniform_vector_elements, | |
826 | scm_u8vector_elements, etc): Made return value "const". | |
827 | (scm_uniform_vector_writable_elements, | |
828 | scm_u8vector_writable_elements, etc): New. | |
829 | (scm_uniform_vector_release, scm_uniform_vector_release_elements): | |
830 | Renamed former to latter. Added explicit call to | |
831 | scm_remember_upto_here_1. | |
832 | (scm_frame_uniform_vector_release, | |
833 | scm_frame_uniform_vector_release_elements): Renamed former to latter. | |
834 | (scm_uniform_vector_release_writable_elements, | |
835 | scm_frame_uniform_vector_release_writable_elements): New. Takes | |
836 | crown of longest identifier yet. | |
837 | Changed all uses as required by the changes above. | |
838 | ||
277e8472 MV |
839 | * vectors.h, vectors.c (scm_c_vector_set_x): Make return type |
840 | void. | |
841 | (scm_is_vector, scm_vector_p, scm_vector_length, | |
842 | scm_c_vector_length, scm_vector_ref, scm_c_vector_ref, | |
843 | scm_vector_set_x, scm_c_vector_set_x, scm_vector_to_list, | |
844 | scm_vector_move_left_x, scm_vector_move_right_x, | |
845 | scm_vector_fill_x): handle one-dimensional arrays. | |
32b26202 MV |
846 | (scm_vector_elements, scm_vector_release_elements, |
847 | scm_vector_frame_release_elements, scm_vector_writable_elements, | |
848 | scm_vector_release_writable_elements, | |
849 | scm_vector_frame_release_writable_elements): New. | |
850 | (scm_list_to_vector, scm_vector_to_list, scm_vector_fill, | |
851 | scm_vector_move_left_x, scm_vector_move_right_x): Use them. | |
277e8472 MV |
852 | |
853 | * ramap.c (scm_ramapc, scm_raeql): Use | |
854 | scm_c_generalized_vector_length instead of | |
855 | scm_uniform_vector_length. | |
856 | (scm_ramap, rafe): Use scm_c_vector_ref instead of SCM_VELTS. use | |
857 | scm_c_generalized_vector_ref instead of scm_uniform_vector_ref. | |
858 | ||
49c51610 MV |
859 | 2004-12-23 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
860 | ||
861 | * continuations.h, continuations.c (scm_t_contregs): New 'offset' | |
862 | member for relocating debug frames. | |
863 | (scm_make_continuation): Set it. | |
864 | ||
865 | * stacks.c (read_frame, read_frames, scm_make_stack, | |
866 | scm_last_stack_frame, scm_stack_id): Use the new 'offset' member | |
867 | of continuations instead of calculating the offset ourselves. | |
868 | Relocate 'vect' member of scm_t_debug_frame. | |
869 | ||
3b2ee265 KR |
870 | 2004-12-16 Kevin Ryde <user42@zip.com.au> |
871 | ||
872 | * ramap.c (scm_array_map_x): Check for at least one source argument. | |
873 | ||
e120686a KR |
874 | 2004-12-14 Kevin Ryde <user42@zip.com.au> |
875 | ||
876 | * srfi-13.c (string-any, string-every): Use a scheme wrapper around | |
877 | the C code so for the final call to the predicate procedure is a tail | |
878 | call, per SRFI-13 spec. | |
879 | ||
680b5237 KR |
880 | 2004-12-10 Kevin Ryde <user42@zip.com.au> |
881 | ||
882 | * eq.c (scm_eq_p, scm_eqv_p, scm_equal_p): Update docstrings from | |
883 | recent revision to the reference manual. | |
884 | ||
885 | * numbers.c (scm_modulo): Amend fixme comment about negative divisor | |
886 | with "%", C99 says it's well-defined. | |
887 | ||
888 | * socket.c (scm_from_ipv6): Just use mpz_import. Don't bother trying | |
889 | to fit scm_from_ulong_long, since that uses mpz_import anyway. Don't | |
890 | bother trying to fit scm_from_ulong, not really worth the trouble if | |
891 | addresses are more than 4 bytes usually. | |
892 | ||
446d320c KR |
893 | 2004-11-30 Kevin Ryde <user42@zip.com.au> |
894 | ||
895 | * gc_os_dep.c (NetBSD): Test __m68k__ and __arm__ as well as m68k and | |
896 | arm32. Reported by Greg Troxel. | |
897 | ||
f2654760 MV |
898 | 2004-11-14 mvo <mvo@zagadka.de> |
899 | ||
900 | * unif.c, unif.h (scm_i_cvref): Made non-static for ramap.c. | |
901 | ||
902 | * Makefile.am (INCLUDES): It is "@LTDLINCL@", not "@LTDLINC@". | |
903 | ||
d550e35f MV |
904 | 2004-11-12 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
905 | ||
906 | Enclosed arrays are now their own smob. This has been done to | |
907 | make the code more explicit about them and to prepare for the time | |
f2654760 MV |
908 | when generalized vectors include arbitrary one-dimensional |
909 | arrays. (Uptonow, enclosed arrays have been recognized by their | |
910 | use of an array as their storage 'vector'. When all generalized | |
911 | vectors are allowed as storage, including one-dimensional arrays, | |
912 | this will no longer work.) | |
d550e35f MV |
913 | |
914 | * unif.h, unif.c: (scm_tc16_enclosed_array, SCM_ENCLOSED_ARRAYP): | |
915 | New. | |
916 | (exactly_one_third, singp): Removed. | |
917 | (scm_array_p, scm_array_dimensions, scm_shared_array_root, | |
918 | scm_shared_array_offset, scm_shared_array_increments): Handle | |
919 | enclosed arrays explicitely. | |
920 | (scm_array_rank): Likewise. Also, do not return zero for | |
921 | non-arrays, signal an error instead since arrays with rank zero do | |
922 | exist. | |
923 | (scm_i_make_ra): New, for specifying the tag of the new array. | |
924 | (scm_make_enclosed_array): Use it. | |
925 | (scm_make_ra): Reimplemented in terms of scm_i_make_ra. | |
926 | (scm_make_shared_array): Use scm_c_generalized_vector_length | |
927 | instead of scm_uniform_vector_length. | |
928 | (scm_array_in_bounds_p): Rewritten to be much cleaner. | |
929 | (scm_i_cvref): New, doing the job of scm_cvref. | |
930 | (scm_cvref): Use scm_i_cvref. | |
931 | (scm_array_ref): Do not accept non-arrays when no indices are | |
932 | given. Use scm_i_cvref to do the actual access. | |
933 | ("uniform-array-set1"): Do not register. | |
934 | (scm_array_set_x, scm_uniform_array_read_x, | |
935 | scm_uniform_array_write): Handle enclosed arrays explicitly. | |
936 | (ra2l): Use scm_i_cvref instead of scm_uniform_vector_ref to also | |
937 | handle enclosed arrays. | |
938 | (scm_array_to_list): Handle enclosed arrays explicitly. | |
939 | (rapr1): Removed. | |
940 | (scm_i_print_array_dimension): Use scm_i_cvref to also handle | |
941 | enclosed arrays. | |
942 | (scm_i_print_enclosed_array): New. | |
943 | (tag_proto_table, tag_creator_table): Renamed former to latter. | |
944 | Added "a" and "b" for strings and bitvectors, resp. | |
945 | (scm_i_tag_to_prototype, scm_i_tag_to_creator): Renamed former to | |
946 | latter. Tag "a" is in the table now, no need to handle it as a | |
947 | legacy tag. | |
948 | (scm_raprin1): Just call scm_iprin1. | |
949 | (scm_array_creator, scm_array_prototype): Handle enclosed arrays | |
950 | explicitly. | |
951 | (scm_init_unif): Initialize scm_tc16_enclosed_array smob. | |
952 | Use scm_i_print_array as printer for scm_tc16_array. | |
953 | ||
2ed34885 MV |
954 | 2004-11-10 Marius Vollmer <mvo@zagadka.de> |
955 | ||
823086c1 MV |
956 | * ramap.c (cind): Changed second arg to be pointer to long instead |
957 | of uniform vector. | |
958 | (scm_ramapc): Allocate index vector with scm_malloc and not as | |
d550e35f | 959 | uniform vector. Wrap it in a frame so that it gets properly freed. |
823086c1 MV |
960 | (scm_array_index_map_x): Likewise. |
961 | ||
962 | * unif.c: Changed all uses of scm_array_prototype to | |
963 | scm_array_creator. (scm_i_get_old_prototype): Signal error when no | |
964 | prototype is known. | |
965 | (scm_uniform_array_read_x, scm_uniform_array_write): Reimplemented | |
966 | in terms of scm_uniform_vector_read_x and | |
967 | scm_uniform_vector_write, respectively. Strings and | |
968 | bitvector support has been dropped. | |
969 | ||
2ed34885 MV |
970 | * srfi-4.h, srfi-4.c: Do not include <libguile.h>, include the |
971 | needed files directly. Include config.h, <unistd.h> and <io.h> | |
972 | when available. | |
973 | (scm_uniform_vector_read_x, scm_uniform_vector_write): New. | |
974 | ||
2c72f253 MV |
975 | 2004-11-09 Marius Vollmer <mvo@zagadka.de> |
976 | ||
977 | * gh_data.c (gh_uniform_vector_length): Properly use | |
978 | scm_c_uniform_vector_length instead of scm_uniform_vector_length. | |
979 | ||
3cc0a296 MV |
980 | 2004-11-09 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
981 | ||
982 | * srfi-4.h (scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x): | |
983 | New. | |
984 | (scm_i_uniform_vector_creator): Removed. | |
985 | (scm_i_generalized_vector_creator): New. | |
986 | (scm_uniform_vector_length, scm_uniform_element_size): Do not | |
987 | handle generalized vectors, only uniform numeric vectors. | |
988 | (alloc_uvec): Do length check here... | |
989 | (make_uvec): ...but not here. | |
990 | (coerce_to_uvec): Use new generalized vector functions to handle | |
991 | all kinds of vectors in one go. | |
992 | ||
993 | * tags.h (scm_tc7_bvect): Renamed to scm_tc7_unused7, renaming the | |
994 | remaining scm_tc7_unused tags to get a neatly ordered list. | |
995 | ||
996 | * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c: Do no | |
997 | longer handle scm_tc7_bvect bitvectors. | |
998 | ||
999 | * ramap.c: Use the new generalized vector functions to handle all | |
1000 | vector like things. | |
1001 | ||
1002 | * vectors.h, vectors.c (scm_is_vector, scm_c_vector_length, | |
1003 | scm_c_vector_ref, scm_c_vector_set_x, scm_generalized_vector_p, | |
1004 | scm_generalized_vector_length, scm_generalized_vector_ref, | |
1005 | scm_generalized_vector_set_x, scm_generalized_vector_to_list, | |
1006 | scm_is_generalized_vector, scm_c_generalized_vector_length, | |
1007 | scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x): | |
1008 | New. | |
1009 | ||
1010 | * unif.h, unif.c (scm_bitvector_p, scm_bitvector, | |
1011 | scm_make_bitvector, scm_bitvector_length, scm_bitvector_ref, | |
1012 | scm_bitvector_set_x, scm_list_to_bitvector, scm_bitvector_to_list, | |
1013 | scm_bitvector_fill_x, scm_is_bitvector, scm_c_make_bitvector, | |
1014 | scm_c_bitvector_length, scm_c_bitvector_ref, | |
1015 | scm_c_bitvector_set_x, scm_bitvector_elements, | |
1016 | scm_bitvector_release, scm_frame_bitvector_release, | |
1017 | scm_tc16_bitvector, bitvector_free, bitvector_print, | |
1018 | bitvector_equalp, count_ones, find_first_one): New. | |
1019 | (scm_bit_count, scm_bit_position, scm_bit_set_star_x, | |
1020 | scm_bit_count_star, scm_bit_invert_x, scm_istr2bve): Rewritten | |
1021 | using the new C API for bitvectors and maybe count_ones or | |
1022 | find_first_one, as appropriate. | |
1023 | (SCM_I_MAX_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE, | |
1024 | SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH, | |
1025 | SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG, | |
1026 | SCM_SET_BITVECTOR_LENGTH): Removed. Replaced all uses with the | |
1027 | new functions from above. | |
1028 | (scm_i_proc_make_vector, scm_i_proc_make_string, | |
1029 | scm_i_proc_make_bitvector): Made non-static for use in | |
1030 | scm_i_generalized_vector_creator. | |
1031 | (scm_make_u1vector): Removed, replaced by scm_make_bitvector. | |
1032 | (scm_make_uve): Validate that the created object is a generalized | |
1033 | vector. | |
1034 | (scm_i_legacy_tag): Removed. | |
1035 | (scm_i_print_array): Do it here. | |
1036 | (scm_raprin1): Only print enclosed arrays. | |
1037 | ||
1038 | * Makefile.am (DOT_DOC_FILES): Added srfi-4.doc. | |
1039 | ||
c24d026b MV |
1040 | 2004-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de> |
1041 | ||
1f2328fe MV |
1042 | * srfi-4.c (make_uvec): Use SCM_I_SIZE_MAX instead of SIZE_MAX for |
1043 | added portability. | |
1044 | ||
1045 | * chars.c (scm_charnames, scm_charnums): Added "sp" as an alias | |
1046 | for "space". Thanks to Bruce Korb! | |
1047 | ||
c24d026b MV |
1048 | * rw.c (scm_read_string_x_partial): Bugfix, apply offset to dest |
1049 | only after dest has been set. Thanks to Hyper Division! | |
1050 | ||
1051 | * gh_data.c (gh_uniform_vector_length): Use | |
1052 | scm_uniform_vector_length instead of SCM_UVECTOR_LENGTH. | |
1053 | ||
d4ea47c8 MV |
1054 | 2004-11-03 Marius Vollmer <mvo@zagadka.de> |
1055 | ||
1056 | * unif.h (SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE, | |
1057 | SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG, | |
1058 | SCM_SET_UVECTOR_LENGTH): Removed. | |
1059 | ||
236288e2 MV |
1060 | 2004-11-02 Marius Vollmer <mvo@zagadka.de> |
1061 | ||
1062 | Content-type: text/html