all messages for Emacs-related lists mirrored at yhetil.org
 help / color / mirror / code / Atom feed
From: Eli Zaretskii <eliz@gnu.org>
To: "Mattias Engdegård" <mattiase@acm.org>
Cc: emacs-devel@gnu.org
Subject: Re: master 3ed79cd: Separate bytecode stack
Date: Sun, 13 Mar 2022 20:50:22 +0200	[thread overview]
Message-ID: <83h781lma9.fsf@gnu.org> (raw)
In-Reply-To: <447E1D53-FA02-4776-9730-507BCA1993FA@acm.org> (message from Mattias Engdegård on Sun, 13 Mar 2022 19:44:22 +0100)

> 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?



  reply	other threads:[~2022-03-13 18:50 UTC|newest]

Thread overview: 9+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2022-03-13 17:39 master 3ed79cd: Separate bytecode stack Eli Zaretskii
2022-03-13 18:44 ` Mattias Engdegård
2022-03-13 18:50   ` Eli Zaretskii [this message]
2022-03-14 15:56     ` Mattias Engdegård
2022-03-14 17:15       ` Eli Zaretskii
2022-03-15 14:20         ` Mattias Engdegård
2022-03-15 14:42           ` Eli Zaretskii
2022-03-15 15:08             ` Robert Pluim
2022-03-15 19:29             ` Stefan Monnier

Reply instructions:

You may reply publicly to this message via plain-text email
using any one of the following methods:

* Save the following mbox file, import it into your mail client,
  and reply-to-all from there: mbox

  Avoid top-posting and favor interleaved quoting:
  https://en.wikipedia.org/wiki/Posting_style#Interleaved_style

* Reply using the --to, --cc, and --in-reply-to
  switches of git-send-email(1):

  git send-email \
    --in-reply-to=83h781lma9.fsf@gnu.org \
    --to=eliz@gnu.org \
    --cc=emacs-devel@gnu.org \
    --cc=mattiase@acm.org \
    /path/to/YOUR_REPLY

  https://kernel.org/pub/software/scm/git/docs/git-send-email.html

* If your mail client supports setting the In-Reply-To header
  via mailto: links, try the mailto: link
Be sure your reply has a Subject: header at the top and a blank line before the message body.
Code repositories for project(s) associated with this external index

	https://git.savannah.gnu.org/cgit/emacs.git
	https://git.savannah.gnu.org/cgit/emacs/org-mode.git

This is an external index of several public inboxes,
see mirroring instructions on how to clone and mirror
all data and code used by this external index.