summaryrefslogtreecommitdiff
path: root/module/Makefile.am
AgeCommit message (Collapse)AuthorFilesLines
2022-02-01Rework bootstrap to be reproducibleAndy Wingo1-397/+8
* configure.ac: * Makefile.am (SUBDIRS): Replace bootstrap/ with stage0, stage1, and stage2. * am/bootstrap.am: Include all files and all rules. * meta/build-env.in (GUILE_AUTO_COMPILE): Always turn off auto-compilation. Take a GUILE_BOOTSTRAP_STAGE argument, which can be stage0, stage1, stage2, or unset. Adapt the load-compiled path accordingly. * meta/uninstalled-env.in: Include .go files from stage2. * module/Makefile.am: Rework to use boostrap.am. * module/system/base/optimize.scm (available-optimizations): Punt the inlinable-exports machinery to -O2. * stage0/Makefile.am: * stage1/Makefile.am: * stage2/Makefile.am: New files.
2021-11-15Add new pass to optimize away return value count checksAndy Wingo1-0/+1
* module/language/cps/return-types.scm: New file. * module/Makefile.am (SOURCES): * am/bootstrap.am (SOURCES): Add new file. * module/language/tree-il/compile-cps.scm (sanitize-meta): Strip "noreturn" and "return-type" properties -- these should only be computed by Guile.
2021-10-01Add CPS pretty-printerAndy Wingo1-0/+1
* module/language/cps/dump.scm: New file. * module/Makefile.am (SOURCES): Add to build.
2021-05-11Add support for recording inlinable module exportsAndy Wingo1-0/+1
* module/language/tree-il/inlinable-exports.scm: New module. * am/bootstrap.am: * module/Makefile.am: * module/language/tree-il/optimize.scm (make-optimizer): * module/system/base/optimize.scm (available-optimizations): Wire up new module. * module/ice-9/boot-9.scm (module): Add inlinable-exports field. (define-module*): Add #:inlinable-exports kwarg.
2021-05-11Add pass to resolve free toplevel references in declarative modulesAndy Wingo1-0/+1
* am/bootstrap.am (SOURCES): * module/Makefile.am (SOURCES): * module/language/tree-il/optimize.scm (make-optimizer): Wire up the new pass. * module/language/tree-il/resolve-free-vars.scm: New pass. * module/system/base/optimize.scm (available-optimizations): Enable new pass at -O1.
2021-04-27Add ice-9/read.scm to extra_distAndy Wingo1-0/+1
* module/Makefile.am (NOCOMP_SOURCES): Add ice-9/read.scm.
2021-04-21New pass: elide-arity-checksAndy Wingo1-0/+1
* module/language/cps/elide-arity-checks.scm: New file. Elides argument count checks for known callers. * am/bootstrap.am (SOURCES): * module/Makefile.am (SOURCES): Add new file. * module/language/cps/optimize.scm (optimize-first-order-cps): * module/system/base/optimize.scm (available-optimizations): Add new pass.
2021-03-03Read-in-scheme replaces boot "read" definitionAndy Wingo1-2/+1
Instead of defining a separate module, given that "read" calls are quite all over the place, we're just going to replace the boot "read" binding with read.scm. This way, we'll be able to remove support for reader options in the boot reader, as it will only ever be used for a finite set of files. * NEWS: Update. * module/Makefile.am (ice-9/boot-9.go): Depend on read.scm. (SOURCES): * am/bootstrap.am (SOURCES): Don't build a ice-9/read.go, as we include it. * module/ice-9/boot-9.scm (read-syntax): Define here, as "include" now uses it. (read-hash-procedures, read-hash-procedure, read-hash-extend): New procedures. Will replace C variants. (read, read-syntax): Include read.scm to define these. * module/ice-9/psyntax-pp.scm (include): Regenerate. * module/ice-9/psyntax.scm (include): Use read-syntax, so we get better source information. * module/ice-9/read.scm (let*-values): New local definition, to avoid loading srfi-11. (%read): Use list->typed-array instead of u8-list->bytevector. * module/language/scheme/spec.scm: Remove (ice-9 read) import; read-syntax is there in the boot environment
2021-02-13Add "read" implementation in SchemeAndy Wingo1-0/+1
* module/Makefile.am (SOURCES): Add ice-9/read. * module/ice-9/read.scm: New file. The idea is to move the compiler to use this "read", after proving that it does the same as C. Then we can switch to read-syntax that returns syntax objects with source locations, allowing us to annotate any datum.
2021-02-03Replace libltdl with raw dlopen, dlsymAndy Wingo1-2/+2
* NEWS: Update. * am/bootstrap.am (SOURCES): * module/Makefile.am (SOURCES): Add system/foreign-library.scm. * configure.ac: Replace ltdl check with -ldl check. * libguile/dynl.c: Rewrite to just expose core dlopen / dlsym / etc to a helper Scheme module. (scm_dynamic_link, scm_dynamic_pointer, scm_dynamic_function) (scm_dynamic_object_p, scm_dynamic_call): Rewrite in terms of (system foreign-library). * libguile/extensions.c (load_extension): Avoid scm_dynamic_call. * module/system/foreign-library.scm: New file. * module/oop/goops.scm (<dynamic-object>): Hackily export <foreign-library> instead of a class here. * doc/ref/api-foreign.texi (Foreign Function Interface): Rewrite to only document the new interfaces. Eventually we will deprecate dynamic-link and friends. * doc/ref/guile.texi (API Reference): Move Foreign Objects after Foreign Function Interface. Seems there should be some closer relationship but this will do for now. * doc/ref/tour.texi (Putting Extensions into Modules): * doc/ref/libguile-parallel.texi (Parallel Installations): Update for rename of Modules and Extensions to Foreign Extensions. * libguile/deprecated.h: * libguile/deprecated.c (scm_dynamic_unlink): Deprecate. * libguile/guile.c: Remove ltdl include. * test-suite/tests/foreign.test: Update tests to use new API, and update error expectations.
2020-09-10Move copy-tree to (ice-9 copy-tree); deprecate main bindingAndy Wingo1-0/+1
* doc/ref/api-data.texi (List Constructors): * doc/ref/api-utility.texi (Copying): Update docs to mention module. * libguile.h: Remove trees.h inclusion. * libguile/Makefile.am (libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES): (DOT_X_FILES, DOT_DOC_FILES, modinclude_HEADERS): Remove trees.c, trees.h, and related files. * libguile/init.c (scm_i_init_guile): Remove trees.h and the scm_init_trees call. * libguile/trees.c: * libguile/trees.h: Remove. * module/Makefile.am (SOURCES): Add ice-9/copy-tree.scm. * module/ice-9/copy-tree.scm: New file. * module/ice-9/deprecated.scm (copy-tree*): Export as copy-tree, proxying to (ice-9 copy-tree). * module/system/repl/common.scm: * module/web/client.scm: * test-suite/tests/elisp.test: * test-suite/tests/srfi-1.test: * module/oop/goops/save.scm: Use (ice-9 copy-tree). * test-suite/Makefile.am (SCM_TESTS): Add copy-tree.test. * test-suite/tests/copy-tree.test: New file; test pulled from eval.test. * libguile/deprecated.h: * libguile/deprecated.c (scm_copy_tree): Deprecate.
2020-08-12Add new pass to optimize branch chains to table dispatchAndy Wingo1-0/+1
* module/language/cps/switch.scm: New pass. * module/Makefile.am (SOURCES): * am/bootstrap.am (SOURCES): Add switch.scm. * module/system/base/optimize.scm (available-optimizations): * module/language/cps/optimize.scm (optimize-first-order-cps): Run switch optimization at level 2. * libguile/hash.c (JENKINS_LOOKUP3_HASHWORD2): Add note regarding cross-compilation. * module/language/cps/graphs.scm (intmap-select): New definition. * module/language/cps/utils.scm (compute-singly-referenced-labels): Move here, from various places. Doesn't take a body intset argument. * module/language/cps/contification.scm: * module/language/cps/closure-conversion.scm: * module/language/cps/simplify.scm: Use compute-singly-referenced-labels from utils. * module/language/cps/effects-analysis.scm (annotation->memory-kind*): (annotation->memory-kind): Add symbol annotation cases.
2020-05-13Another minor module compile order tweakAndy Wingo1-15/+15
* module/Makefile.am (SOURCES): Put Tree-IL compiler early too, so that subsequent compilations can benefit from CPS speedups.
2020-05-13Minor module/Makefile order tweakAndy Wingo1-36/+37
* module/Makefile.am (ice-9/psyntax-pp.go): Add GUILE_OPTIMIZATIONS argument. (SOURCES): Reorder a bit for speed when bootstrapping.
2020-05-04Add baseline compilerAndy Wingo1-0/+1
* module/language/tree-il/compile-bytecode.scm: New file. * module/Makefile.am (SOURCES): * am/bootstrap.am (SOURCES): Add new file.
2020-05-04Remove unused (language tree-il canonicalize)Andy Wingo1-1/+0
* module/language/tree-il/canonicalize.scm: Remove. * module/Makefile.am (SOURCES): * am/bootstrap.am (SOURCES): Update.
2020-03-25Add SRFI-171 to guileLinus Björnstam1-0/+3
This adds SRFI-171 (transducers) to guile. The two guile-specific additions are powerful transducers which can be used to generalize transducers like tsegment. They are hard to get right, but powerful and useful enough to warrant inclusion. * doc/ref/srfi-modules.texi: added srfi-171 section * module/Makefile.am (SOURCES): * module/srfi/srfi-171.scm: * module/srfi/srfi-171/meta.scm: Add SRFI-171 * module/srfi/srfi-171/gnu.scm: Add 2 guile-specific extensions. * test-suite/Makefile.am (SCM_TESTS): * test-suite/tests/srfi-171.test: Add tests. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2020-01-15Add eta-expansion pass after pevalAndy Wingo1-0/+1
* am/bootstrap.am (SOURCES): * module/Makefile.am (SOURCES): Add eta-expand.scm. * module/language/tree-il/eta-expand.scm: New file. * module/language/tree-il/optimize.scm (optimize) (tree-il-optimizations): Add eta-expansion at level 2.
2020-01-12Support R7RS define-libraryAndy Wingo1-2/+3
* module/Makefile.am (ice-9/boot-9.go, NOCOMP_SOURCES): Add r7rs-libraries. * module/ice-9/boot-9.scm ("ice-9/r7rs-libraries"): Include file. * module/ice-9/psyntax.scm (call-with-include-port): New definition. (include): Use call-with-include-port. * module/ice-9/psyntax-pp.scm: Regenerate. * module/ice-9/r7rs-libraries.scm: New file. * module/scheme/base.scm (r7:include, r7:include-ci): Fix mistaken use of core "include". Use include-ci from core. (features): Remove features that are already part of core. * NEWS: Update.
2019-11-16Add initial implementation of R7RS modulesAndy Wingo1-0/+17
* module/Makefile.am (SOURCES): Add new files. * module/scheme/base.scm: * module/scheme/case-lambda.scm: * module/scheme/char.scm: * module/scheme/complex.scm: * module/scheme/cxr.scm: * module/scheme/eval.scm: * module/scheme/file.scm: * module/scheme/inexact.scm: * module/scheme/lazy.scm: * module/scheme/load.scm: * module/scheme/process-context.scm: * module/scheme/r5rs.scm: * module/scheme/read.scm: * module/scheme/repl.scm: * module/scheme/time.scm: * module/scheme/write.scm: New files. Thanks to Göran Weinholt for akku-scm and OKUMURA Yuki for yuni, off of which some of these files were based.
2019-11-03Add (ice-9 exceptions) moduleAndy Wingo1-0/+1
* module/ice-9/exceptions.scm: New file, derived from (rnrs conditions). Perhaps unadvisedly, in this file I've renamed a number of the identifiers. I have never found that the R6RS identifiers made sense to me. For now this is an internal module that R6RS and SRFI-35 will be based on. * module/Makefile.am (SOURCES): Add the new file. * module/rnrs/conditions.scm (rnrs): Export renamed identifiers from (ice-9 exceptions).
2019-10-21Remove (ice-9 channel)Andy Wingo1-1/+0
* module/ice-9/channel.scm: Remove. This file has had a bug since 2.0 or so that prevented loading the module; I can only conclude that it hasn't worked for years. * module/Makefile.am (SOURCES): Remove ice-9/channel.scm.
2019-08-18Add letrectify tree-il passAndy Wingo1-0/+1
* module/language/tree-il/letrectify.scm: New pass, not wired up yet. Adds lexical definitions for declarative top-level definitions, for better inlining and contification within a compilation unit. * am/bootstrap.am: * module/Makefile.am: Add to build.
2019-08-13Split graph utilities out of (language cps utils)Andy Wingo1-2/+2
* module/language/cps/graphs.scm: New file. * module/language/cps/utils.scm: Re-export functions from graphs.scm. * am/bootstrap.am: * module/Makefile.am: Add to build.
2018-08-07Merge branch 'master' into lightningAndy Wingo1-0/+1
This includes a manual cherry-pick of relevant stable-2.2 commits up to 4c91de3e45e7c98d5b7c484509fe5c59bd70f9fd.
2018-08-07build: Really build srfi/srfi-71.scm.Ludovic Courtès1-0/+1
Commit eb90831ce81bcb85ae96d27011ebe71955cdf75d added it to the wrong makefile. * module/Makefile.am (SOURCES): Add srfi/srfi-71.scm. * module/srfi/Makefile.am: Remove. It's a leftover from the 2009 build system rework in commit 3bb299b3f0d5b31957a6447d095ed723268019be.
2018-07-29Emit instrument-loop in loops.Andy Wingo1-1/+1
* am/bootstrap.am (SOURCES): * module/Makefile.am (SOURCES): Handle renamve of handle-interrupts.scm to loop-instrumentation.scm. * libguile/jit.h (SCM_JIT_COUNTER_ENTRY_INCREMENT): Rename from SCM_JIT_COUNTER_CALL_INCREMENT. * libguile/vm-engine.c (instrument-entry): Rename from instrument-call. * module/language/cps/compile-bytecode.scm (compile-function): Add handle-interrupts code before calls and returns. Compile the "instrument-loop" primcall to an "instrument-loop" instruction and a "handle-interrupts" instruction. (lower-cps): Adapt to add-loop-instrumentation name change. * module/language/cps/loop-instrumentation.scm: Rename from handle-interrupts.scm and just add "instrument-loop" primcalls in loops. The compiler will add handle-interrupts primcalls as appropriate. * module/system/vm/assembler.scm (<jit-data>): New data type, for emitting embedded JIT data. (<meta>): Add field for current JIT data. (make-meta): Initialize current JIT data. (emit-instrument-entry*, emit-instrument-loop*): New instruction emitters that reference the current JIT data. (end-program): Now that all labels are known, arrange to serialize the JIT data. (link-data): Reserve space for JIT data, and add relocs to initialize the "start" / "end" fields.
2018-01-05Add (system base optimize) moduleAndy Wingo1-0/+1
* module/system/base/optimize.scm: New module. * module/Makefile.am (SOURCES): * am/bootstrap.am (SOURCES): Add new module. * module/language/tree-il/optimize.scm (tree-il-optimizations): Rename from tree-il-default-optimization-options. Directly specify the optimization level at which a pass should be enabled. * module/language/cps/optimize.scm (cps-optimizations): Likewise, rename from cps-default-optimization-options. * module/scripts/compile.scm (%options, show-optimization-help): Adapt to use new module.
2018-01-03$throw is a new kind of CPS termAndy Wingo1-2/+1
* module/language/cps.scm ($throw): New term type that doesn't have a continuation. Adapt all callers. Remove now-unneeded "prune-bailouts" pass.
2017-12-27Remove inline-constructors passAndy Wingo1-1/+0
* module/language/cps/constructors.scm: Remove pass, as "list" and "vector" are now inlined by CPS conversion, and nothing in the optimizer reifies "list" or "vector" primcalls. * module/language/cps/optimize.scm (optimize-higher-order-cps) (cps-default-optimization-options): * am/bootstrap.am: * module/Makefile.am: Remove references to inline-constructors pass.
2017-12-27Inline "elide-values" optimization into CPS conversionAndy Wingo1-1/+0
* module/language/tree-il/compile-cps.scm (adapt-arity, convert): Avoid reifying "values" primcalls unless necessary. Effectively inlines the "elide-values" optimization into CPS conversion. * module/language/cps/elide-values.scm: Remove, as it's now unneeded. * module/language/cps/optimize.scm (optimize-higher-order-cps): * module/Makefile.am: * am/bootstrap.am: Remove elide-values references.
2017-12-27Refactor lowering of Tree-IL primcalls to CPSAndy Wingo1-1/+1
* module/language/tree-il/cps-primitives.scm: New file, replacing (language cps primitives). Lists known primitives and their relation to Tree-IL explicitly, instead of assuming that any Tree-IL primcall that shares a name with a bytecode instruction is a CPS primcall. * module/language/cps/verify.scm: Remove use of (language cps primitives) and primcall arity checking. Would be nice to add this back at some point. * module/language/tree-il/compile-cps.scm (convert): Refactor to use new tree-il-primitive->cps-primitive+nargs+nvalues helper. * module/Makefile.am: * am/bootstrap.am: Adapt.
2017-11-29Merge until e0bcda4ad940c4e15679cc2b229838b33acdd36c from stable-2.2Andy Wingo1-0/+1
2017-11-24Add integer devirtualization pass.Andy Wingo1-0/+1
* module/language/cps/devirtualize-integers.scm: New pass. * module/language/cps/optimize.scm: * module/Makefile.am: * am/bootstrap.am: Add new pass.
2017-10-31Fix sort, sort! for arrays with nonzero lower boundDaniel Llorens1-0/+1
* module/ice-9/arrays.scm (array-copy): New function, export. * module/Makefile.am: Install (ice-9 arrays). * doc/ref/api-data.texi: Add documentation for (ice-9 arrays). * libguile/quicksort.i.c: Use signed bounds throughout. * libguile/sort.c (scm_restricted_vector_sort_x): Fix error calls. Fix calls to quicksort. * test-suite/tests/sort.test: Actually test that the sorted results match the original data. Test cases for non-zero base index arrays for sort, sort!, and stable-sort!.
2017-10-25Add (system base types internal).Andy Wingo1-1/+2
* module/system/base/types/internal.scm: New file, extracted from (system base types). * module/system/base/types.scm: Use (system base types internal) and adapt to %tc1-pair, %tc2-inum, and %tc3-heap-object name changes. * module/Makefile.am (SOURCES): * am/bootstrap.am (SOURCES): Add new file.
2017-05-22Remove all deprecated codeAndy Wingo1-3/+0
* module/ice-9/debug.scm: * module/ice-9/mapping.scm: * module/ice-9/syncase.scm: Delete these deprecated files. * module/Makefile.am: Remove deleted files. * libguile/deprecated.c: * libguile/deprecated.h: * libguile/backtrace.c: * libguile/goops.c: * libguile/numbers.c: * libguile/socket.c: * libguile/srfi-13.c: * module/ice-9/deprecated.scm: * module/ice-9/format.scm: * module/oop/goops.scm: * module/statprof.scm: * module/texinfo/reflection.scm: * module/web/client.scm: * module/web/uri.scm: Remove deprecated code.
2017-04-18Add sandboxed evaluation facilityAndy Wingo1-0/+1
* module/ice-9/sandbox.scm: New file. * module/Makefile.am (SOURCES): Add new file. * doc/ref/api-evaluation.texi (Sandboxed Evaluation): New section. * NEWS: Update. * test-suite/tests/sandbox.test: New file. * test-suite/Makefile.am: Add new file.
2017-03-28Plumbing changes to rename "syntax-module"Andy Wingo1-0/+2
* module/ice-9/psyntax.scm (%syntax-module): Rename from syntax-module in order to make room for a new syntax-module primitive binding. * module/ice-9/psyntax-pp.scm: Regenerate. * module/ice-9/boot-9.scm: Push syntax bindings into an internal module. * module/system/syntax.scm: New file. * module/Makefile.am (SOURCES): Add system/syntax.scm.
2016-11-16Add handle-interrupts inst and compiler passAndy Wingo1-0/+1
* libguile/vm-engine.c (vm_engine): Remove initial VM_HANDLE_INTERRUPTS call; surely our caller already handled interrupts. Add handle-interrupts opcode. * am/bootstrap.am (SOURCES): * module/Makefile.am (SOURCES): Add handle-interrupts.scm. * module/system/vm/assembler.scm (system): * module/language/cps/compile-bytecode.scm (compile-function): (lower-cps): Add handle-interrupts support. * module/language/cps/handle-interrupts.scm: New file.
2016-09-06Add atomic boxesAndy Wingo1-0/+1
* doc/ref/api-scheduling.texi (Atomics): New manual section. * libguile.h: Include atomic.h. * libguile/Makefile.am (libguile_@GUILE_EFFECTIVE_VERSION@_la_SOURCES): (DOT_X_FILES, DOT_DOC_FILES, modinclude_HEADERS): Add atomic. * libguile/atomic.c: * libguile/atomic.h: New files. * libguile/atomics-internal.h (scm_atomic_set_scm, scm_atomic_ref_scm) (scm_atomic_swap_scm, scm_atomic_compare_and_swap_scm): New facilities. * libguile/goops.c (class_atomic_box, scm_sys_goops_early_init): Add support for <atomic-box>. Remove duplicate <keyword> fetch. * libguile/init.c (scm_i_init_guile): Call scm_register_atomic_box. * libguile/print.c (iprin1): Add atomic box case. * libguile/tags.h (scm_tc7_atomic_box): New tag. * libguile/validate.h (SCM_VALIDATE_ATOMIC_BOX): New macro. * module/Makefile.am (SOURCES): Add ice-9/atomic.scm. * module/ice-9/atomic.scm: New file. * module/oop/goops.scm (<atomic-box>): New var.
2016-08-30Add file descriptor finalizersAndy Wingo1-0/+1
* doc/ref/posix.texi (Ports and File Descriptors): Document new interfaces. * libguile/filesys.c (scm_close, scm_close_fdes) * libguile/fports.c (fport_close): * libguile/ioext.c (scm_primitive_move_to_fdes): Call scm_run_fdes_finalizers. * module/ice-9/fdes-finalizers.scm: * test-suite/tests/fdes-finalizers.test: * libguile/fdes-finalizers.h: * libguile/fdes-finalizers.c: New files. * module/Makefile.am: * test-suite/Makefile.am: * libguile/Makefile.am: * libguile.h: * libguile/init.c: Wire up new files.
2016-07-10Add meta/build-envAndy Wingo1-1/+1
* meta/build-env.in: New file which sets up an environment that does not inherit GUILE_LOAD_PATH / GUILE_LOAD_COMPILED_PATH (unless cross-compiling). * doc/ref/Makefile.am (autoconf-macros.texi): * libguile/Makefile.am (snarf2checkedtexi): * module/Makefile.am (ice-9/psyntax-pp.go): * test-suite/standalone/Makefile.am (GUILE_INSTALL_LOCALE): * am/bootstrap.am (.scm.go): * am/guilec (.scm.go): Use build-env. * configure.ac: Create build-env.
2016-06-09Update port documentation, rename sports to suspendable portsAndy Wingo1-1/+1
* module/ice-9/suspendable-ports.scm: Rename from ice-9/sports.scm, and adapt module names. Remove exports that are not related to the suspendable ports facility; we want people to continue using the port operations from their original locations. Add put-string to the replacement list. * module/Makefile.am: Adapt to rename. * test-suite/tests/suspendable-ports.test: Rename from sports.test. * test-suite/Makefile.am: Adapt to rename. * module/ice-9/textual-ports.scm (unget-char, unget-string): New functions. * doc/ref/api-io.texi (Textual I/O, Simple Output): Flesh out documentation. (Line/Delimited): Undocument write-line, read-string, and read-string!. This is handled by (ice-9 textual-ports). (Bytevector Ports): Fix duplicated section. (String Ports): Move the note about encodings down to the end. (Custom Ports): Add explanatory text. Remove mention of C functions; they should use the C port interface. (Venerable Port Interfaces): Add text, and make documentation refer to recommended interfaces. (Using Ports from C): Add documentation. (Non-Blocking I/O): Document more fully and adapt to suspendable-ports name change.
2016-06-08Add (ice-9 textual-ports)Andy Wingo1-0/+1
* module/ice-9/textual-ports.scm: New module. * module/Makefile.am: Add new module.
2016-05-13Add (ice-9 sports) moduleAndy Wingo1-0/+1
* module/ice-9/sports.scm: New module. * module/Makefile.am (SOURCES): Add new module.
2016-04-15Load port bindings in separate (ice-9 ports) moduleAndy Wingo1-0/+1
* module/ice-9/ports.scm: New file. * am/bootstrap.am (SOURCES): Add ice-9/ports.scm. * libguile/fports.c (scm_init_ice_9_fports): New function. (scm_init_fports): Arrange for scm_init_ice_9_fports to be called via load-extension, and load snarfed things there. Move open-file definition early, to allow ports to bootstrap. * libguile/ioext.c (scm_init_ice_9_ioext): New function. (scm_init_ioext): Similarly, register scm_init_ice_9_ioext as an extension. * libguile/ports.c (scm_set_current_input_port) (scm_set_current_output_port, scm_set_current_error_port): Don't define Scheme bindings; do that in Scheme. * libguile/ports.c (scm_i_set_default_port_encoding): (scm_i_default_port_encoding, scm_i_default_port_conversion_handler): (scm_i_set_default_port_conversion_handler): Since we now init encoding early, remove the "init" flags on these encoding/strategy vars. (scm_init_ice_9_ports): New function. (scm_init_ports): Register scm_init_ice_9_ports extension, and define some bindings needed by the bootstrap. * module/Makefile.am (SOURCES): Add ice-9/ports.scm. * module/ice-9/boot-9.scm: Remove code that's not on the boot path, moving it to ice-9/ports.scm. At the end, load (ice-9 ports). * module/ice-9/psyntax.scm (include): Use close-port instead of close-input-port. * module/ice-9/psyntax-pp.scm (include): Regenerate.
2015-11-11Add new pass to specialize "add" into "fadd" where possibleAndy Wingo1-0/+1
* module/language/cps/specialize-numbers.scm: New pass, to turn "add" into "fadd", and similarly for sub, mul, and div. * module/language/cps/optimize.scm: * module/Makefile.am: * bootstrap/Makefile.am: Wire up the new pass.
2015-10-23Use a bootstrapped -O0 compiler to compile the -O2 GuileAndy Wingo1-310/+263
This reduces total build time to around 30 minutes or so. * Makefile.am (SUBDIRS): Visit bootstrap/ before module/. * bootstrap/Makefile.am: New file. * configure.ac: Generate bootstrap/Makefile. * meta/uninstalled-env.in (top_builddir): Add bootstrap/ to the GUILE_LOAD_COMPILED_PATH. * module/Makefile.am: Simplify to just sort files in alphabetical order; since bootstrap/ was already compiled, we don't need to try to optimize compilation order. Although the compiler will get faster as more of the compiler itself is optimized, this isn't a significant enough effect to worry about.
2015-09-17Remove unused (language tree-il inline) module.Andy Wingo1-1/+0
* module/language/tree-il/inline.scm: Remove. * module/Makefile.am (TREE_IL_LANG_SOURCES): Remove inline.scm.