guile-commits
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

[Guile-commits] GNU Guile branch, master, updated. 8f9b968329797a6a228bb


From: Andy Wingo
Subject: [Guile-commits] GNU Guile branch, master, updated. 8f9b968329797a6a228bb18f5dddfa7444c97ff5
Date: Tue, 09 Jun 2009 21:41:59 +0000

This is an automated email from the git hooks/post-receive script. It was
generated because a ref change was pushed to the repository containing
the project "GNU Guile".

http://git.savannah.gnu.org/cgit/guile.git/commit/?id=8f9b968329797a6a228bb18f5dddfa7444c97ff5

The branch, master has been updated
       via  8f9b968329797a6a228bb18f5dddfa7444c97ff5 (commit)
      from  ac4d09b1647f84453175aabcf8fde7807a3b5cf9 (commit)

Those revisions listed above that are new to this repository have
not appeared on any other notification email; so we list those
revisions in full, below.

- Log -----------------------------------------------------------------
commit 8f9b968329797a6a228bb18f5dddfa7444c97ff5
Author: Andy Wingo <address@hidden>
Date:   Tue Jun 9 23:42:05 2009 +0200

    some attempts to solve the ecmascript stack overflow problem
    
    * module/language/ecmascript/compile-ghil.scm (comp): Just use pmatch,
      not ormatch. Now with syncase running over everything, it doesn't
      matter.
    
    * module/ice-9/boot-9.scm (false-if-exception): Avoid saving stacks
      inside false-if-exception. There's probably a more general solution to
      this, though. Fixes getting bogus backtraces sometimes.
    
    * module/Makefile.am (ECMASCRIPT_LANG_SOURCES): Reorder things so that
      spec comes last.

-----------------------------------------------------------------------

Summary of changes:
 module/Makefile.am                          |    4 ++--
 module/ice-9/boot-9.scm                     |    8 ++++++--
 module/language/ecmascript/compile-ghil.scm |   13 +------------
 3 files changed, 9 insertions(+), 16 deletions(-)

diff --git a/module/Makefile.am b/module/Makefile.am
index ca77852..3358441 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 bb66ccf..a260049 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 92d71ec..6e47791 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 '())))


hooks/post-receive
-- 
GNU Guile




reply via email to

[Prev in Thread] Current Thread [Next in Thread]