summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2010-03-31Adapt ECMAScript parser and lexer to `(system base lalr)'.Ludovic Courtès4-2017/+297
* 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'.
2010-03-31Add rudimentary ECMAScript tests.Ludovic Courtès2-0/+75
* test-suite/Makefile.am (SCM_TESTS): Add `tests/ecmascript.test'. * test-suite/tests/ecmascript.test: New file.
2010-03-31Mention `(system base lalr)' in the manual.Ludovic Courtès3-0/+39
* 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.
2010-03-31Add Boucher's `lalr-scm' as the `(system base lalr)' module.Ludovic Courtès29-1/+3759
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.
2010-03-31fix equal? between an array and a non-arrayAndy Wingo3-7/+39
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.
2010-03-30Revert "fix equal? between an array and a non-array"Andy Wingo3-25/+1
This reverts commit 9d031d4d575ac8f343a5d984cb02cd374577c5a9.
2010-03-30fix equal? between an array and a non-arrayAndy Wingo3-1/+25
* 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.
2010-03-30correctly handle --no-autocompile (fixed broken previous patch)Andy Wingo4-24/+19
* 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.
2010-03-30nil is null, wheeAndy Wingo3-8/+8
* 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.
2010-03-30nil is false, wheeAndy Wingo3-14/+14
* 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.
2010-03-30going through scm_shell not necessary to get autocompilationAndy Wingo2-8/+10
* 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.
2010-03-29fix bug in scm_must_freeAndy Wingo1-11/+5
* 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.
2010-03-29remove out-of-date comment in scm_gc_mallocAndy Wingo1-12/+1
* libguile/gc-malloc.c (scm_gc_malloc): Remove out-of-date comment.
2010-03-29(texinfo reflection) parses out macro metadataAndy Wingo1-19/+36
* 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.
2010-03-29metadata for syntax-rules, identifier-syntax, and define-macro macrosAndy Wingo3-7782/+7968
* 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.
2010-03-28Renumber IFLAGSs so the first 8 are reserved for lisp booleans.Mark H Weaver4-9/+13
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
2010-03-28Fix inlining of lambda-apply-lambda.Andy Wingo1-1/+1
* 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.
2010-03-26remove spurious declarations in c-tokenize.lexAndy Wingo2-14/+2
* libguile/c-tokenize.lex: Remove spurious declarations of flex-internal functions, as their prototypes are changing in upstream flex.
2010-03-25vectors of pairs in docstring position are metadataAndy Wingo2-5383/+5442
* 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.
2010-03-25psyntax supports multiple docstrings, merging lambda-case metadataAndy Wingo2-5445/+5429
* 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.
2010-03-23make guile's welcome more gnu-conventional; also warranty and copying infoAndy Wingo2-20/+121
* 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*.
2010-03-22Update manual examples of how to link with GuileAndy Wingo2-6/+5
* 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.
2010-03-20Make `include' tail-recursive.Ludovic Courtès2-7781/+7771
* module/ice-9/psyntax.scm (include)[read-file]: Make tail-recursive. * module/ice-9/psyntax-pp.scm: Regenerate.
2010-03-20Cosmetic changes in `foreign.c'.Ludovic Courtès2-43/+45
* 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.
2010-03-20Fix argument passing to foreign functions.Ludovic Courtès1-5/+17
* libguile/foreign.c (scm_i_foreign_call): When allocating room for DATA, use the sum of all the argument sizes, not `cif->bytes'.
2010-03-19fix srfi-31 check after macroexpand renameAndy Wingo1-3/+3
* test-suite/tests/srfi-31.test: ("rec special form"): Fix check.
2010-03-19rename sc-expand to macroexpandAndy Wingo5-7779/+7793
* 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.
2010-03-19finish macro docsAndy Wingo1-15/+111
* doc/ref/api-macros.texi: Finish macro docs.
2010-03-19document syntax-caseAndy Wingo2-36/+355
* doc/ref/api-macros.texi: Document syntax-case, and tweak defmacro docs. * doc/ref/api-debug.texi: Move cons-source here.
2010-03-19add GUILE-VERSION to CONFIG_STATUS_DEPENDENCIESAndy Wingo1-0/+2
* Makefile.am (CONFIG_STATUS_DEPENDENCIES): Add GUILE-VERSION, so that a change in GUILE-VERSION causes a reconfigure.
2010-03-18Bump version number for 1.9.9.release_1-9-9Ludovic Courtès1-1/+1
* GUILE-VERSION (GUILE_MICRO_VERSION): Increment.
2010-03-18Update `NEWS'.Ludovic Courtès1-0/+14
2010-03-18A start at syntax-rules docsAndy Wingo5-293/+482
* 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.
2010-03-18Improve encoding error reporting.Ludovic Courtès3-36/+58
* 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.
2010-03-18Update Gnulib; use the `func' module.Ludovic Courtès31-1037/+3036
Update Gnulib to v0.0-3575-g128e4b8. * m4/gnulib-cache.m4: Add `func'.
2010-03-18Add `%null-pointer' to `(system foreign)'.Ludovic Courtès2-1/+15
* 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.
2010-03-17Remove obsolete test directory.Ludovic Courtès5-250/+0
* test-suite/tests/c-api: Remove.
2010-03-17Change `dynamic-link' to return a global handle when the argument is omitted.Ludovic Courtès3-9/+61
* 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'.
2010-03-17Provide `int', `long', `size_t', etc. in `(system foreign)'.Ludovic Courtès2-0/+56
* 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.
2010-03-17Fix doc string of `dynamic-pointer'.Ludovic Courtès1-16/+18
* libguile/dynl.c (scm_dynamic_pointer): Fix doc string. Reformat body.
2010-03-17Use GC-managed pointerless memory in the FFI.Ludovic Courtès1-6/+8
* 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.
2010-03-16update NEWS for 1.9.9Andy Wingo1-0/+91
* NEWS: Update.
2010-03-16cull 1.9.8 NEWS itemsAndy Wingo1-76/+1
* NEWS: Remove 1.9.8 items; they have been folded in already.
2010-03-16add a section to the manual on promptsAndy Wingo1-6/+112
* doc/ref/api-control.texi (Prompts): Add a section on prompts.
2010-03-16parallel installability for libguile*.hAndy Wingo5-6/+10
* 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.
2010-03-16rename libguile to libguile-@EFFECTIVE_VERSION@, currently libguile-2.0Andy Wingo21-49/+64
* 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.
2010-03-16version.h has SCM_EFFECTIVE_VERSION; effective-version uses thatAndy Wingo4-16/+8
* 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.
2010-03-16Bump GUILE_EFFECTIVE_VERSION to 2.0Andy Wingo1-1/+1
* GUILE-VERSION (GUILE_EFFECTIVE_VERSION): Bump to 2.0.
2010-03-16decouple GUILE_VERSION from GUILE_EFFECTIVE_VERSION.Andy Wingo1-1/+1
* GUILE-VERSION (GUILE_VERSION): Decouple from GUILE_EFFECTIVE_VERSION. This allows us to bumpt the effective version to 2.0 before reaching 2.0.
2010-03-16more vm gc fixenAndy Wingo1-0/+2
* 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.