Mark H Weaver [Fri, 26 Oct 2012 21:20:16 +0000 (17:20 -0400)]
Implement SRFI-105 curly infix expressions.
* libguile/private-options.h: Add SCM_CURLY_INFIX_P macro, and increment
SCM_N_READ_OPTIONS.
* libguile/read.c (sym_nfx, sym_bracket_list, sym_bracket_apply): New
variables.
(scm_read_opts): Add curly-infix reader option. Reformat to comply
with GNU coding standards.
(scm_t_read_opts): Add curly_infix_p and neoteric_p fields.
(init_read_options): Initialize new fields.
(CHAR_IS_DELIMITER): Add '{', '}', '[', and ']' as delimiters if
curly_infix_p is set.
(set_port_square_brackets_p, set_port_curly_infix_p): New functions.
(read_inner_expression): New function which contains the code that was
previously in 'scm_read_expression'. Handle curly braces when
curly_infix_p is set. If curly_infix_p is set and square_brackets_p
is unset, follow the Kawa convention: [...] => ($bracket-list$ ...)
(scm_read_expression): New function body to handle neoteric
expressions where appropriate.
(scm_read_shebang): Handle the new reader directives: '#!curly-infix'
and the non-standard '#!curly-infix-and-bracket-lists'.
(scm_read_sexp): Handle curly infix lists.
* module/ice-9/boot-9.scm (%cond-expand-features): Add srfi-105 feature
identifier.
* doc/ref/srfi-modules.texi (SRFI-105): Add stub doc for SRFI-105.
* doc/ref/api-evaluation.texi (Scheme Read): Add documentation for the
'curly-infix' read option, and the '#!curly-infix' and
'#!curly-infix-and-bracket-lists' reader directives.
* doc/ref/api-options.texi (Runtime Options): Add 'curly-infix' to the
list of read options.
* test-suite/Makefile.am: Add tests/srfi-105.test.
* test-suite/tests/srfi-105.test: New file.
Mark H Weaver [Wed, 24 Oct 2012 18:37:36 +0000 (14:37 -0400)]
Implement #!fold-case and #!no-fold-case reader directives.
* libguile/read.c (set_port_case_insensitive_p): New function.
(scm_read_shebang): Handle #!fold-case and #!no-fold-case.
* doc/ref/api-evaluation.texi (Case Sensitivity, Scheme Read): Document
the #!fold-case and #!no-fold-case reader directives.
* test-suite/tests/reader.test ("per-port-read-options"): Add tests.
Mark H Weaver [Tue, 23 Oct 2012 21:28:43 +0000 (17:28 -0400)]
Implement per-port read options.
* libguile/read.c (scm_t_read_opts): Update comment to mention the
per-port read options.
(sym_port_read_options): New variable.
(set_port_read_option): New function.
(init_read_options): Add new 'port' parameter, and consult the
per-port read option overrides when initializing the 'scm_t_read_opts'
struct. Move to bottom of file.
(scm_read): Pass 'port' parameter to init_read_options.
Mark H Weaver [Tue, 23 Oct 2012 04:36:12 +0000 (00:36 -0400)]
Repurpose scm_i_port_weak_hash to associate an alist with each port.
* libguile/ports.c (scm_i_port_weak_hash): Document that the values in
this hash table will now be alists. Previously the value slots were
unused.
(scm_new_port_table_entry): Change the initial value of the entry in
scm_i_port_weak_hash from SCM_BOOL_F to SCM_EOL.
Mark H Weaver [Tue, 23 Oct 2012 04:29:07 +0000 (00:29 -0400)]
Generalize scm_read_shebang to handle other reader directives.
* libguile/read.c (READER_DIRECTIVE_NAME_MAX_SIZE): New C macro.
(scm_read_shebang): Rewrite to handle arbitrary reader directives.
Mark H Weaver [Tue, 23 Oct 2012 04:21:12 +0000 (00:21 -0400)]
Add source properties to more datum types in scm_read_sharp_extension.
* libguile/read.c (scm_read_sharp_extension): Attach source properties
to the result of a custom token reader if the returned datum is not
immediate. Previously, source properties were added to pairs only.
Mark H Weaver [Tue, 23 Oct 2012 21:11:41 +0000 (17:11 -0400)]
Change reader to pass read options to helpers via explicit parameter.
* libguile/read.c (enum t_keyword_style, struct t_read_opts,
scm_t_read_opts): New types.
(init_read_options): New function.
(CHAR_IS_DELIMITER): Look up square-brackets option via local 'opts'.
(scm_read): Call 'init_read_options', and pass 'opts' to helpers.
(flush_ws, maybe_annotate_source, read_complete_token, read_token,
scm_read_bytevector, scm_read_character,
scm_read_commented_expression, scm_read_expression,
scm_read_guile_bit_vector, scm_read_keyword,
scm_read_mixed_case_symbol, scm_read_nil, scm_read_number,
scm_read_number_and_radix, scm_read_quote, scm_read_sexp,
scm_read_sharp, scm_read_sharp_extension, scm_read_shebang,
scm_read_srfi4_vector, scm_read_string, scm_read_syntax,
scm_read_vector, scm_read_array): Add 'opts' as an additional
parameter, and use it to look up read options. Previously the global
read options were consulted directly.
Mark H Weaver [Tue, 23 Oct 2012 03:28:56 +0000 (23:28 -0400)]
Minor tweaks to delimiter handling in read.c
* libguile/read.c (CHAR_IS_R5RS_DELIMITER, CHAR_IS_DELIMITER): Move the
'[' and ']' delimiters from CHAR_IS_R5RS_DELIMITER to
CHAR_IS_DELIMITER. Parenthesize all references to the macro
parameter. Don't check the global square-brackets read option until
after we know the character is '[' or ']'.
(scm_read_sexp): Don't check the global square-brackets read option
until after we know the character is ']'.
Mark H Weaver [Tue, 23 Oct 2012 03:23:45 +0000 (23:23 -0400)]
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'.
Ian Price [Wed, 19 Sep 2012 16:40:17 +0000 (17:40 +0100)]
Fix typo in scheme-using.texi
* doc/ref/scheme-using.texi (System Commands): Fix typo.
Ian Price [Wed, 19 Sep 2012 16:33:29 +0000 (17:33 +0100)]
Fix @@ usage in --listen option
* module/ice-9/command-line.scm (compile-shell-switches): Fix usage of
@@, which no longer supports arbitrary expressions, only identifiers.
Mark H Weaver [Sun, 14 Oct 2012 00:41:45 +0000 (20:41 -0400)]
Remove prototype for scm_read_token, which does not exist.
* libguile/read.h: Remove prototype for scm_read_token.
Mark H Weaver [Sun, 14 Oct 2012 00:28:27 +0000 (20:28 -0400)]
Improve formatting of options help given long option names
* module/ice-9/boot-9.scm (define-option-interface): When printing
options help, e.g. for (read-options 'help), expand the width of the
first column by another tab stop, to accommodate option names of up to
23 characters.
Ludovic Courtès [Sat, 13 Oct 2012 19:13:10 +0000 (21:13 +0200)]
web: Fix possible file descriptor leak in `open-socket-for-uri'.
* module/web/client.scm (open-socket-for-uri): Always close S in the
`system-error' handler.
Ludovic Courtès [Fri, 12 Oct 2012 21:09:44 +0000 (23:09 +0200)]
web: Pass `AI_NUMERICSERV' when given a port number.
* module/web/client.scm (open-socket-for-uri)[addresses]: Pass
AI_NUMERICSERV as the `getaddrinfo' hint when (uri-port URI) is true.
Ludovic Courtès [Fri, 12 Oct 2012 21:05:22 +0000 (23:05 +0200)]
web: Change `http-get' to try all the addresses for the given URI.
* module/web/client.scm (open-socket-for-uri): Try all the addresses
returned by `getaddrinfo' until one succeeds.
Ludovic Courtès [Fri, 12 Oct 2012 21:03:39 +0000 (23:03 +0200)]
Implement `hash' for structs.
* libguile/hash.c (scm_hasher): Call `scm_i_struct_hash' upon
`scm_tcs_struct'.
* libguile/struct.c (scm_i_struct_hash): New function.
* libguile/struct.h (scm_i_struct_hash): New declaration.
* test-suite/tests/structs.test ("hash"): New test prefix.
Mark H Weaver [Fri, 12 Oct 2012 12:26:34 +0000 (08:26 -0400)]
Thanks Daniel Hartwig.
* THANKS (Contributors since the last release): Add Daniel Hartwig.
Daniel Hartwig [Mon, 8 Oct 2012 10:35:00 +0000 (18:35 +0800)]
In string-split, add support for character sets and predicates.
* libguile/srfi-13.c (string-split): Add support for splitting on
character sets and predicates, like string-index and others.
* test-suite/tests/strings.test (string-split): Add tests covering
the new argument types.
* doc/ref/api-data.texi (string-split): Update.
Signed-off-by: Mark H Weaver <mhw@netris.org>
Mark H Weaver [Wed, 10 Oct 2012 17:13:19 +0000 (13:13 -0400)]
Revert "Preserve keyword identifier in 'syntax-rules' and 'define-syntax-rule'"
This reverts commit
3e3d32dd9b2d71ffb0703dedc4d47387e981c9b5.
Mark H Weaver [Mon, 8 Oct 2012 18:08:43 +0000 (14:08 -0400)]
Preserve keyword identifier in 'syntax-rules' and 'define-syntax-rule'
* module/ice-9/psyntax-pp.scm (syntax-rule, define-syntax-rule):
Preserve the keyword identifier.
* module/ice-9/psyntax-pp.scm: Regenerate.
Mark H Weaver [Mon, 8 Oct 2012 15:56:10 +0000 (11:56 -0400)]
Simplify calls to 'eqv?' when one argument is an immediate constant.
* module/language/tree-il/primitives.scm (maybe-simplify-to-eq): New
helper procedure shared by expanders for 'eqv?' and 'equal?'.
(*primitive-expand-table*): Add expansion rule for 'eqv?'.
* test-suite/tests/tree-il.test ("primitives"): Add tests.
Mark H Weaver [Mon, 8 Oct 2012 04:37:09 +0000 (00:37 -0400)]
Don't simplify 'equal?' to 'not' or 'null?'.
* module/language/tree-il/primitives.scm (*primitive-expand-table*):
Don't simplify 'equal?' to 'not' or 'null?', but only to 'eq?'.
* test-suite/tests/tree-il.test ("primitives"): Adjust tests.
Mark H Weaver [Mon, 8 Oct 2012 03:57:13 +0000 (23:57 -0400)]
Don't simplify 'equal?' to 'eq?' when constant is an *inexact* small integer.
* module/language/tree-il/primitives.scm (*primitive-expand-table*):
Refine test for fixnums to verify that the small integer is exact.
* test-suite/tests/tree-il.test ("primitives"): Add test.
Ludovic Courtès [Fri, 5 Oct 2012 23:24:46 +0000 (01:24 +0200)]
Simplify calls to `equal?' when one argument is a constant.
* module/language/tree-il/primitives.scm (*primitive-expand-table*): Add
expansion rules for `equal?', when called with one constant and
another argument.
* test-suite/tests/tree-il.test (pass-if-primitives-resolved): New
macro.
("primitives"): New test prefix.
Mark H Weaver [Sat, 6 Oct 2012 10:04:29 +0000 (06:04 -0400)]
Improve error reporting in 'append!'
* libguile/list.c (scm_append_x): Report correct argument number when
validating arguments. Validate that the last cdr of each argument is
null or nil. Rename formal rest argument from 'lists' to 'args'.
* test-suite/tests/list.test (append!): Update tests to expect correct
handling of improper lists.
Mark H Weaver [Thu, 4 Oct 2012 11:57:27 +0000 (07:57 -0400)]
Change inappropriate uses of expect-fail X to pass-if not X in chars.test
* test-suite/tests/chars.test (basic char handling): Change
inappropriate uses of 'expect-fail' to 'pass-if' with 'not' applied to
the test.
Chris K. Jester-Young [Sun, 16 Sep 2012 06:27:19 +0000 (02:27 -0400)]
In fold-matches, set regexp/notbol unless matching string start.
* module/ice-9/regex.scm (fold-matches): Set regexp/notbol if the
starting position is nonzero.
* test-suite/tests/regexp.test (fold-matches): Check that when
matching /^foo/ against "foofoofoofoo", only one match results.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Ludovic Courtès [Tue, 11 Sep 2012 21:44:59 +0000 (23:44 +0200)]
Don't stat(2) and access(2) the .go location before using it.
* module/system/base/compile.scm (ensure-directory): Rename to...
(ensure-directory): ... this. Update callers. When ERRNO is EEXIST,
assume DIR is a writable directory instead of calling `stat' and
`access?' again. Fixes UID/EUID mismatches for setuid binaries.
Reported by rixed@happyleptic.org at
<http://lists.gnu.org/archive/html/guile-user/2012-06/msg00023.html>.
Ludovic Courtès [Tue, 11 Sep 2012 21:39:32 +0000 (23:39 +0200)]
Rewrite SRFI-31 in terms of `syntax-rules'.
* module/srfi/srfi-31.scm: Use `#:export' instead of `#:export-syntax'.
(rec): Rewrite using `syntax-rules'.
* test-suite/tests/srfi-31.test ("rec special form"): Change exception
type to EXCEPTION:SYNTAX-PATTERN-UNMATCHED.
Ian Price [Thu, 6 Sep 2012 20:21:47 +0000 (21:21 +0100)]
Document (ice-9 curried definitions)
* doc/ref/Makefile.am (guile_TEXINFOS): Add curried.texi to list
* doc/ref/curried.texi: New file.
* doc/ref/guile.texi (Guile Modules): Add "Curried Definitions" to menu.
* doc/ref/scheme-ideas.texi (Lambda Alternatives): Refer to "Curried Definitions"
from the `define' section.
Ian Price [Tue, 4 Sep 2012 12:18:58 +0000 (13:18 +0100)]
`define-public' is no a longer curried definition by default.
* module/ice-9/boot-9.scm (define-public): Remove currying functionality.
* module/ice-9/curried-definitions.scm (define-public): New export.
Ludovic Courtès [Mon, 3 Sep 2012 20:40:46 +0000 (22:40 +0200)]
build: Fix race between installing `guild' and the `guile-tools' symlink.
Fixes <http://bugs.gnu.org/12015>.
Report and patch by Song.Li <Song.Li@windriver.com>.
* meta/Makefile.am (install-data-hook): Rename to...
(install-exec-hook): ... this.
Ludovic Courtès [Mon, 3 Sep 2012 20:35:33 +0000 (22:35 +0200)]
doc: Use scm_{to,from}_double instead of old API in example.
Fixed <http://bugs.gnu.org/12241>.
Reported by Kurt W. Gochko <kgochko@comcast.net>.
* doc/ref/tour.texi (Writing Guile Extensions): Change example to use
scm_{to,from}_double instead of the pre-1.8 API.
Ludovic Courtès [Mon, 3 Sep 2012 20:33:45 +0000 (22:33 +0200)]
build: Use Automake's `color-tests'.
* configure.ac: Use Automake's `color-tests'.
Ian Price [Tue, 21 Aug 2012 11:13:25 +0000 (12:13 +0100)]
ISO 8601 time format specifies zero padding for hours, not blank padding.
* doc/ref/srfi-modules.texi ("SRFI-19 Date to string"): Fix iso 8601 format strings.
* module/srfi/srfi-19.scm (directives): Fix iso 8601 format strings.
Ludovic Courtès [Sun, 26 Aug 2012 22:09:30 +0000 (00:09 +0200)]
doc: Fix description of regexp/locale encoding interaction.
* doc/ref/api-regex.texi (Regexp Functions): Update paragraph that
mentions locale encoding and strings-as-bytes.
* test-suite/tests/regexp.test ("nonascii locales")["match structures
refer to char offsets, non-ASCII pattern"]: New test.
Ludovic Courtès [Sun, 26 Aug 2012 21:42:09 +0000 (23:42 +0200)]
Update `texinfo.test' to match latest change.
* test-suite/tests/texinfo.test ("test-texinfo->stexinfo")["@url{arg}"]:
Update test as a follow-up to
dc7a9cefbf5434b6e7e503fe83faa07b24a1a6cd ("more robust texinfo alias
handling").
Ian Price [Mon, 20 Aug 2012 22:12:23 +0000 (23:12 +0100)]
Fix uri-encoding for strings with no unreserved chars
* module/web/uri.scm (uri-encode): Change test to check for unreserved
chars instead of reserved chars.
* test-suite/tests/web-uri.test ("encode"): Add test.
Ian Price [Mon, 20 Aug 2012 22:03:38 +0000 (23:03 +0100)]
Fix uri-encoding for octets 0-15
* module/web/uri.scm (uri-encode): All encoded octets should be of the
form % HEXDIGIT HEXDIGIT.
* test-suite/tests/web-uri.test ("encode"): Add test.
Andy Wingo [Sat, 25 Aug 2012 09:52:44 +0000 (11:52 +0200)]
more robust texinfo alias handling
* module/texinfo.scm (command-spec): Resolve aliases here.
(complete-start-command, make-command-parser):
(make-dom-parser, parse-environment-args): Reload command after
resolving spec, so we get the alias target.
Ludovic Courtès [Mon, 20 Aug 2012 22:36:50 +0000 (00:36 +0200)]
Micro-optimize (ice-9 format).
* module/ice-9/format.scm (format): Use `call-with-output-string'
instead of `with-output-to-string'.
Ludovic Courtès [Mon, 20 Aug 2012 21:38:21 +0000 (23:38 +0200)]
Optimize `scm_lfwrite_substr', used by `scm_simple_format'.
Fixes <http://bugs.gnu.org/12033>.
Reported by nalaginrut <nalaginrut@gmail.com>.
* libguile/print.c (scm_i_display_substring): New function.
* libguile/print.h (scm_i_display_substring): New internal declaration.
* libguile/ports.c (scm_lfwrite_substr): Use it instead of `scm_display'
+ `scm_c_substring'.
Andy Wingo [Fri, 17 Aug 2012 14:41:27 +0000 (16:41 +0200)]
reinstate type check to scm_to_utf8_stringn
* libguile/strings.c (scm_to_utf8_stringn): Re-add missing type check,
inadvertantly removed in
e3d4597469a543d97c4997b128509c2ceb13ca2b.
Mark H Weaver [Tue, 7 Aug 2012 22:14:32 +0000 (18:14 -0400)]
Revert "Add tests for 'exp' and 'expt' that should produce complex NaNs"
This reverts commit
cc26b9de1d3c21cb4be49cc61c4b5872b8f607c5.
Mark H Weaver [Tue, 7 Aug 2012 22:13:48 +0000 (18:13 -0400)]
Revert "Avoid cexp, whose C standard definition is mathematically incorrect"
This reverts commit
ecbded71bb423a6055c541d6272796aefd1486f9.
Mark H Weaver [Wed, 1 Aug 2012 02:52:17 +0000 (22:52 -0400)]
Avoid cexp, whose C standard definition is mathematically incorrect
* libguile/numbers.c (scm_exp): Do not use cexp.
Mark H Weaver [Sat, 28 Jul 2012 17:07:38 +0000 (13:07 -0400)]
Add tests for 'exp' and 'expt' that should produce complex NaNs
* test-suite/tests/numbers.test (exp, expt): Add tests that should
produce complex NaNs, but apparently don't on all systems.
Andy Wingo [Sat, 28 Jul 2012 10:28:21 +0000 (12:28 +0200)]
set struct names for <standard-vtable>, etc
* libguile/struct.c (scm_init_struct): Set the struct names for
<standard-vtable>, <applicable-struct-vtable>, and
<applicable-struct-with-setter-vtable>.
Andy Wingo [Sat, 28 Jul 2012 10:58:46 +0000 (12:58 +0200)]
update tests after vtable-vtable deprecation
* test-suite/tests/goops.test ("classes for built-in types"): Use a
vtable instead of a vtable-vtable.
* test-suite/tests/structs.test (ball-root)
("low-level struct procedures", "make-struct"): Rework to use normal
vtables instead of making new vtable-vtable.
Andy Wingo [Fri, 18 Nov 2011 10:50:50 +0000 (11:50 +0100)]
deprecate make-vtable-vtable
* libguile/struct.h:
* libguile/struct.c (scm_make_vtable_vtable): Deprecate, as you can
handle most of the use cases with make-vtable, and we don't want to
promote the creation of new roots to the type hierarchy.
(scm_i_make_vtable_vtable): The internal replacement.
Andy Wingo [Sat, 28 Jul 2012 10:43:46 +0000 (12:43 +0200)]
improve documentation for structs
* doc/ref/api-compound.texi (Structures): Update to describe
<standard-vtable>, to remove documentation for make-vtable-vtable, to
describe meta-vtables, and to add a long example.
Andy Wingo [Tue, 24 Jul 2012 21:18:33 +0000 (23:18 +0200)]
update structure documentation
* doc/ref/api-compound.texi (Records): Add a link to SRFI-9 records.
(Structures): Add a link to Records. Describe tail arrays as
deprecated, and add a rationale and some details.
Mark H Weaver [Sat, 28 Jul 2012 06:45:05 +0000 (02:45 -0400)]
Angle of -0.0 is pi, not zero
* libguile/numbers.c (scm_angle): Check the sign of an inexact real
zero, to ensure that (angle -0.0) => pi and (angle 0.0) => 0.0.
* test-suite/tests/numbers.test (angle): Add tests, and increase
precision of tests where the angle should be pi.
Noah Lavine [Sat, 30 Jun 2012 12:42:44 +0000 (08:42 -0400)]
Document (ice-9 and-let-star)
* doc/ref/srfi-modules.texi: note that (srfi srfi-2) is the same as
(ice-9 and-let-star).
Ludovic Courtès [Sat, 7 Jul 2012 09:41:39 +0000 (11:41 +0200)]
build: Use `AM_PROG_AR'.
* configure.ac: Use `AM_PROG_AR', as suggested by Automake
1.12.1 ("warning: 'libguilereadline-v-@LIBGUILEREADLINE_MAJOR@.la':
linking libtool libraries using a non-POSIX archiver requires
'AM_PROG_AR' in 'configure.ac'").
Ludovic Courtès [Sat, 7 Jul 2012 09:32:38 +0000 (11:32 +0200)]
Fix typos in `NEWS'.
* NEWS: Fix typos.
Ludovic Courtès [Sat, 7 Jul 2012 09:29:38 +0000 (11:29 +0200)]
Bump version number for 2.0.6.
* GUILE-VERSION (GUILE_MICRO_VERSION): Increment.
(LIBGUILE_INTERFACE_CURRENT): Increment, to account for new C
functions like `scm_c_nvalues', `scm_to_pointer', etc.
(LIBGUILE_INTERFACE_AGE): Increment.
Ludovic Courtès [Sat, 7 Jul 2012 09:10:49 +0000 (11:10 +0200)]
Store the `git-version-gen' patch.
* gnulib-local/build-aux/git-version-gen.diff: New file.
* Makefile.am (EXTRA_DIST): Add it.
Ludovic Courtès [Fri, 6 Jul 2012 23:52:45 +0000 (01:52 +0200)]
Work around `gl_CANONICALIZE_LGPL' bug when cross-compiling to GNU/Hurd.
* gnulib-local/m4/canonicalize.m4.diff: New file.
* Makefile.am (EXTRA_DIST): Add it.
Ludovic Courtès [Fri, 6 Jul 2012 23:36:08 +0000 (01:36 +0200)]
Work around `gl_CANONICALIZE_LGPL' bug when cross-compiling.
* gnulib-local/m4/canonicalize.m4.diff: New file.
* Makefile.am (EXTRA_DIST): Add it.
Ludovic Courtès [Fri, 6 Jul 2012 22:20:20 +0000 (00:20 +0200)]
Add missing `m4/clock_time.m4'.
Ludovic Courtès [Fri, 6 Jul 2012 21:56:05 +0000 (23:56 +0200)]
Use `clock-time' directly from Gnulib, but with a local patch.
This is equivalent to the previous situation, but more easily
maintainable.
* acinclude.m4 (gl_CLOCK_TIME): Remove.
* configure.ac: Remove explicit use of `gl_CLOCK_TIME'.
* m4/gnulib-cache.m4 (gl_MODULES): Add `clock-time'.
* gnulib-local/m4/clock_time.m4.diff: New file.
* Makefile.am (EXTRA_DIST): Add it.
Ludovic Courtès [Fri, 6 Jul 2012 21:25:57 +0000 (23:25 +0200)]
Update Gnulib to
v0.0-7509-g98a2286.
* Makefile.am (EXTRA_DIST): Add `m4/gnulib-cache.m4'.
* build-aux/git-version-gen: Keep unchanged.
Andy Wingo [Fri, 6 Jul 2012 20:24:25 +0000 (22:24 +0200)]
add http/1.1 transfer codings to the NEWS
* doc/ref/web.texi (Transfer Codings): Add a note about modules.
* NEWS: Add NEWS for transfer codings.
Ian Price [Mon, 7 May 2012 23:18:59 +0000 (00:18 +0100)]
Document and export `declare-opaque-header!'
* module/web/http.scm (declare-opaque-header!): Add docstring. New export.
* doc/ref/web.texi (HTTP): Add documentation.
Ian Price [Mon, 7 May 2012 23:06:01 +0000 (00:06 +0100)]
Add HTTP Chunked Encoding support to web modules.
* doc/ref/web.texi(Transfer Codings): New subsection for transfer codings.
* module/web/http.scm(make-chunked-input-port,
make-chunked-output-port): New procedures.
* module/web/response.scm (read-response-body): Handle chunked responses.
* test-suite/tests/web-response.test: Add test.
* test-suite/tests/web-http.test: Add tests.
afd
Mark H Weaver [Thu, 8 Mar 2012 06:24:25 +0000 (01:24 -0500)]
Fix @ and @@ to not capture lexicals; new @@ @@ form for R6RS libraries
* module/ice-9/psyntax.scm (@): Return top-wrap instead of the wrap
applied to the '@' form, so that the symbol will be interpreted as a
top-level identifier and never refer to any lexical variable.
(@@): Change the syntax used to support R6RS 'library' forms to:
(@@ @@ (mod ...) body). Change the behavior of the documented
(@@ (mod ...) id) form to be the same as that of @, except for the use
of 'private' instead of 'public' in the psyntax mod: use syntax->datum
on the identifier, and return top-wrap instead of the wrap applied to
the '@@' form.
This fixes <http://bugs.gnu.org/10756> reported by Ludovic Courtès.
* module/ice-9/psyntax-pp.scm: Regenerate.
* module/ice-9/r6rs-libraries.scm (library): Use '@@ @@' syntax instead
of the older '@@' syntax.
* test-suite/tests/syncase.test (changes to expansion environment): Use
'@@ @@' syntax.
* module/Makefile.am: Add explicit dependencies for boot-9.go on the
files that it includes: quasisyntax.scm and r6rs-libraries.scm.
Andy Wingo [Fri, 18 Nov 2011 10:35:07 +0000 (11:35 +0100)]
simplify %condition-type-vtable
* module/srfi/srfi-35.scm (%condition-type-vtable): Use make-vtable
instead of make-vtable-vtable.
Andy Wingo [Fri, 18 Nov 2011 10:32:24 +0000 (11:32 +0100)]
record-type-vtable is not a new root of the vtable hierarchy
* module/ice-9/boot-9.scm (record-type-vtable): Simplify to use
make-vtable instead of make-vtable-vtable.
Andy Wingo [Fri, 18 Nov 2011 10:31:52 +0000 (11:31 +0100)]
Scheme standard-vtable-fields binding
* libguile/struct.c (scm_init_struct): Export standard-vtable-fields to
Scheme.
Andy Wingo [Fri, 18 Nov 2011 10:15:43 +0000 (11:15 +0100)]
add Scheme binding for scm_standard_vtable_vtable
* libguile/struct.c (scm_init_struct): Export <standard-vtable> to
Scheme.
Andy Wingo [Fri, 18 Nov 2011 09:50:35 +0000 (10:50 +0100)]
simplify scm_init_print
* libguile/print.c (scm_init_print): Simplify creation of print-state
vtable.
Andy Wingo [Fri, 6 Jul 2012 16:12:59 +0000 (18:12 +0200)]
deprecate struct-vtable-tag
* libguile/deprecated.c:
* libguile/deprecated.h:
* libguile/struct.c:
* libguile/struct.h:
* doc/ref/api-compound.texi: Deprecate struct-vtable-tag.
Andy Wingo [Fri, 6 Jul 2012 15:45:23 +0000 (17:45 +0200)]
disable some uri tests if --disable-networking
* test-suite/tests/web-uri.test: Disable some tests if we don't have
inet-pton.
Andy Wingo [Fri, 6 Jul 2012 14:13:57 +0000 (16:13 +0200)]
add --match pattern to git-version-gen
* configure.ac: Add --match pattern so we only get v2.0.x tagx.
Andy Wingo [Fri, 6 Jul 2012 13:51:05 +0000 (15:51 +0200)]
git-version-gen: add --match argument
* build-aux/git-version-gen (Options): Add --match argument.
(v_from_git): Remove path without --match.
Andy Wingo [Fri, 6 Jul 2012 13:17:07 +0000 (15:17 +0200)]
update git-version-gen from gnulib
* build-aux/git-version-gen: Import from gnulib.
Daniel Krueger [Wed, 28 Mar 2012 16:25:15 +0000 (18:25 +0200)]
fixed repl command ,describe to also handle syntax
Dagobert Michelsen [Mon, 6 Feb 2012 08:45:41 +0000 (09:45 +0100)]
Add alignment for Sun Studio 12
Andy Wingo [Fri, 6 Jul 2012 11:13:19 +0000 (13:13 +0200)]
more uri-related ipv6 fixes
* module/web/uri.scm (ipv6-regexp): IPv6 numeric addresses do not have
brackets. It's only in URIs that they have them.
(ipv6-host-pat, authority-regexp, parse-authority): Refactor ipv6
detection to fix a bug with |, and to extract IPv6 hosts from their
brackets. This way we can pass the uri-host directly to inet-pton.
(uri->string): If the host contains a `:', assume it is ipv6 and add
brackets.
* test-suite/tests/web-uri.test ("build-uri"): Adapt tests to assume
that the address returned by uri-host and passed to build-uri #:host
does not have brackets.
Daniel Hartwig [Fri, 30 Dec 2011 16:16:42 +0000 (00:16 +0800)]
enhance IPv6 support
* module/web/uri.scm (valid-host?): Support dotted-quad notation
in IPv6 addresses.
(parse-authority): Support IPv6 literals.
* test-suite/tests/web-uri.test: Add and fix tests.
Daniel Hartwig [Fri, 30 Dec 2011 09:49:37 +0000 (17:49 +0800)]
support URIs with domain names starting with numbers
* module/web/uri.scm (valid-host?): Fix regexp to support
domain names starting with numbers.
* test-suite/tests/web-uri.scm: Add tests for above and
IP literals.
Andy Wingo [Fri, 6 Jul 2012 10:23:39 +0000 (12:23 +0200)]
fix typo in web.texi
* doc/ref/web.texi (HTTP Headers): Fix typo in example. Fixes
http://bugs.gnu.org/10890.
Andy Wingo [Fri, 6 Jul 2012 10:19:12 +0000 (12:19 +0200)]
better procedure-arguments for interpreted procs with opt, rest, kwargs
* module/ice-9/session.scm (procedure-arguments): Arrange to interpret
numbers in the "req" and "opt" positions of an 'arglist as N arguments
with unknown name.
* module/ice-9/eval.scm (primitive-eval): Set 'arglist on "complex"
procedures. Fixes http://bugs.gnu.org/10922.
* test-suite/tests/session.test ("procedure-arguments"): Add a test.
Andy Wingo [Fri, 6 Jul 2012 09:01:51 +0000 (11:01 +0200)]
add check for fchmod
* configure.ac: Add a check for fchmod.
* libguile/filesys.c (scm_chmod): Guard the fchmod case with
HAVE_FCHMOD.
Andy Wingo [Fri, 6 Jul 2012 08:56:02 +0000 (10:56 +0200)]
remove mkdir alias in filesys.c for mingw
* libguile/filesys.c (mkdir): Remove alias, as gnulib handles this for
us.
Andy Wingo [Fri, 6 Jul 2012 08:50:31 +0000 (10:50 +0200)]
fix warnings in mingw in expand.c
* libguile/expand.c (VOID_, CONST_): Add trailing underscores to avoid
name conflicts on MinGW.
Andy Wingo [Fri, 6 Jul 2012 08:43:29 +0000 (10:43 +0200)]
fix warning about vsnprintf on mingw
* libguile/deprecation.c: Remove a vsnprintf alias for mingw, now that
gnulib handles it correctly.
Andy Wingo [Fri, 6 Jul 2012 08:43:02 +0000 (10:43 +0200)]
be sure to include time.h for struct timespec
* libguile/gen-scmconfig.c: The GNU libc manual says that struct
timespec is defined in time.h. So, just include both sys/time.h and
time.h, if they are available.
Andy Wingo [Thu, 5 Jul 2012 21:26:38 +0000 (23:26 +0200)]
fix `vector' instruction emission for big vectors
* module/language/glil/compile-assembly.scm (dump-constants): Only use
the `vector' instruction for vectors whose length can fit in 16 bits.
Fixes http://bugs.gnu.org/11087.
Andy Wingo [Thu, 5 Jul 2012 18:40:56 +0000 (20:40 +0200)]
fix-letrec uses effects.scm for effects analysis
* module/language/tree-il/fix-letrec.scm: Use effects.scm for effects
analysis, instead of primitives.scm.
(simple-expression?, partition-vars): Adapt.
Andy Wingo [Thu, 5 Jul 2012 18:39:16 +0000 (20:39 +0200)]
simplify one kind of degenerate prompt
* module/language/tree-il/peval.scm (<operand>): Instead of having a
`residualize?' field, have it be a use count.
(peval): Adapt to <operand> change. Add function to kill uses of an
operand. Use it in the <prompt> inliner. Add another kind of
degenerate prompt to elide. We should really switch to CPS though, as
that will allow us to contify more aggressively.
* test-suite/tests/peval.test ("partial evaluation"): Adapt (while #t
#t) test, which was sensitive to how far the recursive inlining got.
Add a test for the degenerate prompt elision.
Andy Wingo [Thu, 5 Jul 2012 18:34:28 +0000 (20:34 +0200)]
fix bugs in effects analysis of "effect+exception-free-primitives"
* module/language/tree-il/effects.scm (make-effects-analyzer): Be more
precise regarding the effects of the so-called
effect+exception-free-primitives: now we check their arities.
* test-suite/tests/cse.test ("cse"): Add a test that we don't
elide (cons 1 2 3) in effect context.
Andy Wingo [Thu, 5 Jul 2012 18:30:18 +0000 (20:30 +0200)]
optimize (apply foo 0 (list 1 2)) => (foo 0 1 2)
* module/language/tree-il/peval.scm (peval): Inline applications where
we know the contents of the tail.
* test-suite/tests/peval.test ("partial evaluation"): Add tests.
Andy Wingo [Thu, 5 Jul 2012 09:06:29 +0000 (11:06 +0200)]
compile ecmascript's `return' as an abort
* module/language/ecmascript/compile-tree-il.scm (current-return-tag):
(with-return-prompt, comp): Compile `return' as an abort instead of a
primcall to `return'. Fixes beta-reduction by the optimizer -- it
doesn't make sense for `return' to move from one function to another!
Andy Wingo [Thu, 5 Jul 2012 08:15:02 +0000 (10:15 +0200)]
fix goops compilation when current language is not scheme
* module/oop/goops/dispatch.scm (compute-dispatch-procedure): Set source
language to Scheme, not (current-language).
Andy Wingo [Wed, 4 Jul 2012 15:54:57 +0000 (17:54 +0200)]
add scm_c_nvalues to news
* NEWS: Add scm_c_nvalues.
Andy Wingo [Wed, 4 Jul 2012 15:48:06 +0000 (17:48 +0200)]
add scm_c_nvalues with docs; also, docs for scm_c_values
* libguile/values.h:
* libguile/values.c (scm_c_nvalues): New function.
* doc/ref/api-control.texi (Multiple Values): Add docs for scm_c_values
and scm_c_nvalues.
Fixes http://bugs.gnu.org/11764.
Andy Wingo [Wed, 4 Jul 2012 15:43:53 +0000 (17:43 +0200)]
add scm_{to,from}_pointer docs
* doc/ref/api-foreign.texi: Add documentation for scm_to_pointer and
scm_from_pointer.