1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-05-18 10:10:23 +02:00
guile/test-suite/tests
Andy Wingo b0b180d522 nifty generic compiler infrastructure -- no more hardcoded passes
* module/system/base/language.scm (<language>): Rework so that instead of
  hardcoding passes in the language, we define compilers that translate
  from one language to another. Add `parser' to the language fields, a
  bit of a hack but useful for languages with s-expression external
  representations but with record internal representations.
  (define-language, *compilation-cache*, invalidate-compilation-cache!)
  (compute-compilation-order, lookup-compilation-order): Add an algorithm
  that does a depth-first search for a translation path from a source
  language to a target language, caching the result in a lookup table.

* module/language/scheme/spec.scm:
* module/language/ghil/spec.scm: Update to the new language format.

* module/language/glil/spec.scm: Add a language specification for GLIL,
  with a compiler to objcode. Also there are parsers and printers, for
  repl usage, but for some reason this doesn't work yet.

* module/language/objcode/spec.scm: Define a language specification for
  object code. There is some sleight of hand here, in the "compiler" to
  values; but there is method behind the madness, because this way we
  higher levels can pass environments (a module + externals pair) to
  objcode->program.

* module/language/value/spec.scm: Define a language specification for
  values. There is something intellectually dishonest about this, but it
  does serve its purpose as a foundation for the language hierarchy.

* configure.in:
* module/language/Makefile.am
* module/language/ghil/Makefile.am
* module/language/glil/Makefile.am
* module/language/objcode/Makefile.am
* module/language/value/Makefile.am:
  Autotomfoolery for the ghil, glil, objcode, and value languages.

* module/language/scheme/translate.scm (translate): Import the bits that
  understand `compile-time-environment' here, and pass on the relevant
  portions of the environment to the next compiler pass.

* module/system/base/compile.scm (current-language): New procedure, refs
  the current language fluid, or lazily sets it to scheme.
  (call-once, call-with-output-file/atomic): Refactor these bits to use
  with-throw-handler. No functional change.
  (compile-file, compile-and-load, compile-passes, compile-fold)
  (compile): Refactor the public interface of the compiler to be generic
  and simple. Uses `lookup-compilation-order' to find a path from the
  source language to the target language.

* module/system/base/syntax.scm (define-type): Adapt to changes in
  define-record.
  (define-record): Instead of expecting all slots in the first form,
  expect them in the body, and let the first form hold the options.

* module/system/il/compile.scm (compile): Adapt to the compilation pass
  API (three in and two out).

* module/system/il/ghil.scm (<ghil-var>, <ghil-env>)
  (<ghil-toplevel-env>): Adapt to define-record changes.

* module/system/il/glil.scm (<glil-vars>): Adapt to define-record
  changes.
  (<glil>, print-glil): Add a GLIL record printer that uses unparse.
  (parse-glil, unparse-glil): Update unparse (formerly known as pprint),
  and write a parse function.

* module/system/repl/common.scm (<repl>): Adapt to define-record changes.
  (repl-parse): New function, parses the read form using the current
  language. Something of a hack.
  (repl-compile): Adapt to changes in `compile'.
  (repl-eval): Fix up the does-the-language-have-a-compiler check for
  changes in <language>.

* module/system/repl/repl.scm (start-repl): Parse the form before eval.

* module/system/repl/command.scm (describe): Parse.
  (compile): Be more generic.
  (compile-file): Adapt to changes in compile-file.
  (disassemble, time, profile, trace): Parse.

* module/system/vm/debug.scm:
* module/system/vm/assemble.scm: Adapt to define-record changes.

