From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!.POSTED!not-for-mail From: Alan Mackenzie Newsgroups: gmane.emacs.devel Subject: scratch/accurate-warning-pos: First tentative successes. Date: Sat, 17 Nov 2018 12:45:34 +0000 Message-ID: <20181117124534.GA8831@ACM> NNTP-Posting-Host: blaine.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii X-Trace: blaine.gmane.org 1542458802 14935 195.159.176.226 (17 Nov 2018 12:46:42 GMT) X-Complaints-To: usenet@blaine.gmane.org NNTP-Posting-Date: Sat, 17 Nov 2018 12:46:42 +0000 (UTC) User-Agent: Mutt/1.10.1 (2018-07-13) Cc: Michael Heerdegen , =?iso-8859-1?Q?Cl=E9ment?= Pit-Claudel , emacs-devel@gnu.org To: Eli Zaretskii , Stefan Monnier Original-X-From: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Sat Nov 17 13:46:38 2018 Return-path: Envelope-to: ged-emacs-devel@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by blaine.gmane.org with esmtp (Exim 4.84_2) (envelope-from ) id 1gNzzg-0003lI-I3 for ged-emacs-devel@m.gmane.org; Sat, 17 Nov 2018 13:46:36 +0100 Original-Received: from localhost ([::1]:49063 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gO01n-0003f4-2k for ged-emacs-devel@m.gmane.org; Sat, 17 Nov 2018 07:48:47 -0500 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:38914) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1gO013-0003ew-Bx for emacs-devel@gnu.org; Sat, 17 Nov 2018 07:48:02 -0500 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1gO010-0000bR-4H for emacs-devel@gnu.org; Sat, 17 Nov 2018 07:48:01 -0500 Original-Received: from colin.muc.de ([193.149.48.1]:29917 helo=mail.muc.de) by eggs.gnu.org with smtp (Exim 4.71) (envelope-from ) id 1gO00z-0000aq-UF for emacs-devel@gnu.org; Sat, 17 Nov 2018 07:47:58 -0500 Original-Received: (qmail 68318 invoked by uid 3782); 17 Nov 2018 12:47:56 -0000 Original-Received: from acm.muc.de (p5B14645E.dip0.t-ipconnect.de [91.20.100.94]) by colin.muc.de (tmda-ofmipd) with ESMTP; Sat, 17 Nov 2018 13:47:54 +0100 Original-Received: (qmail 9293 invoked by uid 1000); 17 Nov 2018 12:45:34 -0000 Content-Disposition: inline X-Delivery-Agent: TMDA/1.1.12 (Macallan) X-Primary-Address: acm@muc.de X-detected-operating-system: by eggs.gnu.org: FreeBSD 9.x [fuzzy] X-Received-From: 193.149.48.1 X-BeenThere: emacs-devel@gnu.org X-Mailman-Version: 2.1.21 Precedence: list List-Id: "Emacs development discussions." List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: emacs-devel-bounces+ged-emacs-devel=m.gmane.org@gnu.org Original-Sender: "Emacs-devel" Xref: news.gmane.org gmane.emacs.devel:231214 Archived-At: Hello, Eli and Stefan. I have just committed another commit to scratch/accurate-warning-pos. It now "works"! To see this, create one or both of these test files: (i) winkler.el, from bug #9109: (unwind-protect (let ((foo "foo")) (insert foo)) (setq foo "bar")) (ii) pit-claudel.el, from bug #22288: (defun test () (let (a)) a) Then build the SW, start it (with or without -Q) and run the byte compiler with the current mechanism for warnings: M-: (byte-compile-file "~/winkler.el") . Then run the byte compiler again, with the new mechanism: M-: (let ((symbols-with-pos-enabled t)) (byte-compile-file "~/winkler.el")) . Note the positions in the warning messages. Eli, in bug #24128, you complained that in compiling progmodes/gud-mi.el and progmodes/gud.el, you got warning message positions which were clearly wrong. Would it be possible to reconstruct the versions of those files which gave these errors? It would be great to be able to try them out on this new software. However... This approach to fixing the bug has disadvantages, namely: (i) The meanings of `eq' and `symbolp' have been modified. (ii) It has slowed Emacs down somewhat. (By about 8% in an unoptimised build; I haven't yet timed an optimsed build). On the other hand... Given the difficulty of the problem, there is probably no way of solving it without such disadvantages. We've searched for and explored several alternatives, and none of them were good. And the approach in scratch/accurate-warning-pos DOES solve all these bugs, not being in any sense a workaround. There might well be optimisations which could reduce the slowdown. So.... Are we going to carry on developing this thing, with a view to integrating it into Emacs, or are we not? It would be good to decide this before spending much more time on it. -- Alan Mackenzie (Nuremberg, Germany).