1
Fork 0
mirror of https://git.savannah.gnu.org/git/guile.git synced 2025-06-14 15:40:19 +02:00

Translation from Scheme to GHIL, and compilation to GLIL work.

* src/*.c:  Removed calls to `scm_must_malloc', `SCM_MUST_MALLOC' and
  `scm_must_free'.  Same for `SCM_INUMP', `SCM_INUM', `SCM_STRING_CHARS',
  and the likes.
* module/system/base/syntax.scm:  Do not import `(ice-9 match)' and do
  not re-export `match', do not export `syntax-error' which was not
  defined here.
* module/system/base/compile.scm (call-with-compile-error-catch):  Use
  the `catch' form instead of `try'.
* src/instructions.c:  Use `scm_from_char ()' instead of the deprecated
  macro `SCM_MAKINUM ()'.
* src/instructions.h (scm_instruction):  Made `npop' a signed char.

git-archimport-id: lcourtes@laas.fr--2004-libre/guile-vm--revival--0.6--patch-2
This commit is contained in:
Ludovic Court`es 2005-04-22 16:00:33 +00:00 committed by Ludovic Courtès
parent f9e8c09d42
commit d8eeb67c89
12 changed files with 111 additions and 79 deletions

View file

@ -41,9 +41,10 @@
(throw 'syntax-error loc msg exp))
(define-public (call-with-compile-error-catch thunk)
(try (thunk)
((syntax-error loc msg exp)
(format #t "~A:~A: ~A: ~A" (car loc) (cdr loc) msg exp))))
(catch 'syntax-error
(thunk)
(lambda (key loc msg exp)
(format #t "~A:~A: ~A: ~A" (car loc) (cdr loc) msg exp))))
;;;

View file

@ -20,10 +20,9 @@
;;; Code:
(define-module (system base syntax)
:use-module (ice-9 match)
:use-module (ice-9 receive)
:use-module (ice-9 and-let-star)
:export (stack-catch match syntax-error receive and-let*))
:export (stack-catch receive and-let*))
;;;

View file

@ -27,7 +27,7 @@
:use-module (ice-9 match)
:use-module (ice-9 regex)
:use-module (ice-9 common-list)
:export (assemble))
:export (preprocess assemble))
(define (assemble glil env . opts)
(codegen (preprocess glil #f) #t))