(scm_ash): Rewrite using shifts, much faster than
[bpt/guile.git] / libguile / ChangeLog
Content-type: text/html HCoop Git - bpt/guile.git/blame - libguile/ChangeLog


500 - Internal Server Error

Malformed UTF-8 character (fatal) at (eval 8) line 1, <$fd> line 2044.
CommitLineData
1367aa5e
HWN
12005-01-27 Han-Wen Nienhuys <hanwen@xs4all.nl>
2
856fca7e
HWN
3 * gc-card.c (scm_i_card_statistics): map structs, closures and
4 subrs to one tag.
5
1367aa5e 6 * gc.c (s_scm_gc_live_object_stats): return alist, not hashtable.
856fca7e 7 (tag_table_to_type_alist): ignore unknown types.
1367aa5e
HWN
8
9 * gc-segment.c (scm_i_all_segments_statistics): new function.
10 (scm_i_heap_segment_statistics): new function
11
12 * gc.c (s_scm_gc_live_object_stats): new GUILE callable: return
13 statistics on the number of live objects of each type.
14
15 * gc-card.c (scm_i_tag_name): new function.
16 (scm_i_card_statistics): new function.
17
333db3b8
KR
182005-01-24 Kevin Ryde <user42@zip.com.au>
19
20 * posix.c (scm_setlocale): Force errno=EINVAL for an error, since
21 POSIX and C99 don't document errno being set. Reported by Bruno
22 Haible.
23 (scm_flock): Update docstring from manual.
24
88f59e53
MV
252005-01-20 Marius Vollmer <marius.vollmer@uni-dortmund.de>
26
0eeb2611
MV
27 * environments.c (obarray_enter, obarray_replace): Call
28 SCM_HASHTABLE_INCREMENT when adding a new entry.
29
88f59e53
MV
30 * objects.c: Include goops.h for the scm_class_of prototype.
31
32 * hashtab.c (hashtable_size, HASHTABLE_SIZE_N): Restrict hashtable
33 sizes to be smaller than the maximum lengths of vectors.
34
219b2868
MV
352005-01-18 Marius Vollmer <marius.vollmer@uni-dortmund.de>
36
37 * ports.c, smob.c: Include "libguile/goops.h".
38
39 * objects.h, objects.c, goops.c, goops.h (scm_class_boolean,
40 scm_class_char, scm_class_pair, scm_class_procedure,
41 scm_class_string, scm_class_symbol,
42 scm_class_procedure_with_setter, scm_class_primitive_generic,
43 scm_class_vector, scm_class_null, scm_class_real,
44 scm_class_complex, scm_class_integer, scm_class_fraction,
45 scm_class_unknown, scm_port_class, scm_smob_class,
46 scm_no_applicable_method, scm_class_of): Moved from objects to
47 goops since they are only useable once goops has been loaded.
48 (scm_classes_initialized): Removed.
49 (scm_class_of): Do not check it.
50 (create_standard_classes): Do not set it.
51
009c6b9c
MV
522005-01-17 Marius Vollmer <marius.vollmer@uni-dortmund.de>
53
50472546
MV
54 * objects.h, objects.c (scm_classes_initialized): New.
55 (scm_class_of): Signal error when scm_classes_initialized is zero.
56 * goops.c (create_standard_classes): Set scm_classes_initialized
57 to one.
58
009c6b9c
MV
59 * random.c (scm_random_solid_sphere_x): Use
60 scm_c_generalized_vector_length instead of
61 scm_uniform_vector_length.
62
7719cbe9
MV
632005-01-16 Marius Vollmer <mvo@zagadka.de>
64
65 * script.c (scm_compile_shell_switches): Removed debugging output.
66
1ec44fed
KR
672005-01-15 Kevin Ryde <user42@zip.com.au>
68
69 * numbers.c (scm_logtest, scm_logbit_p, scm_integer_expt): Update
70 docstrings from manual.
71 * random.c (scm_random_solid_sphere_x): Update docstring from manual.
72
6e4cd850
MV
732005-01-14 Marius Vollmer <marius.vollmer@uni-dortmund.de>
74
0b5a0521
MV
75 * random.c: Don't check for definedness of SCM_HAVE_T_INT64, check
76 its value.
77
78 Implement u64 and s64 uniform numeric vectors with bignums when
79 scm_t_uint64 and scm_t_int64 are not available.
80
81 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_take_u64vector,
82 scm_array_handle_u64_elements,
83 scm_array_handle_u64_writable_elements, scm_u64vector_elements,
84 scm_u64vector_writable_elements): Do not define when scm_t_uint64
85 is not available.
86 (scm_take_s64vector, scm_array_handle_s64_elements,
87 scm_array_handle_s64_writable_elements, scm_s64vector_elements,
88 scm_s64vector_writable_elements): Likewise for scm_t_int64.
89 (uvec_sizes, uvec_print, uvec_equalp): Use SCM bignums when
90 scm_t_int64/scm_t_uint64 are not available.
91 (uvec_mark): New, to mark the bignums.
92 (alloc_uvec): Initialize bignums.
93 (uvec_fast_ref): Return bignums directly.
94 (scm_uint64_min, scm_uint64_max, scm_int64_min, scm_int64_max,
95 assert_exact_integer): New.
96 (uvec_fast_set): Use them to validate the bignums.
97 (scm_init_srfi_4): Set mark function of smob when needed.
98 Initialize scm_uint64_min, scm_uint64_max, scm_int64_min,
99 scm_int64_max.
100
6e4cd850
MV
101 Recognize 1.4 -e syntax.
102
103 * script.c (sym_at, sym_atat, sym_main, all_symbols): New.
104 (scm_compile_shell_switches): Use them to recognize and convert
105 1.4 "-e" syntax.
106
3b698afe
MV
1072005-01-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
108
109 * deprecated.h, deprecated.c, strings.h, strings.c: Turn all
110 deprecated features that once were macros but are now functions
111 back into macros.
112
d6dc83a9
MV
1132005-01-11 Marius Vollmer <marius.vollmer@uni-dortmund.de>
114
49086691
MV
115 * eval.c, debug.h (SCM_WARN_DEPRECATED): New debug option.
116 * deprecation.c (scm_issue_deprecation_warning,
117 scm_c_issue_deprecation_warning_fmt): Use it.
118 (mode): Removed.
119 (print_summary): New.
120 (scm_init_deprecation): Initialize SCM_WARN_DEPRECATED instead of
121 mode.
122
d6dc83a9
MV
123 Deprecated SCM_ARRAY* macros.
124
125 * unif.h, unif.c, ramap.c, vectors.c, srfi-4.c, srfi-4.i.c
126 (SCM_ARRAYP, SCM_I_ARRAYP): Renamed former to latter internal
127 version. Changed all uses.
128 (scm_tc16_array, scm_i_tc16_array,
129 scm_tc16_enclosed_array, scm_i_tc16_enclosed_array,
130 SCM_ARRAY_FLAG_CONTIGUOUS, SCM_I_ARRAY_FLAG_CONTIGUOUS,
131 SCM_ENCLOSE_ARRAYP, SCM_I_ENCLOSE_ARRAYP,
132 SCM_ARRAY_NDIM, SCM_I_ARRAY_NDIM,
133 SCM_ARRAY_CONTP, SCM_I_ARRAY_CONTP,
134 SCM_ARRAY_MEM, SCM_I_ARRAY_MEM,
135 SCM_ARRAY_V, SCM_I_ARRAY_V,
136 SCM_ARRAY_BASE, SCM_I_ARRAY_BASE,
137 SCM_ARRAY_DIMS, SCM_I_ARRAY_DIMS,
138 scm_t_array, scm_i_t_array): Likewise.
139 (SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG):
140 Moved from unif.h to unif.c.
141 (scm_c_array_rank): New.
142 (scm_array_rank): Reimplement using it.
143
144 * deprecated.h, deprecated.c (SCM_ARRAYP, SCM_ARRAY_NDIM,
145 SCM_ARRAY_CONTP, SCM_ARRAY_MEM, SCM_ARRAY_V, SCM_ARRAY_BASE,
146 SCM_ARRAY_DIMS, scm_t_array): New deprecated versions.
147
dc91d8de
MV
1482005-01-11 Marius Vollmer <mvo@zagadka.de>
149
150 * ramap.c: Replace uses of scm_make_ra with scm_i_make_ra.
151 (GVREF, GVSET): New abbreviations. Use them everywhere instead of
152 scm_c_generalized_vector_ref and scm_cvref, and
153 scm_c_generalized_vector_set_x, respectively.
154 (RVREF, IVDEP, BINARY_ELTS_CODE, BINARY_PAIR_ELTS_CODE,
155 UNARY_ELTS_CODE, UNARY_PAIR_ELTS_CODE): Removed since unused.
156
157 * unif.h, unif.c (indices_to_pos, scm_array_handle_pos): Renamed
158 former to latter and made public. Changed all uses.
159 (scm_i_make_ra): Made public, changed tag param to enclosed flag.
160 (scm_make_ra): Deprecated, changed all uses to scm_i_make_ra.
161 (scm_i_shap2ra): New internal version of scm_shap2ra.
162 (scm_shap2ra): Deprecated, changed all uses to scm_i_shap2ra.
163 (scm_i_ra_set_contp): New internal version of scm_ra_set_contp.
164 (scm_ra_set_contp): Deprecated, changed all uses to
165 scm_i_ra_set_contp.
166 (scm_cvref, scm_aind, scm_raprin1): Deprecated.
167
66d33784
MV
1682005-01-10 Marius Vollmer <marius.vollmer@uni-dortmund.de>
169
b06f099d
MV
170 * eval.c (scm_eval): Added example to docstring. Thanks to Issac
171 Trotts!
172
5d35ad81
MV
173 * unif.c (scm_list_to_typed_array): Allow the specification of the
174 upper bound as well. This is needed for empty arrays.
175 (l2ra): Give needed number of elements in error message.
176 (scm_i_print_array): Print length information for arrays that need
177 it.
178 (scm_i_read_array): Parse it.
179
66d33784
MV
180 * deprecated.h, deprecated.c (SCM_CHARS, SCM_UCHARS, SCM_LENGTH,
181 scm_i_object_chars, scm_i_object_length): Brought back from the
182 dead.
183
d7d7d401
MV
1842005-01-10 Marius Vollmer <mvo@zagadka.de>
185
74c58fce
MV
186 * ramap.c: Replaced single-index uses of scm_array_set_x with
187 scm_c_generalized_vector_set_x.
188
d7d7d401
MV
189 * unif.c (scm_array_rank, scm_array_dimensions,
190 scm_shared_array_offset, scm_shared_array_increments,
191 scm_array_ref, scm_array_set_x): Use scm_t_array_handle operations
192 to simplify code and make it more general.
193 (scm_shared_array_root): Work with all kinds of arrays, including
194 naked vectors.
195 (indices_to_pos): New.
74c58fce
MV
196 (scm_make_shared_array): Use it instead of scm_aind; use handle
197 for oldra.
198
4475d3fe
KR
1992005-01-10 Kevin Ryde <user42@zip.com.au>
200
201 * posix.c (scm_mkstemp): Update docstring from manual.
202
d3ddc95e
KR
203 * stime.c (scm_mktime): Missing default errno=EINVAL from prev change.
204
8c8491f5
MV
2052005-01-09 Marius Vollmer <mvo@zagadka.de>
206
b89ecc6f
MV
207 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_i_uniform_vector_ref_proc,
208 scm_i_uniform_vector_set_proc): New.
209 (u8ref, u8set, s8ref, s8set, etc): New.
210 (uvec_reffers, uvec_setters): New.
211 (uvec_to_list): Use generic scm_array_handle_ref instead of
212 uvec_fast_ref since scm_array_handle_ref should be faster now.
8cb01d9f
MV
213 (coerce_to_uvec, scm_c_uniform_vector_ref,
214 scm_c_uniform_vector_set_x): Likewise.
b89ecc6f
MV
215
216 * unif.h, unif.c, inline.h (scm_i_t_array_ref, scm_i_t_array_set):
217 New.
218 (scm_t_array_handle): Added ref, set, elements and
219 writable_elements for fast inline operation of
220 scm_array_handle_ref and scm_array_handle_set.
221 (scm_array_handle_ref, scm_array_handle_set): Moved to inline.h
222 and replaced with inline code that simply calls the ref/set
223 members of the handle.
224 (enclosed_ref, vector_ref, string_ref, bitvector_ref, memoize_ref,
225 enclosed_set, vector_set, string_set, bitvector_set, memoize_set):
226 New.
227 (scm_array_handle_get): Initialize ref/set fields to memoize_ref
228 and memoize_set.
229 (scm_bitvector_fill_x, scm_bitvector_to_list, scm_bit_count,
230 scm_bit_position, scm_bit_set_star_x, scm_bit_count_star,
231 scm_bit_invert_x): Correctly multiply index with increment in the
232 general case.
233
8c8491f5
MV
234 * unif.c (scm_array_handle_set): Correctly execute only one
235 alternative. D'Oh!
236 (scm_list_to_typed_array, l2ra): Use scm_t_array_handle to fill
237 the array; this covers all cases with much simpler code.
238
239 * srfi-4.c (scm_uniform_element_size): Deprecated implementation
240 as well.
241
cd5d55c7
MV
2422005-01-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
243
244 * srfi-4.c (uvec_type): New.
245 (uvec_to_list, uvec_ref, uvec_set_x, scm_c_uniform_vector_ref,
246 scm_c_uniform_vector_x): Use it to get concrete type.
247
248 * unif.h (scm_t_array_dim): Changed type of members to ssize_t, to
249 fit the docs.
250
251 * unif.c (ra2l): Handle zero rank arrays.
252 (scm_i_print_array): Print zero rank arrays specially.
253 (tag_to_type): Return #t for an empty tag, not the empty symbol.
254 (scm_i_read_array): Allow zero rank arrays.
255
a4aad74e
MV
2562005-01-07 Marius Vollmer <marius.vollmer@uni-dortmund.de>
257
258 * hashtab.h, hashtab.c (SCM_HASHTAB_BUCKET_LOC): Removed.
259 (scan_weak_hashtables): Rewrote its use with SCM_HASHTAB_BUCKET
260 and SCM_SET_HASHTAB_BUCKET.
261
262 * print.h, print.c (scm_print_state, SCM_PRINT_STATE_LAYOUT):
263 Removed ref_stack field.
264 (PSTATE_STACK_REF, PSTATE_STACK_SET): New, for accessing the stack
265 of a print state. Use them everywhere instead of ref_stack.
266
3a40d5e1
MV
267 * srfi-4.h (scm_uniform_element_size): Deprecated for real.
268
a4aad74e
MV
269 * srfi-4.c: Include deprecation.h.
270
271 * vectors.h, vectors.c, unif.h, unif.c, deprecated.h,
272 deprecated.c, eq.c
273 (SCM_BITVEC_REF, SCM_BITVEC_SET, SCM_BITVEC_CLR): Removed.
274 (scm_vector_elements, scm_vector_writable_elements,
275 scm_generalized_vector_get_handle): Moved to vectors.[hc] from
276 unif.[hc].
277 (SCM_SIMPLE_VECTOR_LOC): Removed.
278 (SCM_VECTOR_MAX_LENGTH, SCM_VECTOR_LENGTH, SCM_VELTS,
279 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET,
280 scm_vector_equal_p): Moved from vectors.[hc] to deprecated.[hc].
281 (scm_vector_equal_p, scm_i_vector_equal_p): Renamed former to
282 latter. Changed use in eq.c.
283
f01fe441
MV
2842005-01-07 Marius Vollmer <mvo@zagadka.de>
285
286 Make the uniform vector routines also deal with one dimensional
287 arrays.
288
289 * srfi-4.c (SCM_IS_UVEC): New, use it instead of
290 SCM_SMOB_PREDICATE in this file.
291 (is_uvec): Also recognize one-dimensional uniform numeric arrays
292 of the right type.
293 (scm_is_uniform_vector): Likewise.
294 (uvec_fast_ref): Made BASE param const.
295 (uvec_writable_elements, uvec_elements): New.
296 (uvec_to_list, uvec_ref, uvec_set_x, uvec_length,
297 scm_c_uniform_vector_length, scm_c_uniform_vector_ref,
298 scm_c_uniform_set_x): Use them to also deal with one-dimensional
299 arrays.
300 (scm_uniform_vector_ref, scm_uniform_vector_set_x): Deprecate old
301 argument convention.
302 (scm_uniform_vector_to_list): Let uvec_to_list do all the
303 checking.
304 (scm_uniform_vector_length): Use uvec_length.
305
2aaf5726
MV
3062005-01-06 Marius Vollmer <marius.vollmer@uni-dortmund.de>
307
308 * srfi-4.h, srfi-4.c (scm_c_uniform_vector_element_size,
309 scm_c_uniform_vector_size): Removed.
310 (scm_array_handle_uniform_element_size): New.
311
312
313 * unif.h (scm_array_handle_ref, scm_array_handle_set): Changed
314 type of POS parameter to be signed, positions can be negative.
315 (scm_array_handle_release): New, changed all uses of
316 scm_t_array_handle to properly call it.
317 (scm_vector_get_handle, scm_generalized_vector_get_handle):
318 Renamed former to latter, changed all uses.
319
34ae52fc
MV
3202005-01-05 Marius Vollmer <mvo@zagadka.de>
321
322 Updated bitvector routines to also use scm_t_array_handles.
323
324 * unif.h (scm_bitvector_elements,
325 scm_bitvector_writable_elements): Use a scm_t_array_handle and
326 deliver offset, length and increment to caller. Changed all uses.
327 (scm_bitvector_release_elements,
328 scm_frame_bitvector_release_elements,
329 scm_bitvector_release_writable_elements,
330 scm_frame_bitvector_release_writable_elements): Removed.
331 (scm_array_handle_bit_elements,
332 scm_array_handle_bit_writable_elements,
333 scm_array_handle_bit_elements_offset): New.
334 (scm_make_typed_array): The special value for non-initialized
335 arrays is now SCM_UNSPECIFIED. The old special value SCM_BOOL_F
336 was a valid value to fill bitvectors with, so it can't really be
337 specialed out.
338
c4cb7628
KR
3392005-01-04 Kevin Ryde <user42@zip.com.au>
340
341 * stime.c (scm_strftime): Free t.tm_zone produced by bdtime2c.
342 Reported by Bill Schottstaedt.
343
0356881d
MV
3442005-01-02 Marius Vollmer <mvo@zagadka.de>
345
346 * sort.c (quicksort): Added INC parameter for non-contigous
347 vectors.
348 (quicksort1): New, for contigous vectors. Both functions are
349 generated from the same code by including "quicksort.i.c".
350 (scm_restricted_vector_sort_x): Call one of quicksort and
351 quicksort1, depending on increment of vector.
352 (scm_sort): Simply call scm_sort_x on a copy of the list or
353 vector.
354 (scm_merge_vector_x, scm_merge_vector_step): Changed indices to
355 size_t, added inc parameter.
356 (scm_stable_sort_x): Allocate temporary storage as Scheme vector
357 so that it doesn't leak.
358 (scm_stable_sort): Simply call scm_stable_sort_x on a copy of the
359 list or vector.
360
361 * ramap.c (scm_array_map_x): Do not try to convert fill value
362 before filling, any necessary conversion is done while storing.
363
364 * gc-card.c (scm_i_sweep_card): Call scm_i_vector_free instead of
365 doing it inline.
366
367 * hashtab.c, hashtab.h (SCM_HASHTABLE_BUCKETS): Removed.
368 (SCM_HASHTABLE_BUCKET, SCM_HASHTABLE_BUCKET_LOC): New. Replaced
369 all uses of SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
370
371 * tags.h, weaks.c, vports.c, hashtab.c, convert.c, sort.c,
372 convert.c, convert.h, convert.i.c, deprecated.c, environments.c,
373 eval.c, filesys.c, fluids.c, gc-mark.c, gh.h, gh_data.c, goops.c,
374 hash.c, init.c, libguile_la-arrays.loT, modules.c, net_db.c,
375 objects.c, ports.c, posix.c, print.c, random.c, read.c,
376 regex-posix.c, scmsigs.c, socket.c, stime.c, symbols.c: Use new
377 vector elements API or simple vector API, as appropriate. Removed
378 SCM_HAVE_ARRAYS ifdefery. Replaced all uses of
379 SCM_HASHTABLE_BUCKETS with SCM_HASHTABLE_BUCKET.
380
381 * srfi-4.h, srfi-4.c,
382 srfi-4.i.c (scm_array_handle_uniform_elements,
383 scm_array_handle_uniform_writable_elements,
384 scm_uniform_vector_elements,
385 scm_uniform_vector_writable_elements):
386 (scm_<foo>vector_elements, scm_<foo>vector_writable_elements): Use
387 scm_t_array_handle, deliver length and increment.
388 (scm_array_handle_<foo>_elements,
389 scm_array_handle_<foo>_writable_elements): New.
390
391 * gen-scmconfig.h.in (SCM_I_GSC_HAVE_ARRAYS): Removed.
392 * gen-scmconfig.c: Hard code SCM_HAVE_ARRAYS to "1".
393
394 * unif.h, unif.c (scm_t_array_handle, scm_array_get_handle,
395 scm_array_handle_rank, scm_array_handle_dims, scm_array_handle_ref
396 scm_array_handle_set, scm_array_handle_elements
397 scm_array_handle_writable_elements, scm_vector_get_handle): New.
398 (scm_make_uve, scm_array_prototype, scm_list_to_uniform_array,
399 scm_dimensions_to_uniform_array): Deprecated for real.
400 (scm_array_p, scm_i_array_p): Use latter for SCM_DEFINE since
401 snarfing wont allow a mismatch between C and Scheme arglists.
402 (scm_make_shared_array, scm_enclose_array): Correctly use
403 scm_c_generalized_vector_length instead of
404 scm_uniform_vector_length.
405
406 * validate.h (SCM_VALIDATE_VECTOR,
407 SCM_VALIDATE_VECTOR_OR_DVECTOR): use scm_is_simple_vector instead
408 of SCM_VECTORP.
409
410 * weaks.h, weaks.c: Use new internal weak vector API from
411 vectors.h.
412
413 * Makefile.am (libguile_la_SOURCES, DOT_X_FILES, DOT_DOC_FILES,
414 EXTRA_libguile_la_SOURCES): Changed ramap.c and unif.c from being
415 'extra' to being regular sources.
416 (noinst_HEADERS): Added quicksort.i.c.
417 * quicksort.i.c: New file.
418
419 * vectors.h, vector.c (SCM_VECTORP, SCM_VECTOR_LENGTH, SCM_VELTS,
420 SCM_WRITABLE_VELTS, SCM_VECTOR_REF, SCM_VECTOR_SET): Deprecated
421 and reimplemented. Replaced all uses with scm_vector_elements,
422 scm_vector_writable_elements, or SCM_SIMPLE_VECTOR_*, as
423 appropriate.
424 (scm_is_simple_vector, SCM_SIMPLE_VECTOR_LENGTH,
425 SCM_SIMPLE_VECTOR_REF, SCM_SIMPLE_VECTOR_SET,
426 SCM_SIMPLE_VECTOR_LOC): New.
427 (SCM_VECTOR_BASE, SCM_SET_VECTOR_BASE, SCM_VECTOR_MAX_LENGTH,
428 SCM_MAKE_VECTOR_TAG, SCM_SET_VECTOR_LENGTH,
429 SCM_VELTS_AS_STACKITEMS, SCM_SETVELTS, SCM_GC_WRITABLE_VELTS):
430 Removed.
431 (scm_vector_copy): New.
432 (scm_vector_elements, scm_vector_writable_elements): Use
433 scm_t_array_handle, deliver length and increment. Moved to
434 unif.h. Changed all uses.
435 (scm_vector_release_elements,
436 scm_vector_release_writable_elements,
437 (scm_frame_vector_release_elements,
438 scm_frame_vector_release_writable_elements): Removed.
439 (SCM_I_IS_VECTOR, SCM_I_VECTOR_ELTS, SCM_I_VECTOR_WELTS,
440 SCM_I_VECTOR_LENGTH, scm_i_vector_free): New internal API.
441 (SCM_I_WVECTP SCM_I_WVECT_LENGTH SCM_I_WVECT_VELTS
442 SCM_I_WVECT_GC_WVELTS SCM_I_WVECT_TYPE SCM_I_WVECT_GC_CHAIN
443 SCM_I_SET_WVECT_GC_CHAIN, scm_i_allocate_weak_vector): New, for
444 weak vectors.
445
0336d18b
MV
4462004-12-29 Marius Vollmer <mvo@zagadka.de>
447
448 No longer use creators to specify the type of an array. Creators
449 expose the fact that arrays are wrapped around vectors, but that
450 might change.
451
452 * srfi-4.h (scm_i_proc_make_u8vector, scm_i_proc_make_s8vector,
453 scm_i_proc_make_u16vector, scm_i_proc_make_s16vector,
454 scm_i_proc_make_u32vector, scm_i_proc_make_s32vector,
455 scm_i_proc_make_u64vector, scm_i_proc_make_s64vector,
456 scm_i_proc_make_f32vector, scm_i_proc_make_f64vector,
457 scm_i_proc_make_c32vector, scm_i_proc_make_c64vector,
458 uvec_proc_vars): Removed.
459 (scm_i_generalized_vector_creator): Removed.
460 (scm_i_generalized_vector_type): New.
461
462 * unif.h, unif.c (scm_typed_array_p, scm_make_array,
463 scm_make_typed_array, scm_array_type, scm_list_to_array,
464 scm_list_to_typed_array, scm_is_array, scm_is_typed_array): New.
465 (scm_array_creator): Removed.
466 (scm_array_p): Deprecated second PROT argument.
467 (scm_dimensions_to_uniform_array, scm_list_to_uniform_array):
468 Deprecated, reimplemented in terms of scm_make_typed_array and
469 scm_list_to_typed_array.
470 (scm_i_proc_make_vector, scm_i_proc_make_string,
471 scm_i_proc_make_bitvector): Removed.
472 (type_creator_table, init_type_creator_table, type_to_creator,
473 make_typed_vector): New.
474 (scm_i_convert_old_prototype): Removed.
475 (prototype_to_type): New.
476 (scm_make_uve): Deprecated, reimplemented using make_typed_vector.
477 (scm_array_dimensions): Use scm_list_1 instead of scm_cons for
478 minor added clarity.
479 (scm_make_shared_array, scm_ra2contig): Use make_typed_vector
480 instead of scm_make_uve.
481 (tag_creator_table, scm_i_tag_to_creator): Removed.
482 (tag_to_type): New.
483 (scm_i_read_array): Use scm_list_to_typed_array instead of
484 scm_list_to_uniform_array.
485
277e8472
MV
4862004-12-27 Marius Vollmer <mvo@zagadka.de>
487
32b26202
MV
488 * unif.h, unif.c (scm_bitvector_elements): Made return value "const".
489 (scm_bitvector_writable_elements): New.
490 (scm_bitvector_release, scm_bitvector_release_elements):
491 Renamed former to latter. Added explicit call to
492 scm_remember_upto_here_1.
493 (scm_frame_bitvector_release,
494 scm_frame_bitvector_release_elements): Renamed former to latter.
495 (scm_bitvector_release_writable_elements,
496 scm_bitvector_release_writable_elements): New.
497 Changed all uses as required by the changes above.
498
499 * srfi-4.h, srfi-4.c, srfi-4.i.c (scm_uniform_vector_elements,
500 scm_u8vector_elements, etc): Made return value "const".
501 (scm_uniform_vector_writable_elements,
502 scm_u8vector_writable_elements, etc): New.
503 (scm_uniform_vector_release, scm_uniform_vector_release_elements):
504 Renamed former to latter. Added explicit call to
505 scm_remember_upto_here_1.
506 (scm_frame_uniform_vector_release,
507 scm_frame_uniform_vector_release_elements): Renamed former to latter.
508 (scm_uniform_vector_release_writable_elements,
509 scm_frame_uniform_vector_release_writable_elements): New. Takes
510 crown of longest identifier yet.
511 Changed all uses as required by the changes above.
512
277e8472
MV
513 * vectors.h, vectors.c (scm_c_vector_set_x): Make return type
514 void.
515 (scm_is_vector, scm_vector_p, scm_vector_length,
516 scm_c_vector_length, scm_vector_ref, scm_c_vector_ref,
517 scm_vector_set_x, scm_c_vector_set_x, scm_vector_to_list,
518 scm_vector_move_left_x, scm_vector_move_right_x,
519 scm_vector_fill_x): handle one-dimensional arrays.
32b26202
MV
520 (scm_vector_elements, scm_vector_release_elements,
521 scm_vector_frame_release_elements, scm_vector_writable_elements,
522 scm_vector_release_writable_elements,
523 scm_vector_frame_release_writable_elements): New.
524 (scm_list_to_vector, scm_vector_to_list, scm_vector_fill,
525 scm_vector_move_left_x, scm_vector_move_right_x): Use them.
277e8472
MV
526
527 * ramap.c (scm_ramapc, scm_raeql): Use
528 scm_c_generalized_vector_length instead of
529 scm_uniform_vector_length.
530 (scm_ramap, rafe): Use scm_c_vector_ref instead of SCM_VELTS. use
531 scm_c_generalized_vector_ref instead of scm_uniform_vector_ref.
532
49c51610
MV
5332004-12-23 Marius Vollmer <marius.vollmer@uni-dortmund.de>
534
535 * continuations.h, continuations.c (scm_t_contregs): New 'offset'
536 member for relocating debug frames.
537 (scm_make_continuation): Set it.
538
539 * stacks.c (read_frame, read_frames, scm_make_stack,
540 scm_last_stack_frame, scm_stack_id): Use the new 'offset' member
541 of continuations instead of calculating the offset ourselves.
542 Relocate 'vect' member of scm_t_debug_frame.
543
3b2ee265
KR
5442004-12-16 Kevin Ryde <user42@zip.com.au>
545
546 * ramap.c (scm_array_map_x): Check for at least one source argument.
547
e120686a
KR
5482004-12-14 Kevin Ryde <user42@zip.com.au>
549
550 * srfi-13.c (string-any, string-every): Use a scheme wrapper around
551 the C code so for the final call to the predicate procedure is a tail
552 call, per SRFI-13 spec.
553
680b5237
KR
5542004-12-10 Kevin Ryde <user42@zip.com.au>
555
556 * eq.c (scm_eq_p, scm_eqv_p, scm_equal_p): Update docstrings from
557 recent revision to the reference manual.
558
559 * numbers.c (scm_modulo): Amend fixme comment about negative divisor
560 with "%", C99 says it's well-defined.
561
562 * socket.c (scm_from_ipv6): Just use mpz_import. Don't bother trying
563 to fit scm_from_ulong_long, since that uses mpz_import anyway. Don't
564 bother trying to fit scm_from_ulong, not really worth the trouble if
565 addresses are more than 4 bytes usually.
566
446d320c
KR
5672004-11-30 Kevin Ryde <user42@zip.com.au>
568
569 * gc_os_dep.c (NetBSD): Test __m68k__ and __arm__ as well as m68k and
570 arm32. Reported by Greg Troxel.
571
f2654760
MV
5722004-11-14 mvo <mvo@zagadka.de>
573
574 * unif.c, unif.h (scm_i_cvref): Made non-static for ramap.c.
575
576 * Makefile.am (INCLUDES): It is "@LTDLINCL@", not "@LTDLINC@".
577
d550e35f
MV
5782004-11-12 Marius Vollmer <marius.vollmer@uni-dortmund.de>
579
580 Enclosed arrays are now their own smob. This has been done to
581 make the code more explicit about them and to prepare for the time
f2654760
MV
582 when generalized vectors include arbitrary one-dimensional
583 arrays. (Uptonow, enclosed arrays have been recognized by their
584 use of an array as their storage 'vector'. When all generalized
585 vectors are allowed as storage, including one-dimensional arrays,
586 this will no longer work.)
d550e35f
MV
587
588 * unif.h, unif.c: (scm_tc16_enclosed_array, SCM_ENCLOSED_ARRAYP):
589 New.
590 (exactly_one_third, singp): Removed.
591 (scm_array_p, scm_array_dimensions, scm_shared_array_root,
592 scm_shared_array_offset, scm_shared_array_increments): Handle
593 enclosed arrays explicitely.
594 (scm_array_rank): Likewise. Also, do not return zero for
595 non-arrays, signal an error instead since arrays with rank zero do
596 exist.
597 (scm_i_make_ra): New, for specifying the tag of the new array.
598 (scm_make_enclosed_array): Use it.
599 (scm_make_ra): Reimplemented in terms of scm_i_make_ra.
600 (scm_make_shared_array): Use scm_c_generalized_vector_length
601 instead of scm_uniform_vector_length.
602 (scm_array_in_bounds_p): Rewritten to be much cleaner.
603 (scm_i_cvref): New, doing the job of scm_cvref.
604 (scm_cvref): Use scm_i_cvref.
605 (scm_array_ref): Do not accept non-arrays when no indices are
606 given. Use scm_i_cvref to do the actual access.
607 ("uniform-array-set1"): Do not register.
608 (scm_array_set_x, scm_uniform_array_read_x,
609 scm_uniform_array_write): Handle enclosed arrays explicitly.
610 (ra2l): Use scm_i_cvref instead of scm_uniform_vector_ref to also
611 handle enclosed arrays.
612 (scm_array_to_list): Handle enclosed arrays explicitly.
613 (rapr1): Removed.
614 (scm_i_print_array_dimension): Use scm_i_cvref to also handle
615 enclosed arrays.
616 (scm_i_print_enclosed_array): New.
617 (tag_proto_table, tag_creator_table): Renamed former to latter.
618 Added "a" and "b" for strings and bitvectors, resp.
619 (scm_i_tag_to_prototype, scm_i_tag_to_creator): Renamed former to
620 latter. Tag "a" is in the table now, no need to handle it as a
621 legacy tag.
622 (scm_raprin1): Just call scm_iprin1.
623 (scm_array_creator, scm_array_prototype): Handle enclosed arrays
624 explicitly.
625 (scm_init_unif): Initialize scm_tc16_enclosed_array smob.
626 Use scm_i_print_array as printer for scm_tc16_array.
627
2ed34885
MV
6282004-11-10 Marius Vollmer <mvo@zagadka.de>
629
823086c1
MV
630 * ramap.c (cind): Changed second arg to be pointer to long instead
631 of uniform vector.
632 (scm_ramapc): Allocate index vector with scm_malloc and not as
d550e35f 633 uniform vector. Wrap it in a frame so that it gets properly freed.
823086c1
MV
634 (scm_array_index_map_x): Likewise.
635
636 * unif.c: Changed all uses of scm_array_prototype to
637 scm_array_creator. (scm_i_get_old_prototype): Signal error when no
638 prototype is known.
639 (scm_uniform_array_read_x, scm_uniform_array_write): Reimplemented
640 in terms of scm_uniform_vector_read_x and
641 scm_uniform_vector_write, respectively. Strings and
642 bitvector support has been dropped.
643
2ed34885
MV
644 * srfi-4.h, srfi-4.c: Do not include <libguile.h>, include the
645 needed files directly. Include config.h, <unistd.h> and <io.h>
646 when available.
647 (scm_uniform_vector_read_x, scm_uniform_vector_write): New.
648
2c72f253
MV
6492004-11-09 Marius Vollmer <mvo@zagadka.de>
650
651 * gh_data.c (gh_uniform_vector_length): Properly use
652 scm_c_uniform_vector_length instead of scm_uniform_vector_length.
653
3cc0a296
MV
6542004-11-09 Marius Vollmer <marius.vollmer@uni-dortmund.de>
655
656 * srfi-4.h (scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x):
657 New.
658 (scm_i_uniform_vector_creator): Removed.
659 (scm_i_generalized_vector_creator): New.
660 (scm_uniform_vector_length, scm_uniform_element_size): Do not
661 handle generalized vectors, only uniform numeric vectors.
662 (alloc_uvec): Do length check here...
663 (make_uvec): ...but not here.
664 (coerce_to_uvec): Use new generalized vector functions to handle
665 all kinds of vectors in one go.
666
667 * tags.h (scm_tc7_bvect): Renamed to scm_tc7_unused7, renaming the
668 remaining scm_tc7_unused tags to get a neatly ordered list.
669
670 * eq.c, evalext.c, gc-card.c, gc-mark.c, objects.c, print.c: Do no
671 longer handle scm_tc7_bvect bitvectors.
672
673 * ramap.c: Use the new generalized vector functions to handle all
674 vector like things.
675
676 * vectors.h, vectors.c (scm_is_vector, scm_c_vector_length,
677 scm_c_vector_ref, scm_c_vector_set_x, scm_generalized_vector_p,
678 scm_generalized_vector_length, scm_generalized_vector_ref,
679 scm_generalized_vector_set_x, scm_generalized_vector_to_list,
680 scm_is_generalized_vector, scm_c_generalized_vector_length,
681 scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x):
682 New.
683
684 * unif.h, unif.c (scm_bitvector_p, scm_bitvector,
685 scm_make_bitvector, scm_bitvector_length, scm_bitvector_ref,
686 scm_bitvector_set_x, scm_list_to_bitvector, scm_bitvector_to_list,
687 scm_bitvector_fill_x, scm_is_bitvector, scm_c_make_bitvector,
688 scm_c_bitvector_length, scm_c_bitvector_ref,
689 scm_c_bitvector_set_x, scm_bitvector_elements,
690 scm_bitvector_release, scm_frame_bitvector_release,
691 scm_tc16_bitvector, bitvector_free, bitvector_print,
692 bitvector_equalp, count_ones, find_first_one): New.
693 (scm_bit_count, scm_bit_position, scm_bit_set_star_x,
694 scm_bit_count_star, scm_bit_invert_x, scm_istr2bve): Rewritten
695 using the new C API for bitvectors and maybe count_ones or
696 find_first_one, as appropriate.
697 (SCM_I_MAX_LENGTH, SCM_BITVECTOR_P, SCM_BITVECTOR_BASE,
698 SCM_SET_BITVECTOR_BASE, SCM_BITVECTOR_MAX_LENGTH,
699 SCM_BITVECTOR_LENGTH, SCM_MAKE_BITVECTOR_TAG,
700 SCM_SET_BITVECTOR_LENGTH): Removed. Replaced all uses with the
701 new functions from above.
702 (scm_i_proc_make_vector, scm_i_proc_make_string,
703 scm_i_proc_make_bitvector): Made non-static for use in
704 scm_i_generalized_vector_creator.
705 (scm_make_u1vector): Removed, replaced by scm_make_bitvector.
706 (scm_make_uve): Validate that the created object is a generalized
707 vector.
708 (scm_i_legacy_tag): Removed.
709 (scm_i_print_array): Do it here.
710 (scm_raprin1): Only print enclosed arrays.
711
712 * Makefile.am (DOT_DOC_FILES): Added srfi-4.doc.
713
c24d026b
MV
7142004-11-04 Marius Vollmer <marius.vollmer@uni-dortmund.de>
715
1f2328fe
MV
716 * srfi-4.c (make_uvec): Use SCM_I_SIZE_MAX instead of SIZE_MAX for
717 added portability.
718
719 * chars.c (scm_charnames, scm_charnums): Added "sp" as an alias
720 for "space". Thanks to Bruce Korb!
721
c24d026b
MV
722 * rw.c (scm_read_string_x_partial): Bugfix, apply offset to dest
723 only after dest has been set. Thanks to Hyper Division!
724
725 * gh_data.c (gh_uniform_vector_length): Use
726 scm_uniform_vector_length instead of SCM_UVECTOR_LENGTH.
727
d4ea47c8
MV
7282004-11-03 Marius Vollmer <mvo@zagadka.de>
729
730 * unif.h (SCM_UVECTOR_BASE, SCM_SET_UVECTOR_BASE,
731 SCM_UVECTOR_MAXLENGTH, SCM_UVECTOR_LENGTH, SCM_MAKE_UVECTOR_TAG,
732 SCM_SET_UVECTOR_LENGTH): Removed.
733
236288e2
MV
7342004-11-02 Marius Vollmer <mvo@zagadka.de>
735
736