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

yamaken at freedesktop.org yamaken at freedesktop.org
Tue Nov 8 05:40:46 PST 2005


Author: yamaken
Date: 2005-11-08 05:40:38 -0800 (Tue, 08 Nov 2005)
New Revision: 2085

Modified:
   branches/r5rs/sigscheme/sigschemeinternal.h
   branches/r5rs/sigscheme/storage-continuation.c
   branches/r5rs/sigscheme/storage-gc.c
Log:
* sigscheme/sigschemeinternal.h
  - (Scm_DestructContinuation): New function decl
* sigscheme/storage-continuation.c
  - (Scm_DestructContinuation): New function
* sigscheme/storage-gc.c
  - (sweep_obj): Add invocation of Scm_DestructContinuation()


Modified: branches/r5rs/sigscheme/sigschemeinternal.h
===================================================================
--- branches/r5rs/sigscheme/sigschemeinternal.h	2005-11-08 13:24:29 UTC (rev 2084)
+++ branches/r5rs/sigscheme/sigschemeinternal.h	2005-11-08 13:40:38 UTC (rev 2085)
@@ -337,6 +337,7 @@
 /* storage-continuation.c */
 void   SigScm_InitContinuation(void);
 void   SigScm_FinalizeContinuation(void);
+void   Scm_DestructContinuation(ScmObj cont);
 ScmObj Scm_CallWithCurrentContinuation(ScmObj proc, ScmEvalState *eval_state);
 void   Scm_CallContinuation(ScmObj cont, ScmObj ret);
 ScmObj Scm_DynamicWind(ScmObj before, ScmObj thunk, ScmObj after);

Modified: branches/r5rs/sigscheme/storage-continuation.c
===================================================================
--- branches/r5rs/sigscheme/storage-continuation.c	2005-11-08 13:24:29 UTC (rev 2084)
+++ branches/r5rs/sigscheme/storage-continuation.c	2005-11-08 13:40:38 UTC (rev 2085)
@@ -247,6 +247,11 @@
     return dest_cont;
 }
 
+void Scm_DestructContinuation(ScmObj cont)
+{
+    /* no object to free(3) in this implementation */
+}
+
 ScmObj Scm_CallWithCurrentContinuation(ScmObj proc, ScmEvalState *eval_state)
 {
     jmp_buf env;

Modified: branches/r5rs/sigscheme/storage-gc.c
===================================================================
--- branches/r5rs/sigscheme/storage-gc.c	2005-11-08 13:24:29 UTC (rev 2084)
+++ branches/r5rs/sigscheme/storage-gc.c	2005-11-08 13:40:38 UTC (rev 2085)
@@ -579,6 +579,16 @@
 
     /* rarely swept objects */
     case ScmContinuation:
+        /*
+         * Since continuation object is not so many, destructing the object by
+         * function call will not cost high. This function interface makes
+         * continuation module substitution easy without preparing
+         * module-specific header file which contains the module-specific
+         * destruction macro.
+         */
+        Scm_DestructContinuation(obj);
+        break;
+
     case ScmFunc:
     case ScmConstant:
     case ScmFreeCell:



More information about the uim-commit mailing list