unofficial mirror of emacs-devel@gnu.org 
 help / color / mirror / code / Atom feed
From: "Gerd Möllmann" <gerd.moellmann@gmail.com>
To: "K. Handa" <handa@gnu.org>
Cc: Stefan Monnier <monnier@iro.umontreal.ca>,  emacs-devel@gnu.org
Subject: Re: Question about DEFVAR_LISP_NOPRO
Date: Sat, 18 May 2024 15:22:53 +0200	[thread overview]
Message-ID: <m234qfgspe.fsf@pro2.fritz.box> (raw)
In-Reply-To: <87ed9z8f96.fsf@aist.go.jp> (K. Handa's message of "Sat, 18 May 2024 21:40:37 +0900")

"K. Handa" <handa@gnu.org> writes:

> In article <jwvil0vbx6t.fsf-monnier+emacs@gnu.org>, Stefan Monnier <monnier@iro.umontreal.ca> writes:
>
>> >   DEFVAR_LISP_NOPRO ("font-weight-table", Vfont_weight_table,
>> >                  doc: /*  Vector of valid font weight values. ... */);
>> >     Vfont_weight_table = BUILD_STYLE_TABLE (weight_table);
>> >     make_symbol_constant (intern_c_string ("font-weight-table"));
>> >
>> > Here a symbol is defined which has a value that is forwarded to the
>> > static globals.f_Vfont_weight_table, but that static is not staticpro'd.
>> >
>> > My question is simply: What the heck?
>
>> I think only Kenichi knows the real answer (commit d0ab1ebe49f7), but my
>> guess is that it was just an optimization because those vars always
>> refer to each of the three elements of the `font_style_table` which *is*
>> gcpro'd and is not exposed to ELisp so we know that a non-moving GC doesn't
>> need to know about those vars.
>
> As far as I remember, Stefan is right, it was for optimization.

Thanks.



      reply	other threads:[~2024-05-18 13:22 UTC|newest]

Thread overview: 8+ messages / expand[flat|nested]  mbox.gz  Atom feed  top
2024-04-05 15:10 Question about DEFVAR_LISP_NOPRO Gerd Möllmann
2024-04-05 16:24 ` Stefan Monnier
2024-04-05 16:37   ` Gerd Möllmann
2024-04-05 17:16     ` Stefan Monnier
2024-04-05 18:15       ` Gerd Möllmann
2024-04-05 18:16         ` Stefan Monnier
2024-05-18 12:40   ` K. Handa
2024-05-18 13:22     ` Gerd Möllmann [this message]

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

  List information: https://www.gnu.org/software/emacs/

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

  git send-email \
    --in-reply-to=m234qfgspe.fsf@pro2.fritz.box \
    --to=gerd.moellmann@gmail.com \
    --cc=emacs-devel@gnu.org \
    --cc=handa@gnu.org \
    --cc=monnier@iro.umontreal.ca \
    /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 public inbox

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

This is a public inbox, see mirroring instructions
for how to clone and mirror all data and code used for this inbox;
as well as URLs for read-only IMAP folder(s) and NNTP newsgroup(s).