From: Pip Cet <pipcet@gmail.com>
To: 46847@debbugs.gnu.org
Subject: bug#46847: 28.0.50; [native-comp] assume pseudo-insns should be verified
Date: Fri, 5 Mar 2021 16:09:20 +0000 [thread overview]
Message-ID: <CAOqdjBchKORocf17e_DYO2vUrkJ9PdakASL_cqdUBbh6cOzcag@mail.gmail.com> (raw)
In-Reply-To: <CAOqdjBc+ch3KY0ChrLBR3vWyS4eXQgUQQKHzeQRwMv18aFER9A@mail.gmail.com>
On Mon, Mar 1, 2021 at 1:08 PM Pip Cet <pipcet@gmail.com> wrote:
> I would like to add an optional compiler pass which asserts that the
> conditions are actually true at runtime. This is a basic safeguard
> that any assume() mechanism should have, and it's perfectly equivalent
> to the way eassume() becomes eassert() in debug builds of Emacs.
I've proceeded to change things so I can assert assumes, and here's an
incomplete list of the bugs I've found so far:
Function types:
1. append has type (function (&rest t) t), not (function (&rest list) list)
2. aref has type (function (t fixnum) t), not (function (array fixnum) t)
3. bool-vector-count-consecutive has type (function (bool-vector
boolean integer) fixnum), not (function (bool-vector bool-vector
integer) fixnum))
4. at least some of the frame-* functions accept nil parameters
5. intern-soft has type (function ((or string symbol) &optional
vector) symbol), not (function (string &optional vector) symbol)
6. length has type (function (t) integer), not (function (sequence) integer)
7. at least some of the minibuffer functions can return nil as well as a window.
8. nthcdr has type (function (integer t) t), not (function (integer list) list)
9. radians-to-degrees is a macro and probably shouldn't have a function type
10. string has type (function (&rest fixnum) string), not (function
(&rest fixnum) strng)
11. user-full-name has type (function (&optional integer) (or string
null)), not (function (&optional integer) string)
Predicate types:
1. functionp isn't equivalent to (or function symbol)
Other:
1. comp-lambda-list-gen has to allow optional arguments to be nil even
if explicitly specified.
Furthermore, I've already reported some other bugs.
So I think this is worth pursuing further.
Pip
next prev parent reply other threads:[~2021-03-05 16:09 UTC|newest]
Thread overview: 11+ messages / expand[flat|nested] mbox.gz Atom feed top
2021-03-01 13:06 bug#46847: 28.0.50; [native-comp] assume pseudo-insns should be verified Pip Cet
2021-03-01 20:12 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-02 6:57 ` Pip Cet
2021-03-05 11:16 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-05 16:09 ` Pip Cet [this message]
2021-03-05 19:36 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2021-03-14 21:07 ` Andrea Corallo via Bug reports for GNU Emacs, the Swiss army knife of text editors
2024-03-20 9:30 ` Andrea Corallo
2024-03-20 13:05 ` Eli Zaretskii
2024-03-20 13:58 ` Andrea Corallo
2024-03-20 14:09 ` Eli Zaretskii
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=CAOqdjBchKORocf17e_DYO2vUrkJ9PdakASL_cqdUBbh6cOzcag@mail.gmail.com \
--to=pipcet@gmail.com \
--cc=46847@debbugs.gnu.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 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).