GNU bug report logs -
#46847
28.0.50; [native-comp] assume pseudo-insns should be verified
Previous Next
Reported by: Pip Cet <pipcet <at> gmail.com>
Date: Mon, 1 Mar 2021 13:08:01 UTC
Severity: normal
Found in version 28.0.50
Done: Andrea Corallo <acorallo <at> gnu.org>
Bug is archived. No further changes may be made.
Full log
Message #17 received at 46847 <at> debbugs.gnu.org (full text, mbox):
On Mon, Mar 1, 2021 at 1:08 PM Pip Cet <pipcet <at> 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
This bug report was last modified 1 year and 145 days ago.
Previous Next
GNU bug tracking system
Copyright (C) 1999 Darren O. Benham,
1997,2003 nCipher Corporation Ltd,
1994-97 Ian Jackson.