summaryrefslogtreecommitdiff
path: root/module/scripts
AgeCommit message (Collapse)AuthorFilesLines
2024-01-24Bump user-visible copyright years to 2024.Ludovic Courtès1-2/+2
* module/ice-9/command-line.scm (version-etc): * module/scripts/compile.scm (show-version): * module/system/repl/common.scm (*version*): Bump to 2024.
2023-07-16Fix typos throughout codebase.Morgan Smith1-5/+5
* NEWS: * README: * doc/r5rs/r5rs.texi: * doc/ref/api-data.texi: * doc/ref/api-debug.texi: * doc/ref/api-evaluation.texi: * doc/ref/api-io.texi: * doc/ref/api-macros.texi: * doc/ref/api-procedures.texi: * doc/ref/api-scheduling.texi: * doc/ref/api-undocumented.texi: * doc/ref/libguile-concepts.texi: * doc/ref/posix.texi: * doc/ref/srfi-modules.texi: * doc/ref/vm.texi: * doc/ref/web.texi: * examples/box-dynamic-module/box.c: * examples/box-dynamic/box.c: * examples/box-module/box.c: * examples/box/box.c: * examples/safe/safe: * examples/scripts/README: * examples/scripts/hello: * gc-benchmarks/larceny/twobit-input-long.sch: * gc-benchmarks/larceny/twobit-smaller.sch: * gc-benchmarks/larceny/twobit.sch: * libguile/expand.c: * libguile/load.c: * libguile/net_db.c: * libguile/scmsigs.c: * libguile/srfi-14.c: * libguile/threads.c: * meta/guile.m4: * module/ice-9/match.upstream.scm: * module/ice-9/ports.scm: * module/language/cps/graphs.scm: * module/scripts/doc-snarf.scm: * module/srfi/srfi-19.scm: * module/system/repl/command.scm: * test-suite/tests/srfi-18.test: Fix typos. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2023-01-13Bump user-visible copyright years to 2023.Ludovic Courtès1-1/+1
* module/ice-9/command-line.scm (version-etc): * module/scripts/compile.scm (show-version): * module/system/repl/common.scm (*version*): Bump to 2023.
2021-01-07Bump copyright years for user-visible copyright messagesv3.0.5Andy Wingo1-1/+1
* module/ice-9/command-line.scm (version-etc): * module/scripts/compile.scm (show-version): * module/system/repl/common.scm (*version*): Bump to 2021.
2020-05-12Delay loading CPS unless CPS compiler usedAndy Wingo1-8/+8
* module/language/tree-il/spec.scm: Remove #:compilers declaration; instead rely on choose-compiler. (choose-compiler): Load compilers on demand. * module/system/base/compile.scm (find-language-joint): Use next-pass instead of lookup-compilation-order, to avoid loading unused compilers. (read-and-compile): Adapt to find-language-joint change. (compute-compiler): Export. * module/scripts/compile.scm (compile): Use compute-compiler to load compiler modules.
2020-05-11Fix "fail" helper in guild compileAndy Wingo1-7/+6
* module/scripts/compile.scm (fail): Users expect this to be a format string, so adapt. (compile): Fix use that passed multiple strings.
2020-05-08Define new "lowering" phase in compilerAndy Wingo1-10/+16
* module/language/cps/compile-bytecode.scm (compile-bytecode): * module/language/tree-il/compile-bytecode.scm (compile-bytecode): * module/language/tree-il/compile-cps.scm (compile-cps): Rely on compiler to lower incoming term already. * module/language/tree-il/optimize.scm (make-lowerer): New procedure. * module/system/base/compile.scm (compute-lowerer): New procedure, replaceing add-default-optimizations. (compute-compiler): Lower before running compiler. * module/system/base/language.scm (<language>): Change optimizations-for-level field to "lowerer". * module/scripts/compile.scm (%options, compile): Parse -O0, -O1 and so on to #:optimization-level instead of expanding to all the optimization flags. * module/language/cps/optimize.scm (lower-cps): Move here from compile-bytecode.scm. (make-cps-lowerer): New function. * module/language/cps/spec.scm (cps): Declare lowerer.
2020-05-08Warning and optimization levels always small integersAndy Wingo1-8/+2
* module/language/tree-il/analyze.scm (make-analyzer): Expect an int for optimization level. * module/scripts/compile.scm (%options, show-warning-help): No more -Wnone / Wall; use -W0 or -W9 instead. * module/system/base/compile.scm (level-validator): Validate small int. (compute-analyzer, add-default-optimizations): Likewise. * test-suite/tests/optargs.test (without-compiler-warnings): * test-suite/tests/tree-il.test (call-with-warnings): Parameterize level to 0, not #f. * bootstrap/Makefile.am (GUILE_WARNINGS): Use -W0, not -Wnone.
2020-05-08Wire up simplified warning levels in "guild compile"Andy Wingo1-11/+31
* am/guilec (GUILE_WARNINGS): * am/bootstrap.am (GUILE_WARNINGS): Explictly default to -W1. * bootstrap/Makefile.am (GUILE_WARNINGS): Set to -Wnone, as the meaning of "no -W flags" has changed to be effectively -W1. * module/scripts/compile.scm (%options): Adapt to parse -Wnone, -W2, and so on. (parse-args): Default to (default-warning-level). (show-warning-help): Add more warning help. (compile): Pass #:warning-level.
2020-01-20use2dot: Fix incorrect #:autoload binding set leading to unbound variables.Ludovic Courtès1-6/+6
* module/scripts/use2dot.scm: Load (ice-9 getopt-long) with #:use-module rather than #:autoload. With the previous #:autoload spec, 'option-ref' would be unbound due to the new autoload semantics.
2020-01-20frisk: Fix incorrect #:autoload binding set leading to unbound variables.Ludovic Courtès1-7/+7
* module/scripts/frisk.scm: Load (ice-9 getopt-long) with #:use-module rather than #:autoload. With the previous #:autoload spec, 'option-ref' would be unbound due to the new autoload semantics.
2020-01-13Bump user-visible copyright years to 2020Andy Wingo1-2/+2
* module/ice-9/command-line.scm (version-etc): * module/scripts/compile.scm (show-version): Bump to 2020.
2019-12-02Add --r6rs and --r7rs options to "guild compile"Andy Wingo1-5/+20
* module/scripts/compile.scm (%options, compile): Add --r6rs and --r7rs options. * doc/ref/api-evaluation.texi (Compilation): Add docs.
2019-09-27Deprecate passing a non-zero size to make-moduleAndy Wingo1-1/+1
* module/ice-9/boot-9.scm (make-module): Issue a deprecation warning if users pass a non-zero size. (nested-define-module!, make-modules-in, beautify-user-module!) (resolve-interface, make-autoload-interface, %cond-expand-table): * module/ice-9/popen.scm (port/pid-table): * module/ice-9/session.scm (make-fold-modules): * module/language/ecmascript/function.scm (*program-wrappers*): * module/scripts/api-diff.scm (read-api-alist-file): * module/srfi/srfi-10.scm (reader-ctors): Update callers. Also remove some make-hash-table sizes.
2019-05-23Remove redefinition of when & unless in snarf-check-and-output-texiMike Gran1-9/+1
* module/scripts/snarf-check-and-output-texi.scm (when, unless): removed
2018-08-07compile: Update copyright year.Ludovic Courtès1-1/+1
* module/scripts/compile.scm (show-version): Update copyright year.
2018-08-07compile: Improve error message.Ludovic Courtès1-1/+1
* module/scripts/compile.scm (parse-args): Add missing newline in "unrecognized option" message.
2018-08-07compile: Add '-x' flag.Ludovic Courtès1-0/+5
* module/scripts/compile.scm (%options, compile): Add '-x'. * doc/ref/api-evaluation.texi (Compilation): Document it.
2018-08-07compile: Load language modules upfront.Ludovic Courtès1-1/+9
Fixes a bug whereby "guild compile --target=arm-linux-gnueabihf --from=elisp ... language/elisp/boot.el" would fail with an exception from 'load-thunk-from-memory' while trying to load (language elisp spec) from the guile-being-compiled instead of using that of the guile-for-build. The problem did not manifest with --from=scheme because (language scheme spec) happened to be already loaded before we had changed %load-path. * module/scripts/compile.scm (compile): Add calls to 'lookup-language'.
2018-01-05Add (system base optimize) moduleAndy Wingo1-21/+5
* 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.
2017-11-22scripts: help: Fix reference to the "Using Guile Tools" node.Maxim Cournoyer1-1/+1
Fixes <https://bugs.gnu.org/28835>. * module/scripts/help.scm (list-commands): Fix reference to the "Using Guile Tools" node. Signed-off-by: Ludovic Courtès <ludo@gnu.org>
2015-10-22Wire up `guild compile -O0 foo.scm'Andy Wingo1-8/+69
* module/scripts/compile.scm (%options): Resurrect -O option and make it follow GCC, more or less. The default is equivalent to -O2. * module/language/cps/compile-bytecode.scm (lower-cps): * module/language/cps/optimize.scm (optimize-higher-order-cps): Move split-rec to run unconditionally for now, as closure conversion fails without it. (define-optimizer): Only verify the result if we are debugging, to save time. (cps-default-optimization-options): New exported procedure. * module/language/tree-il/optimize.scm (tree-il-default-optimization-options): New exported procedure.
2014-09-30Merge branch 'stable-2.0'Mark H Weaver1-1/+9
Conflicts: benchmark-suite/benchmarks/ports.bm libguile/async.h libguile/bytevectors.c libguile/foreign.c libguile/gsubr.c libguile/srfi-1.c libguile/vm-engine.h libguile/vm-i-scheme.c module/Makefile.am module/language/tree-il/analyze.scm module/language/tree-il/peval.scm module/scripts/compile.scm module/scripts/disassemble.scm test-suite/tests/asm-to-bytecode.test test-suite/tests/peval.test test-suite/tests/rdelim.test
2014-09-20guild disassemble: Use #:prefix instead of #:renamer.Mark H Weaver1-3/+2
* module/scripts/disassemble.scm: Use #:prefix instead of #:renamer in #:use-module clause.
2014-06-03'guild compile' doesn't leave temporary files behind it.Ludovic Courtès1-1/+9
* module/scripts/compile.scm (compile): Add 'sigaction' call. * test-suite/standalone/test-guild-compile: New file. * test-suite/standalone/Makefile.am (check_SCRIPTS, TESTS): Add it.
2014-04-25Merge branch 'stable-2.0'v2.1.0Mark H Weaver1-13/+2
Conflicts: GUILE-VERSION NEWS guile-readline/ice-9/readline.scm libguile/async.c libguile/backtrace.c libguile/deprecated.h libguile/gc-malloc.c libguile/gdbint.c libguile/init.c libguile/ioext.c libguile/mallocs.c libguile/print.c libguile/rw.c libguile/scmsigs.c libguile/script.c libguile/simpos.c libguile/snarf.h libguile/strports.c libguile/threads.c libguile/vm-i-scheme.c libguile/vm-i-system.c module/srfi/srfi-18.scm test-suite/Makefile.am test-suite/standalone/test-num2integral.c
2014-03-06Make snarfing tools more robust to varied C preprocessor behavior.Mark H Weaver1-13/+2
* libguile/guile-snarf.in (modern_snarf): Rewrite sed script to cope with newlines in the snarfed code segments, or multiple code segments on the same line. * module/scripts/snarf-check-and-output-texi.scm (process-stream): Strip all 'hash' tokens from the stream. (do-command): Remove special cases that handled 'hash' tokens in a few places.
2013-12-02Rename "RTL" to "bytecode"Andy Wingo1-2/+2
"RTL" didn't make any sense, and now that there's no other bytecode to disambiguate against, just call it bytecode. * module/Makefile.am: * module/ice-9/eval-string.scm: * module/language/bytecode.scm: * module/language/bytecode/spec.scm: * module/language/cps/arities.scm: * module/language/cps/compile-bytecode.scm: * module/language/cps/compile-rtl.scm: * module/language/cps/contification.scm: * module/language/cps/elide-values.scm: * module/language/cps/primitives.scm: * module/language/cps/reify-primitives.scm: * module/language/cps/spec.scm: * module/language/cps/specialize-primcalls.scm: * module/language/rtl.scm: * module/language/rtl/spec.scm: * module/scripts/compile.scm: * module/system/base/compile.scm: * module/system/repl/common.scm: * module/system/vm/assembler.scm: * module/system/vm/debug.scm: * module/system/vm/disassembler.scm: * module/system/vm/dwarf.scm: * test-suite/tests/cross-compilation.test: * test-suite/tests/dwarf.test: * test-suite/tests/rtl-compilation.test: * test-suite/tests/rtl.test: * test-suite/vm/run-vm-tests.scm: Fixups.
2013-11-08Miscellaneous fixups related to objcode removal.Andy Wingo1-1/+1
* module/scripts/compile.scm: Fix --help message. * module/system/repl/command.scm (disassemble): Fix error message. * module/system/vm/frame.scm: Remove objcode import. * module/system/vm/objcode.scm: Remove some exports related to the objcode type.
2013-10-31Default to compiling to RTLAndy Wingo1-2/+2
* module/ice-9/eval-string.scm (eval-string) * module/language/tree-il/spec.scm (tree-il) * module/scripts/compile.scm (compile) * module/system/base/compile.scm (compile-file, read-and-compile) * module/system/repl/common.scm (repl-compile, repl-prepare-eval-thunk): Default to compiling to RTL. * module/language/rtl/spec.scm (rtl->value): Add value compiler.
2013-08-29,xx for RTL imagesAndy Wingo1-9/+1
* module/scripts/disassemble.scm (disassemble): * module/system/vm/disassembler.scm (disassemble-file): Factor disassemble-file out. * module/system/repl/command.scm (disassemble-file): Map ,xx to disassemble RTL images.
2013-08-29add ability to disassemble ELF imagesAndy Wingo1-3/+7
* module/scripts/disassemble.scm (disassemble): Update to work with RTl (and only RTL, as that's the future). * module/system/vm/debug.scm (for-each-elf-symbol): New public interface. (debug-context-from-image): New helper. (find-debug-context): Use the helper. * module/system/vm/disassembler.scm (disassemble-image): New public interface.
2012-06-22instead of our custom .go format, use elfAndy Wingo1-2/+2
* libguile/objcodes.c: Change to expect objcode on disk to be embedded in ELF instead of having the funky cookie. (to_native_order): Use already existing SCM_BYTE_ORDER style byte order instead of chars. (bytecode_to_objcode): No need for word_size arg. (scm_bytecode_to_objcode, scm_objcode_to_bytecode): Take optional endianness arg instead of sometimes using target-endianness. (scm_load_objcode, scm_write_objcode, scm_bytecode_to_native_objcode): Remove. * libguile/objcodes.h: Adapt. * libguile/vm.c (scm_load_compiled_with_vm): Use scm_load_thunk_from_file. (make_boot_program): Adapt to use scm_bytecode_to_objcode with endianness arg. * module/Makefile.am (OBJCODE_LANG_SOURCES): Add (language objcode elf). * module/language/objcode/elf.scm: New module, embeds objcode in ELF. * module/language/bytecode/spec.scm (compile-objcode): (decompile-objcode): Use (target-endianness). * module/language/objcode/spec.scm: use (language objcode elf) for write-objcode. * module/scripts/disassemble.scm (disassemble): * module/system/repl/command.scm (disassemble-file): Use load-thunk-from-file. * module/system/vm/objcode.scm: Remove load-objcode and write-objcode. * test-suite/tests/asm-to-bytecode.test (test-target): Adapt to the new ELF world.
2012-01-26Fix a couple of warnings.Ludovic Courtès1-1/+2
* module/scripts/list.scm: Use SRFI-1. * module/system/repl/error-handling.scm: Use (ice-9 format).
2011-11-22Add a `--target' option to `guild compile'.Ludovic Courtès1-7/+17
* module/scripts/compile.scm (%options)["--target"]: New option. (show-version): Update copyright year. (compile): Use `with-target' to install the target. * doc/ref/api-evaluation.texi (Compilation): Mention `--target' option.
2011-08-19better guild help FOOAndy Wingo1-21/+61
* module/scripts/help.scm (show-help, show-summary, show-usage): Grovel for %synopsis and %help variables as well, and show them appropriately. Export these routines for other script modules to use. Needs documentation.
2011-07-23Change `guild --help' and `--version' output to be more GNUish.Ludovic Courtès1-6/+8
* meta/guild.in (display-version): Display the version, not the effective version. * module/scripts/help.scm (list-commands)[help]: Add proper footer, as per the GCS.
2011-07-23Export `main' from (scripts help).Ludovic Courtès1-1/+2
* module/scripts/help.scm: Export `main'.
2011-07-23add support for guild help FOOAndy Wingo1-17/+53
* module/scripts/help.scm (main): Add support for guild help FOO.
2011-07-23add (scripts help)Andy Wingo2-35/+117
* meta/guild.in (display-version): Use (ice-9 command-line)'s version-etc. (main): Dispatch --help to guild help. * module/scripts/help.scm: New file, a copy of list.scm, but with a better name. * module/Makefile.am: Add help.scm to the list. * module/scripts/list.scm: Change to be an alias to "help". (list-scripts): Restore this API.
2011-07-23more work on "guild list"Andy Wingo19-25/+83
* module/scripts/: Add %summary entries, and in many cases, %include-in-guild-list entries to inhibit a script from appearing in "guild list". Update list.scm to respect this new variable.
2011-07-23remove scripts PROGRAMAndy Wingo1-40/+0
* module/scripts/PROGRAM.scm: Remove this useless template, which was cluttering `guild list'. We'll perhaps cull the list a bit more in 2.2. * module/Makefile.am: Adapt.
2011-07-23a prettier `guild list'Andy Wingo1-6/+31
* module/scripts/list.scm (strip-extensions): Don't list programs without extensions. (main): Be prettier. Parse out a %summary from modules, for a brief synopsis.
2011-05-31rename `guile-tools' to `guild'Andy Wingo3-7/+7
* configure.ac: Look for ln -s. Write out `guild' instead of `guile-tools'. * meta/Makefile.am (install-data-hook): Link the installed `guild' to the backward-compatible `guile-tools' name. (bin_SCRIPTS, EXTRA_DIST): Fix up for guild change. * meta/guild.in: Moved here from `guile-tools.in'. * doc/ref/Makefile.am (autoconf-macros.texi): * doc/ref/api-evaluation.texi (Compilation): * doc/ref/autoconf.texi (Autofrisk, Using Autofrisk): * doc/ref/mod-getopt-long.texi (getopt-long Reference): * doc/ref/tools.texi (Miscellaneous Tools, Executable Modules): Minimal doc update. * .gitignore: * am/guilec (.scm.go): * libguile/Makefile.am (snarf2checkedtexi): * module/Makefile.am (ice-9/psyntax-pp.go): Update makefiles, etc. * module/scripts/README: * module/scripts/lint.scm: * module/scripts/list.scm: Update commentaries.
2011-05-26Reveal guile-tools's inner simplicity...Neil Jerram1-0/+83
...by not using its own-rolled getopt, and moving the `list' function to a separate script * meta/guile-tools.in: Use (ice-9 getopt-long). (directory-files, strip-extensions, unique, find-submodules, list-scripts): Deleted (and moved to new `list.scm' file). (getopt): Deleted. (main): Use getopt-long. Default to calling the `list' script if no script is specified. * module/scripts/list.scm: New script. * module/Makefile.am (SCRIPTS_SOURCES): Add list.scm.
2011-03-25Remove statements about scripts/* that are no longer trueNeil Jerram1-18/+5
* doc/ref/tools.texi (Executable Modules): Say "guile-tools modules" instead of "executable modules". Remove obsolete statements about not ending in .scm, being executable, and beginning with shell script invocation sequence. * module/scripts/README: Ditto.
2011-02-13Add `*current-warning-prefix*'.Ludovic Courtès1-5/+6
* module/system/base/message.scm (*current-warning-prefix*): New variable. (%warning-types): Honor `*current-warning-prefix*'. * module/scripts/compile.scm (compile): Use an empty `*current-warning-prefix*'. * module/system/repl/common.scm (repl-compile): Likewise. * test-suite/tests/tree-il.test (call-with-warnings): Likewise.
2011-02-13autocompile -> auto-compileAndy Wingo1-3/+3
* NEWS: * check-guile.in: * doc/guile.1: * doc/ref/scheme-scripts.texi: * libguile/init.c: * libguile/load.c: * libguile/load.h: * libguile/script.c: * module/Makefile.am: * module/ice-9/boot-9.scm: * module/scripts/compile.scm: * module/system/base/compile.scm: * test-suite/Makefile.am: * test-suite/tests/popen.test: Change "autocompile" to "auto-compile" or "auto_compile", as appropriate, in variable names, function names, command line arguments, and the documentation.
2010-10-27Have "frisk" recognize `#:use-module' and `#:autoload'.Ludovic Courtès1-3/+3
* module/scripts/frisk.scm (grok-proc): Support keywords `#:use-module' and `#:autoload'.
2010-10-13Placate `-Wformat'.Ludovic Courtès1-2/+1
* module/scripts/compile.scm (fail): Use a fancy format string instead of a non-literal one.