* module/language/scheme/translate.scm (receive): Fix an important bug
  that gave `receive' letrec semantics instead of let semantics. Whoops!
2008-11-14 22:42:31 +01:00
..
c-api *** empty log message *** 2003-04-07 01:58:47 +00:00
alist.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
and-let-star.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
arbiters.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
bit-operations.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
c-api.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
chars.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
common-list.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
compiler.test nifty generic compiler infrastructure -- no more hardcoded passes 2008-11-14 22:42:31 +01:00
continuations.test * tests/continuations.test ("continuations"): Use 2007-10-21 20:45:45 +00:00
dynamic-scope.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
elisp.test elisp.test: apply to nil-terminated list is UNRESOLVED with compiled boot-9 2008-10-16 14:16:53 +02:00
environments.test Remove environments.[ch] from the build. 2006-11-02 21:10:37 +00:00
eval.test make-procedure-with-setter inherits name from getter 2008-11-01 17:12:23 +01:00
exceptions.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
filesys.test Delete test file after all tests have run in order to make "make 2006-05-27 22:24:24 +00:00
format.test merge from 1.8 branch 2006-10-09 23:40:48 +00:00
fractions.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
ftw.test Fix continuation marking, and some tests. 2008-09-26 13:42:09 +02:00
gc.test Add `gc.test' hack for SPARC GNU/Linux. 2008-02-15 16:02:22 +00:00
getopt-long.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
goops.test compile goops accessors. woot! 2008-10-31 18:30:27 +01:00
guardians.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
hash.test Release stuff: missing NEWS and 2007/2008 copyrights. 2008-02-15 23:13:59 +00:00
hooks.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
i18n.test Changes from arch/CVS synchronization 2007-01-31 20:58:20 +00:00
import.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
interp.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
list.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
load.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
modules.test Changes from arch/CVS synchronization 2007-05-05 20:38:57 +00:00
multilingual.nottest merge from 1.8 branch 2006-04-16 23:37:40 +00:00
numbers.test Fix for incorrect (gcd -2) => -2; should give 2. 2008-09-22 21:21:20 +01:00
optargs.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
options.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
pairs.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
poe.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
popen.test merge from 1.8 branch 2006-10-09 23:40:48 +00:00
ports.test ("port-for-each"): remove unresolved for 2007-08-26 18:12:53 +00:00
posix.test Changes from arch/CVS synchronization 2007-06-07 08:36:13 +00:00
q.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
r4rs.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
r5rs_pitfall.test Fix continuation marking, and some tests. 2008-09-26 13:42:09 +02:00
ramap.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
reader.test Add support for SRFI-88-like postfix keyword read syntax. 2008-04-15 19:52:43 +02:00
receive.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
regexp.test Enclose `regexp.test' in a module. 2008-09-25 21:36:14 +02:00
socket.test Honor $TMPDIR in the test suite. 2008-03-13 14:03:58 +00:00
sort.test merge from 1.8 branch 2007-03-07 23:00:22 +00:00
srcprop.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
srfi-1.test Fix type-checking of SRFI-1 `partition'. 2008-04-28 18:03:27 +02:00
srfi-4.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
srfi-6.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
srfi-9.test Changes from arch/CVS synchronization 2007-08-08 14:56:02 +00:00
srfi-10.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
srfi-11.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
srfi-13.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
srfi-14.test Changes from arch/CVS synchronization 2006-10-26 07:20:59 +00:00
srfi-17.test Changes from arch/CVS synchronization 2007-07-24 23:17:54 +00:00
srfi-18.test Raise error on SRFI-18 load if Guile built without threading support 2008-08-30 21:08:50 +02:00
srfi-19.test Changes from arch/CVS synchronization 2007-07-09 16:47:56 +00:00
srfi-26.test * tests/srfi-26.test: New. 2004-01-21 00:45:48 +00:00
srfi-31.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
srfi-34.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
srfi-35.test Make (srfi srfi-35)' visible through cond-expand'. 2008-04-26 21:09:40 +02:00
srfi-37.test Fix SRFI-37 `args-fold' with short option names of argument-less options. 2008-03-12 17:01:19 +00:00
srfi-39.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
srfi-60.test merge from 1.8 branch 2006-06-17 23:15:59 +00:00
srfi-69.test Changes from arch/CVS synchronization 2007-12-13 12:27:37 +00:00
srfi-88.test Add `(srfi srfi-88)'. 2008-04-26 19:34:37 +02:00
streams.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
strings.test Make literal strings (i.e., returned by `read') read-only. 2008-09-23 18:45:27 +02:00
structs.test merge from 1.8 branch 2007-03-07 23:00:22 +00:00
symbols.test Make `symbol->string' return a read-only string. 2008-09-23 18:44:27 +02:00
syncase.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
syntax.test Changes from arch/CVS synchronization 2007-07-18 20:25:38 +00:00
threads.test Delete trailing whitespace. 2008-05-14 23:52:49 +01:00
time.test Use Gnulib's `strftime' to address bug #24130. 2008-09-02 21:58:58 +02:00
unif.test Changes from arch/CVS synchronization 2006-12-12 14:01:40 +00:00
vectors.test Changes from arch/CVS synchronization 2006-11-29 09:05:10 +00:00
version.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00
weaks.test merge from 1.8 branch 2006-04-16 23:37:40 +00:00