Andy Wingo [Tue, 6 Apr 2010 22:01:35 +0000 (00:01 +0200)]
Update NEWS to reflect the current state
* NEWS: Update a number of old entries.
Andy Wingo [Tue, 6 Apr 2010 21:58:51 +0000 (23:58 +0200)]
remove transient 1.9.9 entries from the NEWS
* NEWS: Cull 1.9.9 entries.
Andy Wingo [Tue, 6 Apr 2010 21:17:10 +0000 (23:17 +0200)]
finish ffi docs
* libguile/foreign.c: Some doc tweaks.
* doc/ref/api-foreign.texi: Finish FFI docs.
Andy Wingo [Mon, 5 Apr 2010 22:45:35 +0000 (00:45 +0200)]
more ffi docs
* libguile/foreign.c (scm_make_foreign_function): Doc a little.
* doc/ref/api-foreign.texi (Foreign Function Interface): Document some
more.
Michael Gran [Sat, 3 Apr 2010 13:46:23 +0000 (06:46 -0700)]
copyright dates
* libguile/unidata_to_charset.pl: change copyright date
* test-suite/tests/srfi-14.test: change copyright date
Michael Gran [Sat, 3 Apr 2010 05:25:30 +0000 (22:25 -0700)]
Remove obsolete docs for multi-byte text
These describe the initial, unimplemented plan for Unicode
support. These have been overcome by events.
* doc/mbapi.texi: removed
* doc/mltext.texi: removed
Michael Gran [Sat, 3 Apr 2010 04:12:55 +0000 (21:12 -0700)]
Update standard character sets to Unicode 5.2
* srfi-14.i.c: all character ranges updated to Unicode 5.2
Michael Gran [Sat, 3 Apr 2010 04:08:42 +0000 (21:08 -0700)]
Unicode data parsing script incorrect for char-set:ascii
char-set:ascii is the only char-set consisting of a single contiguous
range, and there was an off-by-one error for that case.
* libguile/unidata_to_charset.pl (compute): fix off-by-one
Andy Wingo [Thu, 1 Apr 2010 22:34:49 +0000 (00:34 +0200)]
deprecate dynamic-args-call, and update docs some more
* libguile/deprecated.h (scm_dynamic_args_call): Deprecate.
* libguile/deprecated.c:
* libguile/dynl.h:
* libguile/dynl.c:
* doc/ref/api-foreign.texi: More doc updates.
Andy Wingo [Thu, 1 Apr 2010 22:23:24 +0000 (00:23 +0200)]
add api-foreign.texi
* doc/ref/api-foreign.texi: New file.
* doc/ref/api-modules.texi: Reorganize bits about dynamic linking into
api-foreign.
* doc/ref/guile.texi:
* doc/ref/Makefile.am: Adapt to api-foreign.texi.
Andy Wingo [Thu, 1 Apr 2010 07:05:59 +0000 (09:05 +0200)]
fix vector-ref and vector-set opcodes for weak vectors
* libguile/vectors.h (SCM_I_IS_NONWEAK_VECTOR): New internal predicate.
* libguile/vm-i-scheme.c (vector-ref, vector-set): Only inline access to
nonweak vectors.
Andy Wingo [Wed, 31 Mar 2010 22:18:44 +0000 (00:18 +0200)]
more fixes to equal? for arrays
* libguile/array-map.c (array_compare, scm_array_equal_p): Rewrite as
something that operates on the generic array handle infrastructure.
Based on array->list.
(scm_i_array_equal_p): Change the docs, as array-equal? is now the same
as equal?, except that it typechecks its args.
* doc/ref/api-compound.texi (Array Procedures): Update array-equal?
docs.
* libguile/deprecated.h:
* libguile/deprecated.c (scm_raequal): Deprecate.
* libguile/bytevectors.c (scm_bytevector_eq_p): Bugfix: bytevectors are
bytevector=? only if their element type is the same.
* libguile/eq.c (scm_equal_p): Only dispatch to scm_array_equal_p if
both args are arrays (generically).
* test-suite/tests/arrays.test ("equal?"): Add some more tests.
Andy Wingo [Wed, 31 Mar 2010 20:31:11 +0000 (22:31 +0200)]
fix array bugs in ecmascript
* module/language/ecmascript/array.scm (pput, *array-prototype*): Fix
bugs in ecmascript array runtime.
Andy Wingo [Wed, 31 Mar 2010 20:29:29 +0000 (22:29 +0200)]
fix bug in ash opcode
* libguile/vm-i-scheme.c (ash): Fix embarrassing bug in (ash 1 32).
* test-suite/tests/bit-operations.test ("bitshifts on word boundaries"):
Add tests.
Andy Wingo [Wed, 31 Mar 2010 19:16:54 +0000 (21:16 +0200)]
rename unif.test to arrays.test
* test-suite/tests/arrays.test: Move all unif.test here. Unif.test was
mostly testing arrays anyway. Incorporate the existing arrays.test.
* test-suite/tests/unif.test: Deleted.
* test-suite/Makefile.am: Update.
Ludovic Courtès [Wed, 31 Mar 2010 12:54:43 +0000 (14:54 +0200)]
Move another GOOPS-less test at the beginning.
* test-suite/tests/eval.test ("promises")["extended promise
behaviour"]("implicit forcing is not supported"): Move...
* test-suite/tests/00-initial-env.test ("goopsless"): ... here.
Ludovic Courtès [Wed, 31 Mar 2010 09:38:02 +0000 (11:38 +0200)]
Add separate test file for GOOPS-less tests.
* test-suite/tests/00-initial-env.test: New file.
* test-suite/Makefile.am (SCM_TESTS): Add `tests/00-initial-env.test'.
* test-suite/tests/numbers.test ("+")["wrong type argument"]: Move to
`00-initial-env.test'.
Ludovic Courtès [Fri, 19 Mar 2010 23:08:36 +0000 (00:08 +0100)]
Adapt ECMAScript parser and lexer to `(system base lalr)'.
* module/language/ecmascript/tokenize.scm: Use `make-lexical-token' and
related procedures instead of pairs as tokens passed to the parser.
Pass source location information in the form of `source-location'
objects.
* module/language/ecmascript/parse.scm (read-ecmascript,
read-ecmascript/1): Instantiate a new parser at each call.
(parse-ecmascript): Rename to...
(make-parser): ... this. Change `->' to `:' in the grammar syntax.
* module/language/ecmascript/parse-lalr.scm: Remove.
* module/Makefile.am (ECMASCRIPT_LANG_SOURCES): Remove
`language/ecmascript/parse-lalr.scm'.
Ludovic Courtès [Tue, 30 Mar 2010 22:09:40 +0000 (00:09 +0200)]
Add rudimentary ECMAScript tests.
* test-suite/Makefile.am (SCM_TESTS): Add `tests/ecmascript.test'.
* test-suite/tests/ecmascript.test: New file.
Ludovic Courtès [Mon, 29 Mar 2010 23:11:09 +0000 (01:11 +0200)]
Mention `(system base lalr)' in the manual.
* doc/ref/Makefile.am (guile_TEXINFOS): Add `api-lalr.texi'.
* doc/ref/api-lalr.texi: New file.
* doc/ref/guile.texi (API Reference): Include it.
Ludovic Courtès [Tue, 30 Mar 2010 22:41:28 +0000 (00:41 +0200)]
Add Boucher's `lalr-scm' as the `(system base lalr)' module.
Taken from r51 of <http://lalr-scm.googlecode.com/svn/trunk>.
* module/Makefile.am (SYSTEM_BASE_SOURCES): Add `system/base/lalr.scm'.
(NOCOMP_SOURCES): Add `system/base/lalr.upstream.scm'.
* module/system/base/lalr.scm, module/system/base/lalr.upstream.scm: New
files.
* test-suite/Makefile.am (LALR_TESTS, LALR_EXTRA, TESTS,
TESTS_ENVIRONMENT): New variables.
(EXTRA_DIST): Add $(LALR_EXTRA).
* test-suite/lalr/common-test.scm,
test-suite/lalr/glr-test.scm,
test-suite/lalr/test-glr-associativity.scm,
test-suite/lalr/test-glr-basics-01.scm,
test-suite/lalr/test-glr-basics-02.scm,
test-suite/lalr/test-glr-basics-03.scm,
test-suite/lalr/test-glr-basics-04.scm,
test-suite/lalr/test-glr-basics-05.scm,
test-suite/lalr/test-glr-script-expression.scm,
test-suite/lalr/test-glr-single-expressions.scm,
test-suite/lalr/test-lr-associativity-01.scm,
test-suite/lalr/test-lr-associativity-02.scm,
test-suite/lalr/test-lr-associativity-03.scm,
test-suite/lalr/test-lr-associativity-04.scm,
test-suite/lalr/test-lr-basics-01.scm,
test-suite/lalr/test-lr-basics-02.scm,
test-suite/lalr/test-lr-basics-03.scm,
test-suite/lalr/test-lr-basics-04.scm,
test-suite/lalr/test-lr-basics-05.scm,
test-suite/lalr/test-lr-error-recovery-01.scm,
test-suite/lalr/test-lr-error-recovery-02.scm,
test-suite/lalr/test-lr-no-clause.scm,
test-suite/lalr/test-lr-script-expression.scm,
test-suite/lalr/test-lr-single-expressions.scm: New files.
Andy Wingo [Tue, 30 Mar 2010 22:05:01 +0000 (00:05 +0200)]
fix equal? between an array and a non-array
OK let's try again. While the thanks go to Daniel Llorens del Río for
the tip, the blame continues going to me :)
* test-suite/Makefile.am:
* test-suite/tests/arrays.test: Add a test.
* libguile/array-map.c (raeql): Handle a few 0-dimensional cases. If the
shapes of the arrays don't match, just return #f instead of raising
an error.
Andy Wingo [Tue, 30 Mar 2010 21:51:40 +0000 (23:51 +0200)]
Revert "fix equal? between an array and a non-array"
This reverts commit
9d031d4d575ac8f343a5d984cb02cd374577c5a9.
Andy Wingo [Tue, 30 Mar 2010 19:23:06 +0000 (21:23 +0200)]
fix equal? between an array and a non-array
* libguile/eq.c (scm_equal_p): Only call scm_array_equal_p if both
arguments are generalized arrays; otherwise they are not equal. Thanks
to Daniel Llorens del Río for the tip.
* test-suite/Makefile.am:
* test-suite/tests/arrays.test: Add a test.
Andy Wingo [Tue, 30 Mar 2010 08:53:05 +0000 (10:53 +0200)]
correctly handle --no-autocompile (fixed broken previous patch)
* libguile/load.c (scm_init_load): Initialize %load-should-autocompile
to false.
* libguile/init.c (scm_i_init_guile):
* libguile/load.h:
* libguile/load.c (scm_init_load_should_autocompile): At the end of
init, check GUILE_AUTO_COMPILE.
* libguile/script.c (scm_compile_shell_switches): Instead of making
--autocompile / --no-autocompile render into the s-expression, just
handle them immediately, so that --no-autocompile takes effect for the
expander.
Andy Wingo [Tue, 23 Mar 2010 19:29:22 +0000 (20:29 +0100)]
nil is null, whee
* libguile/pairs.h (scm_is_null): Nil is also null.
* libguile/vm-i-scheme.c (not, not-not, null?, not-null?):
* libguile/vm-i-system.c (br-if-null, br-if-not-null): Remove some more
nil special cases.
Andy Wingo [Tue, 23 Mar 2010 19:23:19 +0000 (20:23 +0100)]
nil is false, whee
* libguile/boolean.h (scm_is_false): Recognize nil as false, by default.
(scm_is_bool): Recognize nil as a boolean.
* libguile/boolean.c (scm_not, scm_boolean, scm_to_bool, scm_is_bool):
Adapt to treat nil as false.
* libguile/vm-i-system.c (br-if, br-if-not): Just use scm_is_false
instead of specifically mentioning nil.
Andy Wingo [Tue, 30 Mar 2010 08:28:51 +0000 (10:28 +0200)]
going through scm_shell not necessary to get autocompilation
* libguile/load.c (scm_init_load): Initialize %load-should-autocompile
from the environment variable here, so that apps that don't go through
scm_shell get autocompilation.
* libguile/script.c (scm_compile_shell_switches): Explicitly enable or
disable autocompilation here, if told to do so.
Andy Wingo [Mon, 29 Mar 2010 20:02:42 +0000 (22:02 +0200)]
fix bug in scm_must_free
* libguile/gc-malloc.c: Update a comment.
(scm_must_free): Must be able to free memory allocated with
scm_must_malloc, and thus must be GC_FREE, not free.
Andy Wingo [Mon, 29 Mar 2010 19:51:07 +0000 (21:51 +0200)]
remove out-of-date comment in scm_gc_malloc
* libguile/gc-malloc.c (scm_gc_malloc): Remove out-of-date comment.
Andy Wingo [Mon, 29 Mar 2010 16:06:54 +0000 (18:06 +0200)]
(texinfo reflection) parses out macro metadata
* module/texinfo/reflection.scm (macro-arguments):
(macro-additional-stexi, object-stexi-documentation): Parse out the
metadata in macros, if it is available, so we can show defmacros'
arguments, syntax-rules' patterns, etc.
Andy Wingo [Mon, 29 Mar 2010 16:01:34 +0000 (18:01 +0200)]
metadata for syntax-rules, identifier-syntax, and define-macro macros
* module/ice-9/psyntax.scm (syntax-rules, identifier-syntax):
* module/ice-9/boot-9.scm (define-macro): Embed metadata into the macro
transformer for use by documentation tools and the like.
* module/ice-9/psyntax-pp.scm: Regenerated.
Mark H Weaver [Sat, 27 Mar 2010 21:35:46 +0000 (17:35 -0400)]
Renumber IFLAGSs so the first 8 are reserved for lisp booleans.
This enables more efficient implementations of several operations,
e.g. scm_is_lisp_bool, canonicalize_boolean, fast_boolean_not,
converting SCM booleans to C booleans, etc.
* libguile/tags.h: Renumber IFLAGs.
* libguile/print.c: Renumber iflagnames to match.
* libguile/boolean.c:
* libguile/boolean.h:
SCM_XXX_ANOTHER_BOOLEAN_DONT_USE --> SCM_XXX_ANOTHER_BOOLEAN_DONT_USE_0
Andy Wingo [Sun, 28 Mar 2010 12:31:57 +0000 (14:31 +0200)]
Fix inlining of lambda-apply-lambda.
* module/language/tree-il/inline.scm (inline!): Only inline (lambda args
(apply (lambda ...) args)) if the outer lambda has rest args. Thanks
to Mark Weaver for the note.
Andy Wingo [Fri, 26 Mar 2010 12:20:00 +0000 (13:20 +0100)]
remove spurious declarations in c-tokenize.lex
* libguile/c-tokenize.lex: Remove spurious declarations of flex-internal
functions, as their prototypes are changing in upstream flex.
Andy Wingo [Thu, 25 Mar 2010 13:19:25 +0000 (14:19 +0100)]
vectors of pairs in docstring position are metadata
* module/ice-9/psyntax.scm (chi-lambda-case, lambda): If we find a
vector of pairs in the docstring position, interpret those pairs as
additional metadata.
* module/ice-9/psytntax-pp.scm: Regenerated.
Andy Wingo [Thu, 25 Mar 2010 13:02:43 +0000 (14:02 +0100)]
psyntax supports multiple docstrings, merging lambda-case metadata
* module/ice-9/psyntax.scm (build-simple-lambda, build-case-lambda):
Don't take a docstring, take a metadata alist. Don't bother annotating
interpreted expressions with docstrings.
(chi-simple-lambda): Take already-parsed metadata.
(lambda): Parse out multiple docstrings as separate "documentation"
entries in the "meta".
(chi-lambda-case): Merge multiple "meta" entries among the various
cases.
(lambda*, case-lambda, case-lambda*): Receive "meta" clauses, not
docstrings.
* module/ice-9/psyntax-pp.scm: Regenerated.
Andy Wingo [Mon, 22 Mar 2010 23:18:48 +0000 (00:18 +0100)]
make guile's welcome more gnu-conventional; also warranty and copying info
* module/system/repl/command.scm: Add support for ,show with topics
"warranty", "copying", and "version".
(language): Don't re-print the welcome; print sometime more terse.
* module/system/repl/common.scm (*version*, *warranty*, *copying*): New
public globals.
(repl-welcome): Display *version*.
Andy Wingo [Fri, 19 Mar 2010 16:48:08 +0000 (17:48 +0100)]
Update manual examples of how to link with Guile
* doc/ref/intro.texi (Linking Guile into Programs):
* doc/ref/libguile-linking.texi (A Sample Guile Main Program): Update
examples of how to link with guile.
Ludovic Courtès [Fri, 19 Mar 2010 14:42:20 +0000 (15:42 +0100)]
Make `include' tail-recursive.
* module/ice-9/psyntax.scm (include)[read-file]: Make tail-recursive.
* module/ice-9/psyntax-pp.scm: Regenerate.
Ludovic Courtès [Sat, 20 Mar 2010 16:00:38 +0000 (17:00 +0100)]
Cosmetic changes in `foreign.c'.
* libguile/foreign.c (unpack, pack): Add `const' qualifier for `type'.
Comment. Indent.
(scm_i_foreign_call): Add `const' qualifier for `argv'. Punctuate
comments. Clarify argument unpacking loop.
Ludovic Courtès [Sat, 20 Mar 2010 15:45:14 +0000 (16:45 +0100)]
Fix argument passing to foreign functions.
* libguile/foreign.c (scm_i_foreign_call): When allocating room for
DATA, use the sum of all the argument sizes, not `cif->bytes'.
Andy Wingo [Fri, 19 Mar 2010 16:05:46 +0000 (17:05 +0100)]
fix srfi-31 check after macroexpand rename
* test-suite/tests/srfi-31.test: ("rec special form"): Fix check.
Andy Wingo [Fri, 19 Mar 2010 14:22:27 +0000 (15:22 +0100)]
rename sc-expand to macroexpand
* module/ice-9/boot-9.scm (macroexpand): Rename from sc-expand.
(%pre-modules-transformer): Adapt to name change.
* module/ice-9/compile-psyntax.scm: Adapt to name change.
* module/ice-9/psyntax-pp.scm: Regenerated.
* module/ice-9/psyntax.scm: Rename sc-expand to macroexpand.
* module/language/scheme/compile-tree-il.scm (compile-tree-il): Adapt to
name change.
Andy Wingo [Fri, 19 Mar 2010 12:16:57 +0000 (13:16 +0100)]
finish macro docs
* doc/ref/api-macros.texi: Finish macro docs.
Andy Wingo [Fri, 19 Mar 2010 11:30:31 +0000 (12:30 +0100)]
document syntax-case
* doc/ref/api-macros.texi: Document syntax-case, and tweak defmacro
docs.
* doc/ref/api-debug.texi: Move cons-source here.
Andy Wingo [Fri, 19 Mar 2010 11:01:55 +0000 (12:01 +0100)]
add GUILE-VERSION to CONFIG_STATUS_DEPENDENCIES
* Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add GUILE-VERSION, so that a
change in GUILE-VERSION causes a reconfigure.
Ludovic Courtès [Thu, 18 Mar 2010 22:48:49 +0000 (23:48 +0100)]
Bump version number for 1.9.9.
* GUILE-VERSION (GUILE_MICRO_VERSION): Increment.
Ludovic Courtès [Thu, 18 Mar 2010 22:48:12 +0000 (23:48 +0100)]
Update `NEWS'.
Andy Wingo [Thu, 18 Mar 2010 22:39:33 +0000 (23:39 +0100)]
A start at syntax-rules docs
* doc/ref/api-macros.texi: New file, documenting macros. Removed some
old cruft, and started documenting hygienic macros.
* doc/ref/api-procedures.texi: Moved macro things out of here.
* doc/ref/guile.texi: Separate macros from procedures.
* doc/ref/api-data.texi: Update some xrefs.
* doc/ref/Makefile.am: Add api-macros.texi.
Ludovic Courtès [Thu, 18 Mar 2010 19:23:12 +0000 (20:23 +0100)]
Improve encoding error reporting.
* libguile/strings.c (scm_encoding_error): Change arguments to convey
more information. Raise the error with `scm_throw ()', passing all
the information to the handler.
(scm_from_stringn, scm_to_stringn): Update accordingly.
* test-suite/tests/ports.test ("string ports")["wrong encoding"]: Check
the arguments passed to the `throw' handler.
* test-suite/tests/r6rs-ports.test ("7.2.11 Binary
Output")["put-bytevector with wrong-encoding string port"]: Likewise.
Ludovic Courtès [Thu, 18 Mar 2010 19:34:01 +0000 (20:34 +0100)]
Update Gnulib; use the `func' module.
Update Gnulib to
v0.0-3575-g128e4b8.
* m4/gnulib-cache.m4: Add `func'.
Ludovic Courtès [Wed, 17 Mar 2010 23:27:38 +0000 (00:27 +0100)]
Add `%null-pointer' to `(system foreign)'.
* libguile/foreign.c (sym_null, null_pointer): New variables.
(scm_foreign_to_bytevector): Raise an error when PTR is NULL.
(scm_init_foreign): Define SYM_NULL.
* module/system/foreign.scm (%null-pointer): New exported binding.
Ludovic Courtès [Tue, 16 Mar 2010 23:52:52 +0000 (00:52 +0100)]
Remove obsolete test directory.
* test-suite/tests/c-api: Remove.
Ludovic Courtès [Tue, 16 Mar 2010 23:51:22 +0000 (00:51 +0100)]
Change `dynamic-link' to return a global handle when the argument is omitted.
* libguile/dynl.c (sysdep_dynl_link): Handle FNAME == NULL.
(scm_dynamic_link): Make argument optional. Adjust body accordingly.
* test-suite/standalone/test-ffi (global, strerror, strlen): New
bindings.
Add test for these bindings.
* doc/ref/api-modules.texi (Low level dynamic linking): Update
description of `dynamic-link'.
Ludovic Courtès [Tue, 16 Mar 2010 23:45:57 +0000 (00:45 +0100)]
Provide `int', `long', `size_t', etc. in `(system foreign)'.
* libguile/foreign.c (sym_int, sym_long, sym_unsigned_int,
sym_unsigned_long, sym_size_t): New variables.
(scm_init_foreign): Define them at the Scheme level.
* module/system/foreign.scm (int, unsigned-int, long,
unsigned-long, size_t): New exported bindings.
Ludovic Courtès [Tue, 16 Mar 2010 23:06:13 +0000 (00:06 +0100)]
Fix doc string of `dynamic-pointer'.
* libguile/dynl.c (scm_dynamic_pointer): Fix doc string. Reformat body.
Ludovic Courtès [Tue, 16 Mar 2010 22:51:21 +0000 (23:51 +0100)]
Use GC-managed pointerless memory in the FFI.
* libguile/foreign.c (scm_make_foreign_function): Use
`scm_gc_malloc_pointerless ()' when allocating memory for CIF.
(pack): Likewise for the `FFI_TYPE_STRUCT' case.
Andy Wingo [Tue, 16 Mar 2010 22:58:34 +0000 (23:58 +0100)]
update NEWS for 1.9.9
* NEWS: Update.
Andy Wingo [Tue, 16 Mar 2010 21:56:37 +0000 (22:56 +0100)]
cull 1.9.8 NEWS items
* NEWS: Remove 1.9.8 items; they have been folded in already.
Andy Wingo [Tue, 16 Mar 2010 21:47:35 +0000 (22:47 +0100)]
add a section to the manual on prompts
* doc/ref/api-control.texi (Prompts): Add a section on prompts.
Andy Wingo [Tue, 16 Mar 2010 20:37:12 +0000 (21:37 +0100)]
parallel installability for libguile*.h
* Makefile.am:
* libguile/Makefile.am (modincludedir): Install into
$pkgincludedir/$GUILE_EFFECTIVE_VERSION. This allows multiple Guile
development packages to be installed at once.
* guile-readline/Makefile.am (modincludedir):
* srfi/Makefile.am (srfiincludedir): Likewise.
* meta/guile-2.0.pc.in (Cflags): Add the appropriate -I line so that
user code picks up the new location transparently.
Andy Wingo [Tue, 16 Mar 2010 20:18:12 +0000 (21:18 +0100)]
rename libguile to libguile-@EFFECTIVE_VERSION@, currently libguile-2.0
* libguile/Makefile.am (lib_LTLIBRARIES): Instead of just "libguile.la",
make "libguile-@EFFECTIVE_VERSION@.la". This allows multiple versions
of Guile to be installed at once. See
http://www106.pair.com/rhp/parallel.html for a rationale.
(libguile_@GUILE_EFFECTIVE_VERSION@_la_CFLAGS):
(libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES):
(EXTRA_libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES):
(libguile_@GUILE_EFFECTIVE_VERSION@_la_DEPENDENCIES):
(libguile_@GUILE_EFFECTIVE_VERSION@_la_LIBADD):
(libguile_@GUILE_EFFECTIVE_VERSION@_la_LDFLAGS): Fixup automake vars
to include the effective version.
(guile_LDADD): Fix up the spelling of libguile.
* libguile/bytevectors.c (scm_bootstrap_bytevectors):
* libguile/foreign.c (scm_register_foreign):
* libguile/i18n.c (scm_bootstrap_i18n):
* libguile/instructions.c (scm_bootstrap_instructions):
* libguile/objcodes.c (scm_bootstrap_objcodes):
* libguile/programs.c (scm_bootstrap_programs):
* libguile/vm.c (scm_bootstrap_vm): Register extensions using e.g.
"libguile-2.0" as the libname -- i.e., including the effective version
in the libname.
* module/ice-9/i18n.scm:
* module/rnrs/bytevector.scm:
* module/rnrs/io/ports.scm:
* module/system/foreign.scm:
* module/system/vm/instruction.scm:
* module/system/vm/objcode.scm:
* module/system/vm/program.scm:
* module/system/vm/vm.scm: When doing a load-extension for something in
Guile, use the effective version also.
* meta/guile-2.0-uninstalled.pc.in (Libs):
* meta/guile-2.0.pc.in (Libs): Use -lguile-@EFFECTIVE_VERSION@. This
change should mean that code built against Guile should not be
affected by the libguile rename.
* guile-readline/Makefile.am (libguilereadline_v_@LIBGUILEREADLINE_MAJOR@_la_LIBADD):
* srfi/Makefile.am
(libguile_srfi_srfi_1_v_@LIBGUILE_SRFI_SRFI_1_MAJOR@_la_LIBADD):
(libguile_srfi_srfi_4_v_@LIBGUILE_SRFI_SRFI_4_MAJOR@_la_LIBADD):
(libguile_srfi_srfi_13_14_v_@LIBGUILE_SRFI_SRFI_13_14_MAJOR@_la_LIBADD):
(libguile_srfi_srfi_60_v_@LIBGUILE_SRFI_SRFI_60_MAJOR@_la_LIBADD):
* test-suite/standalone/Makefile.am (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): Fix up the spelling of libguile.la.
Andy Wingo [Tue, 16 Mar 2010 19:58:24 +0000 (20:58 +0100)]
version.h has SCM_EFFECTIVE_VERSION; effective-version uses that
* libguile/version.c (scm_effective_version): Use SCM_EFFECTIVE_VERSION.
* libguile/version.h.in (SCM_EFFECTIVE_VERSION): Define from
GUILE_EFFECTIVE_VERSION.
* libguile/Makefile.am (version.h): Subst in GUILE_EFFECTIVE_VERSION.
* test-suite/tests/version.test ("version reporting works"): The
effective version is not necessarily MAJOR.MINOR. Remove check.
Andy Wingo [Tue, 16 Mar 2010 19:27:47 +0000 (20:27 +0100)]
Bump GUILE_EFFECTIVE_VERSION to 2.0
* GUILE-VERSION (GUILE_EFFECTIVE_VERSION): Bump to 2.0.
Andy Wingo [Tue, 16 Mar 2010 19:27:10 +0000 (20:27 +0100)]
decouple GUILE_VERSION from GUILE_EFFECTIVE_VERSION.
* GUILE-VERSION (GUILE_VERSION): Decouple from GUILE_EFFECTIVE_VERSION.
This allows us to bumpt the effective version to 2.0 before reaching 2.0.
Andy Wingo [Tue, 16 Mar 2010 14:55:24 +0000 (15:55 +0100)]
more vm gc fixen
* libguile/vm-i-system.c (continuation_call): Sync before calling a
continuation. Shouldn't much matter, but it seems like a good idea.
(wind-fluids): More importantly, sync before allocating a with-fluids
object.
Ludovic Courtès [Mon, 15 Mar 2010 16:54:45 +0000 (17:54 +0100)]
configure: Abort when GMP is not found.
* configure.ac: Fix erroneous `AC_LIB_HAVE_LINKFLAGS' invocation. Above
when $HAVE_LIBGMP is not "yes".
Ludovic Courtès [Mon, 15 Mar 2010 14:39:43 +0000 (15:39 +0100)]
Make sure the whole VM stack is always scanned by the GC.
Thanks to Andy for noticing this.
* libguile/vm-engine.h (SYNC_REGISTER, CACHE_REGISTER): Add comment.
* libguile/vm-i-scheme.c (make_struct): Call `SYNC_REGISTER ()' in all
cases since the GC is going to run.
(struct_ref, struct_set): Call `SYNC_REGISTER ()' on the slow path.
(BV_REF_WITH_ENDIANNESS, BV_FIXABLE_INT_REF, BV_INT_REF): Likewise.
(BV_FLOAT_REF): Always `SYNC_REGISTER ()'.
Ludovic Courtès [Sun, 14 Mar 2010 22:37:00 +0000 (23:37 +0100)]
doc: Update "Multi-Threading" node.
* doc/ref/libguile-concepts.texi (Multi-Threading): Remove bits about
the requirement not to block in guile mode.
Ludovic Courtès [Sun, 14 Mar 2010 22:28:12 +0000 (23:28 +0100)]
doc: Remove obsolete reference to the lack of Unicode support.
* doc/ref/api-data.texi (Bytevectors as Strings): Remove obsolete
footnote on the lack of Unicode support.
* test-suite/tests/bytevectors.test ("2.9 Operations on
Strings")["string->utf8 [latin-1]", "utf8->string [latin-1]"]: Remove
use of `with-latin1-locale'.
["string->utf32 [Greek]"]: New tests.
Andy Wingo [Sun, 14 Mar 2010 22:28:26 +0000 (23:28 +0100)]
small vm.texi updates
* doc/ref/vm.texi (A Virtual Machine for Guile):
(VM Concepts, Variables and the VM, Branch Instructions): Small
updates.
Andy Wingo [Sun, 14 Mar 2010 22:09:56 +0000 (23:09 +0100)]
add some vm hook docs
* doc/ref/api-evaluation.texi (VM Behaviour): Add docs for
vm-trace-level and set-vm-trace-level!.
Andy Wingo [Sun, 14 Mar 2010 22:06:58 +0000 (23:06 +0100)]
(debug) at the repl invokes the vm debugger
* module/ice-9/boot-9.scm (top-repl): Map (debug) at the repl to (system
vm debug).
* module/system/vm/debug.scm (run-debugger, debugger-repl): Don't take
the index as an arg, for now anyway.
(debug): New wrapper.
Andy Wingo [Sun, 14 Mar 2010 22:05:42 +0000 (23:05 +0100)]
Update api-debug.texi; there is a ways to go.
* doc/ref/api-debug.texi: Update a bit.
Andy Wingo [Sun, 14 Mar 2010 16:48:49 +0000 (17:48 +0100)]
pmatch license clarification clarifications
* module/system/base/pmatch.scm: Clarify the clarifications (somehow
didn't make it into my last commit).
Andy Wingo [Sun, 14 Mar 2010 16:46:13 +0000 (17:46 +0100)]
clarify pmatch licensing
* module/system/base/pmatch.scm: Clarify licensing.
Andy Wingo [Sun, 14 Mar 2010 14:07:44 +0000 (15:07 +0100)]
fix critical bug in history.texi
* doc/ref/history.texi (A Timeline of Selected Guile Releases): Ahem :)
Andy Wingo [Sun, 14 Mar 2010 13:39:47 +0000 (14:39 +0100)]
update "data representation" part of guile internals doc
* doc/ref/api-control.texi (Handling Errors): Move the "Signalling Type
Errors" section here.
* doc/ref/data-rep.texi (Data Representation): Refactor, lopping and
cropping and stitching.
* doc/ref/libguile-concepts.texi (Dynamic Types):
* doc/ref/libguile-smobs.texi (Describing a New Type, Double Smobs):
* doc/ref/guile.texi (Guile Implementation, Programming in C): Adapt to
refactorings.
* doc/ref/history.texi (A Scheme of Many Maintainers):
(A Timeline of Selected Guile Releases, Status): Update.
Andy Wingo [Sat, 13 Mar 2010 20:03:06 +0000 (21:03 +0100)]
narrowing stacks to prompts; backtrace shows frames from start-stack
* libguile/stacks.c (scm_sys_stacks): New global variable, moved here
from boot-9.scm.
(scm_init_stacks): Define scm_sys_stacks to %stacks.
(stack_depth): Remove narrowing by frame pointer.
(find_prompt): New helper.
(narrow_stack): Clean up a bit, and allow narrowing by prompt tag.
(scm_make_stack): Update docs, and use scm_stack_id to get the stack
id.
(scm_stack_id): The current stack id may be fetched as the cdar of
%stacks.
(stack_id_with_fp): Remove helper.
* module/ice-9/boot-9.scm (%start-stack): Fix indentation.
(%stacks): Remove definition, it's in stacks.c now.
(default-pre-unwind-handler): Narrow by another frame.
(save-stack): Remove special handling for certain stack ids, as it is
often possible that the function isn't on the stack -- in the
interpreter, or after a tail call. Better to narrow by prompt ids.
* module/system/vm/debug.scm (print-frames): Change to operate on a
vector of frames.
(run-debugger): Change to receive a vector of frames. The debugger
also has the full stack, so it can re-narrow (or widen) to get the
whole stack, if the user wants.
(stack->vector): New helper.
(debug-pre-unwind-handler): Narrow by more frames, and to the most
recent start-stack invocation. Adapt to run-debugger change.
Andy Wingo [Fri, 12 Mar 2010 11:10:23 +0000 (12:10 +0100)]
remove repl-vm; repl evaluation does not cause recursive vm invocation
* module/system/repl/common.scm (<repl>): Remove "vm" field and repl-vm
accessor. I think the correct model is to just use the-vm. This change
was prompted by the need to have the REPL itself not cause a recursive
VM invocation, so that captured prompts at the REPL are rewindable.
(make-repl): Remove treatment of #:vm.
(repl-eval): Load a compiled expression as a simple thunk, avoiding a
recursive VM call.
* module/system/repl/command.scm (profile, trace): Remove repl-vm
treatment.
(backtrace, debugger, step): Remove, as they were not implemented.
Andy Wingo [Fri, 12 Mar 2010 10:54:26 +0000 (11:54 +0100)]
prompt around REPL evaluations, and around `guile' program invocation
* module/ice-9/control.scm (%): Add a single-argument case, which
instates a default prompt with a default handler.
* libguile/script.c (scm_compile_shell_switches): Wrap user programs in
a default prompt.
* module/system/repl/common.scm (repl-eval): REPL expressions are user
programs too; wrap each one in a default prompt.
Andy Wingo [Thu, 11 Mar 2010 21:36:15 +0000 (22:36 +0100)]
add abort to unknown prompt test
* libguile/control.c (scm_c_abort): Change error string if a prompt
isn't found.
* test-suite/tests/control.test ("abort to unknown prompt"): New test.
Andy Wingo [Thu, 11 Mar 2010 21:31:29 +0000 (22:31 +0100)]
remove internal treatment of default prompt tag, it seems there was no need
* libguile/control.h (scm_sys_default_prompt_tag):
* libguile/control.c (scm_init_control): Remove the logic that defined
%default-prompt-tag.
(scm_c_abort): Remove check for default prompt tag, it wasn't useful.
* libguile/throw.c (sym_pre_init_catch_tag): Define as the pre-init
prompt tag.
(pre_init_catch, pre_init_throw): Use sym_pre_init_catch_tag.
* module/ice-9/boot-9.scm (default-prompt-tag): Define as a simple
value, not a fluid. Perhaps we can expose it as a fluid later.
Andy Wingo [Tue, 9 Mar 2010 21:24:25 +0000 (22:24 +0100)]
prompt, abort -> call-with-prompt, abort-to-prompt
* module/ice-9/boot-9.scm (default-prompt-tag, make-prompt-tag): New
functions.
(call-with-prompt, abort-to-prompt): Rename from `prompt' and `abort',
respectively. These names are more clear, and allow `prompt' and
`abort' to have more convenient, less general bindings.
(default-throw-handler, custom-throw-handler, catch, %start-stack):
Adapt callers.
* module/ice-9/control.scm: Adapt re-export list.
(control): Remove binding, until we're sure that it is Sitaram's
control.
(abort): New binding, aborts to the nearest prompt with the default
tag.
(%): Use call-with-prompt.
* module/language/tree-il/primitives.scm (*primitive-expand-table*):
(*interesting-primitive-names*): Adapt for prompt/abort changes.
* test-suite/tests/control.test: Take advantage of the defaults for %
and abort.
Andy Wingo [Sun, 7 Mar 2010 21:37:57 +0000 (22:37 +0100)]
%start-stack in Scheme, in terms of prompts
* libguile/debug.h:
* libguile/debug.c (scm_sys_start_stack): Removed, we implement this in
Scheme now.
* libguile/vm.h:
* libguile/vm.c (scm_vm_call_with_new_stack): Likewise removed.
* module/ice-9/boot-9.scm (%start-stack): Implement in terms of prompts.
(%stacks): New fluid, for tracking active stacks.
(start-stack): Implement using syntax-rules.
Andy Wingo [Sun, 7 Mar 2010 21:19:13 +0000 (22:19 +0100)]
fix continuation printing bug
* libguile/programs.c (scm_i_program_print): Fix bug printing
continuations.
Ludovic Courtès [Sun, 7 Mar 2010 22:53:22 +0000 (23:53 +0100)]
Don't export `write-bytecode' from `(language assembly compile-bytecode)'.
* module/language/assembly/compile-bytecode.scm: Don't export
`write-bytecode'.
* test-suite/tests/asm-to-bytecode.test (write-bytecode): New global
variable.
Ludovic Courtès [Sun, 7 Mar 2010 22:51:40 +0000 (23:51 +0100)]
Add wide-string compilation test.
* test-suite/tests/asm-to-bytecode.test ("compiler")[load-wide-string
"λ"]: New test.
Ludovic Courtès [Sun, 7 Mar 2010 22:45:14 +0000 (23:45 +0100)]
Fix miscompilation of non-ASCII Latin-1 strings.
The bug was introduced
dad6817f ("Use the R6RS I/O API in
`write-bytecode'.").
* module/language/assembly/compile-bytecode.scm
(write-bytecode)[write-string]: Rename to...
[write-latin1-string]: ... this. Add the `write-loader-len' call.
Write each character individually instead of using `string->utf8'.
[write-loader]: Remove.
* test-suite/tests/asm-to-bytecode.test ("compiler")[load-string "æ"]:
New test.
Ludovic Courtès [Fri, 5 Mar 2010 12:38:28 +0000 (13:38 +0100)]
Recycle fluid numbers.
* libguile/fluids.c: Remove outdated comment on the complexity of fluid GC.
(FLUID_GROW): Increase to 128.
(allocated_fluids): Change to `void **'.
(allocated_fluids_num): Remove.
(grow_dynamic_state): Remove race-condition checker. Grow to
ALLOCATED_FLUIDS_LEN.
(next_fluid_num): Rename to...
(new_fluid): ... this. Return a fluid instead of a fluid number.
Assume ALLOCATED_FLUIDS is sparse and search for a free number in it.
Make ALLOCATED_FLUIDS point to pointerless memory and initialize
individual elements with a pointer to the new fluid. Register a
disappearing link from there to the fluid.
(scm_make_fluid): Use `new_fluid ()'.
(scm_fluid_ref, scm_fluid_set_x, scm_i_swap_with_fluids): Remove
assertion that wasn't checked in a thread-safe way.
Ludovic Courtès [Fri, 5 Mar 2010 10:41:42 +0000 (11:41 +0100)]
Add new fluid tests.
* test-suite/tests/fluids.test ("initial fluid values")["initial value
is inherited from parent thread"]: New test.
("fluid values are thread-local"): New test.
Ludovic Courtès [Fri, 5 Mar 2010 08:49:04 +0000 (09:49 +0100)]
Don't gratuitously over-engineer things...
* libguile/eval.c (eval)[SCM_M_CALL]: Always use `alloca' for ARGV.
Ludovic Courtès [Thu, 4 Mar 2010 23:20:18 +0000 (00:20 +0100)]
Slightly optimize the memoizer, bootstrap evaluator, and `(ice-9 eval)'.
* libguile/eval.c (CAR, CDR, CAAR, CADR, CDAR, CDDR, CADDR, CDDDR): Use
the macro variants, not the functions.
(eval)[SCM_M_CALL]: When invoking a VM program, accumulate its
arguments on the stack rather than on the heap.
* libguile/memoize.c (CAR, CDR, CAAR, CADR, CDAR, CDDR, CADDR, CDDDR,
CADDR): Use the macro variants, not the functions.
(scm_memoized_expression_typecode): Use `SCM_I_MAKINUM' instead of
`scm_from_uint16'.
Ludovic Courtès [Thu, 4 Mar 2010 22:28:38 +0000 (23:28 +0100)]
Remove obsolete compile-time option for freelist debugging.
* configure.ac: Remove `--enable-debug-freelist' option and
`SCM_I_GSC_GUILE_DEBUG_FREELIST' substitution variable.
* libguile/gen-scmconfig.c (main): Remove references to
`SCM_I_GSC_GUILE_DEBUG_FREELIST' and `GUILE_DEBUG_FREELIST'.
* libguile/gen-scmconfig.h.in (SCM_I_GSC_GUILE_DEBUG_FREELIST): Remove.
Andy Wingo [Thu, 4 Mar 2010 15:50:11 +0000 (16:50 +0100)]
some with-fluid* -> with-fluids
* module/ice-9/boot-9.scm (false-if-exception, load)
(try-module-autoload):
* module/language/tree-il/compile-glil.scm (compile-glil): Turn some
with-fluid* invocations into with-fluids.
Andy Wingo [Thu, 4 Mar 2010 11:02:02 +0000 (12:02 +0100)]
partial continuations print as #<partial-continuation ...>
* libguile/control.c (reify_partial_continuation):
* libguile/programs.c (scm_i_program_print):
* libguile/programs.h (SCM_F_PROGRAM_IS_PARTIAL_CONTINUATION)
(SCM_PROGRAM_IS_PARTIAL_CONTINUATION): Distinguish partial
continuations from full continuations.
Andy Wingo [Thu, 4 Mar 2010 10:37:03 +0000 (11:37 +0100)]
tighten up scm_i_dowinds, fixing invalid SCM_CAR (prompt)
* libguile/dynwind.c: Update comment regarding what can be on the wind
stack.
(scm_i_dowinds): Clean up to remove @bind and catch/throw-handler
cases, to add a case for prompts, and to be more strict in general
regarding the set of things that can be on the wind stack. Fixes a bug
whereby prompts were accessed via SCM_CAR; thanks to Ken Raeburn for
the report.
Andy Wingo [Thu, 4 Mar 2010 10:25:22 +0000 (11:25 +0100)]
add printers for prompts and with-fluids objects
* libguile/control.c:
* libguile/control.h (scm_i_prompt_print):
* libguile/fluids.c:
* libguile/fluids.h (scm_i_with_fluids_print):
* libguile/print.c (iprin1): Add printers for prompts and with-fluids
objects.
Ludovic Courtès [Thu, 4 Mar 2010 10:32:51 +0000 (11:32 +0100)]
Try to avoid `guile-test' failures when it can't display the name of a test.
This can happen, e.g., when printing "UNRESOLVED: regexp.test: TEST-NAME",
where TEST-NAME contains characters that cannot be converted to the
encoding of the current output or error port.
* test-suite/guile-test (main): Set the conversion strategy for the
output and error ports to `escape'.
* test-suite/tests/regexp.test (current-output-port): Likewise.