summaryrefslogtreecommitdiff
Commit message (Collapse)AuthorAgeFilesLines
* Inline scm_i_array_implementation_for_obj in scm_i_arrayAndy Wingo2014-02-081-2/+15
| | | | | | * libguile/generalized-arrays.c (scm_is_array, scm_is_typed_array): In preparation for removing the registry of array implementations, remove a couple uss of scm_i_array_implementation_for_obj.
* vref, vset members of scm_t_array_handleAndy Wingo2014-02-084-19/+23
| | | | | | | | | | * libguile/array-handle.h (scm_t_array_ref, scm_t_array_set): Rename from scm_i_t_array_ref, scm_i_t_array_set. (scm_t_array_handle): Copy vref and vset from impl to handle. (scm_array_handle_ref, scm_array_handle_set): * libguile/array-map.c (racp, ramap, rafe, rafill, array_index_map_1): * libguile/array-handle.c (scm_array_get_handle): Adapt.
* Change uses of scm_is_simple_vector to scm_is_vectorDaniel Llorens2014-02-089-27/+76
| | | | | | | | | | | | * libguile/filesys.c, libguile/random.c, libguile/stime.c, libguile/trees.c, libguile/validate.h: use scm_is_vector instead of scm_is_simple_vector. * libguile/sort.c (scm_sort_x, scm_sort, scm_stable_sort_x) (scm_stable_sort): Remove scm_is_vector check; scm_is_array is sufficient. * test-suite/tests/arrays.test: Fix header. * test-suite/tests/random.test: New coverage test covering random:normal-vector!. * test-suite/Makefile.am: Include random.test in make check.
* SCM_I_IS_VECTOR only true for tc7_vector, not weak vectorsAndy Wingo2014-02-085-56/+50
| | | | | | | | | | | | | * libguile/tags.h (SCM_TYP7S, SCM_HAS_TYP7S): Remove these, as we no longer do the differs-by-one-bit thing for vectors and weak vectors. * libguile/vectors.h (SCM_I_IS_VECTOR): Use SCM_HAS_TYP7. (SCM_I_IS_NONWEAK_VECTOR): Remove. * libguile/vm-engine.c (vector-length, vector-ref, vector-set!) (vector-ref/immediate, vector-set!/immediate): We can inline these instructions completely now. * libguile/vm.c (vm_error_not_a_vector, vm_error_out_of_range): New error conditions.
* Merge commit '24cac6554073bb6e691605cd6ac6196f3c0851a3'Andy Wingo2014-02-082-74/+30
|\ | | | | | | | | Conflicts: libguile/vectors.c
| * Deprecate the use of the vector interface on arraysAndy Wingo2014-02-082-15/+50
| | | | | | | | | | | | | | | | | | | | * libguile/vectors.c (scm_is_vector): Deprecate use on weak vectors and arrays. (scm_is_simple_vector): Deprecate use on weak vectors. (scm_vector_length, scm_c_vector_ref, scm_c_vector_set_x): Deprecate use on arrays. * libguile/sort.c: Adapt to check explicitly for arrays.
* | Merge commit '5cfeff11cc58148c58a85a879fd7a3e7cfbbe8e2'Andy Wingo2014-02-081-53/+42
|\ \ | |/ | | | | | | Conflicts: libguile/vectors.c
| * Deprecate use of vector-length, vector-ref, vector-set! as primitive-genericsAndy Wingo2014-02-081-7/+28
| | | | | | | | | | | | * libguile/vectors.c (scm_vector_length, scm_c_vector_ref): (scm_c_vector_set_x): Deprecate the use of vector-length, vector-ref, and vector-set! as primitive generics.
* | Merge commit 'fb7dd00169304a5922838e4d2f25253640a35def'Andy Wingo2014-02-0811-331/+91
|\ \ | |/ | | | | | | | | | | | | | | | | This commit also renames uniform-vector-element-type-code to array-type-code. Conflicts: libguile/uniform.c libguile/uniform.h test-suite/tests/arrays.test
| * Deprecate general "uniform-vector" interfaceAndy Wingo2014-02-088-142/+135
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * libguile/uniform.h: * libguile/uniform.c (scm_is_uniform_vector, scm_uniform_vector_p) (scm_c_uniform_vector_length, scm_uniform_vector_length) (scm_uniform_vector_element_type, scm_uniform_vector_element_size) (scm_c_uniform_vector_ref, scm_uniform_vector_ref): (scm_c_uniform_vector_set_x, scm_uniform_vector_set_x): (scm_uniform_vector_to_list) (scm_uniform_vector_elements, scm_uniform_vector_writable_elements): Deprecate. This interface lacked both generality and specificity. The general replacement is array-length, array-ref, and friends on the scheme side, or the array handle interface on the C side. On the specific side of things, there are the specific bytevector, srfi-4, and bitvector interfaces. * test-suite/tests/arrays.test: * test-suite/tests/bitvectors.test: * test-suite/tests/ports.test: * test-suite/tests/srfi-4.test: Update to use array interfaces. * doc/ref/api-foreign.texi (Void Pointers and Byte Access): * doc/ref/srfi-modules.texi (SRFI-4): Update.
* | Merge commit 'dc65b88d839c326889618112c4870ad3a64e9446'Andy Wingo2014-02-081-43/+25
|\ \ | |/ | | | | | | Conflicts: libguile/srfi-4.c
| * Simplify srfi-4 C implementationAndy Wingo2014-02-081-43/+25
| | | | | | | | | | | | | | | | | | | | * libguile/srfi-4.c (DEFINE_SRFI_4_C_FUNCS): In the raw element accessors (e.g scm_u32vector_writable_elements), only permit bytevectors, as the constructors will only make bytevectors. This harmonizes with the Scheme interfaces as well, which expect packed bytevectors. (scm_make_srfi_4_vector): Knowing that the new value is a bytevector with base 0 and inc 1, simplify initialization.
* | Merge commit 'b9b88351ea2c4b43a6f90938554dc5693b17e328'Andy Wingo2014-02-084-143/+4
|\ \ | |/ | | | | | | | | Conflicts: libguile/deprecated.h test-suite/tests/00-socket.test
| * Deprecate htons, htonl, ntohs, ntohlAndy Wingo2014-02-086-145/+76
| | | | | | | | | | | | | | | | | | | | | | * libguile/sockets.h: * libguile/sockets.c: * libguile/deprecated.h: * libguile/deprecated.c (scm_htons, scm_htonl, scm_ntohs, scm_ntohl): Deprecate. Bytevectors adequately subsume their functionality. * doc/ref/posix.texi: * test-suite/tests/00-socket.test: Update.
* | Merge commit '0ce224594ae5a673f6a397c284db5f5a61935334'Andy Wingo2014-02-0810-44/+38
|\ \ | |/
| * Improve handling of locales in the test suite.Mark H Weaver2014-02-0710-44/+38
| | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | | * test-suite/guile-test (run-tests): Load each test file within (with-locale "C" ...). * test-suite/tests/encoding-iso88591.test: * test-suite/tests/encoding-iso88597.test: * test-suite/tests/encoding-utf8.test: * test-suite/tests/srfi-14.test: Remove broken code to save and restore the previous locale. * test-suite/tests/bytevectors.test: * test-suite/tests/format.test: * test-suite/tests/regexp.test: * test-suite/tests/srfi-19.test: * test-suite/tests/tree-il.test: Make sure 'setlocale' is defined before calling it.
* | Merge commit '495cea0c931de23f074892b3f32808e676712a18'Andy Wingo2014-02-081-2/+2
|\ \ | |/ | | | | | | Conflicts: libguile/weaks.c
| * Better error reporting in 'weak-vector-ref' and 'weak-vector-set!'.Mark H Weaver2014-02-071-2/+2
| | | | | | | | | | * libguile/weaks.c (scm_c_weak_vector_ref, scm_c_weak_vector_set_x): Pass procedure name to 'scm_out_of_range'.
* | Merge commit 'b86069c1308a6ca36f3a3bc56134b3f8fd693592'Andy Wingo2014-02-082-5/+5
|\ \ | |/ | | | | | | Conflicts: libguile/hashtab.c
| * Make size argument optional to 'make-doubly-weak-hash-table'; fix docs.Mark H Weaver2014-02-072-4/+4
| | | | | | | | | | | | | | | | * libguile/hashtab.c (scm_make_doubly_weak_hash_table): Make 'size' argument optional, like the weak hash table constructors. * doc/ref/api-memory.texi (Weak hash tables): Document that 'size' argument is optional for the weak hash table constructors.
* | Merge commit '54cded99dc5db94b1df0dc417161ebef7c60d874'Andy Wingo2014-02-081-5/+1
|\ \ | |/
| * Fix 'weak-vector?' doc: Weak hash tables are not weak vectors.Mark H Weaver2014-02-071-5/+1
| | | | | | | | | | | | * doc/ref/api-memory.texi (Weak vectors): In 'weak-vector?' entry, don't claim that weak hash tables are weak vectors. Remove statement that weak vectors are mainly useful for implementing weak hash tables.
* | Merge commit '2f3b7e9a41677bfe802e8a1ee851827297384c58'Andy Wingo2014-02-083-64/+10
|\ \ | |/ | | | | | | Conflicts: module/ice-9/pretty-print.scm
| * Fix truncated-print for uniform vectorsAndy Wingo2014-02-071-5/+6
| | | | | | | | | | | | * module/ice-9/pretty-print.scm (truncated-print): Use bytevector? instead of uniform-vector?; the latter could be true for shared arrays with non-zero lower bounds.
| * (srfi srfi-4 gnu) uses private define-bytevector-type from (srfi srfi-4)Andy Wingo2014-02-071-41/+4
| | | | | | | | | | * module/srfi/srfi-4/gnu.scm: Re-use implementation of define-bytevector-type from srfi-4.
| * Remove private unused duplicate c32/c64vector definitionsAndy Wingo2014-02-071-18/+0
| | | | | | | | | | * module/srfi/srfi-4.scm: Remove vestigial definitions for c32vectors and c64vectors. Those are defined in (srfi srfi-4 gnu).
* | Merge commit 'a675a2e81b792b9f860bec57c38a1948631c7a41'Andy Wingo2014-02-081-6/+3
|\ \ | |/
| * SRFI-4 predicates, length accessors only accept bytevectors (not arrays)Andy Wingo2014-02-071-6/+3
| | | | | | | | | | | | * module/srfi/srfi-4.scm (define-bytevector-type): For the predicates and length accessors, only accept bytevectors. Since arrays don't work for u32vector-ref et al, they shouldn't pass u32vector?.
* | Avoid using 'eval-when' with 'expand' in (oop goops).Mark H Weaver2014-02-071-3/+8
| | | | | | | | * module/oop/goops.scm: Avoid using 'eval-when' with 'expand'.
* | Merge commit '9b5da400dde6e6bc8fd0e318e7ca1feffa5870db'Andy Wingo2014-02-073-38/+30
|\ \ | |/ | | | | | | | | Conflicts: libguile/vectors.c test-suite/tests/weaks.test
| * Deprecate vector-ref, vector-length, vector-set! on weak vectorsAndy Wingo2014-02-073-43/+59
| | | | | | | | | | | | | | | | | | * libguile/vectors.c (scm_vector_length, scm_c_vector_length): (scm_c_vector_ref, scm_c_vector_set_x): Deprecate the use of these procedures on weak vectors. * test-suite/tests/guardians.test: * test-suite/tests/weaks.test: Adapt test suites.
* | Merge commit '1e3fd6a0c81bb3e9900a93a9d1923cc788de0f99'Andy Wingo2014-02-071-1/+12
|\ \ | |/ | | | | | | | | | | | | Conflicts: doc/ref/api-memory.texi libguile/weaks.c libguile/weaks.h module/ice-9/weak-vector.scm
| * Add weak-vector-length, weak-vector-ref, weak-vector-set!Andy Wingo2014-02-074-5/+122
| | | | | | | | | | | | | | | | | | | | | | | | | | * libguile/weaks.c (scm_is_weak_vector, scm_c_weak_vector_length): (scm_c_weak_vector_ref, scm_c_weak_vector_set_x): New interfaces for dealing with weak vectors from C. (scm_weak_vector_length, scm_weak_vector_ref, scm_weak_vector_set_x): New Scheme interfaces to weak vectors; to be used instead of vector-length, vector-ref, etc. * module/ice-9/weak-vector.scm: Export the new interfaces. * doc/ref/api-memory.texi (Weak vectors): Document them.
* | Merge commit '40a723a92236fe4e58feb89057b4182b1fc76810'Andy Wingo2014-02-073-23/+13
|\ \ | |/
| * Remove outdated documentation of LTDL_LIBRARY_PATH.Mark H Weaver2014-02-051-8/+0
| | | | | | | | | | * doc/ref/guile-invoke.texi (Environment Variables): Remove documentation of 'LTDL_LIBRARY_PATH'.
| * Document 'equal?' in list of R6RS incompatibilities.Mark H Weaver2014-02-051-2/+6
| | | | | | | | | | * doc/ref/r6rs.texi (R6RS Incompatibilities): Mention that 'equal?' may not terminate when applied to cyclic datums.
| * REPL Server: Remove unneeded error case in 'run-server'.Mark H Weaver2014-02-041-4/+0
| | | | | | | | | | | | | | * module/system/repl/server.scm (run-server): Remove case that handled 'interrupt' exceptions specially. It is no longer needed since e6c8e6047ed2e772cc4e1fb5ad4d389e5c616feb (REPL Server: Don't establish a SIGINT handler.)
| * REPL Server: Redirect warnings to client socket.Mark H Weaver2014-02-041-9/+7
| | | | | | | | | | * module/system/repl/server.scm (serve-client): Use parameterize. Redirect warnings to client socket.
* | Merge commit 'c8e839cfeb647aca034b9bcd5a321d419dedca1f'Andy Wingo2014-02-071-1/+1
|\ \ | |/
| * Don't check HAVE_ALARM, which no longer exists.Mark H Weaver2014-02-031-1/+1
| | | | | | | | | | * libguile/scmsigs.c (scm_alarm): Remove check for HAVE_ALARM. Conditionalize only on HAVE_DECL_ALARM.
* | Merge commit '5e69ceb7a667377a61cb0c31d7ac20e245b3fafd'Andy Wingo2014-02-07381-736/+3887
|\ \ | |/
| * Update Gnulib to v0.1-77-gd9361daMark H Weaver2014-02-03381-736/+3887
| |
* | Merge commit '866af5da3d11ac4a9df44ee8c5b1781a0073c288'Andy Wingo2014-02-073-2/+257
|\ \ | |/ | | | | | | Removes the special arity handler, and instead relies on the procedure returning the correct number of values.
| * define-values: Blackhole 'dummy'; work around lack of toplevel hygiene.Mark H Weaver2014-02-021-31/+45
| | | | | | | | | | | | | | * module/ice-9/boot-9.scm (define-values): Use 'generate-temporaries' to generate a fresh name for 'dummy', to work around the lack of hygiene for macro-introduced toplevel identifiers. Blackhole 'dummy' to avoid keeping garbage alive. Add more comments.
| * Implement R7RS 'define-values'.Mark H Weaver2014-02-023-2/+261
| | | | | | | | | | | | | | | | | | * module/ice-9/boot-9.scm (%define-values-arity-error): New procedure. (define-values): New macro. * doc/ref/api-binding.texi (Binding Multiple Values): Add docs. * test-suite/tests/syntax.test: Add tests.
* | Merge commit '34e89877342f20fdb8a531ad78dab34cfd2b0843'Andy Wingo2014-02-079-2/+4957
|\ \ | |/ | | | | | | Conflicts: module/Makefile.am
| * Implement SRFI-64 - A Scheme API for test suites.Mark H Weaver2014-02-017-2/+2091
| | | | | | | | | | | | | | | | | | | | | | | | | | | | * module/srfi/srfi-64.scm: New file. * module/srfi/srfi-64/testing.scm: New file. * module/Makefile.am: Add rule for srfi-64.go dependency on srfi-64/testing.scm. (SRFI_SOURCES): Add srfi/srfi-64.scm. (NOCOMP_SOURCES): Add srfi/srfi-64/testing.scm. * doc/ref/srfi-modules.texi (SRFI-64): New node. * test-suite/tests/srfi-64.test: New file. * test-suite/tests/srfi-64-test.scm: New file. * test-suite/Makefile.am (SCM_TESTS): Add test-suite/tests/srfi-64.test. (EXTRA_DIST): Add tests/srfi-64-test.scm.
| * Implement SRFI-43 Vector Library.Mark H Weaver2014-02-015-0/+2866
| | | | | | | | | | | | | | | | | | | | * module/srfi/srfi-43.scm: New file. * module/Makefile.am (SRFI_SOURCES): Add module/srfi/srfi-43.scm. * test-suite/tests/srfi-43.test: New file. * test-suite/Makefile.am (SCM_TESTS): Add test-suite/tests/srfi-43.test. * doc/ref/srfi-modules.texi (SRFI-43, SRFI-43 Constructors) (SRFI-43 Predicates, SRFI-43 Selectors, SRFI-43 Iteration) (SRFI-43 Searching, SRFI-43 Mutators, SRFI-43 Conversion): New nodes.
* | Merge commit '58147d67806e1f54c447d7eabac35b1a5086c3a6'Andy Wingo2014-02-071-0/+22
|\ \ | |/
| * Compile numerical comparisons with more than 2 arguments to VM code.Mark H Weaver2014-02-011-0/+23
| | | | | | | | | | | | | | * module/language/tree-il/primitives.scm (chained-comparison-expander): New procedure. (*primitive-expand-table*): Add primitive expanders for '<', '>', '<=', '>=', and '='.