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