summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--module/Makefile.am4
-rw-r--r--module/ice-9/boot-9.scm8
-rw-r--r--module/language/ecmascript/compile-ghil.scm13
3 files changed, 9 insertions, 16 deletions
diff --git a/module/Makefile.am b/module/Makefile.am
index ca7785212..3358441b1 100644
--- a/module/Makefile.am
+++ b/module/Makefile.am
@@ -105,12 +105,12 @@ ECMASCRIPT_LANG_SOURCES = \
language/ecmascript/parse-lalr.scm \
language/ecmascript/tokenize.scm \
language/ecmascript/parse.scm \
- language/ecmascript/spec.scm \
language/ecmascript/impl.scm \
language/ecmascript/base.scm \
language/ecmascript/function.scm \
language/ecmascript/array.scm \
- language/ecmascript/compile-ghil.scm
+ language/ecmascript/compile-ghil.scm \
+ language/ecmascript/spec.scm
SCRIPTS_SOURCES = \
scripts/PROGRAM.scm \
diff --git a/module/ice-9/boot-9.scm b/module/ice-9/boot-9.scm
index bb66ccfb6..a2600491b 100644
--- a/module/ice-9/boot-9.scm
+++ b/module/ice-9/boot-9.scm
@@ -382,8 +382,12 @@
(define (apply-to-args args fn) (apply fn args))
(defmacro false-if-exception (expr)
- `(catch #t (lambda () ,expr)
- (lambda args #f)))
+ `(catch #t
+ (lambda ()
+ ;; avoid saving backtraces inside false-if-exception
+ (with-fluid* the-last-stack (fluid-ref the-last-stack)
+ (lambda () ,expr)))
+ (lambda args #f)))
diff --git a/module/language/ecmascript/compile-ghil.scm b/module/language/ecmascript/compile-ghil.scm
index 92d71ec16..6e4779120 100644
--- a/module/language/ecmascript/compile-ghil.scm
+++ b/module/language/ecmascript/compile-ghil.scm
@@ -50,17 +50,6 @@
(and (not (null? props))
props))))
-;; The purpose, you ask? To avoid non-tail recursion when expanding a
-;; long pmatch sequence.
-(define-macro (ormatch x . clauses)
- (let ((X (gensym)))
- `(let ((,X ,x))
- (or ,@(map (lambda (c)
- (if (eq? (car c) 'else)
- `(begin . ,(cdr c))
- `(pmatch ,X ,c (else #f))))
- clauses)))))
-
(define (comp x e)
(let ((l (location x)))
(define (let1 what proc)
@@ -74,7 +63,7 @@
(-> (bind vars (list what)
(-> (begin (list (proc (car vars))
(-> (ref (car vars)))))))))))
- (ormatch x
+ (pmatch x
(null
;; FIXME, null doesn't have much relation to EOL...
(-> (quote '())))