From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.io!.POSTED.blaine.gmane.org!not-for-mail From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Newsgroups: gmane.emacs.bugs Subject: bug#67116: byte-compile-let: reversing the order of evaluation of the clauses CAN make a difference Date: Sun, 12 Nov 2023 15:21:32 +0100 Message-ID: <2324648E-F860-4D57-A7A9-CF0F4F9DB57E@gmail.com> References: Mime-Version: 1.0 (Mac OS X Mail 14.0 \(3654.120.0.1.15\)) Content-Type: text/plain; charset=us-ascii Content-Transfer-Encoding: quoted-printable Injection-Info: ciao.gmane.io; posting-host="blaine.gmane.org:116.202.254.214"; logging-data="1037"; mail-complaints-to="usenet@ciao.gmane.io" Cc: 67116@debbugs.gnu.org, Stefan Monnier To: Alan Mackenzie Original-X-From: bug-gnu-emacs-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Sun Nov 12 15:22:30 2023 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 1r2BM5-00007U-RA for geb-bug-gnu-emacs@m.gmane-mx.org; Sun, 12 Nov 2023 15:22:29 +0100 Original-Received: from localhost ([::1] helo=lists1p.gnu.org) by lists.gnu.org with esmtp (Exim 4.90_1) (envelope-from ) id 1r2BLy-0002Sw-KR; Sun, 12 Nov 2023 09:22:22 -0500 Original-Received: from eggs.gnu.org ([2001:470:142:3::10]) by lists.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_256_GCM_SHA384:256) (Exim 4.90_1) (envelope-from ) id 1r2BLx-0002SY-9i for bug-gnu-emacs@gnu.org; Sun, 12 Nov 2023 09:22:21 -0500 Original-Received: from debbugs.gnu.org ([2001:470:142:5::43]) by eggs.gnu.org with esmtps (TLS1.2:ECDHE_RSA_AES_128_GCM_SHA256:128) (Exim 4.90_1) (envelope-from ) id 1r2BLx-0002RU-1q for bug-gnu-emacs@gnu.org; Sun, 12 Nov 2023 09:22:21 -0500 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.84_2) (envelope-from ) id 1r2BMb-0006yw-Vt for bug-gnu-emacs@gnu.org; Sun, 12 Nov 2023 09:23:02 -0500 X-Loop: help-debbugs@gnu.org In-Reply-To: Resent-From: Mattias =?UTF-8?Q?Engdeg=C3=A5rd?= Original-Sender: "Debbugs-submit" Resent-CC: bug-gnu-emacs@gnu.org Resent-Date: Sun, 12 Nov 2023 14:23:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 67116 X-GNU-PR-Package: emacs Original-Received: via spool by 67116-submit@debbugs.gnu.org id=B67116.169979894726794 (code B ref 67116); Sun, 12 Nov 2023 14:23:01 +0000 Original-Received: (at 67116) by debbugs.gnu.org; 12 Nov 2023 14:22:27 +0000 Original-Received: from localhost ([127.0.0.1]:55253 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r2BM3-0006y4-6w for submit@debbugs.gnu.org; Sun, 12 Nov 2023 09:22:27 -0500 Original-Received: from mail-lf1-x12f.google.com ([2a00:1450:4864:20::12f]:49421) by debbugs.gnu.org with esmtp (Exim 4.84_2) (envelope-from ) id 1r2BLx-0006xn-M3 for 67116@debbugs.gnu.org; Sun, 12 Nov 2023 09:22:26 -0500 Original-Received: by mail-lf1-x12f.google.com with SMTP id 2adb3069b0e04-507973f3b65so5082343e87.3 for <67116@debbugs.gnu.org>; Sun, 12 Nov 2023 06:21:40 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=gmail.com; s=20230601; t=1699798895; x=1700403695; darn=debbugs.gnu.org; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:sender:from:to:cc:subject:date :message-id:reply-to; bh=igvfhSed5PrxblQd0bJ9i+HhHgFideWKuf6TfErTgzM=; b=L/70ScNcnVcnelQReut0j2nYibRXVgYnfqjqunpWUb068Eo/y/DsdYsJFBVZ2k/WXR widlURc9g0ZHHlEpQQzqHE0fgxlsuhHdGfjkKLJ3O6BrlWwhee70a8gaK4KzrK0siEau rc6BRZCSH+fKc2E7nXLsYREL/k5p8d1iftq9PRzChZnlgv1fB62U1/q7nj1mE6fVY5ms r+blTxDdMU0OYX+5VfOVz5oBaoVzso4zASinj3/IS2a+JOBIhhzuQ6rirDu8OV8Uo3e/ TLWUW8sbDWc7gPlyzp6tE0sMTShtr7ojM7HZkkzeDcU0UkKNpUlT9P9TuQXDSVxNkjdD x41g== X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20230601; t=1699798895; x=1700403695; h=to:cc:date:message-id:subject:mime-version :content-transfer-encoding:from:sender:x-gm-message-state:from:to:cc :subject:date:message-id:reply-to; bh=igvfhSed5PrxblQd0bJ9i+HhHgFideWKuf6TfErTgzM=; b=lEUxSjtLkaEYBVQpxE3OcnRlhE2qLXMTxQDonMJnH6dRCsdcO3H4hbanyzyjfcTvtU MRuf4j3MyNwklMj0IGzGFFyC0aYXh6Osg3HmxLuCUWqdV9pPILqCW4+w0vDoCpefNuAn 14EK7RMptr+3lL+6Lq74xN9JysGQtFowT7qW/JWtnhduQ/H3aJJda7n3ZF/5HsBgqYWv TofJ+Jju/SDadKQMeUvmSNybfNptu1j+RKizqrISniMPgG4iOumcJiQm6EtJrejXNFIf JlvZhiiW6CPXSQzWP4kNI5iPw3aGK1WevSaNg502zsfPN7g1Ghq8y0JcM/HdfE4oGT61 jrBA== X-Gm-Message-State: AOJu0Yxjsd35Q9k6guThciC0jeK4gV1OA54fdaQJPVRVxZt6glLPc4qF 5vbZFctPsm89b9n1ZCNdDLg= X-Google-Smtp-Source: AGHT+IHrKw0lcfPmqooEDcTTfLHnCBi+B1O0TjK+SNRhdhe/fnjvWq2myUXA8ptilJmBEke+9noDGw== X-Received: by 2002:ac2:4426:0:b0:509:fc7:8853 with SMTP id w6-20020ac24426000000b005090fc78853mr2468153lfl.12.1699798894453; Sun, 12 Nov 2023 06:21:34 -0800 (PST) Original-Received: from smtpclient.apple (c188-150-165-235.bredband.tele2.se. [188.150.165.235]) by smtp.gmail.com with ESMTPSA id h6-20020a056512054600b00504816564c7sm631602lfl.104.2023.11.12.06.21.33 (version=TLS1_2 cipher=ECDHE-ECDSA-AES128-GCM-SHA256 bits=128/128); Sun, 12 Nov 2023 06:21:33 -0800 (PST) X-Mailer: Apple Mail (2.3654.120.0.1.15) 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-bounces+geb-bug-gnu-emacs=m.gmane-mx.org@gnu.org Xref: news.gmane.io gmane.emacs.bugs:274203 Archived-At: > (let > ((beg pos) > (end (setq pos > = (next-single-property-change > pos 'fontified > nil (point-max))))) > (put-text-property beg end 'fontified nil) > (jit-lock-fontify-now beg end)) >=20 > gets byte compiled, the order of evaluating BEG and END gets reversed = so > that END gets evaluated first. Since the value for END contains (setq > pos ...), BEG gets this updated value of POS rather then the original > intended value. No, the generated code looks correct. Do you have any reason to believe = it's not? (Of course I always blame the compiler first. It's programmer = tradition!)