From mboxrd@z Thu Jan 1 00:00:00 1970 Path: news.gmane.org!not-for-mail From: Ian Price Newsgroups: gmane.lisp.guile.bugs Subject: bug#15533: optimizing away noticeable effects Date: Mon, 07 Oct 2013 17:55:36 +0100 Message-ID: <877gdpc96f.fsf@Kagami.home> References: <87bo33cybo.fsf@Kagami.home> <87ioxba2el.fsf@netris.org> <87eh7za1ko.fsf@netris.org> <871u3yaoor.fsf@netris.org> <87siwe97gy.fsf@netris.org> NNTP-Posting-Host: plane.gmane.org Mime-Version: 1.0 Content-Type: text/plain X-Trace: ger.gmane.org 1381164972 25273 80.91.229.3 (7 Oct 2013 16:56:12 GMT) X-Complaints-To: usenet@ger.gmane.org NNTP-Posting-Date: Mon, 7 Oct 2013 16:56:12 +0000 (UTC) Cc: 15533@debbugs.gnu.org To: Mark H Weaver Original-X-From: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Mon Oct 07 18:56:14 2013 Return-path: Envelope-to: guile-bugs@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 1VTE6Q-0005L0-D7 for guile-bugs@m.gmane.org; Mon, 07 Oct 2013 18:56:14 +0200 Original-Received: from localhost ([::1]:60860 helo=lists.gnu.org) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTE6Q-0000FS-0s for guile-bugs@m.gmane.org; Mon, 07 Oct 2013 12:56:14 -0400 Original-Received: from eggs.gnu.org ([2001:4830:134:3::10]:44259) by lists.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTE6I-0000F5-Qq for bug-guile@gnu.org; Mon, 07 Oct 2013 12:56:11 -0400 Original-Received: from Debian-exim by eggs.gnu.org with spam-scanned (Exim 4.71) (envelope-from ) id 1VTE6E-0004a1-B1 for bug-guile@gnu.org; Mon, 07 Oct 2013 12:56:06 -0400 Original-Received: from debbugs.gnu.org ([140.186.70.43]:52364) by eggs.gnu.org with esmtp (Exim 4.71) (envelope-from ) id 1VTE6E-0004Zw-6v for bug-guile@gnu.org; Mon, 07 Oct 2013 12:56:02 -0400 Original-Received: from Debian-debbugs by debbugs.gnu.org with local (Exim 4.80) (envelope-from ) id 1VTE6D-0005CZ-Vx for bug-guile@gnu.org; Mon, 07 Oct 2013 12:56:02 -0400 X-Loop: help-debbugs@gnu.org Resent-From: Ian Price Original-Sender: "Debbugs-submit" Resent-CC: bug-guile@gnu.org Resent-Date: Mon, 07 Oct 2013 16:56:01 +0000 Resent-Message-ID: Resent-Sender: help-debbugs@gnu.org X-GNU-PR-Message: followup 15533 X-GNU-PR-Package: guile X-GNU-PR-Keywords: Original-Received: via spool by 15533-submit@debbugs.gnu.org id=B15533.138116494619974 (code B ref 15533); Mon, 07 Oct 2013 16:56:01 +0000 Original-Received: (at 15533) by debbugs.gnu.org; 7 Oct 2013 16:55:46 +0000 Original-Received: from localhost ([127.0.0.1]:60657 helo=debbugs.gnu.org) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VTE5x-0005C5-8p for submit@debbugs.gnu.org; Mon, 07 Oct 2013 12:55:45 -0400 Original-Received: from mail-wi0-f172.google.com ([209.85.212.172]:59883) by debbugs.gnu.org with esmtp (Exim 4.80) (envelope-from ) id 1VTE5u-0005Bv-Bj for 15533@debbugs.gnu.org; Mon, 07 Oct 2013 12:55:43 -0400 Original-Received: by mail-wi0-f172.google.com with SMTP id hn9so5158586wib.5 for <15533@debbugs.gnu.org>; Mon, 07 Oct 2013 09:55:41 -0700 (PDT) DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=googlemail.com; s=20120113; h=from:to:cc:subject:references:date:in-reply-to:message-id :user-agent:mime-version:content-type; bh=wdeA9M29+3kWJmHF+LraActBJExpDNkTxDjW4J9JJEE=; b=uaw+7QGIUYiMm20kwPoQFnjpK2EFU1LV5FxrXGgv4iqtodnAk/xsbpj/COzEvxmHUg boQxKkfaZcNBZuwenorwgtGbqfIIB4XB1M9ScytLWRPxtYOYUL9ol8YIKongl8tKEv3F Kq7SgGMSoYROT8vw4PI2SZtgd3fGS9IE9oSsRtFsQvC5OysRMfbk0NWwS9s+DsRLv1NI buPWFvwxVyIftmIOVxoDxlYalJYlWep4zVqop8izYranZBpVABuS1Z3qUDdE0kWOGqPf duEilfKSSZISZBl50HKMu8MlNJ4mWRD67drk8X3MhxIAMlmpmEHCm14QbnSqlecrZp4+ L/qw== X-Received: by 10.180.9.139 with SMTP id z11mr6278892wia.22.1381164941362; Mon, 07 Oct 2013 09:55:41 -0700 (PDT) Original-Received: from Kagami.home (host86-132-92-201.range86-132.btcentralplus.com. [86.132.92.201]) by mx.google.com with ESMTPSA id ft19sm5125736wic.5.1969.12.31.16.00.00 (version=TLSv1.2 cipher=RC4-SHA bits=128/128); Mon, 07 Oct 2013 09:55:40 -0700 (PDT) In-Reply-To: <87siwe97gy.fsf@netris.org> (Mark H. Weaver's message of "Sun, 06 Oct 2013 03:36:13 -0400") User-Agent: Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) 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-guile@gnu.org List-Id: "Bug reports for GUILE, GNU's Ubiquitous Extension Language" List-Unsubscribe: , List-Archive: List-Post: List-Help: List-Subscribe: , Errors-To: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Original-Sender: bug-guile-bounces+guile-bugs=m.gmane.org@gnu.org Xref: news.gmane.org gmane.lisp.guile.bugs:7299 Archived-At: Mark H Weaver writes: > Using git bisect, I've determined that this bug was introduced in the > following commit: > > commit d21537efb4a0edea30a7ab801909207d4bb69030 > Author: Andy Wingo > Date: Fri Feb 15 12:11:29 2013 +0100 > > better inlining of `apply' with rest arguments > > * module/language/tree-il/peval.scm (peval): Move up the find-definition > helper. Use it to speculatively destructure conses and lists into the > tail position of an `apply' form. > > * test-suite/tests/peval.test ("partial evaluation"): Add tests. Thanks for bisecting mark, I've had a little look and this is the right patch. The actual error occurs at the very beginning of the loop, in the variable tail*. Originally, this was a call (for-value tail), which returned a lexical-ref. Now it is a call (find-definition tail) which returns a const (). We obviously need to have a check for mutability when referring to a variable, the question is where? Does it make sense to add it to find-definition? or should we add it before the use in that case? -- Ian Price -- shift-reset.com "Programming is like pinball. The reward for doing it well is the opportunity to do it again" - from "The Wizardy Compiled"