21 |
|
|
22 |
|
|
23 |
#include <config.h> |
#include <config.h> |
24 |
|
#ifdef BOEHM_GC |
25 |
|
#include <gc.h> |
26 |
|
#endif |
27 |
#include "lisp.h" |
#include "lisp.h" |
28 |
#include "blockinput.h" |
#include "blockinput.h" |
29 |
#include "commands.h" |
#include "commands.h" |
205 |
init_eval_once () |
init_eval_once () |
206 |
{ |
{ |
207 |
specpdl_size = 50; |
specpdl_size = 50; |
208 |
specpdl = (struct specbinding *) xmalloc (specpdl_size * sizeof (struct specbinding)); |
specpdl = (struct specbinding *) XGC_MALLOC (specpdl_size * sizeof (struct specbinding)); |
209 |
specpdl_ptr = specpdl; |
specpdl_ptr = specpdl; |
210 |
max_specpdl_size = 600; |
max_specpdl_size = 600; |
211 |
max_lisp_eval_depth = 300; |
max_lisp_eval_depth = 300; |
1104 |
/* Unwind the specbind, catch, and handler stacks back to CATCH, and |
/* Unwind the specbind, catch, and handler stacks back to CATCH, and |
1105 |
jump to that CATCH, returning VALUE as the value of that catch. |
jump to that CATCH, returning VALUE as the value of that catch. |
1106 |
|
|
1107 |
This is the guts Fthrow and Fsignal; they differ only in the way |
This is the guts of Fthrow and Fsignal; they differ only in the way |
1108 |
they choose the catch tag to throw to. A catch tag for a |
they choose the catch tag to throw to. A catch tag for a |
1109 |
condition-case form has a TAG of Qnil. |
condition-case form has a TAG of Qnil. |
1110 |
|
|
1974 |
return form; |
return form; |
1975 |
|
|
1976 |
QUIT; |
QUIT; |
1977 |
|
#ifndef BOEHM_GC |
1978 |
if (consing_since_gc > gc_cons_threshold) |
if (consing_since_gc > gc_cons_threshold) |
1979 |
{ |
{ |
1980 |
GCPRO1 (form); |
GCPRO1 (form); |
1981 |
Fgarbage_collect (); |
Fgarbage_collect (); |
1982 |
UNGCPRO; |
UNGCPRO; |
1983 |
} |
} |
1984 |
|
#endif |
1985 |
|
|
1986 |
if (++lisp_eval_depth > max_lisp_eval_depth) |
if (++lisp_eval_depth > max_lisp_eval_depth) |
1987 |
{ |
{ |
2665 |
register int i; |
register int i; |
2666 |
|
|
2667 |
QUIT; |
QUIT; |
2668 |
|
#ifndef BOEHM_GC |
2669 |
if (consing_since_gc > gc_cons_threshold) |
if (consing_since_gc > gc_cons_threshold) |
2670 |
Fgarbage_collect (); |
Fgarbage_collect (); |
2671 |
|
#endif |
2672 |
|
|
2673 |
if (++lisp_eval_depth > max_lisp_eval_depth) |
if (++lisp_eval_depth > max_lisp_eval_depth) |
2674 |
{ |
{ |
2968 |
specpdl_size *= 2; |
specpdl_size *= 2; |
2969 |
if (specpdl_size > max_specpdl_size) |
if (specpdl_size > max_specpdl_size) |
2970 |
specpdl_size = max_specpdl_size; |
specpdl_size = max_specpdl_size; |
2971 |
specpdl = (struct specbinding *) xrealloc (specpdl, specpdl_size * sizeof (struct specbinding)); |
specpdl = (struct specbinding *) XGC_REALLOC (specpdl, specpdl_size * sizeof (struct specbinding)); |
2972 |
specpdl_ptr = specpdl + count; |
specpdl_ptr = specpdl + count; |
2973 |
} |
} |
2974 |
|
|