##// END OF EJS Templates
revset: comment that we can't swap 'or' operands by weight...
Yuya Nishihara -
r25307:4d1e56b2 default
parent child Browse files
Show More
@@ -2162,8 +2162,10 b' def optimize(x, small):'
2162 2162 elif op == 'or':
2163 2163 wa, ta = optimize(x[1], False)
2164 2164 wb, tb = optimize(x[2], False)
2165 if wb < wa:
2166 wb, wa = wa, wb
2165 # we can't reorder trees by weight because it would change the order.
2166 # ("sort(a + b)" == "sort(b + a)", but "a + b" != "b + a")
2167 # if wb < wa:
2168 # tb, ta = ta, tb
2167 2169 return max(wa, wb), (op, ta, tb)
2168 2170 elif op == 'not':
2169 2171 # Optimize not public() to _notpublic() because we have a fast version
General Comments 0
You need to be logged in to leave comments. Login now