From 6813bb04582cb783024ce67fef4e2e418e447b7d Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Sat, 28 Mar 2015 20:14:17 +0100 Subject: [PATCH] Make the second pass of FoldScript look a bit more logic. --- lslopt/lsloptimizer.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/lslopt/lsloptimizer.py b/lslopt/lsloptimizer.py index 205f798..b7c005e 100644 --- a/lslopt/lsloptimizer.py +++ b/lslopt/lsloptimizer.py @@ -87,10 +87,10 @@ class optimizer(foldconst, renamer, deadcode): if self.dcr: self.RemoveDeadCode() - # Make another fold pass, since RemoveDeadCode can embed expressions - # into other expressions and generate unoptimized code. - if self.constfold and self.dcr: - self.FoldScript(warningpass=True) + # Make another fold pass, since RemoveDeadCode can embed expressions + # into other expressions and generate unoptimized code. + if self.constfold: + self.FoldScript(warningpass=True) if self.shrinknames: self.ShrinkNames()