Execute context optimizations
This commit is contained in:
parent
4337e6073e
commit
67d050e07d
@ -82,10 +82,10 @@ def optimize_all(expression: Union[str, Node], rels: ContextDict, specific: bool
|
|||||||
total = 0
|
total = 0
|
||||||
if specific:
|
if specific:
|
||||||
for i in optimizations.specific_optimizations:
|
for i in optimizations.specific_optimizations:
|
||||||
res = i(n, rels) # Performs the optimization
|
n, c = recursive_scan(i, n, rels)
|
||||||
if res != 0 and dbg:
|
if c != 0 and dbg:
|
||||||
debug.append(str(n))
|
debug.append(str(n))
|
||||||
total += res
|
total += c
|
||||||
if general:
|
if general:
|
||||||
for i in optimizations.general_optimizations:
|
for i in optimizations.general_optimizations:
|
||||||
n, c = recursive_scan(i, n, None)
|
n, c = recursive_scan(i, n, None)
|
||||||
|
Loading…
x
Reference in New Issue
Block a user