]> granicus.if.org Git - python/commit
Teach the peepholer to fold unary operations on constants.
authorRaymond Hettinger <python@rcn.com>
Sun, 20 Feb 2005 12:46:54 +0000 (12:46 +0000)
committerRaymond Hettinger <python@rcn.com>
Sun, 20 Feb 2005 12:46:54 +0000 (12:46 +0000)
commitafd842f5b262bfe5e2e2e53762d748b5da6caf2c
tree9f9a7b567735efff9ea61825e4fb875e47c89c8b
parent80121491e083a3e80d482f73d201590083285d57
Teach the peepholer to fold unary operations on constants.

Afterwards, -0.5 loads in a single step and no longer requires a runtime
UNARY_NEGATIVE operation.
Lib/test/test_peepholer.py