Added optimizations for most operators, and 'cornermath' option.

Only remaining operators are < <= > >= &.
This commit is contained in:
Sei Lisa 2015-02-28 18:30:04 +01:00
parent 1440f7811e
commit 6ea01c4242
2 changed files with 125 additions and 29 deletions

View file

@ -52,6 +52,9 @@ class optimizer(foldconst, renamer, deadcode):
self.constfold = 'constfold' in options
self.dcr = 'dcr' in options
# Math that works fine except in rare corner-cases can be optimized.
self.cornermath = 'cornermath' in options
tree, symtab = self.tree, self.symtab = treesymtab
self.globalmode = False