aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorAndrea Corallo2019-12-22 08:31:02 +0100
committerAndrea Corallo2020-01-01 11:38:14 +0100
commita88e5f0f199ad018d57d07016dce20e5462dbbca (patch)
treeceac2faa207cea06fa867f81e90fe5150adf0c31 /src
parent4c8b46514d87856e5e2044bce804ad0156097d04 (diff)
downloademacs-a88e5f0f199ad018d57d07016dce20e5462dbbca.tar.gz
emacs-a88e5f0f199ad018d57d07016dce20e5462dbbca.zip
better compilation unit definition
Diffstat (limited to 'src')
-rw-r--r--src/alloc.c6
-rw-r--r--src/comp.h3
-rw-r--r--src/lisp.h6
3 files changed, 5 insertions, 10 deletions
diff --git a/src/alloc.c b/src/alloc.c
index d47f9c8a574..5e0b04b1cc7 100644
--- a/src/alloc.c
+++ b/src/alloc.c
@@ -6572,13 +6572,9 @@ mark_object (Lisp_Object arg)
6572 struct Lisp_Subr *subr = XSUBR (obj); 6572 struct Lisp_Subr *subr = XSUBR (obj);
6573 mark_object (subr->native_comp_u); 6573 mark_object (subr->native_comp_u);
6574 } 6574 }
6575 break;
6576 case PVEC_NATIVE_COMP_UNIT:
6577 set_vector_marked (ptr);
6578 /* FIXME see comp.h. */
6579 mark_object (XNATIVE_COMP_UNIT (obj)->data_vec);
6580#endif 6575#endif
6581 break; 6576 break;
6577
6582 case PVEC_FREE: 6578 case PVEC_FREE:
6583 emacs_abort (); 6579 emacs_abort ();
6584 6580
diff --git a/src/comp.h b/src/comp.h
index 04c57278667..8b83911f53c 100644
--- a/src/comp.h
+++ b/src/comp.h
@@ -26,10 +26,11 @@ along with GNU Emacs. If not, see <https://www.gnu.org/licenses/>. */
26struct Lisp_Native_Comp_Unit 26struct Lisp_Native_Comp_Unit
27{ 27{
28 union vectorlike_header header; 28 union vectorlike_header header;
29 /* Analogous to the constant vector but per compilation unit. */
30 Lisp_Object data_vec;
29 /* Compilation unit file descriptor and handle. */ 31 /* Compilation unit file descriptor and handle. */
30 int fd; 32 int fd;
31 dynlib_handle_ptr handle; 33 dynlib_handle_ptr handle;
32 Lisp_Object data_vec; /* FIXME this should be in the normal lisp slot. */
33}; 34};
34 35
35INLINE bool 36INLINE bool
diff --git a/src/lisp.h b/src/lisp.h
index 2e4a6c89846..81ccae5683f 100644
--- a/src/lisp.h
+++ b/src/lisp.h
@@ -4773,10 +4773,8 @@ INLINE Lisp_Object
4773make_native_comp_u (int fd, dynlib_handle_ptr handle) 4773make_native_comp_u (int fd, dynlib_handle_ptr handle)
4774{ 4774{
4775 struct Lisp_Native_Comp_Unit *x = 4775 struct Lisp_Native_Comp_Unit *x =
4776 (struct Lisp_Native_Comp_Unit *) allocate_pseudovector ( 4776 ALLOCATE_ZEROED_PSEUDOVECTOR (struct Lisp_Native_Comp_Unit, data_vec,
4777 VECSIZE (struct Lisp_Native_Comp_Unit), 4777 PVEC_NATIVE_COMP_UNIT);
4778 0, VECSIZE (struct Lisp_Native_Comp_Unit),
4779 PVEC_NATIVE_COMP_UNIT);
4780 x->fd = fd; 4778 x->fd = fd;
4781 x->handle = handle; 4779 x->handle = handle;
4782 Lisp_Object cu; 4780 Lisp_Object cu;