aboutsummaryrefslogtreecommitdiffstats
path: root/src/eval.c
diff options
context:
space:
mode:
authorDmitry Antipov2012-07-20 09:28:00 +0400
committerDmitry Antipov2012-07-20 09:28:00 +0400
commit765e61e391ee0937ff6b30510b6c4651064fe38e (patch)
tree6f8cfef58d32ed81e2219fc69b1c5c5027c8cce8 /src/eval.c
parent89dea803ea4293eb8d14b87067d1e3eebdcbd180 (diff)
downloademacs-765e61e391ee0937ff6b30510b6c4651064fe38e.tar.gz
emacs-765e61e391ee0937ff6b30510b6c4651064fe38e.zip
Cleanup calls to Fgarbage_collect.
* lisp.h (maybe_gc): New prototype. (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold): Remove declarations. * alloc.c (maybe_gc): New function. (consing_since_gc, gc_relative_threshold, memory_full_cons_threshold): Make them static. * bytecode.c (MAYBE_GC): Use maybe_gc. * eval.c (eval_sub, Ffuncall): Likewise. * keyboard.c (read_char): Likewise. Adjust call to maybe_gc to avoid dependency from auto-save feature.
Diffstat (limited to 'src/eval.c')
-rw-r--r--src/eval.c16
1 files changed, 2 insertions, 14 deletions
diff --git a/src/eval.c b/src/eval.c
index da567e1e635..a0143c372de 100644
--- a/src/eval.c
+++ b/src/eval.c
@@ -2040,15 +2040,7 @@ eval_sub (Lisp_Object form)
2040 return form; 2040 return form;
2041 2041
2042 QUIT; 2042 QUIT;
2043 if ((consing_since_gc > gc_cons_threshold 2043 maybe_gc ();
2044 && consing_since_gc > gc_relative_threshold)
2045 ||
2046 (!NILP (Vmemory_full) && consing_since_gc > memory_full_cons_threshold))
2047 {
2048 GCPRO1 (form);
2049 Fgarbage_collect ();
2050 UNGCPRO;
2051 }
2052 2044
2053 if (++lisp_eval_depth > max_lisp_eval_depth) 2045 if (++lisp_eval_depth > max_lisp_eval_depth)
2054 { 2046 {
@@ -2737,11 +2729,7 @@ usage: (funcall FUNCTION &rest ARGUMENTS) */)
2737 ptrdiff_t i; 2729 ptrdiff_t i;
2738 2730
2739 QUIT; 2731 QUIT;
2740 if ((consing_since_gc > gc_cons_threshold 2732 maybe_gc ();
2741 && consing_since_gc > gc_relative_threshold)
2742 ||
2743 (!NILP (Vmemory_full) && consing_since_gc > memory_full_cons_threshold))
2744 Fgarbage_collect ();
2745 2733
2746 if (++lisp_eval_depth > max_lisp_eval_depth) 2734 if (++lisp_eval_depth > max_lisp_eval_depth)
2747 { 2735 {