diff options
| author | Richard M. Stallman | 2005-10-29 19:34:12 +0000 |
|---|---|---|
| committer | Richard M. Stallman | 2005-10-29 19:34:12 +0000 |
| commit | ee830945cc0d1ddf6e6e26c7f3f874b764e9736b (patch) | |
| tree | 108db52023bb6d5426168b977d038dcdec6123b7 /src/eval.c | |
| parent | 5c125a1338ede831ed5597cf70c561bb770c904c (diff) | |
| download | emacs-ee830945cc0d1ddf6e6e26c7f3f874b764e9736b.tar.gz emacs-ee830945cc0d1ddf6e6e26c7f3f874b764e9736b.zip | |
(internal_lisp_condition_case): New function.
(Fcondition_case): Use internal_lisp_condition_case.
(Feval): Test Vmemory_full and memory_full_cons_threshold.
(Ffuncall): Likewise.
Diffstat (limited to 'src/eval.c')
| -rw-r--r-- | src/eval.c | 31 |
1 files changed, 24 insertions, 7 deletions
diff --git a/src/eval.c b/src/eval.c index a867d00150e..86859e4ddae 100644 --- a/src/eval.c +++ b/src/eval.c | |||
| @@ -1343,15 +1343,28 @@ usage: (condition-case VAR BODYFORM &rest HANDLERS) */) | |||
| 1343 | (args) | 1343 | (args) |
| 1344 | Lisp_Object args; | 1344 | Lisp_Object args; |
| 1345 | { | 1345 | { |
| 1346 | Lisp_Object val; | ||
| 1347 | struct catchtag c; | ||
| 1348 | struct handler h; | ||
| 1349 | register Lisp_Object bodyform, handlers; | 1346 | register Lisp_Object bodyform, handlers; |
| 1350 | volatile Lisp_Object var; | 1347 | volatile Lisp_Object var; |
| 1351 | 1348 | ||
| 1352 | var = Fcar (args); | 1349 | var = Fcar (args); |
| 1353 | bodyform = Fcar (Fcdr (args)); | 1350 | bodyform = Fcar (Fcdr (args)); |
| 1354 | handlers = Fcdr (Fcdr (args)); | 1351 | handlers = Fcdr (Fcdr (args)); |
| 1352 | |||
| 1353 | return internal_lisp_condition_case (var, bodyform, handlers); | ||
| 1354 | } | ||
| 1355 | |||
| 1356 | /* Like Fcondition_case, but the args are separate | ||
| 1357 | rather than passed in a list. Used by Fbyte_code. */ | ||
| 1358 | |||
| 1359 | Lisp_Object | ||
| 1360 | internal_lisp_condition_case (var, bodyform, handlers) | ||
| 1361 | volatile Lisp_Object var; | ||
| 1362 | Lisp_Object bodyform, handlers; | ||
| 1363 | { | ||
| 1364 | Lisp_Object val; | ||
| 1365 | struct catchtag c; | ||
| 1366 | struct handler h; | ||
| 1367 | |||
| 1355 | CHECK_SYMBOL (var); | 1368 | CHECK_SYMBOL (var); |
| 1356 | 1369 | ||
| 1357 | for (val = handlers; CONSP (val); val = XCDR (val)) | 1370 | for (val = handlers; CONSP (val); val = XCDR (val)) |
| @@ -2094,8 +2107,10 @@ DEFUN ("eval", Feval, Seval, 1, 1, 0, | |||
| 2094 | return form; | 2107 | return form; |
| 2095 | 2108 | ||
| 2096 | QUIT; | 2109 | QUIT; |
| 2097 | if (consing_since_gc > gc_cons_threshold | 2110 | if ((consing_since_gc > gc_cons_threshold |
| 2098 | && consing_since_gc > gc_relative_threshold) | 2111 | && consing_since_gc > gc_relative_threshold) |
| 2112 | || | ||
| 2113 | (!NILP (Vmemory_full) && consing_since_gc > memory_full_cons_threshold)) | ||
| 2099 | { | 2114 | { |
| 2100 | GCPRO1 (form); | 2115 | GCPRO1 (form); |
| 2101 | Fgarbage_collect (); | 2116 | Fgarbage_collect (); |
| @@ -2795,8 +2810,10 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */) | |||
| 2795 | register int i; | 2810 | register int i; |
| 2796 | 2811 | ||
| 2797 | QUIT; | 2812 | QUIT; |
| 2798 | if (consing_since_gc > gc_cons_threshold | 2813 | if ((consing_since_gc > gc_cons_threshold |
| 2799 | && consing_since_gc > gc_relative_threshold) | 2814 | && consing_since_gc > gc_relative_threshold) |
| 2815 | || | ||
| 2816 | (!NILP (Vmemory_full) && consing_since_gc > memory_full_cons_threshold)) | ||
| 2800 | Fgarbage_collect (); | 2817 | Fgarbage_collect (); |
| 2801 | 2818 | ||
| 2802 | if (++lisp_eval_depth > max_lisp_eval_depth) | 2819 | if (++lisp_eval_depth > max_lisp_eval_depth) |