summaryrefslogtreecommitdiff
path: root/src/lisp.h
diff options
context:
space:
mode:
authorStefan Monnier <monnier@iro.umontreal.ca>2011-02-17 21:07:36 -0500
committerStefan Monnier <monnier@iro.umontreal.ca>2011-02-17 21:07:36 -0500
commitb286858c7a0d5dafa302b9e88970c13385358a6a (patch)
tree37aca1554bbef09ef09256d7162e619222dbb4a1 /src/lisp.h
parent3804652098c7c8824f332e92846a3b8896b9e683 (diff)
downloademacs-b286858c7a0d5dafa302b9e88970c13385358a6a.tar.gz
Don't GC-scan stack data redundantly.
* src/alloc.c (Fgarbage_collect): When using stack scanning, don't redundantly scan byte-code stacks, catchlist, and handlerlist. * src/bytecode.c (BYTE_MAINTAIN_TOP): New macros. (struct byte_stack): Only define `top' and `bottom' if used. (mark_byte_stack): Only define if used. (BEFORE_POTENTIAL_GC, AFTER_POTENTIAL_GC): Nullify if BYTE_MAINTAIN_TOP is not set. (Fbyte_code): Don't set `bottom' unless BYTE_MAINTAIN_TOP is set. * src/lisp.h (BYTE_MARK_STACK): New macro. (mark_byte_stack): Only declare if BYTE_MARK_STACK is set. * src/term.c (OUTPUT_IF): Use OUTPUT.
Diffstat (limited to 'src/lisp.h')
-rw-r--r--src/lisp.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/src/lisp.h b/src/lisp.h
index 7cc2a8e7d45..82c4f65613d 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -2145,6 +2145,11 @@ struct gcpro
#define GC_MARK_STACK GC_USE_GCPROS_AS_BEFORE
#endif
+/* Whether we do the stack marking manually. */
+#define BYTE_MARK_STACK !(GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS \
+ || GC_MARK_STACK == GC_MARK_STACK_CHECK_GCPROS)
+
+
#if GC_MARK_STACK == GC_MAKE_GCPROS_NOOPS
/* Do something silly with gcproN vars just so gcc shuts up. */
@@ -3253,7 +3258,9 @@ extern Lisp_Object Qbytecode;
EXFUN (Fbyte_code, 3);
extern void syms_of_bytecode (void);
extern struct byte_stack *byte_stack_list;
+#ifdef BYTE_MARK_STACK
extern void mark_byte_stack (void);
+#endif
extern void unmark_byte_stack (void);
/* Defined in macros.c */