summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2013-10-28Convert (ice-9 session) to use hygienic macros.cky-hygienic-macrosChris K. Jester-Young1-12/+11
* module/ice-9/session.scm (help): Convert to syntax-rules. Also move most of the body into help-internal; help messages should not be displayed at macro-expansion time. (help-internal): New procedure.
2013-10-27Convert (ice-9 i18n) to use hygienic macros.Chris K. Jester-Young1-31/+34
* module/ice-9/i18n.scm (define-vector-langinfo-mapping) (define-simple-langinfo-mapping, define-monetary-langinfo-mapping): Convert to syntax-rules macros. Also change the use of rest parameters to instead use case-lambda, in order to fail fast when given more than one argument.
2013-10-27Convert test-suite/tests/exceptions.test to use hygienic macros.Chris K. Jester-Young1-12/+14
* test-suite/tests/exceptions.test (push): New syntax parameter. (throw-test): Convert to a syntax-rules macro, using syntax parameters to support the otherwise-unhygienic use of "push".
2013-10-20Fix optional end argument in `uniform-vector-read!'.Ian Price1-2/+2
Fixes <http://bugs.gnu.org/15370>. Reported by Thien-Thi Nguyen <ttn@gnu.org>. * libguile/deprecated.c (scm_uniform_vector_read_x): Only multiply by width when argument supplied.
2013-10-19Doc: 'unfold-right' takes a tail not a tail generator.Ian Price1-2/+2
Reported by David Kastrup <dak@gnu.org>. * doc/ref/srfi-modules.texi (SRFI-1 Fold and Map): Change argument name, and default value.
2013-10-18Doc: mention vectors are self-quotingIan Price1-13/+9
Reported by Dmitry Bogatov <KAction@gnu.org>. * doc/ref/api-compound.texi (Vector Syntax, Vector Creation): Mention that vectors are self-quoting. Remove examples with quote signs.
2013-10-14doc: Update the section on SMOBs and memory management.Ludovic Courtès1-115/+59
* doc/ref/libguile-smobs.texi (Describing a New Type): Only list 'print' and 'equalp' as compulsory. Explain why 'mark' and 'free' are optional. (Creating Smob Instances): Remove paragraphs about allocations that might fail etc. Use 'scm_gc_malloc_pointerless' for the pixel buffer. (Garbage Collecting Smobs): Explain when the 'mark' and 'free' functions are needed. (Garbage Collecting Simple Smobs): Remove.
2013-10-14'scm_c_read' goes through the fast path with ISO-8859-1 unbuffered ports.Ludovic Courtès1-1/+3
Discussed in <http://bugs.gnu.org/15368>. * libguile/ports.c (scm_c_read): Enter the 'swap_buffer' case when pt->encoding is "ISO-8859-1".
2013-10-03Fix edge case in 'ash'.Mark H Weaver2-4/+13
* libguile/numbers.c (left_shift_exact_integer): Fix edge case where N is -1 and count is SCM_I_FIXNUM_BIT-1 to return the most negative fixnum. Previously this result was returned as a bignum. * test-suite/tests/numbers.test (ash): Add tests.
2013-10-03Revert "Fix edge case in 'ash'."Mark H Weaver2-14/+5
This reverts commit 8df68898b9f6ba15171244f1f3549688f13d605f.
2013-10-03Deprecate scm_c_program_source, as it has no internal users.Andy Wingo4-10/+18
* libguile/programs.c: * libguile/programs.h: * libguile/deprecated.h: * libguile/deprecated.c (scm_c_program_source): Deprecate.
2013-10-03Fix edge case in 'ash'.Mark H Weaver2-5/+14
* libguile/numbers.c (scm_ash): Fix (ash -1 SCM_I_FIXNUM_BIT-1) to return a fixnum instead of a bignum. * test-suite/tests/numbers.test (ash): Add tests.
2013-09-30Fix minor mistakes in documentation.Mark H Weaver3-3/+3
Fixes <http://bugs.gnu.org/15487>. Reported by Josep Portella Florit <jpf@primfilat.com>. * doc/ref/api-i18n.texi (i18n Introduction, Text Collation, Internationalization, Internationalization): LC_MESSAGE --> LC_MESSAGES. * doc/ref/api-procedures.texi (Compiled Procedures): program-lambda-alist --> program-lambda-list. * THANKS: Fix alignment of Josep Portella Florit.
2013-09-13Fix truncated documentation for 'put-char'.Mark H Weaver2-0/+2
Fixes <http://bugs.gnu.org/15152>. Reported by Josep Portella Florit <jpf@primfilat.com>. * doc/ref/api-io.texi (R6RS Textual Output): Fix truncated docs for 'put-char'. * THANKS: Add Josep Portella Florit to fixes section.
2013-09-12Web: Use functional setters in extend-request and extend-response.Mark H Weaver2-14/+9
* module/web/client.scm (extend-request): * module/web/server.scm (extend-response): Reimplement using functional setters.
2013-09-12Web client+server: Add Content-Length header for empty bodies.Mark H Weaver2-2/+4
* module/web/client.scm (sanitize-request): Add a Content-Length header if a body if given, even if the body is empty. * module/web/server.scm (sanitize-response): Add a Content-Length header if a body if given, even if the body is empty.
2013-09-12Adapt srfi-9.test to error reporting improvements; update copyright dates.Mark H Weaver2-4/+9
* module/srfi/srfi-9.scm: Add 2013 copyright date. * test-suite/tests/srfi-9.test: Adapt to recent error reporting improvements to procedures defined by 'define-tagged-inlinable'.
2013-09-12Improve error reporting of procedures defined by define-inlinable.Mark H Weaver2-0/+4
* module/ice-9/boot-9.scm (define-inlinable): Improve error reporting when procedures defined using 'define-inlinable' are applied to the wrong number of arguments. * module/srfi/srfi-9.scm (define-tagged-inlinable): Improve error reporting when procedures defined using 'define-tagged-inlinable' are applied to the wrong number of arguments.
2013-09-10THANKS Alexandru CojocaruMark H Weaver1-0/+1
* THANKS: Add Alexandru Cojocaru to fixes section.
2013-09-10web client: HTTP methods are symbols, not strings.Mark H Weaver1-9/+9
* module/web/client.scm (request, http-get, http-head, http-post, http-put, http-delete, http-trace, http-options): HTTP methods are symbols.
2013-09-10Fix extend-request to preserve method and meta.Alexandru Cojocaru1-2/+5
* module/web/client.scm (extend-request): Preserve method and meta.
2013-09-09psyntax: cite the paper that psyntax is based on.Mark H Weaver1-0/+6
* module/ice-9/psyntax.scm: cite the paper.
2013-09-09Minor stylistic improvement to 'and-let*' macro.Mark H Weaver1-3/+1
* module/ice-9/and-let-star.scm (%and-let*): Use 'and' instead of 'if'. Suggested by Chris K. Jester-Young <cky944@gmail.com>.
2013-09-09Rewrite SRFI-2 'and-let*' using syntax-case.Mark H Weaver1-27/+27
* module/ice-9/and-let-star.scm (%and-let*): Helper macro. (and-let*): Reimplement using syntax-case.
2013-08-23Fix 'define-public' from (ice-9 curried-definitions).Mark H Weaver1-17/+10
* module/ice-9/curried-definitions.scm (cdefine, cdefine*): Simplify, and improve error reporting by making the patterns more strict. (define-public): Fix bug in generated 'export' form.
2013-08-19Improve error checking in 'define-public' and 'module-add!'.Mark H Weaver1-1/+3
* module/ice-9/boot-9.scm (module-add!): Check that the symbol argument is actually a symbol. (define-public): Expand into 'define' in such a way that curried definitions will immediately fail.
2013-08-19doc: `get-string-all' takes only one argument.Ian Price1-1/+1
* doc/ref/api-io.texi (R6RS Textual Input): Remove `count' argument.
2013-08-19`write-request-line' always prints a path component.Ian Price2-6/+7
* module/web/http.scm (write-request-line): Always write "/" when path is empty, regardless of query. * test-suite/tests/web-http.test ("write-request-line"): Add test.
2013-08-16Improved error checking in bytevector->uint-list and bytevector->sint-list.Mark H Weaver2-6/+12
Partially fixes <http://bugs.gnu.org/15100>. Reported by Göran Weinholt <goran@weinholt.se>. * libguile/bytevectors.c (INTEGERS_TO_LIST): Make sure SIZE isn't 0. Allow SIZE to be greater than the bytevector length, for consistency with allowing extra bytes at the end when the bytevector length is non-zero. Use scm_from_size_t instead of scm_from_uint. * test-suite/tests/bytevectors.test: Add tests. Remove a test that checks for an exception when SIZE is greater than the bytevector length.
2013-08-15Improve run-time error reporting in (ice-9 match).Mark H Weaver3-3/+7
* module/Makefile.am: match.go depends on match.upstream.scm. * module/ice-9/match.scm (error): Accept any number of arguments. * module/ice-9/match.upstream.scm (match-next): Call 'error' in non-tail context, and include the value that failed to match in the call.
2013-08-13Manual: clarify that 'append!' and 'reverse!' might not mutate.Mark H Weaver1-4/+4
* doc/ref/api-compound.texi (Append/Reverse): Clarify that 'append!' and 'reverse!' are not required to modify anything.
2013-08-13Manual: don't promise that 'append!' will modify the existing lists.Mark H Weaver1-1/+1
* doc/ref/api-compound.texi (Append/Reverse): Say that 'append!' *may* modify the given lists, but don't promise that it will.
2013-08-12Common numeric operations are left-to-right associative.Mark H Weaver1-23/+19
* module/language/tree-il/primitives.scm (define-primitive-expander): Use 'match-lambda*' instead of 'case-lambda' for pattern matching. (*primitive-expand-table*): In primitive expanders for '+', '*', '-', '/', 'logior', and 'logand', assume conventional left-to-right associativity.
2013-08-12Numerical comparisons are not negatable.Mark H Weaver1-2/+1
* module/language/tree-il/primitives.scm (*negatable-primitives*): Remove (< <= > >=) from the list of negatable primitives.
2013-08-11Broken Turkish UTF-8 locale still unresolved in FreeBSD 9.1.Mark H Weaver1-4/+6
* test-suite/tests/i18n.test (under-turkish-utf8-locale-or-unresolved): Disable tests of Turkish UTF-8 locale in FreeBSD 9.1.
2013-08-10Fix inappropriate uses of scm_syserror in numbers.c.Mark H Weaver1-4/+5
* libguile/numbers.c (mem2ureal, left_shift_exact_integer, floor_right_shift_exact_integer, round_right_shift_exact_integer): Use 'assert' instead of 'scm_syserror' to indicate a case that should never happen.
2013-08-09dereference-pointer: check for null pointer.Mark H Weaver2-1/+11
* libguile/foreign.c (scm_dereference_pointer): Check for attempts to dereference a null pointer. * test-suite/tests/foreign.test ("null pointer"): Add test.
2013-08-09Fix numerator and denominator handling of signed zeroes and infinities.Mark H Weaver4-72/+59
* libguile/numbers.c (scm_numerator, scm_denominator): Handle signed zeroes and infinities in accordance with the corresponding R6RS flonum procedures. * module/rnrs/arithmetic/flonums.scm (flnumerator, fldenominator): Remove special handling of infinities. * test-suite/tests/numbers.test (numerator, denominator): Add tests. Convert existing tests to use 'pass-if-equal'. * test-suite/tests/r6rs-arithmetic-flonums.test (flnumerator): Fix broken test of (flnumerator -0.0).
2013-08-07Decompiler: fix handling of empty 'case-lambda' expressions.Mark H Weaver1-1/+1
* module/language/scheme/decompile-tree-il.scm (choose-output-names): A <lambda> with no <lambda-case> decompiles into a 'case-lambda' primitive. Ensure that 'case-lambda' is not shadowed by a lexical.
2013-08-06Fix display of symbols containing backslashes.David Kastrup1-1/+2
Fixes <http://bugs.gnu.org/15033>. * libguile/print.c (print_extended_symbol): Double print backslashes. Signed-off-by: Mark H Weaver <mhw@netris.org>
2013-08-06Add files from 'copysign' and 'isfinite' Gnulib modules.Mark H Weaver10-0/+891
* lib/copysign.c: * lib/isfinite.c: * lib/isnanf-nolibm.h: * lib/isnanl-nolibm.h: * lib/signbitd.c: * lib/signbitf.c: * lib/signbitl.c: * m4/copysign.m4: * m4/isfinite.m4: * m4/signbit.m4: New files.
2013-08-06VM: ash: Use SCM_SRS and handle large right shift in fast path.Mark H Weaver1-6/+5
* libguile/vm-i-scheme.c (ash): Use SCM_SRS. Handle inum right shift by more than SCM_I_FIXNUM_BIT-1 bits in fast path.
2013-08-06Use Gnulib's 'isfinite' in numbers.c.Mark H Weaver1-15/+6
* libguile/numbers.c (DOUBLE_IS_FINITE, DOUBLE_IS_POSITIVE_INFINITY, DOUBLE_IS_NEGATIVE_INFINITY): Remove. (scm_odd_p, scm_even_p, scm_finite_p, icmplx2str, scm_rational_p, scm_inexact_to_exact): Use 'isfinite' instead of 'DOUBLE_IS_FINITE'.
2013-08-06Use Gnulib's 'copysign' in numbers.c.Mark H Weaver1-18/+10
* libguile/numbers.c (double_is_non_negative_zero): Remove. (idbl2str, scm_max, scm_min, scm_angle, log_of_shifted_double, scm_log10): Use 'copysign' to check signs of zeroes, instead of 'double_is_non_negative_zero'.
2013-08-06Import 'copysign' and 'isfinite' modules from Gnulib.Mark H Weaver3-2/+92
* lib/Makefile.am: * m4/gnulib-cache.m4: * m4/gnulib-comp.m4: Add 'copysign' and 'isfinite' Gnulib modules.
2013-08-04VM: ASM_ADD and ASM_SUB for x86: clobber _CX not "rcx".Mark H Weaver1-2/+2
* libguile/vm-i-scheme.c (ASM_ADD, ASM_SUB): Clobber _CX not "rcx".
2013-08-04VM: Define ASM_MUL on ARM only if SMULL instruction is supported.Mark H Weaver1-1/+17
* libguile/vm-i-scheme.c (ASM_MUL): Define only if the target architecture is known to implement the SMULL instruction.
2013-08-04VM: Implement ASM_ADD, ASM_SUB, and ASM_MUL for ARM processors.Mark H Weaver1-0/+46
* libguile/vm-i-scheme.c (ASM_ADD, ASM_SUB, ASM_MUL): Implement for ARM.
2013-08-03VM: Avoid untagging inums in 'logand' and 'logior'.Mark H Weaver1-2/+4
* libguile/vm-i-scheme.c (logand, logior): Avoid untagging.
2013-08-03VM: Add ASM_MUL for x86.Mark H Weaver1-3/+27
* libguile/vm-i-scheme.c (ASM_MUL): New macro. (mul): Use ASM_MUL if available.