changeset 66528:c9adaa704c22

(internal_lisp_condition_case): New function. (Fcondition_case): Use internal_lisp_condition_case. (Feval): Test Vmemory_full and memory_full_cons_threshold. (Ffuncall): Likewise.
author Richard M. Stallman <rms@gnu.org>
date Sat, 29 Oct 2005 19:34:12 +0000
parents 098219e8d2e8
children e62f159f7a46
files src/eval.c
diffstat 1 files changed, 24 insertions(+), 7 deletions(-) [+]
line wrap: on
line diff
--- a/src/eval.c	Sat Oct 29 19:32:27 2005 +0000
+++ b/src/eval.c	Sat Oct 29 19:34:12 2005 +0000
@@ -1343,15 +1343,28 @@
      (args)
      Lisp_Object args;
 {
-  Lisp_Object val;
-  struct catchtag c;
-  struct handler h;
   register Lisp_Object bodyform, handlers;
   volatile Lisp_Object var;
 
   var      = Fcar (args);
   bodyform = Fcar (Fcdr (args));
   handlers = Fcdr (Fcdr (args));
+
+  return internal_lisp_condition_case (var, bodyform, handlers);
+}
+
+/* Like Fcondition_case, but the args are separate
+   rather than passed in a list.  Used by Fbyte_code.  */
+
+Lisp_Object
+internal_lisp_condition_case (var, bodyform, handlers)
+     volatile Lisp_Object var;
+     Lisp_Object bodyform, handlers;
+{
+  Lisp_Object val;
+  struct catchtag c;
+  struct handler h;
+
   CHECK_SYMBOL (var);
 
   for (val = handlers; CONSP (val); val = XCDR (val))
@@ -2094,8 +2107,10 @@
     return form;
 
   QUIT;
-  if (consing_since_gc > gc_cons_threshold
-      && consing_since_gc > gc_relative_threshold)
+  if ((consing_since_gc > gc_cons_threshold
+       && consing_since_gc > gc_relative_threshold)
+      ||
+      (!NILP (Vmemory_full) && consing_since_gc > memory_full_cons_threshold))
     {
       GCPRO1 (form);
       Fgarbage_collect ();
@@ -2795,8 +2810,10 @@
   register int i;
 
   QUIT;
-  if (consing_since_gc > gc_cons_threshold
-      && consing_since_gc > gc_relative_threshold)
+  if ((consing_since_gc > gc_cons_threshold
+       && consing_since_gc > gc_relative_threshold)
+      ||
+      (!NILP (Vmemory_full) && consing_since_gc > memory_full_cons_threshold))
     Fgarbage_collect ();
 
   if (++lisp_eval_depth > max_lisp_eval_depth)