[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-janitors] #1620: Some let bindings are not replaced resulti
From: |
Chicken Trac |
Subject: |
Re: [Chicken-janitors] #1620: Some let bindings are not replaced resulting in unnecessary CPS calls |
Date: |
Wed, 29 May 2019 14:49:46 -0000 |
#1620: Some let bindings are not replaced resulting in unnecessary CPS calls
---------------------------------+-------------------
Reporter: sjamaan | Owner:
Type: defect | Status: new
Priority: major | Milestone: 5.2
Component: compiler | Version: 5.0.0
Resolution: | Keywords:
Estimated difficulty: hard |
---------------------------------+-------------------
Comment (by sjamaan):
Note: The `let` bindings are actually necessary when the arguments of `=`
are impure; you want side-effects or exceptions to happen before calling
`=`. The expanded generated code contains a shortcutting `C_and` call
introduced by `fold-boolean` and each of the arguments except the first
and the last are repeated twice, so if we got rid of the `let` completely,
the resulting code would not be semantically equivalent.
However, if they just alias other variables, I think they should always be
replacable.
--
Ticket URL: <https://bugs.call-cc.org/ticket/1620#comment:2>
CHICKEN Scheme <https://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.