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

yamaken at freedesktop.org yamaken at freedesktop.org
Sun Nov 20 09:01:11 PST 2005


Author: yamaken
Date: 2005-11-20 09:01:07 -0800 (Sun, 20 Nov 2005)
New Revision: 2192

Modified:
   branches/r5rs/sigscheme/error.c
   branches/r5rs/sigscheme/eval.c
Log:
* sigscheme/eval.c
  - (Scm_ExtendEnvironment): Add vars/vals number matching check

* sigscheme/error.c
  - (SigScm_ShowBacktrace): Use write/ss if enabled


Modified: branches/r5rs/sigscheme/error.c
===================================================================
--- branches/r5rs/sigscheme/error.c	2005-11-20 16:38:08 UTC (rev 2191)
+++ branches/r5rs/sigscheme/error.c	2005-11-20 17:01:07 UTC (rev 2192)
@@ -287,7 +287,11 @@
         env = TRACE_FRAME_ENV(frame);
         obj = TRACE_FRAME_OBJ(frame);
 
+#if SCM_USE_SRFI38
+        SigScm_WriteToPortWithSharedStructure(scm_current_error_port, obj);
+#else
         SigScm_WriteToPort(scm_current_error_port, obj);
+#endif
         SigScm_ErrorNewline();
 
 #if SCM_DEBUG_BACKTRACE_VAL
@@ -296,7 +300,11 @@
             if (UNBOUNDP(obj, env))
                 break;
             SigScm_ErrorPrintf("  - [%s]: ", SCM_SYMBOL_NAME(obj));
+#if SCM_USE_SRFI38
+            SigScm_WriteToPortWithSharedStructure(scm_current_error_port, Scm_SymbolValue(obj, env));
+#else
             SigScm_WriteToPort(scm_current_error_port, Scm_SymbolValue(obj, env));
+#endif
             SigScm_ErrorNewline();
             break;
 
@@ -307,15 +315,25 @@
                     if (UNBOUNDP(proc, env))
                         break;
                     SigScm_ErrorPrintf("  - [%s]: ", SCM_SYMBOL_NAME(proc));
+#if SCM_USE_SRFI38
+                    SigScm_WriteToPortWithSharedStructure(scm_current_error_port,
+                                                          Scm_SymbolValue(proc, env));
+#else
                     SigScm_WriteToPort(scm_current_error_port,
                                        Scm_SymbolValue(proc, env));
+#endif
                     SigScm_ErrorNewline();
                 }
             }
             if (SYMBOLP(obj)) {
                 SigScm_ErrorPrintf("  - [%s]: ", SCM_SYMBOL_NAME(proc));
+#if SCM_USE_SRFI38
+                SigScm_WriteToPortWithSharedStructure(scm_current_error_port,
+                                                      Scm_SymbolValue(proc, env));
+#else
                 SigScm_WriteToPort(scm_current_error_port,
                                    Scm_SymbolValue(proc, env));
+#endif
                 SigScm_ErrorNewline();
             }
             break;

Modified: branches/r5rs/sigscheme/eval.c
===================================================================
--- branches/r5rs/sigscheme/eval.c	2005-11-20 16:38:08 UTC (rev 2191)
+++ branches/r5rs/sigscheme/eval.c	2005-11-20 17:01:07 UTC (rev 2192)
@@ -123,9 +123,16 @@
         /* dot list appeared: fold the rest values into a variable */
         if (SYMBOLP(CDR(rest_vars))) {
             SET_CDR(rest_vals, LIST_1(CDR(rest_vals)));
+#if SCM_STRICT_ARGCHECK
+            rest_vars = rest_vals = SCM_NULL;
+#endif
             break;
         }
     }
+#if SCM_STRICT_ARGCHECK
+    if (!NULLP(rest_vals))
+        ERR_OBJ("unmatched variable number", vals);
+#endif
 
     /* create new frame */
     frame = CONS(vars, vals);



More information about the uim-commit mailing list