summaryrefslogtreecommitdiff
AgeCommit message (Collapse)AuthorFilesLines
2011-10-22doc: Document the `sitedir' and `extensiondir' pkg-config variables.Ludovic Courtès1-1/+22
* doc/ref/libguile-parallel.texi (Parallel Installations): Document the `sitedir' and `extensiondir' pkg-config variables. This fixes <https://savannah.gnu.org/bugs/index.php?32515>, reported by Dale. P. Smith.
2011-10-22Fix compilation with `--enable-debug-malloc'.Bake Timmons1-2/+3
* libguile/gc-malloc.c (scm_gc_register_collectable_memory): Add the missing second argument in the call to scm_malloc_register.
2011-10-22Initialize `get_internal_run_time' before it is used.Ludovic Courtès1-2/+2
* libguile/init.c (scm_i_init_guile): Call `scm_init_stime' before `scm_init_gc'. Fixes <https://savannah.gnu.org/bugs/?34616> reported by Bake Timmons.
2011-10-22set width for `,trace' commandBT Templeton1-1/+1
* module/system/repl/command.scm (trace): Set trace width to terminal width by default.
2011-10-21fix segfault in goops if class fields are redefinedAndy Wingo2-12/+70
* libguile/goops.c (map, filter_cpl, remove_duplicate_slots): Use scm_is_pair instead of !scm_is_null, given that we use accessor macros. (check_cpl, build_slots_list): Check that descendents of <class> can't redefine slots of <class>. * test-suite/tests/goops.test ("defining classes"): Add a test. Patch originally by Stefan Israelsson Tampe.
2011-10-20fix misallocation of some <fix> proceduresAndy Wingo2-1/+14
* module/language/tree-il/analyze.scm (analyze-lexicals): When stepping into a non-tail form, we know that labels allocation will be invalid, so use an empty labels set. Fixes http://debbugs.gnu.org/9769. * test-suite/tests/tree-il.test ("labels allocation"): Add a test.
2011-10-19slight frames.h refactorAndy Wingo1-17/+32
* libguile/frames.h: Instead of doing a lot of nasty pointer match and casts here, simply define a struct that aliases the contents of a stack frame. There are some naming issues here, that the SCM_FRAME macros access the scm_vm_frame structure, but SCM_VM_FRAME macros access scm_frame; oh well.
2011-10-18doc: Add `libguile-parallel.texi' to the distribution.Ludovic Courtès1-0/+1
This is a followup to d32df1325dfe5f550cf1262dc7e90ba86b526a7c ("manual: reorganize autoconf, pkg-config info"). * doc/ref/Makefile.am (guile_TEXINFOS): Add `libguile-parallel.texi'.
2011-10-17fix (web http) write-date for mondaysAndy Wingo1-1/+1
* module/web/http.scm (write-date): Fix bug on Mondays. Jeez!
2011-10-16doc: Complete renaming of `autoconf.texi'.Ludovic Courtès1-2/+2
This is a followup to d32df1325dfe5f550cf1262dc7e90ba86b526a7c ("manual: reorganize autoconf, pkg-config info"). * doc/ref/Makefile.am: Replace references to `autoconf.texi' by `libguile-autoconf.texi'.
2011-10-16Update (ice-9 match) from Chibi-Scheme.Ludovic Courtès3-23/+7
* module/ice-9/match.scm (match): Remove macro. * module/ice-9/match.upstream.scm: Update from Chibi-Scheme, which fixes <http://debbugs.gnu.org/9567>. * test-suite/tests/match.test.upstream: Likewise.
2011-10-15coverage: Add tests for `case-lambda'.Ludovic Courtès1-0/+22
* test-suite/tests/coverage.test ("line-execution-counts")["case-lambda"]: New test. ("procedure-execution-count")["case-lambda"]: New test.
2011-10-15doc: Mention the partial evaluator next to `define-inlinable'.Ludovic Courtès1-0/+20
* doc/ref/api-procedures.texi (Inlinable Procedures): Mention inlining performed by the partial evaluator.
2011-10-15coverage: Add test with `eval'.Ludovic Courtès1-2/+17
* test-suite/tests/coverage.test (test-procedure): New procedure. ("procedure-execution-count")["called from eval"]: New test.
2011-10-15Default to using poll(2) in `fport_input_waiting'.Cedric Cellier1-2/+17
* libguile/fports.c (fport_input_waiting): Use poll(2) instead of select(2) when possible. Cosmetic changes by Ludovic Courtès.
2011-10-15revise comments in libguile/tags.hAndy Wingo1-109/+102
* libguile/tags.h: Revise the comments to reflect libgc reality.
2011-10-12update NEWS for 2.0.3Andy Wingo1-0/+98
* NEWS: Update.
2011-10-12add "Installing Site Packages"Andy Wingo3-0/+66
* doc/ref/scheme-using.texi (Installing Site Packages): Add a new section about where to install .scm, .go, and .so files. * doc/ref/tour.texi: Reference it here. * doc/ref/guile.texi: Add new section.
2011-10-12update tour.texi for site modules and extensionsAndy Wingo1-3/+3
* doc/ref/tour.texi (Putting Extensions into Modules) (Writing new Modules): In the examples, show the files as being in the "site" dirs.
2011-10-12manual: reorganize autoconf, pkg-config infoAndy Wingo4-49/+78
* doc/ref/libguile-parallel.texi: New file, documenting parallel installation and the use of pkg-config. * doc/ref/libguile-linking.texi: Adapt. * doc/ref/libguile-autoconf.texi: Rename from autoconf.texi. Lower sections, and integrate in the "Programming in C" chapter. * doc/ref/guile.texi: Adapt.
2011-10-12remove documentation on autofrisk fooAndy Wingo1-109/+0
* doc/ref/autoconf.texi: Remove documentation on autofrisk facility, given that we do not ship those macros, and to my knowledge, never have.
2011-10-12add (web client) docsAndy Wingo1-2/+37
* doc/ref/web.texi (Web Client): New doc section.
2011-10-10fold constants with accessorsAndy Wingo2-30/+51
* module/language/tree-il/peval.scm (peval): Factor constant folding out to a helper. Use it in the accessor case in addition to the normal effect-free-primitive case. * test-suite/tests/tree-il.test: Add a test.
2011-10-10recognize string primitivesAndy Wingo1-4/+10
* module/language/tree-il/primitives.scm (*interesting-primitive-names*): Add string?, string-length, and ref and set. (*primitive-accessors*): Add string-ref. (*effect-free-primitives*): Add string-length and string? (*effect+exception-free-primitives*): Add string?. (*singly-valued-primitives*): Add string-length and ref and set.
2011-10-10add ,expand and ,optimizeAndy Wingo3-0/+41
* module/system/repl/command.scm (*command-table*, expand, optimize): New meta-commands. * module/system/repl/common.scm (repl-expand, repl-optimize): New helpers. * doc/ref/scheme-using.texi (Compile Commands): Document.
2011-10-10regenerate psyntax-pp.scmAndy Wingo1-10718/+12963
* module/ice-9/psyntax-pp.scm: Regenerate, now with optimizations.
2011-10-10Merge remote-tracking branch 'origin/stable-2.0'Andy Wingo14-406/+1150
Does not include psyntax regeneration. Conflicts: module/ice-9/psyntax-pp.scm module/language/tree-il/peval.scm test-suite/tests/tree-il.test
2011-10-10regenerate psyntax-pp.scmAndy Wingo1-14975/+24426
* module/ice-9/psyntax-pp.scm: Regenerate, now with inlined letrec bindings. Whee!!
2011-10-10peval support for memq and memvAndy Wingo2-0/+83
* module/language/tree-il/peval.scm (peval): Add special handlers for memq and memv, as inline.scm used to have. This is important for `case' clauses. It is very ugly, though. * test-suite/tests/tree-il.test ("partial evaluation"): Add tests.
2011-10-10add accessor-primitive?, peval uses itAndy Wingo2-40/+53
* module/language/tree-il/primitives.scm (*primitive-accessors*): New set of primitives: those that access mutable memory, but are otherwise pure. Include bytevector references here. (accessor-primitive?): New public predicate. * module/language/tree-il/peval.scm (peval): Refactor to distinguish constructor-primitive? from accessor-primitive?.
2011-10-10peval: visit operands on-demand, to inline mutually recursive bindingsAndy Wingo2-388/+478
This commit changes to use <operand> structures to hold the context needed to visit lexical bindings lazily, in context, instead of eagerly visiting them for value. This laziness enables inlining of mutually recursive bindings. * module/language/tree-il/peval.scm (<var>): Remove comment about copy propagation having to run build-var-table; things don't work like that any more. (build-var-table): Build <var> entries for all variables, even unreferenced variables. (alpha-rename): Remove. We will rename bindings on-demand now. (peval lookup-var): New helper, to fetch the <var> of a gensym. (peval fresh-gensyms): Fold here, under peval, and in it, handle updating the store to record a mapping between new names and <var> entries from the source program. (peval record-source-expression): Don't call build-var-table on the new expression, as alpha-renaming happens on-demand now. (peval prune-bindings): Rewrite to work with mutually-recursive bindings, while optionally preserving binding order. (peval extend-env): New helper. (peval loop): OK, here goes... Remove the `operand' context, as now we visit operands lazily. Add a `call' context, which does not copy-propagate lambda expressions, used to residualize a call after aborting an inlining attempt. Change the `env' to be a mapping of gensym to <operand>. Instead of looking up the operand's binding then alpha-renaming it, just rely on the fact that visiting the operand will rename it if necessary. If we residualize a lexical, do so with the fresh name from the environment. If we visit an operand and it doesn't turn out to be constant, we will never be able to copy it, and so cache that fact in the operand. If we residualize a binding and we know what the value should be, record that binding so that prune-bindings won't have to visit it again. If the operand folds to a constant, cache that too, to save effort when unrolling loops. For let, letrec, fix, and lambda-case, instead of visiting the bindings eagerly for value, simply record the source expressions and environments in an <operand> and rely on copy-propagation to visit them later in the right context. In the case of letrec and fix, this allows mutually-recursive bindings to be inlined. Refactor folding of "constructors" (which still need renaming) to avoid visiting operands twice in some contexts. For applications, if we have to abort, process the procedure in call context, which allows some folding but avoids copying lambdas. If we find a recursive procedure, mark intervening counters as recursive too, to allow for mutual recursion at the top level. For lambdas, if we are processing for value, record the source expression so we can detect recursion. This was previously done in the lexical-ref copy propagator. * test-suite/tests/tree-il.test ("partial evaluation"): Remove unused recursive lexicals in a couple of cases. Add a couple test cases for pruning. Add a few recursive binding cases.
2011-10-10peval: add operand structureAndy Wingo1-0/+57
* module/language/tree-il/peval.scm (<operand>): Add operand structure, to be used by peval.
2011-10-10peval: refactor loggingAndy Wingo1-5/+6
* module/language/tree-il/peval.scm: Make it easier to turn on logging.
2011-10-09New functions scm_is_exact and scm_is_inexactMike Gran4-0/+58
* doc/ref/api-data.texi (Exact and Inexact Numbers): doc for scm_is_exact and scm_is_inexact * libguile/numbers.c (scm_is_exact, scm_is_inexact): new functions * libguile/numbers.h: declarations for scm_is_exact and scm_is_inexact * test/suite/standalone/test-conversion.c (test_is_exact, test_is_inexact): new tests
2011-10-08Document SCM_ASSERT_TYPE and SCM_ASRTGO macrosMike Gran1-0/+11
* doc/ref/api-control.texi (Signalling Type Errors): document macros
2011-10-08peval: loggingAndy Wingo1-4/+52
* module/language/tree-il/peval.scm: Define a quick and dirty infrastructure for logging. Use it in peval.
2011-10-07peval: bugfix in constant-expression?Andy Wingo1-1/+2
* module/language/tree-il/peval.scm (constant-expression?): Correctly handle lambda-case alternates.
2011-10-07optimizer verifies its outputAndy Wingo1-2/+4
* module/language/tree-il/optimize.scm: Verify the result of partial evaluation.
2011-10-07add tree-il verifierAndy Wingo2-0/+262
* module/Makefile.am: Add debug.scm. * module/language/tree-il/debug.scm: New file, a verifier for tree-il.
2011-10-06peval refactorAndy Wingo1-9/+7
* module/language/tree-il/peval.scm (peval): Refactor the for-value, etc helpers.
2011-10-06comment peval.scmAndy Wingo1-126/+196
* module/language/tree-il/peval.scm: Add comments. Move alpha-rename later in the file.
2011-10-05fix reading of #||||#Andy Wingo2-21/+28
* libguile/read.c (scm_read_r6rs_block_comment): * test-suite/tests/reader.test ("reading"): Fix reading of #||||#, originally reported in bug debbugs.gnu.org/9672, by Bruno Haible. Thanks, Bruno!
2011-09-30peval: Add test for possible infinite recursion.Ludovic Courtès1-0/+9
* test-suite/tests/tree-il.test ("partial evaluation"): Add test.
2011-09-30Add link to the (ice-9 match) bug.Ludovic Courtès1-0/+1
* module/ice-9/match.scm: Add comment.
2011-09-30peval: Recognize module-refs to primitives.Ludovic Courtès2-0/+22
* module/language/tree-il/optimize.scm (peval): Handle module-refs to primitives. * test-suite/tests/tree-il.test ("partial evaluation"): Add test, using `pmatch'.
2011-09-29regenerate psyntax-pp.scmAndy Wingo1-13137/+16294
* module/ice-9/psyntax-pp.scm: Regenerate.
2011-09-29Merge remote-tracking branch 'origin/stable-2.0'Andy Wingo60-961/+3177
This was a pretty big merge involving a fair amount of porting, especially to peval and its tests. I did not update psyntax-pp.scm, that comes in the next commit. Conflicts: module/ice-9/boot-9.scm module/ice-9/psyntax-pp.scm module/language/ecmascript/compile-tree-il.scm module/language/tree-il.scm module/language/tree-il/analyze.scm module/language/tree-il/inline.scm test-suite/tests/tree-il.test
2011-09-28generate psyntax-pp in canonical formAndy Wingo2-27661/+26446
* module/ice-9/compile-psyntax.scm (source): Canonicalize after optimizing. The optimizer should be a little more clever, but currently fix-letrec outputs some non-canonical forms. * module/ice-9/psyntax-pp.scm: Regenerate.
2011-09-28separate peval and a new canonicalization pass into their own modulesAndy Wingo6-1162/+1048
* module/language/tree-il/peval.scm: Move to its own file. Remove the bits about <prompt> thunk-application bodies, as they are not optimizations, simply expectations of the compiler. `canonicalize' handles that now. * module/language/tree-il/optimize.scm: Use peval from its module. Don't call `inline!', as that's useless now. * module/language/tree-il/canonicalize.scm: New file, implementing a pass that `compile-tree-il' runs on the result from the optimizer. The compiler currently expects a <let> form to have bindings, for example, and this pass turns a <let> without bindings into its body. * module/language/tree-il/inline.scm: Deprecate, as `peval' does everything this function ever did. * module/language/tree-il/compile-glil.scm: Canonicalize after optimizing. This should allow us to skip the optimizer entirely, if we want. * module/Makefile.am: Update and reorder a little bit.
2011-09-28regenerate psyntax-pp.scm, with optimizationsAndy Wingo1-13702/+28957
* module/ice-9/psyntax-pp.scm: Regenerate.