From f730843762ab60b1d7886e93e5f38d229b23cf83 Mon Sep 17 00:00:00 2001 From: Sei Lisa Date: Thu, 5 Mar 2015 06:20:11 +0100 Subject: [PATCH] More TODO tweaking. --- lslopt/lslfoldconst.py | 7 +++---- lslopt/lsljson.py | 2 +- 2 files changed, 4 insertions(+), 5 deletions(-) diff --git a/lslopt/lslfoldconst.py b/lslopt/lslfoldconst.py index 9e7e8d7..d562626 100644 --- a/lslopt/lslfoldconst.py +++ b/lslopt/lslfoldconst.py @@ -193,8 +193,7 @@ class foldconst(object): if subexpr['nt'] == 'CONST': node = parent[index] = subexpr node['value'] = int(not node['value']) - # TODO: Missing comparison optimization - # !(i>const) to i<(const+1) if no overflow (4 variants) + # TODO: !(i>const) to i<(const+1) if no overflow (4 variants) return if nt == '~': @@ -418,7 +417,7 @@ class foldconst(object): # same as above, join them # FIXME: Isn't this covered by the associative sum above? - pass # TODO: implement + pass # TODO: implement const + (expr + const) or const + (const + expr) if rnt == 'CONST': # Swap the vars to deal with const in lval always @@ -853,7 +852,7 @@ class foldconst(object): return if nt == 'IF': - # TODO: Swap IF/ELSE if both present and nonempty and cond starts with ! + # TODO: Swap IF/ELSE if both present and cond starts with ! self.FoldTree(child, 0) self.FoldCond(child, 0) if child[0]['nt'] == 'CONST': diff --git a/lslopt/lsljson.py b/lslopt/lsljson.py index 27ff91e..3db4c3f 100644 --- a/lslopt/lsljson.py +++ b/lslopt/lsljson.py @@ -597,7 +597,7 @@ def llJsonSetValue(json, lst, val): # Recursive works best here return InternalJsonRecursiveSetValue(json, lst, val) - return u"----unimplemented----" # TODO: Implement llJsonSetValue. + return u"----unimplemented----" ''' def llJsonValueType(json, lst):