| Commit message (Expand) | Author | Age | Files | Lines |
* | Final names for new array functions...Globally rename (array-from* -> array-slice), (array-from ->
array-cell-ref), (array-amend! -> array-cell-set!), (array-for-each-cell
-> array-slice-for-each).
| Daniel Llorens | 2017-01-09 | 1 | -25/+25 |
* | Deprecate scm_from_contiguous_array...scm_from_contiguous_array() was undocumented, unused within Guile, and
can be replaced by make-array + array-copy! without requiring contiguity
and without loss of performance.
* libguile/arrays.c (scm_array_contents): Do not rely on
SCM_I_ARRAY_CONTP.
* test-suite/tests/arrays.test: Test array-contents with 0-rank array.
* libguile/arrays.h: Declare scm_i_shap2ra(),
SCM_SET_ARRAY_CONTIGUOUS_FLAG, SCM_CLR_ARRAY_CONTIGUOUS_FLAG so that
scm_from_contiguous_array() can keep using them.
* libguile/deprecated.c (scm_from_contiguous_array): Move here from
arrays.c.
* libguile/deprecated.h (scm_from_contiguous_array): Deprecate.
* NEWS: Add deprecation notice.
| Daniel Llorens | 2016-11-23 | 1 | -61/+30 |
* | New functions array-from, array-from*, array-amend!...* libguile/arrays.h (scm_array_from, scm_array_from_s,
scm_array_amend_x): New declarations.
* libguile/arrays.c (scm_array_from, scm_array_from_s,
scm_array_amend_x): New functions, export as array-from, array-from*,
array-amend!.
* test-suite/tests/arrays.test: Tests for array-from, array-from*,
array-amend!. Replace with-test-prefix/c&e with with-test-prefix where
the array read syntax isn't used.
| Daniel Llorens | 2016-11-23 | 1 | -1/+172 |
* | Avoid unneeded internal use of array handles...* libguile/arrays.c (scm_shared_array_root): Adopt uniform check order.
(scm_shared_array_offset, scm_shared_array_increments): Use the array
fields directly just as scm_shared_array_root does.
(scm_c_array_rank): Moved from libguile/generalized-arrays.c. Don't
use array handles, but follow the same type check sequence as the
other array functions (shared-array-root, etc).
(scm_array_rank): Moved from libguile/generalized-arrays.h.
* libguile/arrays.h: Move prototypes here.
* test-suite/tests/arrays.test: Tests for shared-array-offset,
shared-array-increments.
| Daniel Llorens | 2016-11-23 | 1 | -22/+43 |
* | Deprecate dynamic roots...* libguile/root.h:
* libguile/root.c: Remove these files.
* libguile/deprecated.h:
* libguile/deprecated.c (scm_internal_cwdr, scm_call_with_dynamic_root)
(scm_dynamic_root, scm_apply_with_dynamic_root): Deprecate.
Remove all root.h usage, which was vestigial.
* module/ice-9/serialize.scm: Use (current-thread) instead
of (dynamic-root).
| Andy Wingo | 2016-11-21 | 1 | -1/+0 |
* | Remove scm_putc_unlocked....* libguile/ports.h (scm_putc_unlocked): Remove.
* libguile/ports.c (scm_putc): Replace implementation with
scm_putc_unlocked's implementation.
(scm_port_print): Use scm_putc.
* libguile/arbiters.c:
* libguile/arrays.c:
* libguile/bitvectors.c:
* libguile/bytevectors.c:
* libguile/continuations.c:
* libguile/dynl.c:
* libguile/eval.c:
* libguile/filesys.c:
* libguile/fluids.c:
* libguile/foreign.c:
* libguile/fports.c:
* libguile/frames.c:
* libguile/hashtab.c:
* libguile/hooks.c:
* libguile/macros.c:
* libguile/mallocs.c:
* libguile/print.c:
* libguile/programs.c:
* libguile/promises.c:
* libguile/r6rs-ports.c:
* libguile/smob.c:
* libguile/srcprop.c:
* libguile/struct.c:
* libguile/variable.c:
* libguile/weak-set.c:
* libguile/weak-table.c: Use scm_putc instead of scm_putc_unlocked.
| Andy Wingo | 2016-04-26 | 1 | -8/+8 |
* | Non-vector 1D arrays print as #1()...* libguile/arrays.c (scm_i_print_array): Print the dimension whenever
the array is a true scm_tc7_array.
* test-suite/tests/arrays.test: Check that non-vector 1D arrays print as
expected.
| Daniel Llorens | 2015-02-18 | 1 | -2/+3 |
* | Pack array dimensions in array object...* libguile/arrays.c (scm_i_make_array): redo object layout.
* libguile/arrays.h (SCM_I_ARRAY_V, SCM_ARRAY_BASE, SCM_I_ARRAY_DIMS):
to match new layout.
(SCM_I_ARRAY_SET_V, SCM_ARRAY_SET_BASE): new setters.
(SCM_I_ARRAY_MEM, scm_i_t_array): unused, remove.
(scm_i_shap2ra, scm_make_typed_array, scm_from_contiguous_typed_array,
scm_from_contiguous_array, scm_make_shared_array, scm_transpose_array,
scm_array_contents): fix uses of SCM_I_ARRAY_V, SCM_ARRAY_BASE as
lvalues.
* libguile/array-map.c (make1array, scm_ramapc): fix uses of
SCM_I_ARRAY_V, SCM_ARRAY_BASE as lvalues.
| Daniel Llorens | 2014-09-30 | 1 | -31/+35 |
* | array-contents returns root for empty arrays with empty root...This fixes a compiler issue where (uniform-array->bytevector #2f64())
failed because of the stricter definition of uniform-vector? on this branch.
Perhaps it would be better if uniform-array->bytevector didn't require
a contiguous argument.
* libguile/arrays.c: (scm_array_contents): return the root regardless of
the value of SCM_I_ARRAY_DIMS (ra)->inc.
* test-suite/tests/arrays.test: check.
| Daniel Llorens | 2014-02-10 | 1 | -3/+2 |
* | Match types used in arrays.c to struct field types...* libguile/arrays.c
- scm_shared_array_root: check for SCM_I_ARRAYP first.
- scm_i_shap2ra:
* check valid bounds in the '(lbnd ubnd) case. This makes
(make-array 0 '(4 -3)) fail with a 'bad dimension' instead of
with a 'wrong index' error.
* use ssize_t for lbnd/ubnd/inc, not long.
- scm_make_shared_array: use ssize_t for indices, not long.
- scm_transpose_array: use size_t for ndim, not ulong.
- scm_i_print_array: idem.
| Daniel Llorens | 2014-02-10 | 1 | -22/+24 |
* | Check more cases of array-contents...* libguile/arrays.c: (scm_array_contents): fix comment.
* test-suite/tests/arrays.test: add cases that depend on correct
setting of CONTIGUOUS_FLAG.
| Daniel Llorens | 2014-02-10 | 1 | -2/+2 |
* | Refactor array-contents...* libguile/arrays.c (scm_array_contents): Branch cases not on
scm_is_generalized_vector but on SCM_I_ARRAYP. Thus lbnd!=0, which
could happen with scm_is_generalized_vector, never appears in the
output.
* test-suite/tests/arrays.test: Test array-contents.
| Daniel Llorens | 2014-02-10 | 1 | -22/+20 |
* | Remove array impl. registry; instead, hard-code array handle creation...* libguile/array-handle.h (scm_t_vector_ref, scm_t_vector_set): Rename
from scm_t_array_ref, scm_t_array_set. These were named
scm_i_t_array_ref and scm_i_t_array_set in 1.8 and 2.0. Change to
take the vector directly, instead of the array handle. In this way,
generic array handles are layered on top of specific implementations
of backing stores.
Remove scm_t_array_implementation, introduced in 2.0 but never
documented. It was a failed attempt to layer the array implementation
that actually introduced too many layers, as it prevented the "vref"
and "vset" members of scm_t_array_handle (called "ref" and "set" in
1.8, not present in 2.0) from specializing on array backing stores.
(scm_i_register_array_implementation) (scm_i_array_implementation_for_obj):
Remove these internal interfaces.
(scm_t_array_handle): Adapt to scm_t_vector_ref / scm_t_vector_set
change.
(scm_array_handle_ref, scm_array_handle_set): Adapt to change in
vref/vset prototype.
* libguile/array-handle.c (scm_array_get_handle): Inline all the
necessary initializations here for all specific array types.
* libguile/array-map.c (rafill, racp, ramap, rafe, array_index_map_1):
* libguile/arrays.c: Remove array implementation code.
* libguile/bitvectors.h:
* libguile/bitvectors.c: Remove array implementation code.
(scm_i_bitvector_bits): New internal interface.
* libguile/bytevectors.c: Remove array implementation code.
* libguile/srfi-4.h: Remove declarations for internal procedures that
don't exist (!).
* libguile/strings.c: Remove array implementation code.
* libguile/vectors.c: Remove array implementation code.
| Andy Wingo | 2014-02-09 | 1 | -34/+0 |
* | Fix bad uses of base and lbnd on rank 1 arrays... * libguile/array-map.c
- rafill, ramap, rafe, racp: object from SCM_I_ARRAY_V always
has base 0, lbnd 0 and inc 1; make use of this.
* libguile/arrays.c
- array_handle_ref, array_handle_set: idem.
- array_get_handle: sanity check.
* libguile/generalized-vectors.c
- scm_c_generalized_vector_ref, scm_c_generalized_vector_set_x:
pos should be base when idx is lbnd. Furthermore, pos should be signed and
have its overflow checked; do this by handling the job to
scm_c_array_ref_1, scm_c_array_set_1_x.
* libguile/generalized-vectors.h
- fix prototypes.
| Daniel Llorens | 2014-02-07 | 1 | -0/+2 |
* | Don't use scm_is_generalized_vector in transpose-array...* libguile/arrays.c (scm_transpose_array)
- Use scm_c_array_rank(), which contains an implicit is_array test.
- Handle the rank 0 case.
* test-suite/tests/arrays.test
- Add test for rank 0 case.
- Add failure test for non array argument.
| Daniel Llorens | 2014-02-06 | 1 | -8/+8 |
* | Don't use scm_is_generalized_vector in shared-array-root...* libguile/arrays.c: (scm_shared_array_root): replace check for
scm_is_generalized_vector.
| Daniel Llorens | 2014-02-06 | 1 | -5/+6 |
* | Remove unnecessary conditions in array constructors...* libguile/arrays.c: (scm_make_type_array, scm_from_contigous_typed_array,
scm_from_contigous_array): Remove conditions known to be true.
| Daniel Llorens | 2014-02-06 | 1 | -3/+4 |
* | Replace generalized-vector calls in array_handle_ref/set...* libguile/arrays.c: (array-handle-ref, array-handle-set): Use the
rank-1 array accessors.
| Andy Wingo | 2014-02-06 | 1 | -5/+5 |
* | Replace scm_c_generalized_vector_length in arrays.c...* libguile/arrays.c: (scm_array_contents, scm_make_shared_array):
arrays are known of rank 1 so replace by scm_c_array_length.
| Daniel Llorens | 2014-02-06 | 1 | -5/+5 |
* | RTL compiler supports static bitvectors...* libguile/arrays.c (scm_from_contiguous_typed_array):
* libguile/bytevectors.c (scm_uniform_array_to_bytevector): For
bitvectors, round up the length to 32-bit units, as they are stored
internally. Otherwise I think this probably does the wrong thing for
the last word on big-endian systems.
* libguile/bitvectors.c (BITVECTOR_LENGTH, BITVECTOR_BITS):
(scm_c_make_bitvector): Reorder the length and pointer words to match
the layout of bytevectors.
* module/language/cps/primitives.scm (*branching-primcall-arities*):
* module/system/vm/assembler.scm (br-if-bitvector):
* module/system/vm/disassembler.scm (code-annotation): Add bitvector
test support.
* module/system/vm/assembler.scm (<uniform-vector-backing-store>): Add
an element-size field.
(intern-constant): Adapt make-uniform-vector-backing-store call. Use
uniform-array->bytevector, as the old compiler did.
(link-data): Add bitvector cases.
| Andy Wingo | 2013-11-03 | 1 | -3/+4 |
* | Merge remote-tracking branch 'origin/stable-2.0'...Moved scm_i_struct_hash from struct.c to hash.c and made it static.
The port's alist is now a field of 'scm_t_port'.
Conflicts:
libguile/arrays.c
libguile/hash.c
libguile/ports.c
libguile/print.h
libguile/read.c
| Mark H Weaver | 2012-10-30 | 1 | -173/+2 |
|\ |
|
| * | Move array reader from arrays.c to read.c...* libguile/arrays.c (read_decimal_integer): Move to read.c.
(scm_i_read_array): Remove. Incorporate the code into the
'scm_read_array' static function in read.c.
* libguile/arrays.h (scm_i_read_array): Remove prototype.
* libguile/read.c (read_decimal_integer): Move here from read.c.
(scm_read_array): Incorporate the code from 'scm_i_read_array'. Call
'scm_read_vector' and 'scm_read_sexp' instead of 'scm_read'.
| Mark H Weaver | 2012-10-23 | 1 | -173/+2 |
* | | Merge remote-tracking branch 'origin/stable-2.0'...Conflicts:
GUILE-VERSION
libguile/gc-malloc.c
libguile/ports.c
| Andy Wingo | 2012-02-08 | 1 | -18/+19 |
|\| |
|
| * | Improve the usage of variable names in C docstrings....* libguile/alist.c:
* libguile/array-map.c:
* libguile/arrays.c:
* libguile/bitvectors.c:
* libguile/filesys.c:
* libguile/foreign.c:
* libguile/generalized-arrays.c:
* libguile/hashtab.c:
* libguile/ioext.c:
* libguile/load.c:
* libguile/numbers.c:
* libguile/ports.c:
* libguile/posix.c:
* libguile/print.c:
* libguile/procprop.c:
* libguile/promises.c:
* libguile/simpos.c:
* libguile/socket.c:
* libguile/srfi-1.c:
* libguile/srfi-13.c:
* libguile/srfi-14.c:
* libguile/stacks.c:
* libguile/stime.c:
* libguile/strings.c:
* libguile/struct.c:
* libguile/symbols.c:
* libguile/threads.c:
* libguile/weak-table.c:
* libguile/weak-vector.c: Make the variable names in the C docstrings more
consistent. Replace a few instances of @var with @code when appropriate.
| Bake Timmons | 2012-02-02 | 1 | -18/+19 |
* | | Merge remote-tracking branch 'origin/stable-2.0'...Conflicts:
libguile/__scm.h
libguile/array-map.c
libguile/procprop.c
libguile/tags.h
module/ice-9/deprecated.scm
module/ice-9/psyntax-pp.scm
module/ice-9/psyntax.scm
test-suite/standalone/test-num2integral.c
test-suite/tests/regexp.test
| Andy Wingo | 2012-01-10 | 1 | -16/+10 |
|\| |
|
| * | Fix incorrect use of `SCM_UNPACK'....* libguile/arrays.c (scm_i_make_array): Cast the result of
`scm_gc_malloc' directly to `scm_t_bits'.
| Ludovic Courtès | 2012-01-09 | 1 | -4/+4 |
| * | allocate a tc7 to arrays...* libguile/tags.h (scm_tc7_array): Allocate a tag for arrays.
* libguile/arrays.h (SCM_I_ARRAYP): Change to use scm_tc7_array. The
previous definition was not externally usable because scm_i_tc16_array
was internal.
(scm_i_print_array): Declare, though internally.
* libguile/arrays.c (scm_i_make_array): Use scm_cell with the tc7
instead of NEWSMOB.
(scm_i_print_array): Make not static.
(SCM_ARRAY_IMPLEMENTATION): Adapt.
(scm_init_arrays): Remove array smob declaration.
* libguile/eq.c (scm_equal_p): Refactor to put the string, pointer, and
bytevector cases in the switch. Add a case for arrays.
* libguile/goops.c: Add <array> declarations.
* libguile/print.c (iprin1): Call scm_i_print_array as needed.
* libguile/evalext.c (scm_self_evaluating_p): Add a case for arrays.
| Andy Wingo | 2012-01-09 | 1 | -15/+9 |
* | | locking for putc, puts...* libguile/ports.c (scm_putc, scm_puts):
* libguile/ports.h (scm_putc_unlocked, scm_puts_unlocked): Separate into
_unlocked and locked variants. Change all callers to use the
_unlocked versions.
| Andy Wingo | 2011-11-08 | 1 | -8/+8 |
* | | locking on unget_byte, ungetc, ungets...* libguile/ports.h:
* libguile/ports.c (scm_unget_byte_unlocked, scm_unget_byte)
(scm_ungetc_unlocked, scm_ungetc, scm_ungets_unlocked, scm_ungets):
Add locking and _unlocked variants.
* libguile/arrays.c:
* libguile/rdelim.c:
* libguile/read.c:
* libguile/vports.c: Adapt callers to use the _unlocked variants.
| Andy Wingo | 2011-11-08 | 1 | -3/+3 |
* | | locking on scm_c_read, scm_getc...* libguile/ports.c (scm_c_read_unlocked, scm_c_read, scm_getc_unlocked)
(scm_getc): Split getc and read operations into locked and unlocked
variants. Change most uses to use the _unlocked version.
| Andy Wingo | 2011-11-08 | 1 | -6/+6 |
* | | add SCM_HEAP_OBJECT_P...* libguile/tags.h (SCM_HEAP_OBJECT_P): New macro, an alias for
SCM_NIMP.
* libguile/arrays.c:
* libguile/debug.c:
* libguile/foreign.c:
* libguile/gdbint.c:
* libguile/guardians.c:
* libguile/list.c:
* libguile/modules.c:
* libguile/options.c:
* libguile/smob.c:
* libguile/validate.h:
* libguile/weak-set.c:
* libguile/weak-table.c:
* libguile/weak-vector.c: Use it instead of SCM_NIMP or !SCM_IMP.
| Andy Wingo | 2011-10-24 | 1 | -1/+1 |
|/ |
|
* | fix write beyond array end in arrays.c...* libguile/arrays.c (scm_i_read_array): Fix write past end of array
while reading array type tag. Fix non-ascii type tag elements.
Thanks to http://article.gmane.org/gmane.lisp.guile.devel/12685.
| Andy Wingo | 2011-07-28 | 1 | -17/+17 |
* | fix code that causes warnings on gcc 4.6...* libguile/arrays.c (scm_i_read_array):
* libguile/backtrace.c (display_backtrace_body):
* libguile/filesys.c (scm_readdir)
* libguile/i18n.c (chr_to_case):
* libguile/ports.c (register_finalizer_for_port):
* libguile/posix.c (scm_nice):
* libguile/stacks.c (scm_make_stack): Clean up a number of
set-but-unused vars. Thanks to Douglas Mencken for the report.
* libguile/numbers.c (scm_log, scm_exp): Fix a few #if cases that should
be #ifdef.
| Andy Wingo | 2011-03-17 | 1 | -3/+1 |
* | allow compilation of #@2(1 2 3)...* libguile/arrays.h:
* libguile/arrays.c (scm_from_contiguous_array): New public function,
like scm_from_contiguous_typed_array but for arrays of generic Scheme
values.
* libguile/vm-i-scheme.c (make-struct): Sync regs before making the
struct, so if we get a GC the regs are on the heap.
(make-array): New instruction, makes an generic (untyped) Scheme
array.
* module/language/glil/compile-assembly.scm (dump-object): Correctly
compile arrays.
| Andy Wingo | 2010-01-11 | 1 | -1/+36 |
* | reimplement srfi-4 vectors on top of bytevectors...* libguile/srfi-4.h:
* libguile/srfi-4.c (scm_make_srfi_4_vector): New function, exported by
(srfi srfi-4 gnu).
* libguile/srfi-4.i.c: Removed.
* module/srfi/srfi-4.scm:
* module/srfi/srfi-4/gnu.scm: Reimplement srfi-4 vectors on top of
bytevectors. The implementation is mostly in Scheme now.
* test-suite/tests/unif.test: Update to use (srfi srfi-4 gnu).
* libguile/bytevectors.c (bytevector_ref_c32, bytevector_ref_c64)
(bytevector_set_c32, bytevector_set_c64): Fix some embarrassing bugs.
Still need to do an upper bounds check.
* libguile/deprecated.h: Remove deprecated array functions:
scm_i_arrayp, scm_i_array_ndim, scm_i_array_mem, scm_i_array_v,
scm_i_array_base, scm_i_array_dims, and the deprecated macros:
SCM_ARRAYP, SCM_ARRAY_NDIM, SCM_ARRAY_CONTP, SCM_ARRAY_MEM,
SCM_ARRAY_V, SCM_ARRAY_BASE, SCM_ARRAY_DIMS.
* libguile/deprecated.c (scm_uniform_vector_read_x)
(scm_uniform_vector_write, scm_uniform_array_read_x)
(scm_uniform_array_write): Newly deprecated functions.
* libguile/generalized-arrays.c (scm_array_type): Remove the bytevector
hack.
* libguile/objcodes.c (scm_bytecode_to_objcode, scm_objcode_to_bytecode):
Rework to operate on bytevectors, as scm_make_u8vector now causes a
module lookup, which can't be done e.g. when loading the VM boot
program for psyntax-pp.go on a fresh bootstrap.
* libguile/objcodes.h (SCM_F_OBJCODE_IS_BYTEVECTOR):
(SCM_OBJCODE_IS_BYTEVECTOR): s/U8VECTOR/BYTEVECTOR/.
* module/ice-9/boot-9.scm (the-scm-module): A terrible hack to pull in
(srfi srfi-4), as the bindings are primarily there now. We'll worry
about this later.
| Andy Wingo | 2010-01-07 | 1 | -144/+0 |
* | Remove extraneous semicolon after `SCM_ARRAY_IMPLEMENTATION' & co....* libguile/bitvectors.c, libguile/srfi-4.c, libguile/strings.c,
libguile/vectors.c: Remove extraneous semicolon after
`SCM_ARRAY_IMPLEMENTATION' and `SCM_VECTOR_IMPLEMENTATION'
invocations.
| Ludovic Courtès | 2009-12-15 | 1 | -1/+1 |
* | add SCM_SMOB_TYPE_BITS and SCM_SMOB_TYPE_MASK...* libguile/smob.h (SCM_SMOB_TYPE_BITS, SCM_SMOB_TYPE_MASK): New macros,
for when you want to identify a SMOB by type and mask.
* libguile/arrays.c:
* libguile/bitvectors.c:
* libguile/srfi-4.c: Use the new macros.
| Andy Wingo | 2009-12-08 | 1 | -1/+2 |
* | fix erroneous SCM_CELL_* usage in arrays.[ch]...* libguile/arrays.h (SCM_I_ARRAY_FLAG_CONTIGUOUS, SCM_I_ARRAY_NDIM):
(SCM_I_ARRAY_CONTP, SCM_I_ARRAY_MEM):
* libguile/arrays.c (SCM_SET_ARRAY_CONTIGUOUS_FLAG):
(SCM_CLR_ARRAY_CONTIGUOUS_FLAG): Fix macros to use SCM_SMOB macros
instead of SCM_CELL macros.
| Andy Wingo | 2009-12-08 | 1 | -2/+2 |
* | bitvector tweaks...* libguile/arrays.c (scm_from_contiguous_typed_array):
* libguile/bytevectors.c (scm_uniform_array_to_bytevector): Error if the
uniform element size is more than 8 bits, but not divisible by 8 --
because our math could overflow in that case.
* module/ice-9/deprecated.scm (#\y): Indeed, #* is the valid bitvector
syntax :)
| Andy Wingo | 2009-10-16 | 1 | -1/+4 |
* | Fix compilation of literal bitvectors....* libguile/arrays.c (scm_from_contiguous_typed_array): Fix BYTE_LEN
sanity check for bitvectors.
* test-suite/tests/unif.test ("syntax")["bitvector is self-evaluating"]:
New test.
* module/ice-9/deprecated.scm (#\y): Fix deprecation comment: `#*' is
not a read syntax.
| Ludovic Courtès | 2009-10-15 | 1 | -1/+2 |
* | Remove unneeded SMOB/port mark/free procedures....* libguile/arrays.c (array_mark, array_free): Remove.
(scm_init_arrays): Adjust accordingly.
* libguile/bitvectors.c (bitvector_free): Remove.
(scm_c_make_bitvector): Use `scm_gc_malloc_pointerless ()'.
(scm_init_bitvectors): Adjust accordingly.
* libguile/strports.c (scm_make_stptob): Remove `scm_set_port_mark ()'
call.
* libguile/vports.c (scm_make_sfptob): Likewise.
| Ludovic Courtès | 2009-09-28 | 1 | -18/+0 |
* | fix bitvectors after the array handle refactoring...* libguile/uniform.h (scm_array_handle_uniform_element_bit_size): New
public accessor.
* libguile/uniform.c (scm_array_handle_uniform_element_size): Better
errors in non-byte-aligned arrays.
(scm_uniform_vector_element_type, scm_uniform_vector_element_size)
(scm_c_uniform_vector_ref, scm_c_uniform_vector_set_x):
(scm_uniform_vector_to_list): Don't require byte-aligned access.
* libguile/bytevectors.c (scm_uniform_array_to_bytevector):
* libguile/arrays.c (scm_from_contiguous_typed_array): Fix for
uniform arrays whose element size is not a multiple of the byte size.
| Andy Wingo | 2009-09-18 | 1 | -8/+16 |
* | make-typed-array builds backing vector via make-generalized-vector...* libguile/arrays.c: Rework to use scm_make_generalized_vector instead
of our own type table.
* libguile/bitvectors.c: Fix some includes.
| Andy Wingo | 2009-07-19 | 1 | -172/+81 |
* | uniform vector functions to their own file...* libguile/uniform.c:
* libguile/uniform.h:
* libguile/srfi-4.c:
* libguile/srfi-4.h:
* libguile/Makefile.am: Move uniform vector funcs out of srfi-4 to their
own file.
* libguile.h:
* libguile/arrays.c:
* libguile/bytevectors.c: Update includers.
| Andy Wingo | 2009-07-19 | 1 | -0/+1 |
* | generic vector ops to own file...* libguile/Makefile.am:
* libguile/vectors.c:
* libguile/vectors.h:
* libguile/generalized-vectors.c:
* libguile/generalized-vectors.h: Move generic vector ops off into their
own file too. The implementation is now based on the generic
array-handle infrastructure.
* libguile.h:
* libguile/array-map.c:
* libguile/bitvectors.c:
* libguile/random.c:
* libguile/srfi-4.c: Update includers.
| Andy Wingo | 2009-07-19 | 1 | -0/+1 |
* | move generic array foo out to its own file...* libguile/arrays.h:
* libguile/arrays.c:
* libguile/generalized-arrays.h:
* libguile/generalized-arrays.c: Move some generic functionality out of
arrays.c to a new file.
* libguile/array-map.c:
* libguile/deprecated.c:
* libguile/init.c: Update includers.
| Andy Wingo | 2009-07-19 | 1 | -252/+1 |
* | remove enclosed arrays...* libguile/arrays.h:
* libguile/array-map.c:
* libguile/arrays.c:
* libguile/deprecated.c: Remove "enclosed arrays". The only user-facing
procedures that this affects are scm_enclose_array / enclose-array. If
enclosed arrays are added back, it should be through the generic array
interface; but really, it sounds like something that would be better
implemented in Scheme.
| Andy Wingo | 2009-07-19 | 1 | -166/+17 |
* | add generic array implementation facility...* libguile/array-handle.c (scm_i_register_array_implementation):
(scm_i_array_implementation_for_obj): Add generic array facility,
which will (in a few commits) detangle the array code.
(scm_array_get_handle): Use the generic array facility. Note that
scm_t_array_handle no longer has ref and set function pointers;
instead it has a pointer to the array implementation. It is unlikely
that code out there used these functions, however, as the supported
way was through scm_array_handle_ref/set_x.
(scm_array_handle_pos): Move this function here from arrays.c.
(scm_array_handle_element_type): New function, returns a Scheme value
representing the type of element stored in this array.
* libguile/array-handle.h (scm_t_array_element_type): New enum, for
generically determining the type of an array.
(scm_array_handle_rank):
(scm_array_handle_dims): These are now just #defines.
* libguile/arrays.c:
* libguile/bitvectors.c:
* libguile/bytevectors.c:
* libguile/srfi-4.c:
* libguile/strings.c:
* libguile/vectors.c: Register array implementations for all of these.
* libguile/inline.h: Update for array_handle_ref/set change.
* libguile/deprecated.h: Need to include arrays.h now.
| Andy Wingo | 2009-07-19 | 1 | -21/+32 |
* | rename unif.[ch] to arrays.[ch]...* libguile/Makefile.am:
* libguile/unif.c:
* libguile/unif.h:
* libguile/arrays.c:
* libguile/arrays.h: Rename unif.[ch] to arrays.[ch].
* libguile.h:
* libguile/array-handle.c:
* libguile/array-map.c:
* libguile/bitvectors.c:
* libguile/bytevectors.c:
* libguile/eq.c:
* libguile/gc-card.c:
* libguile/gc-malloc.c:
* libguile/gc-mark.c:
* libguile/gc.c:
* libguile/init.c:
* libguile/inline.h:
* libguile/print.c:
* libguile/random.c:
* libguile/read.c:
* libguile/socket.c:
* libguile/sort.c:
* libguile/srfi-4.c:
* libguile/srfi-4.h:
* libguile/strports.c:
* libguile/vectors.c:
* libguile/vectors.h: Update includers.
| Andy Wingo | 2009-07-19 | 1 | -0/+1634 |