[#144] Optimize some specific PUSHes, improve other rules
Description
Problem: some specific constants can be pushed more efficiently than using PUSH. E. g. empty map.
Solution: add corresponding rules to the optimizer (for unit, empty map and empty set).
Also this MR improves some existing rules.
It turned out to be hard to remove SWAP
in front of commutative operations, it will be done later.
Related issue(s)
Resolves part of #144 (closed)
✅ Checklist for your Merge Request
Related changes (conditional)
-
Tests (see short guidelines)
-
If I added new functionality, I added tests covering it. -
If I fixed a bug, I added a regression test to prevent the bug from silently reappearing again.
-
-
Documentation
Stylistic guide (mandatory)
-
My commits comply with the following policy. -
My code complies with the style guide.
Edited by Ivan Gromakovskii