[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
bug#15533: optimizing away noticeable effects
From: |
Ian Price |
Subject: |
bug#15533: optimizing away noticeable effects |
Date: |
Mon, 07 Oct 2013 17:55:36 +0100 |
User-agent: |
Gnus/5.13 (Gnus v5.13) Emacs/24.1 (gnu/linux) |
Mark H Weaver <address@hidden> writes:
> Using git bisect, I've determined that this bug was introduced in the
> following commit:
>
> commit d21537efb4a0edea30a7ab801909207d4bb69030
> Author: Andy Wingo <address@hidden>
> 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"