summaryrefslogtreecommitdiff
path: root/module/system/base/compile.scm
diff options
context:
space:
mode:
authorLudovic Court`es <ludovic.courtes@laas.fr>2005-04-22 16:00:33 +0000
committerLudovic Courtès <ludo@gnu.org>2008-04-25 19:09:29 +0200
commitd8eeb67c89ea3f68f25bd1d7633a91cd3e8c1b68 (patch)
tree78a4059664f9c2c289abac64ce82d2bb974a61ce /module/system/base/compile.scm
parentf9e8c09d42ce992803d2c4dddbc00991260c636f (diff)
downloadguile-d8eeb67c89ea3f68f25bd1d7633a91cd3e8c1b68.tar.gz
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
Diffstat (limited to 'module/system/base/compile.scm')
-rw-r--r--module/system/base/compile.scm7
1 files changed, 4 insertions, 3 deletions
diff --git a/module/system/base/compile.scm b/module/system/base/compile.scm
index e6b2d1310..49a47eea6 100644
--- a/module/system/base/compile.scm
+++ b/module/system/base/compile.scm
@@ -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))))
;;;