[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: [Chicken-janitors] #1330: spock generates unreachable code
From: |
Chicken Trac |
Subject: |
Re: [Chicken-janitors] #1330: spock generates unreachable code |
Date: |
Sun, 02 Oct 2016 16:02:26 -0000 |
#1330: spock generates unreachable code
-----------------------------------+-------------------------------------
Reporter: mario | Owner: felix
Type: defect | Status: new
Priority: major | Milestone: someday
Component: extensions | Version: 4.11.0
Resolution: | Keywords: spock, unreachable code
Estimated difficulty: |
-----------------------------------+-------------------------------------
Comment (by felix):
Can you try the attached Patch? The reason for these assignments is that
the compiler does not detect whether conditional branches return. The
patch avoids an assignment to variable if the branch has an unspecified
result. The variable declared before the conditional (holding the result
of either branch) is initialized to undefined anyway, so this should work
as before.
There may be more cases of dead assignments, but this patch should
eliminate most.
--
Ticket URL: <https://bugs.call-cc.org/ticket/1330#comment:1>
CHICKEN Scheme <https://www.call-cc.org/>
CHICKEN Scheme is a compiler for the Scheme programming language.