-
Notifications
You must be signed in to change notification settings - Fork 55
tippers, squads, experts
Ori Roth edited this page Apr 2, 2017
·
3 revisions
-
- Converts cast to
doubleby multiplying by1.0 - Applies arithmetical operations at compile time
- Careful not to divide by zero and not mod zero.
- Relies on the type engine
- Multiplication by zero? Remove whole when item has no side effect.
- Converts cast to
-
- Clever pushdown
- changes
equals - convert
X.toString()toX + ""when possible - convert
X.toString()to `"" + X' when above not possible - moves
""to end when possible - remove concatenation of empty string
- contains
-
- Compare to
true/false - and with
true, eliminate - or with
false, eliminate -
X && false: convert to false when possible, i.e., X has no side effect -
X || true: convert to false when possible, i.e., X has no side effect
- Compare to
-
- inline when possible
- ternarize when possible
- early return
- sequencers
-
Push into initiliazers
-
Move last into updaters
-
Condition on return
-
Unification tipper
-
Fall through tipper
-
Sorting in a group of identical cases: tipper
-
Sorting cases by sequencer level
-
Remove empty switch
-
- remove empty finally
- remove empty try
-
- dollar
- cent
-
- Generic name
- Pluarlization
-
- sort annotations
- sort modifiers
- remove redundant modifiers
-
extract tail
-
extract head
-
extract segment
-
extract loop