#define TOP (*stackp)
+/* Garbage collect if we have consed enough since the last time.
+ We do this at every branch, to avoid loops that never GC. */
+
+#define MAYBE_GC() \
+ if (consing_since_gc > gc_cons_threshold) \
+ Fgarbage_collect ();
+
DEFUN ("byte-code", Fbyte_code, Sbyte_code, 3, 3, 0,
"Function used internally in byte-compiled code.\n\
The first argument, BYTESTR, is a string of byte code;\n\
break;
case Bgoto:
+ MAYBE_GC ();
QUIT;
op = FETCH2; /* pc = FETCH2 loses since FETCH2 contains pc++ */
pc = XSTRING (string_saved)->data + op;
break;
case Bgotoifnil:
+ MAYBE_GC ();
op = FETCH2;
if (NILP (POP))
{
break;
case Bgotoifnonnil:
+ MAYBE_GC ();
op = FETCH2;
if (!NILP (POP))
{
break;
case Bgotoifnilelsepop:
+ MAYBE_GC ();
op = FETCH2;
if (NILP (TOP))
{
break;
case Bgotoifnonnilelsepop:
+ MAYBE_GC ();
op = FETCH2;
if (!NILP (TOP))
{
break;
case BRgoto:
+ MAYBE_GC ();
QUIT;
pc += (int) *pc - 127;
break;
case BRgotoifnil:
+ MAYBE_GC ();
if (NILP (POP))
{
QUIT;
break;
case BRgotoifnonnil:
+ MAYBE_GC ();
if (!NILP (POP))
{
QUIT;
break;
case BRgotoifnilelsepop:
+ MAYBE_GC ();
op = *pc++;
if (NILP (TOP))
{
break;
case BRgotoifnonnilelsepop:
+ MAYBE_GC ();
op = *pc++;
if (!NILP (TOP))
{