1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-04-29 19:30:36 +02:00
Commit graph

3 commits

Author SHA1 Message Date
Andy Wingo
0658041d11 fix use-syntax / use-modules confusion -- fixes testsuites
* testsuite/t-match.scm:
* testsuite/t-records.scm: While the attempt to redefine use-syntax as
  being "use during compilation" was cute, it does not reflect the
  historical usage of use-syntax, nor does it correspond to existing code
  that includes other modules and uses them during compilation.

  So use-syntax has been replaced with use-modules. The test suites now
  pass. In the future, compilation phases should be done on whole
  modules, I think; r5rs-style computation does not have phases.
2008-05-14 14:54:52 +02:00
Ludovic Courtes
b89fc2153e Slowly improving support for macro compilation.
* module/language/scheme/translate.scm (&current-macros): Removed.
  (&current-macro-module): Removed.
  (&compile-time-module): New.
  (eval-at-compile-time): New.
  (translate): Initialize `&compile-time-module'.
  (expand-macro)[use-syntax]: New case.
  [begin let...]: Don't expand these built-in macros.
  [else]: Rewrote the macro detection and invocation logic.  Invoke macro
  transformers in the current compile-time module.
  (trans): Let `expand-macro' raise an exception if needed.
  (trans-pair)[defmacro define-macro]: Evaluate the macro definition in
  the compile-time module.

* testsuite/t-match.scm: Use `use-syntax' instead of `use-modules' for
  `(ice-9 match)' and `(srfi srfi-9)'.

* testsuite/t-records.scm: Likewise.

git-archimport-id: lcourtes@laas.fr--2005-mobile/guile-vm--mobile--0.6--patch-15
2008-04-25 19:15:50 +02:00
Ludovic Courtes
0b5f0e49a8 * src/objcodes.c (make_objcode_by_mmap): Fixed the error type when the
object file is too small.

* doc/guile-vm.texi:  Documented `make-closure'.  Improved the documentation
  of `load-program'.

* testsuite:  New directory.

* configure.in:  Added `testsuite/Makefile' to `AC_OUTPUT'.

* Makefile.am (SUBDIRS):  Added `testsuite'.

* src/vm_engine.h (VM_CHECK_OBJECT):  New option.
  (CHECK_OBJECT):  New macro.

* src/vm_system.c (object-ref):  Use VM_CHECK_OBJECT.

* module/system/vm/assemble.scm (preprocess):  Commented out the debugging
  code.

* benchmark/lib.scm (do-loop):  New procedure.

git-archimport-id: lcourtes@laas.fr--2005-mobile/guile-vm--mobile--0.6--patch-2
2008-04-25 19:09:30 +02:00