[uim-commit] r1740 - branches/r5rs/sigscheme

yamaken at freedesktop.org yamaken at freedesktop.org
Sun Oct 2 08:45:14 PDT 2005


Author: yamaken
Date: 2005-10-02 08:45:11 -0700 (Sun, 02 Oct 2005)
New Revision: 1740

Modified:
   branches/r5rs/sigscheme/operations.c
Log:
* sigscheme/operations.c
  - (ScmOp_call_with_current_continuation):
    * Make logical intention clear
    * Add some comments


Modified: branches/r5rs/sigscheme/operations.c
===================================================================
--- branches/r5rs/sigscheme/operations.c	2005-10-02 15:10:34 UTC (rev 1739)
+++ branches/r5rs/sigscheme/operations.c	2005-10-02 15:45:11 UTC (rev 1740)
@@ -1794,16 +1794,18 @@
 
     cont = Scm_NewContinuation();
 
-    /* setjmp and check result */
     if (setjmp(SCM_CONTINUATION_JMPENV(cont))) {
         /* returned from longjmp */
         ret = scm_continuation_thrown_obj;
-        scm_continuation_thrown_obj = SCM_FALSE;  /* make sweepable */
+        scm_continuation_thrown_obj = SCM_FALSE;  /* make ret sweepable */
         return ret;
+    } else {
+        /* call proc with current continutation as (proc cont): This call must
+         * not be Scm_tailcall(), to preserve current stack until longjmp()
+         * called.
+         */
+        return Scm_call(proc, LIST_1(cont));
     }
-
-    /* execute (proc cont) */
-    return Scm_call(proc, LIST_1(cont));
 }
 
 ScmObj ScmOp_values(ScmObj args)



More information about the uim-commit mailing list