From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Pip Cet Newsgroups: gmane.emacs.bugs Subject: bug#46847: 28.0.50; [native-comp] assume pseudo-insns should be verified Date: Fri, 5 Mar 2021 16:09:20 +0000 Message-ID: References: Mime-Version: 1.0 Content-Type: text/plain; charset="UTF-8" Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1199"; mail-complaints-to="usenet@ciao.gmane.io" To: 46847@debbugs.gnu.org Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Fri Mar 05 17:11:27 2021 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane-mx.org Original-Received: from lists.gnu.org ([209.51.188.17]) by ciao.gmane.io with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.92) (envelope-from ) id 1lID30-0000EF-Da for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Mar 2021 17:11:26 +0100 Original-Received: from localhost ([::1]:33258 helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1lID2z-0001jW-Fx for geb-bug-gnu-emacs@m.gmane-mx.org; Fri, 05 Mar 2021 11:11:25 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]:44072) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1lID2g-0001dE-UM for bug-gnu-emacs@gnu.org; Fri, 05 Mar 2021 11:11:06 -0500 Original-Received: from debbugs.gnu.org ([209.51.188.43]:51926) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1lID2d-0002je-Ko for bug-gnu-emacs@gnu.org; Fri, 05 Mar 2021 11:11:06 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1lID2d-0005G9-HB for bug-gnu-emacs@gnu.org; Fri, 05 Mar 2021 11:11:03 -0500 X-Loop: help-debbugs@gnu.org Resent-From: Pip Cet Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Fri, 05 Mar 2021 16:11:03 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 46847 X-GNU-PR-Package: emacs Original-Received: via spool by 46847-submit@debbugs.gnu.org id=B46847.161496061520131 (code B ref 46847); Fri, 05 Mar 2021 16:11:03 +0000 Original-Received: (at 46847) by debbugs.gnu.org; 5 Mar 2021 16:10:15 +0000 Original-Received: from localhost ([127.0.0.1]:35235 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lID1q-0005EX-RI for submit@debbugs.gnu.org; Fri, 05 Mar 2021 11:10:15 -0500 Original-Received: from mail-ot1-f45.google.com ([209.85.210.45]:36589) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1lID1l-0005E6-6i for 46847@debbugs.gnu.org; Fri, 05 Mar 2021 11:10:09 -0500 Original-Received: by mail-ot1-f45.google.com with SMTP id t16so2286396ott.3 for <46847@debbugs.gnu.org>; Fri, 05 Mar 2021 08:10:09 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20161025; h=mime-version:references:in-reply-to:from:date:message-id:subject:to; bh=VN7s3cnIH+cxWFiCH0VayCulyCxglHPtZDxD6gHTsVo=; b=Wd9OdD6D+BC3MkA2rIxjl7xp4ncOLalRDDPhBXqHNocZ8T+iP5ZUGz7cN0XwY0eWpB VzWdMyPILQfJGSoS20+eY3ZCNSYQREQfTr5LCUy0A2gxtV5wvGOtYg1b8Ld8sy79sbja QeHmp6JwrUHyPGiqEs2ECj3AN3EkLA8YSENuctjS8TnBEnQjUKq2vpH+yTgtRzwZ/Xbg QElNfeN5ngTQi6/7q0wC9DqGqhWiMKfy3IPmHLXRYKR0xfHS9Abd36xwY7Mj76soYfMj pUmi6L14gXMGszXG7bRrfLrNKxLHqQY70GA6HB9VyCeTvNtFZD1UdnuPiTz118wTc5up QJ2Q== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20161025; h=x-gm-message-state:mime-version:references:in-reply-to:from:date :message-id:subject:to; bh=VN7s3cnIH+cxWFiCH0VayCulyCxglHPtZDxD6gHTsVo=; b=HHW8V8/N9szRIrmX5lV9bRg1gTJJdZCP9ibB1yt2XsrIJpyAcIKSJPvxsfY8kkkUyj Rgzjy/aZF0M3XgHv7p6du+2slnvBG4Q4eyfUz1ZHK98ppwv0ryGUXw5nyS/bBe2DzJSN w8tdIHaARCVnpRkjwn/aahoGuZPZnkI8aJaJJHTXOn8/gjwvduGwvjEsdGIshaAtuMho kIZsJbGY77T8UcA81a/+arEjMrKiVkjM0uj+gnn6tKhRaBqRBrG5OodKcpyr+0Em6KnO HT1tG0u3bTpevwjrm1+TsY+tG2V4MkWq8r+KgMqz2ManNu8EuxVedBmAyUAKvuwOGp40 MXdg== X-Gm-Message-State: AOAM532SRPVtcj1GzuS6ibAKFGnpVAOQ/k2pPpgy5z3QH0DAtjJnw2k8 UyCHa0bHsVO4l3QGgdSr2MBYWdCEXfdjiBtLbv/o5t3nzr3LYA== X-Google-Smtp-Source: ABdhPJyDXK6mPx5k/DQnQBmj7Kkku+tmlBje08vClj1V8F+blvhFZuGj2RmErygMQv6iA/8nD8Ofz8Fu1rFpu8KyffY= X-Received: by 2002:a05:6830:11d4:: with SMTP id v20mr8501012otq.287.1614960603641; Fri, 05 Mar 2021 08:10:03 -0800 (PST) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.18 Precedence: list X-BeenThere: bug-gnu-emacs@gnu.org List-Id: "Bug reports for GNU Emacs, the Swiss army knife of text editors" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Original-Sender: "bug-gnu-emacs" Xref: news.gmane.io gmane.emacs.bugs:201560 Archived-At: On Mon, Mar 1, 2021 at 1:08 PM Pip Cet 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