[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: master 3ed79cd: Separate bytecode stack
From: |
Eli Zaretskii |
Subject: |
Re: master 3ed79cd: Separate bytecode stack |
Date: |
Sun, 13 Mar 2022 20:50:22 +0200 |
> From: Mattias Engdegård <mattiase@acm.org>
> Date: Sun, 13 Mar 2022 19:44:22 +0100
> Cc: Emacs-Devel <emacs-devel@gnu.org>
>
> 13 mars 2022 kl. 18.39 skrev Eli Zaretskii <eliz@gnu.org>:
> >
> > This changeset causes compilation warning in a 32-bit build in which
> > !LISP_WORDS_ARE_POINTERS and which was configured --with-wide-int:
> >
> > In file included from bytecode.c:22:
> > bytecode.c: In function 'sf_set_ptr':
> > bytecode.c:396:20: warning: cast from pointer to integer of different size
> > [-Wpointer-to-int-cast]
> > 396 | fp[index] = XIL ((EMACS_INT)value);
>
> Thank you for testing this configuration! Silly mistake of mine; please try
> with the pushed change.
The warning is gone, but I cannot say I'm happy with the code, see
below.
> > More generally, I'm quite nervous to see void * pointers and integers
> > being put into the same array.
>
> Actually what we are doing is storing arbitrary pointers in a Lisp_Object,
> and this should always be possible.
I don't think I understand why you need to do this in the first place.
XLP was introduced for very specific and very rare situations, and I
don't see why we would need in this case to use something similar.
What am I missing? What kind of pointers do you need to store in the
fp array, why, and for what purpose? And if you do need to do that,
why not use a union?
- Re: master 3ed79cd: Separate bytecode stack, Eli Zaretskii, 2022/03/13
- Re: master 3ed79cd: Separate bytecode stack, Mattias Engdegård, 2022/03/13
- Re: master 3ed79cd: Separate bytecode stack,
Eli Zaretskii <=
- Re: master 3ed79cd: Separate bytecode stack, Mattias Engdegård, 2022/03/14
- Re: master 3ed79cd: Separate bytecode stack, Eli Zaretskii, 2022/03/14
- Re: master 3ed79cd: Separate bytecode stack, Mattias Engdegård, 2022/03/15
- Re: master 3ed79cd: Separate bytecode stack, Eli Zaretskii, 2022/03/15
- Re: master 3ed79cd: Separate bytecode stack, Robert Pluim, 2022/03/15
- Re: master 3ed79cd: Separate bytecode stack, Stefan Monnier, 2022/03/15