From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Shigeru Fukaya Newsgroups: gmane.emacs.bugs Subject: bug#18767: 24.4; incorrect byte-compile on arithmatic comparisons Date: Wed, 22 Oct 2014 18:16:42 +0900 Message-ID: <50CFEDD8E4FAF2shigeru.fukaya@gmail.com> References: <4CCFEB0DE4728Cshigeru.fukaya@gmail.com> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: 7bit X-Trace: ger.gmane.org 1413969448 3683 80.91.229.3 (22 Oct 2014 09:17:28 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Wed, 22 Oct 2014 09:17:28 +0000 (UTC) Cc: 18767@debbugs.gnu.org To: Stefan Monnier Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Wed Oct 22 11:17:21 2014 Return-path: Envelope-to: geb-bug-gnu-emacs@m.gmane.org Original-Received: from lists.gnu.org ([208.118.235.17]) by plane.gmane.org with esmtp (Exim 4.69) (envelope-from ) id 1Xgs2j-0005cv-7h for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Oct 2014 11:17:21 +0200 Original-Received: from localhost ([::1]:55737 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xgs2i-0007y9-OE for geb-bug-gnu-emacs@m.gmane.org; Wed, 22 Oct 2014 05:17:20 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:59770) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xgs2Y-0007x3-Ak for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 05:17:17 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1Xgs2Q-0001KV-QK for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 05:17:10 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:38806) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1Xgs2Q-0001KR-N5 for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 05:17:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1Xgs2P-0008Jv-OA for bug-gnu-emacs@gnu.org; Wed, 22 Oct 2014 05:17:01 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Shigeru Fukaya Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Wed, 22 Oct 2014 09:17:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 18767 X-GNU-PR-Package: emacs X-GNU-PR-Keywords: Original-Received: via spool by 18767-submit@debbugs.gnu.org id=B18767.141396941131958 (code B ref 18767); Wed, 22 Oct 2014 09:17:01 +0000 Original-Received: (at 18767) by debbugs.gnu.org; 22 Oct 2014 09:16:51 +0000 Original-Received: from localhost ([127.0.0.1]:59137 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xgs2E-0008JN-Rv for submit@debbugs.gnu.org; Wed, 22 Oct 2014 05:16:51 -0400 Original-Received: from mail-pa0-f47.google.com ([209.85.220.47]:59354) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1Xgs2D-0008JB-9h for 18767@debbugs.gnu.org; Wed, 22 Oct 2014 05:16:49 -0400 Original-Received: by mail-pa0-f47.google.com with SMTP id kq14so3294893pab.6 for <18767@debbugs.gnu.org>; Wed, 22 Oct 2014 02:16:43 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20120113; h=from:to:cc:subject:date:mime-version:content-type :content-transfer-encoding:in-reply-to:references:message-id; bh=PbicBSgtZDnSyDhXpnnNG9YV0bQYKPpTdcnQUDk+1SY=; b=vam/HfmUj93EHiGhdj1i3md/HdIz7hxzbyTpDFMbQ1xsVa+jkgHRvyDflOoOsnhmjS ZKj1/fU530a0zgK8hdhNoIOUcHdKKa0RQyp6kQ7sVbxE9ApuG0mbstw6xv9fW2Z6z/DU jgvhsBUt++6vFxdp148QM2lyh4jAhoaKzophRfBeHEBnjAHiNq5qegYl7Jxg1QUNDPix bEt2SH/6+KG3rTRNG42R+65hbdtskQWkUO0vPks6hWq6IiAOoZLT7mMlYna2i16An1uH ETYOyhnb6EgdSD3Gsd++g9F4HiK1MMtl3qK665fiPszQqUgJOHdcwq4kis5cDO/I49hb TXSw== X-Received: by 10.70.35.72 with SMTP id f8mr16965377pdj.134.1413969403176; Wed, 22 Oct 2014 02:16:43 -0700 (PDT) Original-Received: from gmail.com (115x125x38x6.ap115.ftth.ucom.ne.jp. [115.125.38.6]) by mx.google.com with ESMTPSA id cy9sm13907265pdb.28.2014.10.22.02.16.41 for (version=TLSv1 cipher=ECDHE-RSA-AES128-SHA bits=128/128); Wed, 22 Oct 2014 02:16:42 -0700 (PDT) X-Mailer: HidemaruMail 6.30 (WinNT,602) In-Reply-To: X-BeenThere: debbugs-submit@debbugs.gnu.org X-Mailman-Version: 2.1.15 Precedence: list X-detected-operating-system: by eggs.gnu.org: GNU/Linux 3.x X-Received-From: 140.186.70.43 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.org@gnu.org Original-Sender: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.emacs.bugs:94899 I think your change of reversion will cause byte-compile error when more than two args are specified. Maybe you had better call byte-compile-normal-call for that case at least. >loop over all args, doing "byte-compile-form" + "dup", and then apply >the comparisons backward, combining them with "and". Alternative is, If non-first args are all constants or simple reference, fold them with AND, otherwise call them at once by byte-compile-normal-call. Shigeru >Version:24.5 > >> byte-compile of arithmatic comparison operators on more than two >> arguments is incorrect. > >Indeed, I was not very awake when I committed that code. I just >reverted the change so the byte-compiler simply doesn't optimize this case. >To do any better, I think we'll have to do something like: > >loop over all args, doing "byte-compile-form" + "dup", and then apply >the comparisons backward, combining them with "and". > > > Stefan