summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2012-01-30Merge remote-tracking branch 'origin/stable-2.0'Andy Wingo45-18738/+20211
Conflicts: libguile/debug.h module/ice-9/psyntax-pp.scm module/ice-9/psyntax.scm module/language/tree-il/peval.scm module/language/tree-il/primitives.scm
2012-01-30Merge commit '3d51e57cfb0404db568a6adfde2a346d3fd9907e'Andy Wingo38-169/+560
Conflicts: libguile/foreign.c libguile/hashtab.c module/ice-9/psyntax-pp.scm module/language/tree-il/compile-glil.scm
2012-01-30Merge commit '9b0975f1dc41ddd10d81fb5b0965b9e9a54ef37a'Andy Wingo331-817/+1929
Conflicts: libguile/foreign.c module/ice-9/psyntax-pp.scm module/ice-9/psyntax.scm
2012-01-30fix hook invocation during thread guilificationAndy Wingo1-0/+4
* libguile/gc.c (run_before_gc_c_hook): Don't run pre-GC hooks from a thread that is in the process of guilification.
2012-01-30Rename scm_call_varargs -> scm_callMark H Weaver5-16/+16
* libguile/eval.c, libguile/eval.h, doc/ref/api-evaluation.texi, test-suite/standalone/test-loose-ends.c, NEWS: Rename scm_call_varargs -> scm_call Suggested by Ludovic Courtès <ludo@gnu.org>
2012-01-30Implement scm_call_varargs and scm_call_{7,8,9}Mark H Weaver5-0/+86
* libguile/eval.c (scm_call_7, scm_call_8, scm_call_9, scm_call_varargs): New functions. * libguile/eval.h: Add prototypes. * doc/ref/api-evaluation.texi: Add documentation. * test-suite/standalone/test-loose-ends.c: Add tests. * NEWS: Add news entry.
2012-01-30Fix primitive-eval to return #<unspecified> for definitionsMark H Weaver3-1/+7
* module/ice-9/eval.scm (primitive-eval): Return #<unspecified> for definitions. Previously the variable object was returned. * test-suite/tests/eval.test (evaluator): Add test. * NEWS: Add news entry.
2012-01-30Fix 'local-eval' when the specified environment is a moduleMark H Weaver2-10/+12
* module/ice-9/local-eval.scm (local-wrap): Fix the (module? e) case, to reference the expression 'x' instead of the non-existent variable 'exp', as was previously done. Also use quasisyntax instead of quasiquote, so that the introduced 'lambda' is an identifier instead of a bare symbol, so that this will work in modules that have rebound 'lambda' to something else. * test-suite/tests/eval.test (local-eval): Make sure to test both 'local-eval' and 'local-compile' when the specified environment is a module.
2012-01-30Update user-visible copyright dates in manual and REPL to 2012Mark H Weaver2-2/+2
* doc/ref/guile.texi, module/system/repl/common.scm: Update user-visible copyright dates to 2012.
2012-01-30Augment `Libs.private' with for non-GNU platforms.Ludovic Courtès1-1/+4
Reported by Eli Zaretskii <eliz@gnu.org>. * meta/guile-2.0.pc.in (Libs.private): Add all the optional libraries that may be pulled via Gnulib on non-GNU platforms.
2012-01-29paper over some "lexical vars are collectable" flakinessAndy Wingo1-11/+23
* test-suite/tests/gc.test ("gc"): Hack around flakiness in "lexical vars are collectable" on some architectures.
2012-01-29Revert "vm-i-scheme.c slight refactor"Andy Wingo1-125/+45
This reverts commit c0e4449908eee84bcb293ec21c10fec646bde45d. This refactor was needed for the introduction of DEAD(), which does not appear to have been necessary.
2012-01-29Revert "attempt to clear stale references on VM C stack"Andy Wingo4-229/+10
This reverts commit 04b2d773548c57b6eadd1808a8d15cce47af9630. Since it wasn't fixing the "lexical vars are collectable" test, it added complexity with no benefit.
2012-01-29Revert "Work around instruction reordering on SPARC and HPPA in the VM."Ludovic Courtès1-21/+4
This reverts commit 2b264d7e4fb649955ade1814527b6eb6f34f4e18, which is unnecessary after commit f5ea0499a411309014475dc7f7983e827f431af2 ("Build with `-fno-strict-aliasing' when available.").
2012-01-28Fix double-free error on non-GNU systems.Chris K. Jester-Young1-0/+3
* libguile/i18n.c (scm_make_locale): Null out c_locale_name after it's freed, so it doesn't get freed again. While this only has effect if USE_GNU_LOCALE_API is unset, the nulling out happens in both cases, to be consistent and robust. (scm_nl_langinfo): Free c_result in all switch cases, in particular P_SIGN_POSN, N_SIGN_POSN, INT_P_SIGN_POSN, and INT_N_SIGN_POSN.
2012-01-28mention new manual sections in NEWSAndy Wingo1-0/+6
* NEWS: Mention new sections.
2012-01-27Build with `-fno-strict-aliasing' when available.Ludovic Courtès1-1/+6
* configure.ac (POTENTIAL_GCC_CFLAGS): Add `-fno-strict-aliasing'. Suggested by Mark H. Weaver.
2012-01-27attempt to clear stale references on VM C stackAndy Wingo4-10/+229
* libguile/vm-engine.h (DEAD): New macro, nulls out a value. * libguile/vm-i-system.c: * libguile/vm-i-loader.c: * libguile/vm-i-scheme.c: Use DEAD when variables become dead. Later we can #ifdef this out, but I want to give the buildbots a try with this patch to make sure it's correct.
2012-01-27vm-i-scheme.c slight refactorAndy Wingo1-45/+125
* libguile/vm-i-scheme.c: Refactor the RETURN macro to not include NEXT. Adapt all uses to NEXT on their own.
2012-01-27document `include', `include-from-path'Andy Wingo1-0/+62
* doc/ref/api-evaluation.texi (Local Inclusion): New section.
2012-01-27more documentation on the process of loading source and compiled filesAndy Wingo5-60/+89
* doc/ref/api-evaluation.texi (Load Paths): Move documentation of %load-path and related procedures here, from Build Config. Add docs for %load-compiled-path. * doc/ref/api-foreign.texi: * doc/ref/api-modules.texi: * doc/ref/api-options.texi: * doc/ref/scheme-using.texi: Update xrefs.
2012-01-27Fix error messages involving definition formsMark H Weaver3-11325/+11472
* module/ice-9/psyntax.scm (syntax-type): Return an additional value that contains the entire form in _all_ cases, including for definition forms. Previously, the entire form was not returned for definition forms. (expand-expr): Add an additional argument that contains the entire form in _all_ cases, including for definition forms. Use it to include the entire form in error messages, notably for definitions in expression context. Include the source location information, which was previously missing from these errors when the rhs expression was an atom. Improve the "definition in expression context" error message to be more comprehensible for Scheme beginners. (expand-top-sequence, expand, expand-body): Adjust as needed to handle the additional return value from 'syntax-type' and the additional argument to 'expand-expr'. * module/ice-9/psyntax-pp.scm: Regenerate. * NEWS: Update.
2012-01-26update NEWSAndy Wingo1-28/+77
* NEWS: Update.
2012-01-26fix test-loose-endsAndy Wingo1-1/+4
* test-suite/standalone/test-loose-ends.c (test_scm_local_eval): Use ice-9 local-eval to get (the-environment).
2012-01-26update local-eval docsAndy Wingo1-21/+46
* doc/ref/api-evaluation.texi (Local Evaluation): Update docs, add some examples.
2012-01-26more readable gensymsAndy Wingo3-5989/+5214
* module/language/tree-il/peval.scm (peval): * module/language/tree-il/primitives.scm (dynamic-wind): When you make a gensym that just has to be compared against other gensyms, it will be unique if the prefix doesn't end in something that can be interpreted as a number. There's no reason to make that character something difficult like " ". So change to use a dash in that case. * module/ice-9/psyntax-pp.scm: Regenerate. More readable now.
2012-01-26globally unique marks and labels using syntax-session-idAndy Wingo5-12952/+12112
* libguile/macros.c (scm_init_macros): Add definition of new syntax-session-id helper. * module/ice-9/psyntax.scm: Capture a reference to syntax-session-id at boot time. Uniquify marks and labels using the session id. * module/ice-9/boot-9.scm: Shunt syntax-session-id off to (system syntax) once we finished booting. * module/ice-9/compile-psyntax.scm: Override syntax-session-id when remaking psyntax to avoid spurious diffs. * module/ice-9/psyntax-pp.scm: Regenerate.
2012-01-26Revert "Universally-unique gensyms"Andy Wingo3-44/+11
This reverts commit ad432bc8317c33899efc29854550b67f3d7babf7. Not all gensyms need to be universally-unique: most of them just need to be unique within some portion of a Guile session. We'll take a different tack on this problem in the next commit.
2012-01-26Implement `local-eval', `local-compile', and `the-environment'Andy Wingo7-7/+411
* module/ice-9/local-eval.scm: New module (ice-9 local-eval) which exports `the-environment', `local-eval', and `local-compile'. * libguile/debug.c (scm_local_eval): New C function that calls the Scheme implementation of `local-eval' in (ice-9 local-eval). * libguile/debug.h (scm_local_eval): Add prototype. * doc/ref/api-evaluation.texi (Local Evaluation): Add documentation. * test-suite/tests/eval.test (local evaluation): Add tests. * test-suite/standalone/test-loose-ends.c (test_scm_local_eval): Add test. * module/Makefile.am: Add ice-9/local-eval.scm. Based on a patch by Mark H Weaver <mhw@netris.org>.
2012-01-26Fix a couple of warnings.Ludovic Courtès2-2/+4
* module/scripts/list.scm: Use SRFI-1. * module/system/repl/error-handling.scm: Use (ice-9 format).
2012-01-26Fix typo in `-Wformat'.Ludovic Courtès1-1/+1
* module/language/tree-il/analyze.scm (format-analysis): Call `warning', not `warn'.
2012-01-26Add warnings for unsupported `simple-format' options.Ludovic Courtès4-31/+112
* module/language/tree-il/analyze.scm (format-analysis)[check-simple-format-args]: New procedure. Use it. Add support for applications of <module-ref>. * module/system/base/message.scm (%warning-types): Handle the `format simple-format' warning. * module/language/scheme/spec.scm (scheme)[make-default-environment]: Use `simple-format' as the default `format'. * test-suite/tests/tree-il.test ("warnings")["format"]: Explicitly use (@ (ice-9 format) format) where needed. ("simple-format"): New test prefix.
2012-01-25Import Gnulib's `setenv' module, for MinGW.Ludovic Courtès5-2/+550
Reported by Eli Zaretskii <eliz@gnu.org>. * m4/gnulib-cache.m4 (gl_MODULES): Add `setenv'.
2012-01-25new syntax procedures to (system syntax)Andy Wingo4-12338/+12375
* module/ice-9/boot-9.scm: * module/ice-9/psyntax.scm (syntax-module, syntax-local-binding) (syntax-locally-bound-identifiers): After boot, move these definitions to a new (system syntax) module. * module/ice-9/psyntax-pp.scm: Regenerate. * doc/ref/api-macros.texi: Add some words about syntax-module and friends being in (system syntax).
2012-01-25add syntax-moduleAndy Wingo4-7053/+7082
* module/ice-9/psyntax.scm (syntax-module): New accessor for syntax objects. * module/ice-9/psyntax-pp.scm: Regenerate. * module/ice-9/boot-9.scm: Declare syntax-module. * doc/ref/api-macros.texi: Document it.
2012-01-25add syntax-locally-bound-identifiersAndy Wingo4-11457/+13078
* module/ice-9/boot-9.scm (syntax-locally-bound-identifiers): Declare variable. * module/ice-9/psyntax.scm: Add locally-bound-identifiers helper, and define syntax-locally-bound-identifiers. * module/ice-9/psyntax-pp.scm: Regenerated. * doc/ref/api-macros.texi: Document the new procedure.
2012-01-25fix "lexical vars are collectable" testAndy Wingo1-3/+6
* test-suite/tests/gc.test ("gc"): Fix "lexical vars are collectable" test. (Previously, the binding was getting inlined, so we weren't testing what we meant to test. Besides that, the value was a constant, not a closure, so it wasn't collectable in the first place!)
2012-01-25better function prologue disassemblyAndy Wingo1-1/+4
* module/language/assembly/disassemble.scm (code-annotation): Add an annotation for assert-nargs-ee/locals and assert-nargs-ge/locals.
2012-01-25add another case in which to fold (values FOO) to FOO, for some FOOAndy Wingo1-2/+4
* module/language/tree-il/peval.scm (peval): Fold (values 'singly-valued-expression) to 'singly-valued-expression in contexts that expect multiple values, in addition to those that expect single values.
2012-01-25fix values miscompilation in push context with RAAndy Wingo2-6/+22
* module/language/tree-il/compile-glil.scm (flatten-lambda-case): Fix miscompilation of `values' in a push context with RA. * test-suite/tests/tree-il.test: Add low-level test for this miscompilation.
2012-01-24Work around instruction reordering on SPARC and HPPA in the VM.Ludovic Courtès1-4/+21
Fixes part of <http://bugs.gnu.org/10520>. Reported by Bruno Haible <bruno@clisp.org>. * libguile/vm-i-system.c (COMPILER_BARRIER): New macro. (halt, return, return_values): Insert compiler barrier after each assignment to `fp'.
2012-01-24vlist: Use (ice-9 format).Ludovic Courtès1-1/+2
* module/ice-9/vlist.scm: Use (ice-9 format).
2012-01-23FFI: Fix `set-pointer-finalizer!' to leave the type cell unchanged.Ludovic Courtès2-3/+7
This is a followup to 690a0112e55823aa8b862daeddcf44cea97e7917 ("Remove the "has finalizer?" bit from pointer objects.") * libguile/foreign.c (scm_set_pointer_finalizer_x): Leave the type cell unchanged. Before, `equal?' would break on pointers on which `set-pointer-finalizer!' had been called. * test-suite/tests/foreign.test ("make-pointer")["equal? modulo finalizer (set-pointer-finalizer!)"]: New test.
2012-01-23guile-readline: Clean `.go' files.Ludovic Courtès1-2/+3
* guile-readline/Makefile.am (CLEANFILES): Add *.go.
2012-01-23current-filename canonicalizes path, remove add-to-pathAndy Wingo2-16/+5
* module/ice-9/boot-9.scm (current-filename): Canonicalize the path, so that the result is independent of the current directory, and so that `dirname' can traverse up the file system, as in the add-to-load-path example. (add-to-path): Remove. The eval-when semantics make this macro too tricky to explain -- people will start using it on other path-like things, in lexical contours, whereas it only really makes sense with load-like paths at the toplevel. * doc/ref/api-evaluation.texi (Loading): Fix link to load-with-path docs, and remove add-to-path docs.
2012-01-23Adjust tests that relied on the output of the hash table printer.Ludovic Courtès2-9/+12
* libguile/hashtab.c (scm_i_hashtable_print): Use `SCM_UNPACK', not `SCM2PTR'. * test-suite/tests/hash.test: Adjust tests that rely on the output of the printer to just check for the suffix of the hash table's external representation.
2012-01-23Print the address of hash tables.Ludovic Courtès1-2/+5
* libguile/hashtab.c (scm_i_hashtable_print): Print the address of EXP.
2012-01-22Augment `release.org'.Ludovic Courtès1-0/+10
* doc/release.org: Mention debbugs and `platform-testers@gnu.org'.
2012-01-22Parenthesize and type `SCM_FRAME' macros; check layout of `scm_vm_frame'.Ludovic Courtès3-7/+16
* libguile/frames.c: Add compile-time assertions on the layout of `struct scm_vm_frame'. (RELOC): Parenthesize and type VAL. * libguile/frames.h (SCM_FRAME_STRUCT): Write in terms of `SCM_FRAME_DATA_ADDRESS'. (SCM_FRAME_DATA_ADDRESS): Parenthesize and type FP. (SCM_FRAME_SET_DYNAMIC_LINK): Write in terms of `SCM_FRAME_DYNAMIC_LINK'. * libguile/vm.c (RELOC): Parenthesize and type SCM_P.
2012-01-22Relax `asm-to-bytecode.test' for when target CPU == native CPU.Ludovic Courtès1-2/+18
* test-suite/tests/asm-to-bytecode.test (native-cpu, native-word-size): New procedures. (test-target): When the target is the native CPU, use the native word size instead of WORD-SIZE.