Andy Wingo [Thu, 3 Mar 2011 10:29:27 +0000 (11:29 +0100)]
more module-use-interfaces! tweaks
* module/ice-9/boot-9.scm (module-use-interfaces!): Fix up to prevent
duplication in the use list of multiple incoming interfaces.
* test-suite/tests/modules.test ("module-use"): Add tests.
Andreas Rottmann [Thu, 3 Mar 2011 10:09:54 +0000 (11:09 +0100)]
Use module identity to filter for existing modules
This fixes a problem with R6RS's `import' in particuliar: when importing
a subset of a library/module, the interface created for that purpose
inherits the name of the module it is derived from. The low-level
primitives that are used for importing would then disregard earlier
imports from the same module.
An example for this bug can be seen with the following library
definition:
(library (test-guile2)
(export foo)
(import (only (rnrs base) define)
(only (rnrs base) error))
(define (foo . args)
#t))
In the above, the import of `define' would be disregarded when `error'
is imported, thus leading to a syntax error, since `(foo . args)' is
treated as an application, since the binding of `define' would be not
present.
* module/ice-9/boot-9.scm (module-use!): Remove the filtering of the
existing imports of the module by name; a check for identity is
already done beforehand.
(module-use-interfaces!): Filter the existing imports by identity
instead of filtering them by their names.
Ludovic Courtès [Wed, 2 Mar 2011 23:13:30 +0000 (00:13 +0100)]
Remove extra comma after `SCM_ARRAY_ELEMENT_TYPE_LAST'.
* libguile/array-handle.h (scm_t_array_element_type): Remove extra comma
after last element. Reported by David Fang <fang@csl.cornell.edu>.
Indent.
Ludovic Courtès [Wed, 2 Mar 2011 21:12:56 +0000 (22:12 +0100)]
Improve the documentation for `dynamic-link'.
* doc/ref/api-foreign.texi (Foreign Libraries): Make it clear that the
LIBRARY argument of `dynamic-link' should not contain an extension.
(Foreign Functions): Add cross-reference from `load-extension' to
`dynamic-link'. Typeset file names and module names correctly.
Mark H Weaver [Wed, 2 Mar 2011 11:02:58 +0000 (06:02 -0500)]
Portability fixes for popen.test (for when /bin/sh is not bash)
* test-suite/tests/popen.test (open-input-pipe no-duplicate): Pass
"read REPLY" command instead of "read" to the subshell, for improved
portability. In particular, it is needed when /bin/sh is dash.
(open-output-pipe no-duplicate): Pass "exec guile [...]" instead of
"guile [...]" to the subshell, to ensure that the subshell will not
run guile as a subprocess while holding a duplicate of STDIN, which
would cause this test to fail. This is needed when /bin/sh is dash.
Ludovic Courtès [Mon, 28 Feb 2011 22:33:47 +0000 (23:33 +0100)]
Have `read' update line/column numbers when reading SCSH block comments.
* libguile/read.c (scm_read_scsh_block_comment): Use `scm_getc' instead
of `scm_get_byte_or_eof'.
* test-suite/tests/reader.test ("read-options")["position of SCSH block
comment"]: New test.
Andy Wingo [Mon, 28 Feb 2011 19:53:40 +0000 (20:53 +0100)]
update port-filename docs
* doc/ref/api-io.texi (File Ports):
* libguile/ports.c (scm_port_filename): Fix docs to match
implementation.
Ludovic Courtès [Sun, 27 Feb 2011 23:40:45 +0000 (00:40 +0100)]
Link stand-alone tests against libgc.
Reported by Andreas Rottmann <a.rottmann@gmx.at>.
* test-suite/standalone/Makefile.am (LIBGUILE_LDADD): New variable.
(test_num2integral_LDADD, test_round_LDADD, libtest_asmobs_la_LIBADD,
libtest_ffi_la_LIBADD, test_list_LDADD, test_unwind_LDADD,
test_conversion_LDADD, test_loose_ends_LDADD, test_scm_c_read_LDADD,
test_scm_take_locale_symbol_LDADD, test_scm_take_u8vector_LDADD,
libtest_extensions_la_LIBADD, test_with_guile_module_LDADD,
test_scm_with_guile_LDADD): Use it.
Ludovic Courtès [Sun, 27 Feb 2011 23:21:48 +0000 (00:21 +0100)]
Strip any CPPFLAGS other than `-I' from `guile-2.0.pc'.
* configure.ac: Strip anything beyond `-I' from $GUILE_CFLAGS so that
`guile-2.0.pc' does not export them to the user. Reported and fixed
by Bruno Haible <bruno@clisp.org>.
Andy Wingo [Sun, 27 Feb 2011 22:26:08 +0000 (23:26 +0100)]
flush all input on a read error
* module/system/repl/repl.scm (flush-all-input): New helper.
(prompting-meta-read): Flush all input on a read error, as we could be
within some expression or a string or something.
Andy Wingo [Sun, 27 Feb 2011 22:15:13 +0000 (23:15 +0100)]
scm-error-printer resilience
* module/ice-9/boot-9.scm (scm-error-printer): Allow #f for rest args,
interpreting it as '(). Fixes regexp throws, which are of the form:
(regular-expression-syntax "make-regexp" "Invalid preceding regular expression" #f ("?.*"))
Andy Wingo [Sun, 27 Feb 2011 12:07:04 +0000 (13:07 +0100)]
update R6RS incompatibilities
* doc/ref/r6rs.texi (R6RS Incompatibilities): Update.
Andy Wingo [Sun, 27 Feb 2011 11:59:44 +0000 (12:59 +0100)]
regenerate psyntax-pp
* module/ice-9/psyntax-pp.scm: Regenerate.
Andy Wingo [Sun, 27 Feb 2011 11:58:54 +0000 (12:58 +0100)]
add syncase test
* test-suite/tests/syncase.test ("top-level expansions"): New test.
Andy Wingo [Sun, 27 Feb 2011 11:48:23 +0000 (12:48 +0100)]
chi-top-sequence defines macros before expanding other exps
* module/ice-9/psyntax.scm (chi-top-sequence): Manually inline
eval-if-c&e into its two call sites; I found it hard to understand
otherwise. If the mode is just 'e, defer expansion of definitions and
expressions until the end, so that they can be expanded in a context
of all syntax expanders defined in the sequence.
Andy Wingo [Sun, 27 Feb 2011 11:07:48 +0000 (12:07 +0100)]
psyntax: fold chi-top-sequence into chi-top
* module/ice-9/psyntax.scm (chi-top-sequence): Pull chi-top into the
body of this toplevel begin expander. This will let us do r6rs
toplevel expansion correctly.
(chi-top): Remove.
(macroexpand): Dispatch to chi-top-sequence directly.
Ludovic Courtès [Fri, 25 Feb 2011 13:54:36 +0000 (14:54 +0100)]
Fix `gc-profile.scm'.
* gc-benchmarks/gc-profile.scm (memory-mappings)[mapping-line-rx]: Fix
and give an example.
(total-heap-size): Fix docstring.
Andy Wingo [Fri, 25 Feb 2011 09:48:35 +0000 (10:48 +0100)]
make-weak-key-hash-table vacuuming
* libguile/hashtab.c (scm_make_weak_key_hash_table): Whoops, fix the
case I actually cared about.
Ludovic Courtès [Thu, 24 Feb 2011 22:17:23 +0000 (23:17 +0100)]
Revert ""latin1" -> "Latin-1"."
This reverts commit
c2c550ca9d2442d070f79ed8bacb8db173c72df3.
The name "latin1" is standardized by IANA, unlike the other one.
Reported by Bruno Haible.
Ludovic Courtès [Thu, 24 Feb 2011 22:17:06 +0000 (23:17 +0100)]
Make `locale-digit-grouping' more robust.
* libguile/i18n.c (scm_nl_langinfo)[GROUPING]: Consider negative numbers
like `CHAR_MAX'. Reported by David Fang <fang@csl.cornell.edu>.
Fix suggested by Bruno Haible <bruno@clisp.org>.
Ludovic Courtès [Thu, 24 Feb 2011 22:13:54 +0000 (23:13 +0100)]
Fix README.
* README: Remove mention of an alpha release. Reported by
Mark H. Weaver.
Andy Wingo [Thu, 24 Feb 2011 16:00:30 +0000 (17:00 +0100)]
weak hash tables vacuum stale entries after a gc
* libguile/hashtab.c (scm_c_register_weak_gc_callback): New private
helper, arranges for a C function to be called with a SCM as an
argument, as long as the argument is reachable by GC.
(scm_make_weak_key_hash_table)
(scm_make_weak_value_hash_table)
(scm_make_doubly_weak_hash_table): Register a weak GC callback to
vacuum_weak_hash_table.
Andy Wingo [Thu, 24 Feb 2011 15:30:08 +0000 (16:30 +0100)]
re-enable the after-gc-hook
* libguile/gc.c (scm_gc): No need to take a mutex here. Don't run the
hook, the hook will run itself.
(scm_c_register_gc_callback): New private helper, registers a callback
the next time GC happens.
(system_gc_callback): Guile's internal callback that runs
scm_after_gc_c_hook, which itself queues a call to the after-gc-hook.
(scm_storage_prehistory): Queue up a call to system_gc_callback.
Andy Wingo [Thu, 24 Feb 2011 12:12:58 +0000 (13:12 +0100)]
pointerless backing buffers for string ports
* libguile/strports.c (scm_mkstrport): String port string buffer
allocated atomically.
Andy Wingo [Thu, 24 Feb 2011 12:10:16 +0000 (13:10 +0100)]
errno saving in display_string
* libguile/print.c (display_string): Fix a case in which perhaps `errno'
could have been stompled.
Andy Wingo [Thu, 24 Feb 2011 10:10:19 +0000 (11:10 +0100)]
web server more assiduous about closing ports
* module/web/uri.scm:
* module/web/server.scm (call-with-output-string*):
(call-with-output-bytevector*): Local procs to output to strings or
bytevectors, *and then close the port*. We can't make this change in
call-with-output-string because it would be incompatible.
* module/web/uri.scm (call-with-encoded-output-string, decode-string)
(uri-decode)
* module/web/server.scm (call-with-encoded-output-string): Use the new
helpers.
Andy Wingo [Wed, 23 Feb 2011 20:04:26 +0000 (21:04 +0100)]
open-pipe* pumps pipes guardian
* module/ice-9/popen.scm (open-pipe*): Hack around the lack of an
after-gc hook, and pump the pipes guardian here in the procedure that
adds to the guardian.
Andy Wingo [Wed, 23 Feb 2011 10:59:38 +0000 (11:59 +0100)]
GC dead links in weak hash tables before a possible rehash
* libguile/hashtab.c (vacuum_weak_hash_table): New helper, goes through
the entirety of a weak hash table, vacuuming dead entries.
(scm_hash_fn_create_handle_x): If when adding to a weak hash table, we
would trigger a rehash, vacuum the table first. The weak_bucket_assoc
would have only caught dead entries within one bucket.
Without this patch, the following code leaks:
(let lp ()
(call-with-output-string
(lambda (port)
(display "foo" port)))
(lp))
Mark H Weaver [Wed, 16 Feb 2011 00:29:41 +0000 (19:29 -0500)]
Portability fix for new log and log10
* libguile/numbers.c: Define M_LN2 if it's not already defined.
Fix error in comment.
Ludovic Courtès [Mon, 21 Feb 2011 23:32:00 +0000 (00:32 +0100)]
Fix a bug in `vhash-delete'.
* module/ice-9/vlist.scm (vhash-delete): Honor HASH.
* test-suite/tests/vlist.test ("vhash")["vhash-delete honors HASH"]: New test.
Ludovic Courtès [Mon, 21 Feb 2011 23:31:00 +0000 (00:31 +0100)]
Use `vhash-delq' in `(language tree-il analyze)'.
* module/language/tree-il/analyze.scm (unbound-variable-analysis): Use
`vhash-delq' instead of `vhash-delete'.
Ludovic Courtès [Mon, 21 Feb 2011 23:08:39 +0000 (00:08 +0100)]
Optimize `vhash-delete'.
* module/ice-9/vlist.scm (vhash-delete): Check whether KEY is in VHASH
and return VHASH if it's not.
Ludovic Courtès [Mon, 21 Feb 2011 23:07:48 +0000 (00:07 +0100)]
Add omitted exports from `(ice-9 vlist)'.
* module/ice-9/vlist.scm: Export `vhash-delq' and `vhash-delv'.
Ludovic Courtès [Mon, 21 Feb 2011 23:05:05 +0000 (00:05 +0100)]
Compile `(rnrs)' after all other RNRS modules, potentially.
* module/Makefile.am (RNRS_SOURCES): Move `rnrs.scm' last.
Ludovic Courtès [Mon, 21 Feb 2011 23:32:13 +0000 (00:32 +0100)]
Make `(rnrs base)' independent of other rnrs modules.
* module/rnrs/base.scm (define-proxy): New macro.
(raise, condition, make-error, make-assertion-violation,
make-who-condition, make-message-condition, make-irritants-condition):
Use it.
Andy Wingo [Sun, 20 Feb 2011 21:08:27 +0000 (22:08 +0100)]
update examples in manual to use PKG_CHECK_MODULES
* doc/ref/autoconf.texi (Using Autoconf Macros): Switch example to use
PKG_CHECK_MODULES.
* doc/ref/libguile-linking.texi (A Sample Guile Main Program): Likewise,
and change from configure.in to configure.ac, and recommend
autoreconf.
Andy Wingo [Sun, 20 Feb 2011 20:43:19 +0000 (21:43 +0100)]
pkg-config instead of guile-config in manuals
* doc/ref/api-options.texi (Build Config):
* doc/ref/libguile-linking.texi (Linking Programs With Guile):
(A Sample Guile Main Program):
* doc/ref/libguile-smobs.texi (The Complete Example): Use pkg-config in
the examples instead of guile-config.
Andy Wingo [Sun, 20 Feb 2011 14:01:37 +0000 (15:01 +0100)]
tour.texi compilation fix
* doc/ref/tour.texi (Writing Guile Extensions): Fix compilation
example.
Andy Wingo [Sun, 20 Feb 2011 12:15:34 +0000 (13:15 +0100)]
@value{EFFECTIVE-VERSION} instead of 2.0 in some places in the manual
* doc/ref/history.texi (A Timeline of Selected Guile Releases): Update
the 2.0 release blurb.
* doc/ref/api-foreign.texi (Modules and Extensions):
* doc/ref/libguile-extensions.texi (A Sample Guile Extension):
* doc/ref/tour.texi (Linking Guile into Programs): Use
@value{EFFECTIVE-VERSION} instead of 2.0. Also fix sample extension
compilation line to include the Guile CFLAGS.
Bruno Haible [Sun, 20 Feb 2011 10:49:48 +0000 (11:49 +0100)]
guile.m4: Add support for linking against guile with rpath.
* guile.m4 (GUILE_FLAGS): Also set GUILE_LIBS and GUILE_LTLIBS. Fix
documentation.
Neil Jerram [Fri, 21 Jan 2011 19:34:01 +0000 (19:34 +0000)]
Fix typos in (web ...) doc
* doc/ref/web.texi (Types and the Web): "help" -> "helpful".
(HTTP): Add closing paren. Remove code that looks like a leftover.
Neil Jerram [Fri, 18 Feb 2011 23:10:54 +0000 (23:10 +0000)]
Last (for a little while) GOOPs doc fix
* doc/ref/goops.texi (GOOPS Object Miscellany): Clarify that it would
be instances being printed, not classes.
Neil Jerram [Fri, 18 Feb 2011 22:53:57 +0000 (22:53 +0000)]
Remove unneeded fixme
* doc/ref/goops.texi (Class Definition Protocol): Removed `*fixme
Need to insert something here about checking that the value is not
unbound'. It's a fine detail, and also I imagine there could be a
valid application that would choose to allow SCM_GOOPS_UNBOUND
values to escape through here.
Neil Jerram [Fri, 18 Feb 2011 22:46:02 +0000 (22:46 +0000)]
Tidy up remaining bits of the MOP section
* doc/ref/goops.texi (Method Definition): Unindent text about
define-method invoking add-method!.
(Method Definition Internals): Add @noindent's.
(Generic Function Invocation): Add intro text, and tidy up the tree.
Neil Jerram [Fri, 18 Feb 2011 22:15:11 +0000 (22:15 +0000)]
Clean up doc on class redefinition and instance class changing
* doc/ref/goops.texi (Class Redefinition): Deleted, with its material
all merged into later `Redefining a Class' and `Changing the Class of
an Instance' sections.
Neil Jerram [Fri, 18 Feb 2011 20:50:55 +0000 (20:50 +0000)]
Merge orphan Class Options section into Class Definition
* doc/ref/goops.texi (Class Definition): Move material from later
`Class Options' section to here.
Neil Jerram [Fri, 18 Feb 2011 19:47:05 +0000 (19:47 +0000)]
Doc of MOP for instance and class creation
* doc/ref/goops.texi (Instance Creation Protocol): Rename from
`Customizing Instance Creation', and move before the more
complicated class definition stuff. Couple of very minor edits.
(Class Definition Protocol): Remove ensure-metaclass-with-supers
(too internal) and repeated material. Move class-redefinition
stuff to (existing) later section on that. Merge reference-like
material from `Customizing Class Definition' to here.
Neil Jerram [Thu, 17 Feb 2011 22:09:13 +0000 (22:09 +0000)]
Summarize class definition protocol
* doc/ref/goops.texi (Class Definition Protocol): Add tree summary
diagram.
Neil Jerram [Thu, 17 Feb 2011 21:36:10 +0000 (21:36 +0000)]
Work on GOOPS MOP documentation
* doc/ref/goops.texi (The Metaobject Protocol): Simplify intro text.
Minor edits and simplifications throughout this section.
(Metaobjects and the Metaobject Protocol): Insert "default".
(Metaclasses): Renamed from `Terminology', and deleted the material
on CPL and accessors, which just duplicated what has already been
covered earlier in the chapter. Remove statements that confuse
whether "metaclass of" means "class of class of" or "class of
(something that is itself a class)". (I think it's actually the
latter.)
(Class Definition Protocol): Renamed from `Class Definition
Internals'.
Neil Jerram [Wed, 16 Feb 2011 00:17:14 +0000 (00:17 +0000)]
Rewording for "make an intervention".
* doc/ref/compiler.texi (Extending the Compiler): Rephrase first sentence.
Neil Jerram [Tue, 15 Feb 2011 23:49:48 +0000 (23:49 +0000)]
No sublimated desires
* doc/ref/compiler.texi: Delete "subliminated".
Andy Wingo [Fri, 18 Feb 2011 18:28:33 +0000 (19:28 +0100)]
fix a couple leaks in ports.c. thanks valgrind!
* libguile/ports.c (scm_i_remove_port): Fix a case in which ports
explictly closed via close-port would leak their iconv_t data.
(scm_set_port_encoding_x): scm_i_set_port_encoding_x strdups its
argument, so we need to free the locale encoding of the incoming str.
Andy Wingo [Fri, 18 Feb 2011 14:57:27 +0000 (15:57 +0100)]
core modules use (ice-9 binary-ports) instead of (rnrs io ports)
* module/language/assembly/compile-bytecode.scm:
* module/language/elisp/lexer.scm:
* module/web/request.scm:
* module/web/response.scm:
* module/web/server.scm:
* module/web/uri.scm: Use ice-9 binary-ports.
Andy Wingo [Fri, 18 Feb 2011 14:52:02 +0000 (15:52 +0100)]
add (ice-9 binary-ports)
* module/ice-9/binary-ports.scm: New module.
* module/Makefile.am: Add to makefile.
* module/rnrs/io/ports.scm: Re-export bindings from (ice-9 binary
ports). This will allow the compiler to not pull (rnrs) into its
included module set.
Andy Wingo [Fri, 18 Feb 2011 08:38:04 +0000 (09:38 +0100)]
update extension example in manual
* doc/ref/libguile-extensions.texi (A Sample Guile Extension): Fix use
of deprecated functions.
Ludovic Courtès [Wed, 16 Feb 2011 09:25:23 +0000 (10:25 +0100)]
Change tag naming convention to `vX.Y.Z'.
* configure.ac: Tell `git-version-gen' that we're switching to a
`vX.Y.Z' scheme for release tags.
Mark H Weaver [Tue, 15 Feb 2011 15:37:03 +0000 (10:37 -0500)]
Improvements to `log' and `log10'
* libguile/numbers.c (log_of_shifted_double, log_of_exact_integer,
log_of_exact_integer_with_size, log_of_fraction): New internal static
functions used by scm_log and scm_log10.
(scm_log, scm_log10): Robustly handle large integers, large and small
fractions, and fractions close to 1. Previously, computing logarithms
of fractions close to 1 yielded grossly inaccurate results, and the
other cases yielded infinities even though the answer could easily fit
in a double. (log -0.0) now returns -inf.0+<PI>i, where previously it
returned -inf.0. (log 0) now throws a numerical overflow exception,
where previously it returned -inf.0. (log 0.0) still returns -inf.0.
Analogous changes made to `log10'.
* test-suite/tests/numbers.test (log, log10): Add tests.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Mark H Weaver [Mon, 14 Feb 2011 23:18:52 +0000 (18:18 -0500)]
Fix comment above number-theoretic division tests
* test-suite/tests/numbers.test: Fix comment.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Ludovic Courtès [Tue, 15 Feb 2011 15:45:20 +0000 (16:45 +0100)]
Switch to 2.0.0.
* GUILE-VERSION (GUILE_MAJOR_VERSION, GUILE_MINOR_VERSION,
GUILE_MINOR_VERSION): 2.0.0!
Ludovic Courtès [Tue, 15 Feb 2011 15:44:00 +0000 (16:44 +0100)]
Increment `LIBGUILE_INTERFACE_CURRENT'.
* GUILE-VERSION (LIBGUILE_INTERFACE_CURRENT): Set to 22, i.e.,
Guile 1.8.8 + 1.
Ludovic Courtès [Tue, 15 Feb 2011 15:40:27 +0000 (16:40 +0100)]
Update `doc/example-smob'.
* doc/example-smob/Makefile (CFLAGS, LIBS): Use `pkg-config' instead of
`guile-config'.
* doc/example-smob/image-type.c (mark_image, free_image): Remove.
(init_image_type): Don't call `scm_set_smob_mark' and
`scm_set_smob_free'.
Mark H Weaver [Tue, 15 Feb 2011 11:10:06 +0000 (06:10 -0500)]
Use trunc in scm_i_inexact_truncate_divide
* libguile/numbers.c (scm_i_inexact_truncate_divide): Use trunc instead
of floor and ceil. Important for consistency with
scm_truncate_quotient and scm_truncate_remainder.
Signed-off-by: Ludovic Courtès <ludo@gnu.org>
Ludovic Courtès [Tue, 15 Feb 2011 11:31:02 +0000 (12:31 +0100)]
Document `%auto-compilation-options'.
* doc/ref/api-evaluation.texi (Compilation): Emphasize
auto-compilation. Document `%auto-compilation-options'.
Ludovic Courtès [Tue, 15 Feb 2011 11:15:02 +0000 (12:15 +0100)]
Fix compilation of `c-tokenize.c' in a cross-compile setup.
* libguile/Makefile.am (c-tokenize.$(OBJEXT)): When cross-compiling,
don't include any CPPFLAGS since we could end up seeing Gnulib's
replacements, e.g., `rpl_malloc', which we can't use.
Ludovic Courtès [Tue, 15 Feb 2011 11:07:49 +0000 (12:07 +0100)]
Use all the LDFLAGS from Gnulib.
* libguile/Makefile.am (version_info): New variable.
(libguile_@GUILE_EFFECTIVE_VERSION@_la_LIBADD): Remove
`$(LTLIBUNISTRING) $(LTLIBICONV) $(LTLIBINTL)'.
(libguile_@GUILE_EFFECTIVE_VERSION@_la_LDFLAGS): Add all the flags
from Gnulib, one per line as in the `gnulib-tool' output, including
those above.
Ludovic Courtès [Tue, 15 Feb 2011 10:52:43 +0000 (11:52 +0100)]
Remove Gnulib's `sockets' module from the import list.
* m4/gnulib-cache.m4: Remove `sockets', which we don't directly depend
on.
Ludovic Courtès [Tue, 15 Feb 2011 10:28:10 +0000 (11:28 +0100)]
Import Gnulib's `log1p' and `round' modules.
From Gnulib
v0.0-4889-ge375fe3.
* m4/gnulib-cache.m4: Add `log1p' and `round', requested by
Mark H Weaver <mhw@netris.org>.
Use `malloc-gnu' instead of `malloc', the latter being obsolete.
Andy Wingo [Tue, 15 Feb 2011 08:29:54 +0000 (09:29 +0100)]
remove 1.9 changes from NEWS (leaving only 2.0)
* NEWS: Compress year range (as allowed by standards and note in
README). Remove 1.9.15->2.0 changes, leaving only 2.0 changes.
Mark H Weaver [Mon, 14 Feb 2011 22:10:03 +0000 (17:10 -0500)]
Use trunc instead of scm_c_truncate
* libguile/numbers.c (scm_c_truncate, scm_truncate_number,
scm_i_inexact_truncate_quotient, scm_i_inexact_truncate_remainder):
Use trunc directly, now that we have its gnulib module.
Mark H Weaver [Sun, 13 Feb 2011 21:28:34 +0000 (16:28 -0500)]
Fix minor errors in docs of division operators
* doc/ref/api-data.texi (Arithmetic): The R5RS `quotient', `remainder',
and `modulo' operators are exact-integer-only operators. `modulo' is
equivalent to `floor-remainder', not `floor-quotient'.
Andy Wingo [Mon, 14 Feb 2011 22:27:50 +0000 (23:27 +0100)]
news tweak
* NEWS: Tweak
Andy Wingo [Mon, 14 Feb 2011 22:26:18 +0000 (23:26 +0100)]
add more NEWS
* NEWS: Add new NEWS and fold into main text.
Andy Wingo [Mon, 14 Feb 2011 22:03:11 +0000 (23:03 +0100)]
fold new NEWS items into main text
* NEWS: Fold all items into main text, while keeping a list of things
that are new in 1.9.15.
Andy Wingo [Mon, 14 Feb 2011 21:03:37 +0000 (22:03 +0100)]
update THANKS
* THANKS: Update, adding all people who have their name on a patch in
Git. Add a section on authors of other free software libraries.
Andy Wingo [Mon, 14 Feb 2011 19:39:31 +0000 (20:39 +0100)]
tweak to internal scm_i_extract_values_2
* libguile/values.c (scm_i_extract_values_2): Make nvalues check more
robust.
Mark H Weaver [Sat, 12 Feb 2011 10:43:17 +0000 (05:43 -0500)]
Allow GOOPS getters to add methods to primitive generics
* module/oop/goops.scm (ensure-generic): If the old definition of a
desired getter is a primitive generic, let the new method be added to
it instead of creating a fresh new generic.
(ensure-accessor): Modify as necessary to keep the old behavior.
Maybe something more optimal can be done here, but it's not yet
obvious to me how to do it.
Mark H Weaver [Fri, 11 Feb 2011 00:04:05 +0000 (19:04 -0500)]
Make SCM_NUMP and SCM_NUMBERP more extensible
* libguile/numbers.h (SCM_NUMP, SCM_NUMBERP): Mask out more bits in the
cell type field when doing the comparison, in order to accept future
numeric types that have not yet been implemented. This should allow
us to add more core numeric types without breaking ABI compatibility.
As a bonus, these macros are now more efficient.
Mark H Weaver [Fri, 11 Feb 2011 00:38:49 +0000 (19:38 -0500)]
Slight optimization for scm_equal_p
* libguile/eq.c (scm_equal_p): Move SCM_STRUCTP check within the default
case of the SCM_TYP7 switch statement, for optimization.
Mark H Weaver [Sun, 13 Feb 2011 12:25:28 +0000 (07:25 -0500)]
Reduce code size of division operators
* libguile/numbers.c (scm_quotient): Reimplement in terms of
scm_truncate_quotient.
(scm_remainder): Reimplement in terms of scm_truncate_remainder.
(scm_modulo): Reimplement in terms of scm_floor_remainder.
(scm_euclidean_quotient, scm_euclidean_remainder,
scm_euclidean_divide): Reimplement in terms of floor and ceiling.
Make them non-extensible, because there is no need; they will work
with any objects that implement the floor and ceiling division
operators, and that can be tested using `negative?'.
Mark H Weaver [Sun, 13 Feb 2011 12:14:57 +0000 (07:14 -0500)]
Optimize truncate, round, floor, and ceiling
* libguile/numbers.c (scm_c_truncate): Use ceil (x) instead of
-floor (-x).
(scm_truncate_number): Implement directly instead of by checking the
sign and using scm_floor or scm_ceiling. Use scm_truncate_quotient
for fractions. Make extensible, so that new number types implemented
in GOOPS will be able to do the job more efficiently, since it is
often easier to implement truncate than floor or ceiling.
(scm_round_number): Optimize fractions case by using
scm_round_quotient. Make extensible, so that new number types
implemented in GOOPS will be able to do the job efficiently.
(scm_floor, scm_ceiling): Optimize fractions case by using
scm_floor_quotient and scm_ceiling_quotient, respectively.
* test-suite/tests/numbers.test: Add test cases.
Mark H Weaver [Sun, 13 Feb 2011 14:16:27 +0000 (09:16 -0500)]
Add four new sets of fast quotient and remainder operators
* libguile/numbers.c (scm_floor_divide, scm_floor_quotient,
scm_floor_remainder, scm_ceiling_divide, scm_ceiling_quotient,
scm_ceiling_remainder, scm_truncate_divide, scm_truncate_quotient,
scm_truncate_remainder, scm_round_divide, scm_round_quotient,
scm_round_remainder): New extensible procedures `floor/',
`floor-quotient', `floor-remainder', `ceiling/', `ceiling-quotient',
`ceiling-remainder', `truncate/', `truncate-quotient',
`truncate-remainder', `round/', `round-quotient', and
`round-remainder'.
* libguile/numbers.h: Add function prototypes.
* test-suite/tests/numbers.test: Add tests.
* doc/ref/api-data.texi (Arithmetic): Add documentation.
* NEWS: Add NEWS entry.
Mark H Weaver [Sun, 13 Feb 2011 11:04:52 +0000 (06:04 -0500)]
Optimize division operators handling of fractions
* libguile/numbers.c: (scm_euclidean_quotient, scm_euclidean_remainder,
scm_euclidean_divide, scm_centered_quotient, scm_centered_remainder,
scm_centered_divide): Optimize case where both arguments are exact and
at least one is a fraction, by reducing to a subproblem involving only
integers, and then adjusting the resulting remainder as needed.
Mark H Weaver [Sun, 13 Feb 2011 10:47:33 +0000 (05:47 -0500)]
Make divide functions return values via (SCM *) output arguments
* libguile/numbers.c (scm_euclidean_divide, scm_centered_divide): Change
API to return two values via output arguments of type (SCM *), instead
of packing into a values object.
(scm_i_euclidean_divide, scm_i_centered_divide): New internal wrappers
that call the above functions and pack the result into a values
object.
* libguile/numbers.h: Change prototypes to reflect new API.
* doc/ref/api-data.h (Arithmetic): Update manual.
Mark H Weaver [Thu, 10 Feb 2011 23:03:14 +0000 (18:03 -0500)]
Added internal C function to extract from values object
* libguile/values.c (scm_i_extract_values_2): New internal function
that extracts two values from a values object.
* libguile/values.h: Added prototype.
Andy Wingo [Mon, 14 Feb 2011 19:23:43 +0000 (20:23 +0100)]
update thanks
* THANKS: Add Ian Price
Andy Wingo [Mon, 14 Feb 2011 19:21:04 +0000 (20:21 +0100)]
add vector-move test cases
* test-suite/tests/vectors.test ("vector-move-left!")
("vector-move-right!"): Add test cases for recent bug.
Ian Price [Mon, 14 Feb 2011 03:44:31 +0000 (03:44 +0000)]
fix fencepost error in vector-move-left! and -right!
* libguile/vectors.c (scm_vector_move_right_x, scm_vector_move_left_x):
Fix edge case.
Ludovic Courtès [Mon, 14 Feb 2011 12:48:08 +0000 (13:48 +0100)]
Pass all the flags when building `gen-scmconfig' in a cross-compile setup.
* libguile/Makefile.am (gen-scmconfig.$(OBJEXT)): When cross-compiling,
pass all the CPPFLAGS and CFLAGS.
Ludovic Courtès [Mon, 14 Feb 2011 12:47:20 +0000 (13:47 +0100)]
Leave the default `*current-warning-prefix*' at the REPL.
* module/system/repl/common.scm (repl-compile): Leave the default
`*current-warning-prefix*'.
Ludovic Courtès [Tue, 7 Dec 2010 21:49:46 +0000 (22:49 +0100)]
Temporarily fix `unistr.in.h' to allow compilation with `-Wundef'.
See <http://thread.gmane.org/gmane.comp.lib.gnulib.bugs/24225> for details.
* lib/unistr.in.h: Change #if's into #ifdef's.
Ludovic Courtès [Mon, 14 Feb 2011 10:36:25 +0000 (11:36 +0100)]
Update Gnulib; add new modules.
This updates Gnulib to
v0.0-4889-ge375fe3.
* m4/gnulib-cache.m4: Add `accept', `bind', `close', `connect',
`getpeername', `getsockname', `getsockopt', `listen', `malloc',
`malloca', `recv', `recvfrom', `send', `sendto', `setsockopt',
`shutdown', `socket', and `sockets', requested by
Jan Nieuwenhuizen <janneke-list@xs4all.nl> for cross-MinGW32 builds.
Add `trunc', requested by Mark H Weaver <mhw@netris.org>.
Neil Jerram [Mon, 14 Feb 2011 08:30:33 +0000 (08:30 +0000)]
Thank Ralf
* THANKS: Thank Ralf.
Neil Jerram [Sun, 13 Feb 2011 22:34:12 +0000 (22:34 +0000)]
Typo fix
* doc/ref/api-modules.texi (R6RS Libraries): "libraries
implementation" -> "library implementation".
Neil Jerram [Sun, 13 Feb 2011 22:28:25 +0000 (22:28 +0000)]
Procedure/macro index includes Autoconf macros
* doc/ref/indices.texi (Procedure Index): Make explicit that the
procedure/macro index includes Autoconf macros.
Neil Jerram [Sun, 13 Feb 2011 22:13:33 +0000 (22:13 +0000)]
Misc textual editing
* doc/ref/api-scheduling.texi (Asyncs): "queueing" -> "queuing".
* benchmark-suite/lib.scm, doc/sources/unix.texi (Unix conventions),
test-suite/lib.scm: "postpend" -> "append".
* doc/ref/api-compound.texi (Array Syntax, Dictionary Types),
doc/ref/api-control.texi (Catch), doc/ref/api-data.texi (Complex
Numbers, Conversion, Random, Symbol Props, Symbol Uninterned),
doc/ref/api-options.texi (Build Config, Common Feature Symbols),
doc/ref/api-regex.texi (Match Structures),
doc/ref/api-undocumented.texi, doc/ref/compiler.texi (Tree-IL,
GLIL), doc/ref/data-rep.texi (Immediate objects), doc/ref/goops.texi
(Slot Description Example), doc/ref/history.texi (A Scheme of Many
Maintainers, Status), doc/ref/libguile-program.texi (Available
Functionality), doc/ref/misc-modules.texi (Formatted Output),
doc/ref/mod-getopt-long.texi (getopt-long Reference),
doc/ref/posix.texi (Network Socket Address, Network Sockets and
Communication), doc/ref/srfi-modules.texi (SRFI-1 Association Lists,
SRFI-10, SRFI-19 String to date, SRFI-27 Random Sources),
doc/ref/vm.texi (Instruction Set, Top-Level Environment
Instructions, Procedure Call and Return Instructions),
doc/sources/unix.texi (Unix conventions): Correct spacing after
"i.e." and "e.g.".
Neil Jerram [Sun, 13 Feb 2011 21:50:35 +0000 (21:50 +0000)]
Avoid uses of "resp. signed"
* doc/ref/api-data.texi (Bytevectors as Integers, Bytevectors and
Integer Lists): Split signed and unsigned deffns.
Neil Jerram [Sun, 13 Feb 2011 21:49:31 +0000 (21:49 +0000)]
Reword intro of `Accessing Arrays from C'
* doc/ref/api-compound.texi (Accessing Arrays from C): Reword to avoid
awkward "rectangularily organized".
Ralf Wildenhues [Tue, 8 Feb 2011 20:20:57 +0000 (21:20 +0100)]
docs: fix typos in manual, and a couple in code comments.
* doc/ref/api-data.texi: Use \sqrt{2} consistently rather than \sqrt2.
Add @: for correct spacing after "i.e.".
Ralf Wildenhues [Tue, 8 Feb 2011 19:52:02 +0000 (20:52 +0100)]
docs: fix markup in api-options.texi.
* doc/ref/api-options.texi (Build Config): Use @var for
metasyntactic variable. Add newline after @noindent.
Use @env for GUILE_LOAD_PATH.
Noah Lavine [Sun, 13 Feb 2011 20:31:32 +0000 (15:31 -0500)]
Set sockaddr_in.sin_len field when it exists.
* configure.ac: Detect when struct sockaddr_in has a sin_len field.
Remove obsolete comment.
* libguile/socket.c (scm_to_sockaddr, scm_fill_sockaddr): Set the
sin_len field in our struct sockaddr_in when it exists.