[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Don't use mark_vectorlike for bool vectors
From: |
Dmitry Antipov |
Subject: |
Don't use mark_vectorlike for bool vectors |
Date: |
Fri, 05 Oct 2007 13:56:04 +0400 |
User-agent: |
Thunderbird 2.0.0.5 (X11/20070719) |
This cleanup patch avoids using mark_vectorlike for bool vectors,
since this kind of vectors doesn't contains Lisp objects to trace
during GC.
Dmitry
Index: ChangeLog
===================================================================
RCS file: /sources/emacs/emacs/src/ChangeLog,v
retrieving revision 1.5912
diff -u -r1.5912 ChangeLog
--- ChangeLog 4 Oct 2007 16:57:53 -0000 1.5912
+++ ChangeLog 5 Oct 2007 09:58:11 -0000
@@ -1,3 +1,8 @@
+2007-10-05 Dmitry Antipov <address@hidden>
+
+ * alloc.c (mark_object): Don't use mark_vectorlike for bool
+ vectors, reorganize vector marking code.
+
2007-10-04 Juanma Barranquero <address@hidden>
* image.c (syms_of_image) <image-types>: Fix typo in docstring.
Index: alloc.c
===================================================================
RCS file: /sources/emacs/emacs/src/alloc.c,v
retrieving revision 1.426
diff -u -r1.426 alloc.c
--- alloc.c 2 Oct 2007 22:07:41 -0000 1.426
+++ alloc.c 5 Oct 2007 09:58:11 -0000
@@ -5553,8 +5553,6 @@
mark_buffer (obj);
}
}
- else if (GC_SUBRP (obj))
- break;
else if (GC_COMPILEDP (obj))
/* We could treat this just like a vector, but it is better to
save the COMPILED_CONSTANTS element for last and avoid
@@ -5619,7 +5617,11 @@
VECTOR_MARK (XVECTOR (h->key_and_value));
}
}
- else
+ else if (GC_BOOL_VECTOR_P (obj))
+ /* Since no Lisp_Objects are referenced from bool vector,
+ just mark the vector without examining it's contents. */
+ VECTOR_MARK (XVECTOR (obj));
+ else if (!GC_SUBRP (obj))
mark_vectorlike (XVECTOR (obj));
break;
- Don't use mark_vectorlike for bool vectors,
Dmitry Antipov <=