diff --git a/lslopt/lslfoldconst.py b/lslopt/lslfoldconst.py index da9f523..c03ebbb 100644 --- a/lslopt/lslfoldconst.py +++ b/lslopt/lslfoldconst.py @@ -1784,7 +1784,6 @@ class foldconst(object): # If type(X) != Key, then: # if (X) ; else {stuff} -> if (!X) {stuff} - # (being careful with labels again) if child[0].t != 'key': # We've already converted all other types to equivalent # comparisons @@ -1849,10 +1848,9 @@ class foldconst(object): if child[1].nt == 'CONST': # FOR is delicate. It can have multiple expressions at start. # And if there is more than one, these expressions will need a - # new block, which means new scope, which is dangerous. - # They are expressions, no declarations or labels allowed, thus - # no new identifiers may be created in the new scope, but it - # still feels dodgy. + # new block, which means new scope. They are expressions, no + # declarations or labels allowed, thus no new identifiers may + # be created in the new scope. if lslfuncs.cond(child[1].value): # Endless loop. Traverse the loop and the iterator. self.FoldTree(child, 3) diff --git a/testparser.py b/testparser.py index aeff2d7..2bdf086 100644 --- a/testparser.py +++ b/testparser.py @@ -540,9 +540,6 @@ class Test03_Optimizer(UnitTestCase): self.opt.optimize(p) out = self.outscript.output(p) print out - # FIXME: DCR produces invalid code, thinks the while can be eliminated - # due to the jump jumping past it. Extremely corner case, but maybe - # worth a fix. def tearDown(self): del self.parser