summaryrefslogtreecommitdiff
path: root/src/bytecode.c
diff options
context:
space:
mode:
authorTom Tromey <tromey@redhat.com>2013-03-17 05:17:24 -0600
committerTom Tromey <tromey@redhat.com>2013-03-17 05:17:24 -0600
commit6bd488cd8d05aa3983ca55f70ee384732d8c0085 (patch)
tree5645fc7b882638d6c0eb3f61fd55bde1a63fc190 /src/bytecode.c
parent71f91792e3013b397996905224f387da5cc539a9 (diff)
parent9c44569ea2a18099307e0571d523d8637000a153 (diff)
downloademacs-6bd488cd8d05aa3983ca55f70ee384732d8c0085.tar.gz
merge from trunk
Diffstat (limited to 'src/bytecode.c')
-rw-r--r--src/bytecode.c12
1 files changed, 7 insertions, 5 deletions
diff --git a/src/bytecode.c b/src/bytecode.c
index 010477904be..45fe5d49154 100644
--- a/src/bytecode.c
+++ b/src/bytecode.c
@@ -313,9 +313,11 @@ struct byte_stack
Lisp_Object byte_string;
const unsigned char *byte_string_start;
+#if BYTE_MARK_STACK
/* The vector of constants used during byte-code execution. Storing
this here protects it from GC because mark_byte_stack marks it. */
Lisp_Object constants;
+#endif
/* Next entry in byte_stack_list. */
struct byte_stack *next;
@@ -376,12 +378,12 @@ unmark_byte_stack (struct byte_stack *stack)
}
-/* Fetch the next byte from the bytecode stream */
+/* Fetch the next byte from the bytecode stream. */
#define FETCH *stack.pc++
/* Fetch two bytes from the bytecode stream and make a 16-bit number
- out of them */
+ out of them. */
#define FETCH2 (op = FETCH, op + (FETCH << 8))
@@ -401,7 +403,7 @@ unmark_byte_stack (struct byte_stack *stack)
#define DISCARD(n) (top -= (n))
/* Get the value which is at the top of the execution stack, but don't
- pop it. */
+ pop it. */
#define TOP (*top)
@@ -532,7 +534,9 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
stack.byte_string = bytestr;
stack.pc = stack.byte_string_start = SDATA (bytestr);
+#if BYTE_MARK_STACK
stack.constants = vector;
+#endif
if (MAX_ALLOCA / word_size <= XFASTINT (maxdepth))
memory_full (SIZE_MAX);
top = alloca ((XFASTINT (maxdepth) + 1) * sizeof *top);
@@ -748,7 +752,6 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
{
BEFORE_POTENTIAL_GC ();
wrong_type_argument (Qlistp, v1);
- AFTER_POTENTIAL_GC ();
}
NEXT;
}
@@ -783,7 +786,6 @@ exec_byte_code (Lisp_Object bytestr, Lisp_Object vector, Lisp_Object maxdepth,
{
BEFORE_POTENTIAL_GC ();
wrong_type_argument (Qlistp, v1);
- AFTER_POTENTIAL_GC ();
}
NEXT;
}