mirror of
https://github.com/Sei-Lisa/LSL-PyOptimizer
synced 2025-07-01 15:48:21 +00:00
Warn about float constants that can't be represented in globals. Also don't duplicate the globals warnings.
This commit is contained in:
parent
c1d837674c
commit
59cdd64228
2 changed files with 16 additions and 7 deletions
|
@ -82,7 +82,7 @@ class optimizer(foldconst, renamer, deadcode):
|
|||
self.globalmode = False
|
||||
|
||||
if self.constfold:
|
||||
self.FoldScript()
|
||||
self.FoldScript(warningpass=False)
|
||||
|
||||
if self.dcr:
|
||||
self.RemoveDeadCode()
|
||||
|
@ -90,7 +90,7 @@ class optimizer(foldconst, renamer, deadcode):
|
|||
# Make another fold pass, since RemoveDeadCode can embed expressions
|
||||
# into other expressions and generate unoptimized code.
|
||||
if self.constfold:
|
||||
self.FoldScript()
|
||||
self.FoldScript(warningpass=True)
|
||||
|
||||
if self.shrinknames:
|
||||
self.ShrinkNames()
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue