From: Stefan Monnier <monnier@iro.umontreal.ca>
To: Pip Cet <pipcet@gmail.com>
Cc: Eli Zaretskii <eliz@gnu.org>, emacs-devel@gnu.org
Subject: Re: master d582356: * src/fns.c (Frandom): Handle bignum `limit`s
Date: Sun, 07 Mar 2021 13:37:39 -0500 [thread overview]
Message-ID: <jwvr1kq95po.fsf-monnier+emacs@gnu.org> (raw)
In-Reply-To: <CAOqdjBdw5L+h7V4LH=FHEcOStGMnOVK_koaEZ7Ktfe7p=jTxHQ@mail.gmail.com> (Pip Cet's message of "Sun, 7 Mar 2021 13:27:01 +0000")
>> I don't think I understand how will we know which function says it
>> never calls GC.
> By tagging it in the source code?
Random thoughts on this:
- AFAIK in the current code, the places where we can't run GC are much
more rare than the cases where we can run GC, so we'd be better off
trying to annotate the places where it can't happen.
- Those places are currently not annotated at all, by and large.
There are a few comments here and there stating that GC shouldn't
happen, but those comments shouldn't be trusted.
- The trend is to reduce the amount of code where GC cannot take place
[ I think and I hope. ]
- As you have noted some functions can be called in contexts where they
may GC and in other contexts where they may not GC. So we don't have
a clear static partitioning of the code. So maybe a dynamic-test
approach is the better option (it will rarely catch the unlikely
corner cases, but if it does catch them in their rare occurrences it'll
still help us diagnose those problems which tend to be very painful
to track down).
Stefan
next prev parent reply other threads:[~2021-03-07 18:37 UTC|newest]
Thread overview: 19+ messages / expand[flat|nested] mbox.gz Atom feed top
[not found] <20210305170955.27732.27579@vcs0.savannah.gnu.org>
[not found] ` <20210305170957.AF99920E1B@vcs0.savannah.gnu.org>
2021-03-05 19:42 ` master d582356: * src/fns.c (Frandom): Handle bignum `limit`s Pip Cet
2021-03-05 19:56 ` Stefan Monnier
2021-03-05 20:13 ` Pip Cet
2021-03-05 20:34 ` Stefan Monnier
2021-03-06 7:42 ` Pip Cet
2021-03-06 8:44 ` Eli Zaretskii
2021-03-06 9:44 ` Pip Cet
2021-03-06 10:56 ` Eli Zaretskii
2021-03-06 13:22 ` Pip Cet
2021-03-06 14:45 ` Eli Zaretskii
2021-03-07 13:27 ` Pip Cet
2021-03-07 14:04 ` Eli Zaretskii
2021-03-07 14:21 ` Pip Cet
2021-03-07 15:22 ` Eli Zaretskii
2021-03-07 17:23 ` Pip Cet
2021-03-07 17:47 ` Eli Zaretskii
2021-03-07 18:37 ` Stefan Monnier [this message]
2021-03-07 19:54 ` Andrea Corallo via Emacs development discussions.
2021-03-07 19:55 ` Pip Cet
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=jwvr1kq95po.fsf-monnier+emacs@gnu.org \
--to=monnier@iro.umontreal.ca \
--cc=eliz@gnu.org \
--cc=emacs-devel@gnu.org \
--cc=pipcet@gmail.com \
/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).